mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-36145 import latest YUI 3.7.3
This commit is contained in:
parent
7e8ae12a7a
commit
6df2abcf1a
@ -230,7 +230,7 @@ umask(0000);
|
||||
|
||||
// exact version of currently used yui2 and 3 library
|
||||
$CFG->yui2version = '2.9.0';
|
||||
$CFG->yui3version = '3.7.2';
|
||||
$CFG->yui3version = '3.7.3';
|
||||
|
||||
|
||||
// special support for highly optimised scripts that do not need libraries and DB connection
|
||||
|
@ -193,7 +193,7 @@
|
||||
<location>yui</location>
|
||||
<name>YUI</name>
|
||||
<license>BSD</license>
|
||||
<version>3.7.2</version>
|
||||
<version>3.7.3</version>
|
||||
<licenseversion></licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dataschema-xml",function(e,t){var n=e.Lang,r={1:!0,9:!0,11:!0},i;i={apply:function(e,t){var n=t,s={results:[],meta:{}};return n&&r[n.nodeType]&&e?(s=i._parseResults(e,n,s),s=i._parseMeta(e.metaFields,n,s)):s.error=new Error("XML schema parse failure"),s},_getLocationValue:function(t,n){var r=t.locator||t.key||t,s=n.ownerDocument||n,o,u,a=null;try{o=i._getXPathResult(r,n,s);while(u=o.iterateNext())a=u.textContent||u.value||u.text||u.innerHTML||null;return e.DataSchema.Base.parse.call(this,a,t)}catch(f){}return null},_getXPathResult:function(t,r,i){if(!n.isUndefined(i.evaluate))return i.evaluate(t,r,i.createNSResolver(r.ownerDocument?r.ownerDocument.documentElement:r.documentElement),0,null);var s=[],o=t.split(/\b\/\b/),u=0,a=o.length,f,l,c,h;try{i.setProperty("SelectionLanguage","XPath"),s=r.selectNodes(t)}catch(p){for(;u<a&&r;u++){f=o[u];if(f.indexOf("[")>-1&&f.indexOf("]")>-1)l=f.slice(f.indexOf("[")+1,f.indexOf("]")),l--,r=r.children[l],h=!0;else if(f.indexOf("@")>-1)l=f.substr(f.indexOf("@")),r=l?r.getAttribute(l.replace("@","")):r;else if(-1<f.indexOf("//"))l=r.getElementsByTagName(f.substr(2)),r=l.length?l[l.length-1]:null;else if(a!=u+1)for(c=r.childNodes.length-1;0<=c;c-=1)f===r.childNodes[c].tagName&&(r=r.childNodes[c],c=-1)}r&&(n.isString(r)?s[0]={value:r}:h?s[0]={value:r.innerHTML}:s=e.Array(r.childNodes,0,!0))}return{index:0,iterateNext:function(){if(this.index>=this.values.length)return undefined;var e=this.values[this.index];return this.index+=1,e},values:s}},_parseField:function(e,t,n){var r=e.key||e,s;e.schema?(s={results:[],meta:{}},s=i._parseResults(e.schema,n,s),t[r]=s.results):t[r]=i._getLocationValue(e,n)},_parseMeta:function(e,t,r){if(n.isObject(e)){var s,o=t.ownerDocument||t;for(s in e)e.hasOwnProperty(s)&&(r.meta[s]=i._getLocationValue(e[s],o))}return r},_parseResult:function(e,t){var n={},r;for(r=e.length-1;0<=r;r--)i._parseField(e[r],n,t);return n},_parseResults:function(e,t,r){if(e.resultListLocator&&n.isArray(e.resultFields)){var s=t.ownerDocument||t,o=e.resultFields,u=[],a,f,l=0;if(e.resultListLocator.match(/^[:\-\w]+$/)){f=t.getElementsByTagName(e.resultListLocator);for(l=f.length-1;l>=0;--l)u[l]=i._parseResult(o,f[l])}else{f=i._getXPathResult(e.resultListLocator,t,s);while(a=f.iterateNext())u[l]=i._parseResult(o,a),l+=1}u.length?r.results=u:r.error=new Error("XML schema result nodes retrieval failure")}return r}},e.DataSchema.XML=e.mix(i,e.DataSchema.Base)},"3.7.2",{requires:["dataschema-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("datatype-xml-format",function(e,t){var n=e.Lang;e.mix(e.namespace("XML"),{format:function(e){try{if(!n.isUndefined(XMLSerializer))return(new XMLSerializer).serializeToString(e)}catch(t){return e&&e.xml?e.xml:n.isValue(e)&&e.toString?e.toString():""}}}),e.namespace("DataType"),e.DataType.XML=e.XML},"3.7.2");
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("datatype-xml-parse",function(e,t){var n=e.Lang;e.mix(e.namespace("XML"),{parse:function(e){var t=null;if(n.isString(e))try{n.isUndefined(ActiveXObject)||(t=new ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.loadXML(e))}catch(r){try{n.isUndefined(DOMParser)||(t=(new DOMParser).parseFromString(e,"text/xml"))}catch(i){}}return n.isNull(t)||n.isNull(t.documentElement)||t.documentElement.nodeName==="parsererror",t}}),e.namespace("Parsers").xml=e.XML.parse,e.namespace("DataType"),e.DataType.XML=e.XML},"3.7.2");
|
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dd-constrain",function(e,t){var n="dragNode",r="offsetHeight",i="offsetWidth",s="host",o="tickXArray",u="tickYArray",a=e.DD.DDM,f="top",l="right",c="bottom",h="left",p="view",d=null,v="drag:tickAlignX",m="drag:tickAlignY",g=function(e){this._lazyAddAttrs=!1,g.superclass.constructor.apply(this,arguments)};g.NAME="ddConstrained",g.NS="con",g.ATTRS={host:{},stickX:{value:!1},stickY:{value:!1},tickX:{value:!1},tickY:{value:!1},tickXArray:{value:!1},tickYArray:{value:!1},gutter:{value:"0",setter:function(t){return e.DD.DDM.cssSizestoObject(t)}},constrain:{value:p,setter:function(t){var n=e.one(t);return n&&(t=n),t}},constrain2region:{setter:function(e){return this.set("constrain",e)}},constrain2node:{setter:function(t){return this.set("constrain",e.one(t))}},constrain2view:{setter:function(e){return this.set("constrain",p)}},cacheRegion:{value:!0}},d={_lastTickXFired:null,_lastTickYFired:null,initializer:function(){this._createEvents(),this._eventHandles=[this.get(s).on("drag:end",e.bind(this._handleEnd,this)),this.get(s).on("drag:start",e.bind(this._handleStart,this)),this.get(s).after("drag:align",e.bind(this.align,this)),this.get(s).after("drag:drag",e.bind(this.drag,this))]},destructor:function(){e.each(this._eventHandles,function(e,t){e.detach()}),this._eventHandles.length=0},_createEvents:function(){var t=[v,m];e.each(t,function(e,t){this.publish(e,{type:e,emitFacade:!0,bubbles:!0,queuable:!1,prefix:"drag"})},this)},_handleEnd:function(){this._lastTickYFired=null,this._lastTickXFired=null},_handleStart:function(){this.resetCache()},_regionCache:null,_cacheRegion:function(){this._regionCache=this.get("constrain").get("region")},resetCache:function(){this._regionCache=null},_getConstraint:function(){var t=this.get("constrain"),r=this.get("gutter"),i;t&&(t instanceof e.Node?(this._regionCache||(this._eventHandles.push(e.on("resize",e.bind(this._cacheRegion,this),e.config.win)),this._cacheRegion()),i=e.clone(this._regionCache),this.get("cacheRegion")||this.resetCache()):e.Lang.isObject(t)&&(i=e.clone(t)));if(!t||!i)t=p;return t===p&&(i=this.get(s).get(n).get("viewportRegion")),e.each(r,function(e,t){t==l||t==c?i[t]-=e:i[t]+=e}),i},getRegion:function(e){var t={},o=null,u=null,a=this.get(s);return t=this._getConstraint(),e&&(o=a.get(n).get(r),u=a.get(n).get(i),t[l]=t[l]-u,t[c]=t[c]-o),t},_checkRegion:function(e){var t=e,o=this.getRegion(),u=this.get(s),a=u.get(n).get(r),p=u.get(n).get(i);return t[1]>o[c]-a&&(e[1]=o[c]-a),o[f]>t[1]&&(e[1]=o[f]),t[0]>o[l]-p&&(e[0]=o[l]-p),o[h]>t[0]&&(e[0]=o[h]),e},inRegion:function(e){e=e||this.get(s).get(n).getXY();var t=this._checkRegion([e[0],e[1]]),r=!1;return e[0]===t[0]&&e[1]===t[1]&&(r=!0),r},align:function(){var e=this.get(s),t=[e.actXY[0],e.actXY[1]],n=this.getRegion(!0);this.get("stickX")&&(t[1]=e.startXY[1]-e.deltaXY[1]),this.get("stickY")&&(t[0]=e.startXY[0]-e.deltaXY[0]),n&&(t=this._checkRegion(t)),t=this._checkTicks(t,n),e.actXY=t},drag:function(t){var n=this.get(s),r=this.get("tickX"),i=this.get("tickY"),a=[n.actXY[0],n.actXY[1]];(e.Lang.isNumber(r)||this.get(o))&&this._lastTickXFired!==a[0]&&(this._tickAlignX(),this._lastTickXFired=a[0]),(e.Lang.isNumber(i)||this.get(u))&&this._lastTickYFired!==a[1]&&(this._tickAlignY(),this._lastTickYFired=a[1])},_checkTicks:function(e,t){var n=this.get(s),r=n.startXY[0]-n.deltaXY[0],i=n.startXY[1]-n.deltaXY[1],p=this.get("tickX"),d=this.get("tickY");return p&&!this.get(o)&&(e[0]=a._calcTicks(e[0],r,p,t[h],t[l])),d&&!this.get(u)&&(e[1]=a._calcTicks(e[1],i,d,t[f],t[c])),this.get(o)&&(e[0]=a._calcTickArray(e[0],this.get(o),t[h],t[l])),this.get(u)&&(e[1]=a._calcTickArray(e[1],this.get(u),t[f],t[c])),e},_tickAlignX:function(){this.fire(v)},_tickAlignY:function(){this.fire(m)}},e.namespace("Plugin"),e.extend(g,e.Base,d),e.Plugin.DDConstrained=g,e.mix(a,{_calcTicks:function(e,t,n,r,i){var s=(e-t)/n,o=Math.floor(s),u=Math.ceil(s);return(o!==0||u!==0)&&s>=o&&s<=u&&(e=t+n*o,r&&i&&(e<r&&(e=t+n*(o+1)),e>i&&(e=t+n*(o-1)))),e},_calcTickArray:function(e,t,n,r){var i=0,s=t.length,o=0,u,a,f;if(!t||t.length===0)return e;if(t[0]>=e)return t[0];for(i=0;i<s;i++){o=i+1;if(t[o]&&t[o]>=e)return u=e-t[i],a=t[o]-e,f=a>u?t[i]:t[o],n&&r&&f>r&&(t[i]?f=t[i]:f=t[s-1]),f}return t[t.length-1]}})},"3.7.2",{requires:["dd-drag"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dd-ddm-base",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)};n.NAME="ddm",n.ATTRS={dragCursor:{value:"move"},clickPixelThresh:{value:3},clickTimeThresh:{value:1e3},throttleTime:{value:-1},dragMode:{value:"point",setter:function(e){return this._setDragMode(e),e}}},e.extend(n,e.Base,{_createPG:function(){},_active:null,_setDragMode:function(t){t===null&&(t=e.DD.DDM.get("dragMode"));switch(t){case 1:case"intersect":return 1;case 2:case"strict":return 2;case 0:case"point":return 0}return 0},CSS_PREFIX:e.ClassNameManager.getClassName("dd"),_activateTargets:function(){},_drags:[],activeDrag:!1,_regDrag:function(e){return this.getDrag(e.get("node"))?!1:(this._active||this._setupListeners(),this._drags.push(e),!0)},_unregDrag:function(t){var n=[];e.each(this._drags,function(e,r){e!==t&&(n[n.length]=e)}),this._drags=n},_setupListeners:function(){this._createPG(),this._active=!0;var t=e.one(e.config.doc);t.on("mousemove",e.throttle(e.bind(this._docMove,this),this.get("throttleTime"))),t.on("mouseup",e.bind(this._end,this))},_start:function(){this.fire("ddm:start"),this._startDrag()},_startDrag:function(){},_endDrag:function(){},_dropMove:function(){},_end:function(){this.activeDrag&&(this._shimming=!1,this._endDrag(),this.fire("ddm:end"),this.activeDrag.end.call(this.activeDrag),this.activeDrag=null)},stopDrag:function(){return this.activeDrag&&this._end(),this},_shimming:!1,_docMove:function(e){this._shimming||this._move(e)},_move:function(e){this.activeDrag&&(this.activeDrag._move.call(this.activeDrag,e),this._dropMove())},cssSizestoObject:function(e){var t=e.split(" ");switch(t.length){case 1:t[1]=t[2]=t[3]=t[0];break;case 2:t[2]=t[0],t[3]=t[1];break;case 3:t[3]=t[1]}return{top:parseInt(t[0],10),right:parseInt(t[1],10),bottom:parseInt(t[2],10),left:parseInt(t[3],10)}},getDrag:function(t){var n=!1,r=e.one(t);return r instanceof e.Node&&e.each(this._drags,function(e,t){r.compareTo(e.get("node"))&&(n=e)}),n},swapPosition:function(t,n){t=e.DD.DDM.getNode(t),n=e.DD.DDM.getNode(n);var r=t.getXY(),i=n.getXY();return t.setXY(i),n.setXY(r),t},getNode:function(t){return t instanceof e.Node?t:(t&&t.get?e.Widget&&t instanceof e.Widget?t=t.get("boundingBox"):t=t.get("node"):t=e.one(t),t)},swapNode:function(t,n){t=e.DD.DDM.getNode(t),n=e.DD.DDM.getNode(n);var r=n.get("parentNode"),i=n.get("nextSibling");return i==t?r.insertBefore(t,n):n==t.get("nextSibling")?r.insertBefore(n,t):(t.get("parentNode").replaceChild(n,t),r.insertBefore(t,i)),t}}),e.namespace("DD"),e.DD.DDM=new n},"3.7.2",{requires:["node","base","yui-throttle","classnamemanager"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dd-ddm-drop",function(e,t){e.mix(e.DD.DDM,{_noShim:!1,_activeShims:[],_hasActiveShim:function(){return this._noShim?!0:this._activeShims.length},_addActiveShim:function(e){this._activeShims[this._activeShims.length]=e},_removeActiveShim:function(t){var n=[];e.each(this._activeShims,function(e,r){e._yuid!==t._yuid&&(n[n.length]=e)}),this._activeShims=n},syncActiveShims:function(t){e.later(0,this,function(t){var n=t?this.targets:this._lookup();e.each(n,function(e,t){e.sizeShim.call(e)},this)},t)},mode:0,POINT:0,INTERSECT:1,STRICT:2,useHash:!0,activeDrop:null,validDrops:[],otherDrops:{},targets:[],_addValid:function(e){return this.validDrops[this.validDrops.length]=e,this},_removeValid:function(t){var n=[];return e.each(this.validDrops,function(e,r){e!==t&&(n[n.length]=e)}),this.validDrops=n,this},isOverTarget:function(e){if(this.activeDrag&&e){var t=this.activeDrag.mouseXY,n,r=this.activeDrag.get("dragMode"),i,s=e.shim;if(t&&this.activeDrag){i=this.activeDrag.region;if(r==this.STRICT)return this.activeDrag.get("dragNode").inRegion(e.region,!0,i);if(e&&e.shim)return r==this.INTERSECT&&this._noShim?(n=i||this.activeDrag.get("node"),e.get("node").intersect(n,e.region).inRegion):(this._noShim&&(s=e.get("node")),s.intersect({top:t[1],bottom:t[1],left:t[0],right:t[0]},e.region).inRegion)}}return!1},clearCache:function(){this.validDrops=[],this.otherDrops={},this._activeShims=[]},_activateTargets:function(){this._noShim=!0,this.clearCache(),e.each(this.targets,function(e,t){e._activateShim([]),e.get("noShim")==1&&(this._noShim=!1)},this),this._handleTargetOver()},getBestMatch:function(t,n){var r=null,i=0,s;return e.each(t,function(e,t){var n=this.activeDrag.get("dragNode").intersect(e.get("node"));e.region.area=n.area,n.inRegion&&n.area>i&&(i=n.area,r=e)},this),n?(s=[],e.each(t,function(e,t){e!==r&&(s[s.length]=e)},this),[r,s]):r},_deactivateTargets:function(){var t=[],n,r=this.activeDrag,i=this.activeDrop;r&&i&&this.otherDrops[i]?(r.get("dragMode")?(n=this.getBestMatch(this.otherDrops,!0),i=n[0],t=n[1]):(t=this.otherDrops,delete t[i]),r.get("node").removeClass(this.CSS_PREFIX+"-drag-over"),i&&(i.fire("drop:hit",{drag:r,drop:i,others:t}),r.fire("drag:drophit",{drag:r,drop:i,others:t}))):r&&r.get("dragging")&&(r.get("node").removeClass(this.CSS_PREFIX+"-drag-over"),r.fire("drag:dropmiss",{pageX:r.lastXY[0],pageY:r.lastXY[1]})),this.activeDrop=null,e.each(this.targets,function(e,t){e._deactivateShim([])},this)},_dropMove:function(){this._hasActiveShim()?this._handleTargetOver():e.each(this.otherDrops,function(e,t){e._handleOut.apply(e,[])})},_lookup:function(){if(!this.useHash||this._noShim)return this.validDrops;var t=[];return e.each(this.validDrops,function(e,n){e.shim&&e.shim.inViewportRegion(!1,e.region)&&(t[t.length]=e)}),t},_handleTargetOver:function(){var t=this._lookup();e.each(t,function(e,t){e._handleTargetOver.call(e)},this)},_regTarget:function(e){this.targets[this.targets.length]=e},_unregTarget:function(t){var n=[],r;e.each(this.targets,function(e,r){e!=t&&(n[n.length]=e)},this),this.targets=n,r=[],e.each(this.validDrops,function(e,n){e!==t&&(r[r.length]=e)}),this.validDrops=r},getDrop:function(t){var n=!1,r=e.one(t);return r instanceof e.Node&&e.each(this.targets,function(e,t){r.compareTo(e.get("node"))&&(n=e)}),n}},!0)},"3.7.2",{requires:["dd-ddm"]});
|
@ -1,203 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
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/dd-ddm/dd-ddm.js"] = {
|
||||
lines: {},
|
||||
functions: {},
|
||||
coveredLines: 0,
|
||||
calledLines: 0,
|
||||
coveredFunctions: 0,
|
||||
calledFunctions: 0,
|
||||
path: "build/dd-ddm/dd-ddm.js",
|
||||
code: []
|
||||
};
|
||||
_yuitest_coverage["build/dd-ddm/dd-ddm.js"].code=["YUI.add('dd-ddm', function (Y, NAME) {","",""," /**"," * Extends the dd-ddm-base Class to add support for the viewport shim to allow a draggable node to drag to be dragged over an iframe or any other node that traps mousemove events."," * It is also required to have Drop Targets enabled, as the viewport shim will contain the shims for the Drop Targets."," * @module dd"," * @submodule dd-ddm"," * @for DDM"," * @namespace DD"," */"," Y.mix(Y.DD.DDM, {"," /**"," * @private"," * @property _pg"," * @description The shim placed over the screen to track the mousemove event."," * @type {Node}"," */"," _pg: null,"," /**"," * @private"," * @property _debugShim"," * @description Set this to true to set the shims opacity to .5 for debugging it, default: false."," * @type {Boolean}"," */"," _debugShim: false,"," _activateTargets: function() { },"," _deactivateTargets: function() {},"," _startDrag: function() {"," if (this.activeDrag && this.activeDrag.get('useShim')) {"," this._shimming = true;"," this._pg_activate();"," this._activateTargets();"," }"," },"," _endDrag: function() {"," this._pg_deactivate();"," this._deactivateTargets();"," },"," /**"," * @private"," * @method _pg_deactivate"," * @description Deactivates the shim"," */"," _pg_deactivate: function() {"," this._pg.setStyle('display', 'none');"," },"," /**"," * @private"," * @method _pg_activate"," * @description Activates the shim"," */"," _pg_activate: function() {"," if (!this._pg) {"," this._createPG();"," }"," var ah = this.activeDrag.get('activeHandle'), cur = 'auto';"," if (ah) {"," cur = ah.getStyle('cursor');"," }"," if (cur == 'auto') {"," cur = this.get('dragCursor');"," }"," "," this._pg_size();"," this._pg.setStyles({"," top: 0,"," left: 0,"," display: 'block',"," opacity: ((this._debugShim) ? '.5' : '0'),"," cursor: cur"," });"," },"," /**"," * @private"," * @method _pg_size"," * @description Sizes the shim on: activatation, window:scroll, window:resize"," */"," _pg_size: function() {"," if (this.activeDrag) {"," var b = Y.one('body'),"," h = b.get('docHeight'),"," w = b.get('docWidth');"," this._pg.setStyles({"," height: h + 'px',"," width: w + 'px'"," });"," }"," },"," /**"," * @private"," * @method _createPG"," * @description Creates the shim and adds it's listeners to it."," */"," _createPG: function() {"," var pg = Y.Node.create('<div></div>'),"," bd = Y.one('body'), win;"," pg.setStyles({"," top: '0',"," left: '0',"," position: 'absolute',"," zIndex: '9999',"," overflow: 'hidden',"," backgroundColor: 'red',"," display: 'none',"," height: '5px',"," width: '5px'"," });"," pg.set('id', Y.stamp(pg));"," pg.addClass(Y.DD.DDM.CSS_PREFIX + '-shim');"," bd.prepend(pg);"," this._pg = pg;"," this._pg.on('mousemove', Y.throttle(Y.bind(this._move, this), this.get('throttleTime')));"," this._pg.on('mouseup', Y.bind(this._end, this));"," "," win = Y.one('win');"," Y.on('window:resize', Y.bind(this._pg_size, this));"," win.on('scroll', Y.bind(this._pg_size, this));"," } "," }, true);","","","","","}, '3.7.2', {\"requires\": [\"dd-ddm-base\", \"event-resize\"]});"];
|
||||
_yuitest_coverage["build/dd-ddm/dd-ddm.js"].lines = {"1":0,"12":0,"30":0,"31":0,"32":0,"33":0,"37":0,"38":0,"46":0,"54":0,"55":0,"57":0,"58":0,"59":0,"61":0,"62":0,"65":0,"66":0,"80":0,"81":0,"84":0,"96":0,"98":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"116":0,"117":0,"118":0};
|
||||
_yuitest_coverage["build/dd-ddm/dd-ddm.js"].functions = {"_startDrag:29":0,"_endDrag:36":0,"_pg_deactivate:45":0,"_pg_activate:53":0,"_pg_size:79":0,"_createPG:95":0,"(anonymous 1):1":0};
|
||||
_yuitest_coverage["build/dd-ddm/dd-ddm.js"].coveredLines = 32;
|
||||
_yuitest_coverage["build/dd-ddm/dd-ddm.js"].coveredFunctions = 7;
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 1);
|
||||
YUI.add('dd-ddm', function (Y, NAME) {
|
||||
|
||||
|
||||
/**
|
||||
* Extends the dd-ddm-base Class to add support for the viewport shim to allow a draggable node to drag to be dragged over an iframe or any other node that traps mousemove events.
|
||||
* It is also required to have Drop Targets enabled, as the viewport shim will contain the shims for the Drop Targets.
|
||||
* @module dd
|
||||
* @submodule dd-ddm
|
||||
* @for DDM
|
||||
* @namespace DD
|
||||
*/
|
||||
_yuitest_coverfunc("build/dd-ddm/dd-ddm.js", "(anonymous 1)", 1);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 12);
|
||||
Y.mix(Y.DD.DDM, {
|
||||
/**
|
||||
* @private
|
||||
* @property _pg
|
||||
* @description The shim placed over the screen to track the mousemove event.
|
||||
* @type {Node}
|
||||
*/
|
||||
_pg: null,
|
||||
/**
|
||||
* @private
|
||||
* @property _debugShim
|
||||
* @description Set this to true to set the shims opacity to .5 for debugging it, default: false.
|
||||
* @type {Boolean}
|
||||
*/
|
||||
_debugShim: false,
|
||||
_activateTargets: function() { },
|
||||
_deactivateTargets: function() {},
|
||||
_startDrag: function() {
|
||||
_yuitest_coverfunc("build/dd-ddm/dd-ddm.js", "_startDrag", 29);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 30);
|
||||
if (this.activeDrag && this.activeDrag.get('useShim')) {
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 31);
|
||||
this._shimming = true;
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 32);
|
||||
this._pg_activate();
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 33);
|
||||
this._activateTargets();
|
||||
}
|
||||
},
|
||||
_endDrag: function() {
|
||||
_yuitest_coverfunc("build/dd-ddm/dd-ddm.js", "_endDrag", 36);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 37);
|
||||
this._pg_deactivate();
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 38);
|
||||
this._deactivateTargets();
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @method _pg_deactivate
|
||||
* @description Deactivates the shim
|
||||
*/
|
||||
_pg_deactivate: function() {
|
||||
_yuitest_coverfunc("build/dd-ddm/dd-ddm.js", "_pg_deactivate", 45);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 46);
|
||||
this._pg.setStyle('display', 'none');
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @method _pg_activate
|
||||
* @description Activates the shim
|
||||
*/
|
||||
_pg_activate: function() {
|
||||
_yuitest_coverfunc("build/dd-ddm/dd-ddm.js", "_pg_activate", 53);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 54);
|
||||
if (!this._pg) {
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 55);
|
||||
this._createPG();
|
||||
}
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 57);
|
||||
var ah = this.activeDrag.get('activeHandle'), cur = 'auto';
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 58);
|
||||
if (ah) {
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 59);
|
||||
cur = ah.getStyle('cursor');
|
||||
}
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 61);
|
||||
if (cur == 'auto') {
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 62);
|
||||
cur = this.get('dragCursor');
|
||||
}
|
||||
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 65);
|
||||
this._pg_size();
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 66);
|
||||
this._pg.setStyles({
|
||||
top: 0,
|
||||
left: 0,
|
||||
display: 'block',
|
||||
opacity: ((this._debugShim) ? '.5' : '0'),
|
||||
cursor: cur
|
||||
});
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @method _pg_size
|
||||
* @description Sizes the shim on: activatation, window:scroll, window:resize
|
||||
*/
|
||||
_pg_size: function() {
|
||||
_yuitest_coverfunc("build/dd-ddm/dd-ddm.js", "_pg_size", 79);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 80);
|
||||
if (this.activeDrag) {
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 81);
|
||||
var b = Y.one('body'),
|
||||
h = b.get('docHeight'),
|
||||
w = b.get('docWidth');
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 84);
|
||||
this._pg.setStyles({
|
||||
height: h + 'px',
|
||||
width: w + 'px'
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @method _createPG
|
||||
* @description Creates the shim and adds it's listeners to it.
|
||||
*/
|
||||
_createPG: function() {
|
||||
_yuitest_coverfunc("build/dd-ddm/dd-ddm.js", "_createPG", 95);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 96);
|
||||
var pg = Y.Node.create('<div></div>'),
|
||||
bd = Y.one('body'), win;
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 98);
|
||||
pg.setStyles({
|
||||
top: '0',
|
||||
left: '0',
|
||||
position: 'absolute',
|
||||
zIndex: '9999',
|
||||
overflow: 'hidden',
|
||||
backgroundColor: 'red',
|
||||
display: 'none',
|
||||
height: '5px',
|
||||
width: '5px'
|
||||
});
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 109);
|
||||
pg.set('id', Y.stamp(pg));
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 110);
|
||||
pg.addClass(Y.DD.DDM.CSS_PREFIX + '-shim');
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 111);
|
||||
bd.prepend(pg);
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 112);
|
||||
this._pg = pg;
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 113);
|
||||
this._pg.on('mousemove', Y.throttle(Y.bind(this._move, this), this.get('throttleTime')));
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 114);
|
||||
this._pg.on('mouseup', Y.bind(this._end, this));
|
||||
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 116);
|
||||
win = Y.one('win');
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 117);
|
||||
Y.on('window:resize', Y.bind(this._pg_size, this));
|
||||
_yuitest_coverline("build/dd-ddm/dd-ddm.js", 118);
|
||||
win.on('scroll', Y.bind(this._pg_size, this));
|
||||
}
|
||||
}, true);
|
||||
|
||||
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["dd-ddm-base", "event-resize"]});
|
7
lib/yuilib/3.7.2/build/dd-ddm/dd-ddm-min.js
vendored
7
lib/yuilib/3.7.2/build/dd-ddm/dd-ddm-min.js
vendored
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dd-ddm",function(e,t){e.mix(e.DD.DDM,{_pg:null,_debugShim:!1,_activateTargets:function(){},_deactivateTargets:function(){},_startDrag:function(){this.activeDrag&&this.activeDrag.get("useShim")&&(this._shimming=!0,this._pg_activate(),this._activateTargets())},_endDrag:function(){this._pg_deactivate(),this._deactivateTargets()},_pg_deactivate:function(){this._pg.setStyle("display","none")},_pg_activate:function(){this._pg||this._createPG();var e=this.activeDrag.get("activeHandle"),t="auto";e&&(t=e.getStyle("cursor")),t=="auto"&&(t=this.get("dragCursor")),this._pg_size(),this._pg.setStyles({top:0,left:0,display:"block",opacity:this._debugShim?".5":"0",cursor:t})},_pg_size:function(){if(this.activeDrag){var t=e.one("body"),n=t.get("docHeight"),r=t.get("docWidth");this._pg.setStyles({height:n+"px",width:r+"px"})}},_createPG:function(){var t=e.Node.create("<div></div>"),n=e.one("body"),r;t.setStyles({top:"0",left:"0",position:"absolute",zIndex:"9999",overflow:"hidden",backgroundColor:"red",display:"none",height:"5px",width:"5px"}),t.set("id",e.stamp(t)),t.addClass(e.DD.DDM.CSS_PREFIX+"-shim"),n.prepend(t),this._pg=t,this._pg.on("mousemove",e.throttle(e.bind(this._move,this),this.get("throttleTime"))),this._pg.on("mouseup",e.bind(this._end,this)),r=e.one("win"),e.on("window:resize",e.bind(this._pg_size,this)),r.on("scroll",e.bind(this._pg_size,this))}},!0)},"3.7.2",{requires:["dd-ddm-base","event-resize"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dd-delegate",function(e,t){var n=function(e){n.superclass.constructor.apply(this,arguments)},r="container",i="nodes",s=e.Node.create("<div>Temp Node</div>");e.extend(n,e.Base,{_bubbleTargets:e.DD.DDM,dd:null,_shimState:null,_handles:null,_onNodeChange:function(e){this.set("dragNode",e.newVal)},_afterDragEnd:function(t){e.DD.DDM._noShim=this._shimState,this.set("lastNode",this.dd.get("node")),this.get("lastNode").removeClass(e.DD.DDM.CSS_PREFIX+"-dragging"),this.dd._unprep(),this.dd.set("node",s)},_delMouseDown:function(t){var n=t.currentTarget,r=this.dd,s=n,o=this.get("dragConfig");n.test(this.get(i))&&!n.test(this.get("invalid"))&&(this._shimState=e.DD.DDM._noShim,e.DD.DDM._noShim=!0,this.set("currentNode",n),r.set("node",n),o&&o.dragNode?s=o.dragNode:r.proxy&&(s=e.DD.DDM._proxy),r.set("dragNode",s),r._prep(),r.fire("drag:mouseDown",{ev:t}))},_onMouseEnter:function(t){this._shimState=e.DD.DDM._noShim,e.DD.DDM._noShim=!0},_onMouseLeave:function(t){e.DD.DDM._noShim=this._shimState},initializer:function(t){this._handles=[];var n=this.get("dragConfig")||{},o=this.get(r);n.node=s.cloneNode(!0),n.bubbleTargets=this,this.get("handles")&&(n.handles=this.get("handles")),this.dd=new e.DD.Drag(n),this.dd.after("drag:end",e.bind(this._afterDragEnd,this)),this.dd.on("dragNodeChange",e.bind(this._onNodeChange,this)),this.dd.after("drag:mouseup",function(){this._unprep()}),this._handles.push(e.delegate(e.DD.Drag.START_EVENT,e.bind(this._delMouseDown,this),o,this.get(i))),this._handles.push(e.on("mouseenter",e.bind(this._onMouseEnter,this),o)),this._handles.push(e.on("mouseleave",e.bind(this._onMouseLeave,this),o)),e.later(50,this,this.syncTargets),e.DD.DDM.regDelegate(this)},syncTargets:function(){if(!e.Plugin.Drop||this.get("destroyed"))return;var t,n,s;return this.get("target")&&(t=e.one(this.get(r)).all(this.get(i)),n=this.dd.get("groups"),s=this.get("dragConfig"),s&&s.groups&&(n=s.groups),t.each(function(e){this.createDrop(e,n)},this)),this},createDrop:function(t,n){var r={useShim:!1,bubbleTargets:this};return t.drop||t.plug(e.Plugin.Drop,r),t.drop.set("groups",n),t},destructor:function(){this.dd&&this.dd.destroy();if(e.Plugin.Drop){var t=e.one(this.get(r)).all(this.get(i));t.unplug(e.Plugin.Drop)}e.each(this._handles,function(e){e.detach()})}},{NAME:"delegate",ATTRS:{container:{value:"body"},nodes:{value:".dd-draggable"},invalid:{value:"input, select, button, a, textarea"},lastNode:{value:s},currentNode:{value:s},dragNode:{value:s},over:{value:!1},target:{value:!1},dragConfig:{value:null},handles:{value:null}}}),e.mix(e.DD.DDM,{_delegates:[],regDelegate:function(e){this._delegates.push(e)},getDelegate:function(t){var n=null;return t=e.one(t),e.each(this._delegates,function(e){t.test(e.get(r))&&(n=e)},this),n}}),e.namespace("DD"),e.DD.Delegate=n},"3.7.2",{requires:["dd-drag","dd-drop-plugin","event-mouseenter"]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dd-gestures",function(e,t){e.DD.Drag.START_EVENT="gesturemovestart",e.DD.Drag.prototype._prep=function(){this._dragThreshMet=!1;var t=this.get("node"),n=e.DD.DDM;t.addClass(n.CSS_PREFIX+"-draggable"),t.on(e.DD.Drag.START_EVENT,e.bind(this._handleMouseDownEvent,this),{minDistance:0,minTime:0}),t.on("gesturemoveend",e.bind(this._handleMouseUp,this),{standAlone:!0}),t.on("dragstart",e.bind(this._fixDragStart,this))},e.DD.DDM._setupListeners=function(){var t=e.DD.DDM;this._createPG(),this._active=!0,e.one(e.config.doc).on("gesturemove",e.throttle(e.bind(t._move,t),t.get("throttleTime")),{standAlone:!0})}},"3.7.2",{requires:["dd-drag","event-synthetic","event-gestures"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("dd-proxy",function(e,t){var n=e.DD.DDM,r="node",i="dragNode",s="host",o=!0,u,a=function(e){a.superclass.constructor.apply(this,arguments)};a.NAME="DDProxy",a.NS="proxy",a.ATTRS={host:{},moveOnEnd:{value:o},hideOnEnd:{value:o},resizeFrame:{value:o},positionProxy:{value:o},borderStyle:{value:"1px solid #808080"},cloneNode:{value:!1}},u={_hands:null,_init:function(){if(!n._proxy){n._createFrame(),e.on("domready",e.bind(this._init,this));return}this._hands||(this._hands=[]);var t,o,u=this.get(s),a=u.get(i);a.compareTo(u.get(r))&&n._proxy&&u.set(i,n._proxy),e.each(this._hands,function(e){e.detach()}),t=n.on("ddm:start",e.bind(function(){n.activeDrag===u&&n._setFrame(u)},this)),o=n.on("ddm:end",e.bind(function(){u.get("dragging")&&(this.get("moveOnEnd")&&u.get(r).setXY(u.lastXY),this.get("hideOnEnd")&&u.get(i).setStyle("display","none"),this.get("cloneNode")&&(u.get(i).remove(),u.set(i,n._proxy)))},this)),this._hands=[t,o]},initializer:function(){this._init()},destructor:function(){var t=this.get(s);e.each(this._hands,function(e){e.detach()}),t.set(i,t.get(r))},clone:function(){var t=this.get(s),n=t.get(r),o=n.cloneNode(!0);return delete o._yuid,o.setAttribute("id",e.guid()),o.setStyle("position","absolute"),n.get("parentNode").appendChild(o),t.set(i,o),o}},e.namespace("Plugin"),e.extend(a,e.Base,u),e.Plugin.DDProxy=a,e.mix(n,{_createFrame:function(){if(!n._proxy){n._proxy=o;var t=e.Node.create("<div></div>"),r=e.one("body");t.setStyles({position:"absolute",display:"none",zIndex:"999",top:"-999px",left:"-999px"}),r.prepend(t),t.set("id",e.guid()),t.addClass(n.CSS_PREFIX+"-proxy"),n._proxy=t}},_setFrame:function(e){var t=e.get(r),s=e.get(i),o,u="auto";o=n.activeDrag.get("activeHandle"),o&&(u=o.getStyle("cursor")),u=="auto"&&(u=n.get("dragCursor")),s.setStyles({visibility:"hidden",display:"block",cursor:u,border:e.proxy.get("borderStyle")}),e.proxy.get("cloneNode")&&(s=e.proxy.clone()),e.proxy.get("resizeFrame")&&s.setStyles({height:t.get("offsetHeight")+"px",width:t.get("offsetWidth")+"px"}),e.proxy.get("positionProxy")&&s.setXY(e.nodeXY),s.setStyle("visibility","visible")}})},"3.7.2",{requires:["dd-drag"]});
|
File diff suppressed because one or more lines are too long
7
lib/yuilib/3.7.2/build/dial/dial-min.js
vendored
7
lib/yuilib/3.7.2/build/dial/dial-min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("editor-bidi",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="host",i="dir",s="BODY",o="nodeChange",u="bidiContextChange",a=s+" > p",f="style";e.extend(n,e.Base,{lastDirection:null,firstEvent:null,_checkForChange:function(){var e=this.get(r),t=e.getInstance(),i=new t.EditorSelection,s,o;i.isCollapsed?(s=n.blockParent(i.focusNode),s&&(o=s.getStyle("direction"),o!==this.lastDirection&&(e.fire(u,{changedTo:o}),this.lastDirection=o))):(e.fire(u,{changedTo:"select"}),this.lastDirection=null)},_afterNodeChange:function(e){if(this.firstEvent||n.EVENTS[e.changedType])this._checkForChange(),this.firstEvent=!1},_afterMouseUp:function(e){this._checkForChange(),this.firstEvent=!1},initializer:function(){var t=this.get(r);this.firstEvent=!0,t.after(o,e.bind(this._afterNodeChange,this)),t.after("dom:mouseup",e.bind(this._afterMouseUp,this))}},{EVENTS:{"backspace-up":!0,"pageup-up":!0,"pagedown-down":!0,"end-up":!0,"home-up":!0,"left-up":!0,"up-up":!0,"right-up":!0,"down-up":!0,"delete-up":!0},BLOCKS:e.EditorSelection.BLOCKS,DIV_WRAPPER:"<DIV></DIV>",blockParent:function(t,r){var i=t,o,u;return i||(i=e.one(s)),i.test(n.BLOCKS)||(i=i.ancestor(n.BLOCKS)),r&&i.test(s)&&(o=e.Node.create(n.DIV_WRAPPER),i.get("children").each(function(e,t){t===0?u=e:o.append(e)}),u.replace(o),o.prepend(u),i=o),i},_NODE_SELECTED:"bidiSelected",addParents:function(e){var t,r,i;for(t=0;t<e.length;t+=1)e[t].setData(n._NODE_SELECTED,!0);for(t=0;t<e.length;t+=1)r=e[t].get("parentNode"),!r.test(s)&&!r.getData(n._NODE_SELECTED)&&(i=!0,r.get("children").some(function(e){if(!e.getData(n._NODE_SELECTED))return i=!1,!0}),i&&(e.push(r),r.setData(n._NODE_SELECTED,!0)));for(t=0;t<e.length;t+=1)e[t].clearData(n._NODE_SELECTED);return e},NAME:"editorBidi",NS:"editorBidi",ATTRS:{host:{value:!1}},RE_TEXT_ALIGN:/text-align:\s*\w*\s*;/,removeTextAlign:function(e){return e&&(e.getAttribute(f).match(n.RE_TEXT_ALIGN)&&e.setAttribute(f,e.getAttribute(f).replace(n.RE_TEXT_ALIGN,"")),e.hasAttribute("align")&&e.removeAttribute("align")),e}}),e.namespace("Plugin"),e.Plugin.EditorBidi=n,e.Plugin.ExecCommand.COMMANDS.bidi=function(t,s){var o=this.getInstance(),u=new o.EditorSelection,a=this.get(r).get(r).editorBidi,f,l,c,h,p;if(!a){e.error("bidi execCommand is not available without the EditorBiDi plugin.");return}o.EditorSelection.filterBlocks();if(u.isCollapsed){l=n.blockParent(u.anchorNode),l||(l=o.one("body").one(o.EditorSelection.BLOCKS)),l=n.removeTextAlign(l),s||(p=l.getAttribute(i),!p||p=="ltr"?s="rtl":s="ltr"),l.setAttribute(i,s);if(e.UA.ie){var d=l.all("br.yui-cursor");d.size()===1&&l.get("childNodes").size()==1&&d.remove()}f=l}else c=u.getSelected(),h=[],c.each(function(e){h.push(n.blockParent(e))}),h=o.all(n.addParents(h)),h.each(function(e){var t=s;e=n.removeTextAlign(e),t||(p=e.getAttribute(i),!p||p=="ltr"?t="rtl":t="ltr"),e.setAttribute(i,t)}),f=h;return a._checkForChange(),f}},"3.7.2",{requires:["editor-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("editor-br",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="host",i="li";e.extend(n,e.Base,{_onKeyDown:function(t){if(t.stopped){t.halt();return}if(t.keyCode==13){var n=this.get(r),s=n.getInstance(),o=new s.EditorSelection,u="";if(o){if(e.UA.ie)if(!o.anchorNode||!o.anchorNode.test(i)&&!o.anchorNode.ancestor(i)){var n=this.get(r);n.execCommand("inserthtml",s.EditorSelection.CURSOR),t.halt()}e.UA.webkit&&!o.anchorNode.test(i)&&!o.anchorNode.ancestor(i)&&(n.frame._execCommand("insertlinebreak",null),t.halt())}}},_afterEditorReady:function(){var t=this.get(r).getInstance();try{t.config.doc.execCommand("insertbronreturn",null,!0)}catch(n){}(e.UA.ie||e.UA.webkit)&&t.on("keydown",e.bind(this._onKeyDown,this),t.config.doc)},_onNodeChange:function(e){switch(e.changedType){case"backspace-up":case"backspace-down":case"delete-up":var t=this.get(r).getInstance(),n=e.changedNode,i=t.config.doc.createTextNode(" ");n.appendChild(i),n.removeChild(i)}},initializer:function(){var t=this.get(r);if(t.editorPara){e.error("Can not plug EditorBR and EditorPara at the same time.");return}t.after("ready",e.bind(this._afterEditorReady,this)),e.UA.gecko&&t.on("nodeChange",e.bind(this._onNodeChange,this))}},{NAME:"editorBR",NS:"editorBR",ATTRS:{host:{value:!1}}}),e.namespace("Plugin"),e.Plugin.EditorBR=n},"3.7.2",{requires:["editor-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("editor-lists",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="li",i="ol",s="ul",o="host";e.extend(n,e.Base,{_onNodeChange:function(t){var u=this.get(o).getInstance(),a,f,l,c,h,p,d=!1,v,m=!1;t.changedType==="tab"&&(t.changedNode.test(r+", "+r+" *")&&(t.changedEvent.halt(),t.preventDefault(),f=t.changedNode,h=t.changedEvent.shiftKey,p=f.ancestor(i+","+s),v=s,p.get("tagName").toLowerCase()===i&&(v=i),f.test(r)||(f=f.ancestor(r)),h?f.ancestor(r)&&(f.ancestor(r).insert(f,"after"),d=!0,m=!0):f.previous(r)&&(c=u.Node.create("<"+v+"></"+v+">"),f.previous(r).append(c),c.append(f),d=!0)),d&&(f.test(r)||(f=f.ancestor(r)),f.all(n.REMOVE).remove(),e.UA.ie&&(f=f.append(n.NON).one(n.NON_SEL)),(new u.EditorSelection).selectNode(f,!0,m)))},initializer:function(){this.get(o).on("nodeChange",e.bind(this._onNodeChange,this))}},{NON:'<span class="yui-non"> </span>',NON_SEL:"span.yui-non",REMOVE:"br",NAME:"editorLists",NS:"lists",ATTRS:{host:{value:!1}}}),e.namespace("Plugin"),e.Plugin.EditorLists=n},"3.7.2",{requires:["editor-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("editor-para-base",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="host",i="body",s="nodeChange",o="parentNode",u=i+" > p",a="p",f="<br>",l="firstChild",c="li";e.extend(n,e.Base,{_fixFirstPara:function(){var e=this.get(r),t=e.getInstance(),n,i,s=t.config.doc.body,o=s.innerHTML,l=o.length?!0:!1;o===f&&(o="",l=!1),s.innerHTML="<"+a+">"+o+t.EditorSelection.CURSOR+"</"+a+">",i=t.one(u),n=new t.EditorSelection,n.selectNode(i,!0,l)},_afterEditorReady:function(){var e=this.get(r),t=e.getInstance(),n;t&&(t.EditorSelection.filterBlocks(),n=t.EditorSelection.DEFAULT_BLOCK_TAG,u=i+" > "+n,a=n)},_afterContentChange:function(){var e=this.get(r),t=e.getInstance();t&&t.EditorSelection&&t.EditorSelection.filterBlocks()},_afterPaste:function(){var t=this.get(r),n=t.getInstance(),i=new n.EditorSelection;e.later(50,t,function(){n.EditorSelection.filterBlocks()})},initializer:function(){var t=this.get(r);if(t.editorBR){e.error("Can not plug EditorPara and EditorBR at the same time.");return}t.after("ready",e.bind(this._afterEditorReady,this)),t.after("contentChange",e.bind(this._afterContentChange,this)),e.Env.webkit&&t.after("dom:paste",e.bind(this._afterPaste,this))}},{NAME:"editorParaBase",NS:"editorParaBase",ATTRS:{host:{value:!1}}}),e.namespace("Plugin"),e.Plugin.EditorParaBase=n},"3.7.2",{requires:["editor-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("editor-para-ie",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="host",i="body",s="nodeChange",o="parentNode",u=i+" > p",a="p",f="<br>",l="firstChild",c="li";e.extend(n,e.Plugin.EditorParaBase,{_onNodeChange:function(e){var t=this.get(r),n=t.getInstance(),i,s,o,u,f,l=n.EditorSelection.DEFAULT_BLOCK_TAG,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C=":last-child";switch(e.changedType){case"enter-up":var k=this._lastPara?this._lastPara:e.changedNode,L=k.one("br.yui-cursor");this._lastPara&&delete this._lastPara,L&&(L.previous()||L.next())&&L.ancestor(a)&&L.remove();if(!k.test(l)){var A=k.ancestor(l);A&&(k=A,A=null)}if(k.test(l)){var O=k.previous(),M,_,D=!1;if(O){M=O.one(C);while(!D)M?(_=M.one(C),_?M=_:D=!0):D=!0;M&&t.copyStyles(M,k)}}break;case"enter":if(e.changedNode.test("br"))e.changedNode.remove();else if(e.changedNode.test("p, span")){var L=e.changedNode.one("br.yui-cursor");L&&L.remove()}}},initializer:function(){var t=this.get(r);if(t.editorBR){e.error("Can not plug EditorPara and EditorBR at the same time.");return}t.on(s,e.bind(this._onNodeChange,this))}},{NAME:"editorPara",NS:"editorPara",ATTRS:{host:{value:!1}}}),e.namespace("Plugin"),e.Plugin.EditorPara=n},"3.7.2",{requires:["editor-para-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("editor-para",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="host",i="body",s="nodeChange",o="parentNode",u=i+" > p",a="p",f="<br>",l="firstChild",c="li";e.extend(n,e.Plugin.EditorParaBase,{_onNodeChange:function(t){var n=this.get(r),s=n.getInstance(),h,p,d,v,m,g=s.EditorSelection.DEFAULT_BLOCK_TAG,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D=":last-child";switch(t.changedType){case"enter-up":var H=this._lastPara?this._lastPara:t.changedNode,B=H.one("br.yui-cursor");this._lastPara&&delete this._lastPara,B&&(B.previous()||B.next())&&B.ancestor(a)&&B.remove();if(!H.test(g)){var j=H.ancestor(g);j&&(H=j,j=null)}if(H.test(g)){var F=H.previous(),I,q,R=!1;if(F){I=F.one(D);while(!R)I?(q=I.one(D),q?I=q:R=!0):R=!0;I&&n.copyStyles(I,H)}}break;case"enter":e.UA.webkit&&t.changedEvent.shiftKey&&(n.execCommand("insertbr"),t.changedEvent.preventDefault());if(t.changedNode.test("li")&&!e.UA.ie){h=s.EditorSelection.getText(t.changedNode);if(h===""){d=t.changedNode.ancestor("ol,ul");var U=d.getAttribute("dir");U!==""&&(U=' dir = "'+U+'"'),d=t.changedNode.ancestor(s.EditorSelection.BLOCKS),v=s.Node.create("<p"+U+">"+s.EditorSelection.CURSOR+"</p>"),d.insert(v,"after"),t.changedNode.remove(),t.changedEvent.halt(),m=new s.EditorSelection,m.selectNode(v,!0,!1)}}if(e.UA.gecko&&n.get("defaultblock")!=="p"){d=t.changedNode;if(!d.test(c)&&!d.ancestor(c)){d.test(g)||(d=d.ancestor(g)),v=s.Node.create("<"+g+"></"+g+">"),d.insert(v,"after"),m=new s.EditorSelection;if(m.anchorOffset){y=m.anchorNode.get("textContent"),p=s.one(s.config.doc.createTextNode(y.substr(0,m.anchorOffset))),b=s.one(s.config.doc.createTextNode(y.substr(m.anchorOffset))),E=m.anchorNode,E.setContent(""),x=E.cloneNode(),x.append(b),T=!1,C=E;while(!T){C=C.get(o);if(C&&!C.test(g)){N=C.cloneNode(),N.set("innerHTML",""),N.append(x),w=C.get("childNodes");var z=!1;w.each(function(e){z&&N.append(e),e===E&&(z=!0)}),E=C,x=N}else T=!0}b=x,m.anchorNode.append(p),b&&v.append(b)}v.get(l)&&(v=v.get(l)),v.prepend(s.EditorSelection.CURSOR),m.focusCursor(!0,!0),h=s.EditorSelection.getText(v),h!==""&&s.EditorSelection.cleanCursor(),t.changedEvent.preventDefault()}}break;case"keyup":e.UA.gecko&&s.config.doc&&s.config.doc.body&&s.config.doc.body.innerHTML.length<20&&(s.one(u)||this._fixFirstPara());break;case"backspace-up":case"backspace-down":case"delete-up":e.UA.ie||(k=s.all(u),A=s.one(i),k.item(0)&&(A=k.item(0)),L=A.one("br"),L&&(L.removeAttribute("id"),L.removeAttribute("class")),p=s.EditorSelection.getText(A),p=p.replace(/ /g,"").replace(/\n/g,""),M=A.all("img"),p.length===0&&!M.size()&&(A.test(a)||this._fixFirstPara(),O=null,t.changedNode&&t.changedNode.test(a)&&(O=t.changedNode),!O&&n._lastPara&&n._lastPara.inDoc()&&(O=n._lastPara),O&&!O.test(a)&&(O=O.ancestor(a)),O&&!O.previous()&&O.get(o)&&O.get(o).test(i)&&(t.changedEvent.frameEvent.halt(),t.preventDefault())),e.UA.webkit&&t.changedNode&&(t.preventDefault(),A=t.changedNode,A.test("li")&&!A.previous()&&!A.next()&&(h=A.get("innerHTML").replace(f,""),h===""&&A.get(o)&&(A.get(o).replace(s.Node.create(f)),t.changedEvent.frameEvent.halt(),s.EditorSelection.filterBlocks())))),e.UA.gecko&&(v=t.changedNode,_=s.config.doc.createTextNode(" "),v.appendChild(_),v.removeChild(_))}e.UA.gecko&&t.changedNode&&!t.changedNode.test(g)&&(O=t.changedNode.ancestor(g),O&&(this._lastPara=O))},initializer:function(){var t=this.get(r);if(t.editorBR){e.error("Can not plug EditorPara and EditorBR at the same time.");return}t.on(s,e.bind(this._onNodeChange,this))}},{NAME:"editorPara",NS:"editorPara",ATTRS:{host:{value:!1}}}),e.namespace("Plugin"),e.Plugin.EditorPara=n},"3.7.2",{requires:["editor-para-base"]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("event-focus",function(e,t){function u(t,r,u){var a="_"+t+"Notifiers";e.Event.define(t,{_attach:function(i,s,o){return e.DOM.isWindow(i)?n._attach([t,function(e){s.fire(e)},i]):n._attach([r,this._proxy,i,this,s,o],{capture:!0})},_proxy:function(t,r,i){var s=t.target,f=t.currentTarget,l=s.getData(a),c=e.stamp(f._node),h=o||s!==f,p;r.currentTarget=i?s:f,r.container=i?f:null,l?h=!0:(l={},s.setData(a,l),h&&(p=n._attach([u,this._notify,s._node]).sub,p.once=!0)),l[c]||(l[c]=[]),l[c].push(r),h||this._notify(t)},_notify:function(t,n){var r=t.currentTarget,i=r.getData(a),o=r.ancestors(),u=r.get("ownerDocument"),f=[],l=i?e.Object.keys(i).length:0,c,h,p,d,v,m,g,y,b,w;r.clearData(a),o.push(r),u&&o.unshift(u),o._nodes.reverse(),l&&(m=l,o.some(function(t){var n=e.stamp(t),r=i[n],s,o;if(r){l--;for(s=0,o=r.length;s<o;++s)r[s].handle.sub.filter&&f.push(r[s])}return!l}),l=m);while(l&&(c=o.shift())){d=e.stamp(c),h=i[d];if(h){for(g=0,y=h.length;g<y;++g){p=h[g],b=p.handle.sub,v=!0,t.currentTarget=c,b.filter&&(v=b.filter.apply(c,[c,t].concat(b.args||[])),f.splice(s(f,p),1)),v&&(t.container=p.container,w=p.fire(t));if(w===!1||t.stopped===2)break}delete h[d],l--}if(t.stopped!==2)for(g=0,y=f.length;g<y;++g){p=f[g],b=p.handle.sub,b.filter.apply(c,[c,t].concat(b.args||[]))&&(t.container=p.container,t.currentTarget=c,w=p.fire(t));if(w===!1||t.stopped===2)break}if(t.stopped)break}},on:function(e,t,n){t.handle=this._attach(e._node,n)},detach:function(e,t){t.handle.detach()},delegate:function(t,n,r,s){i(s)&&(n.filter=function(n){return e.Selector.test(n._node,s,t===n?null:t._node)}),n.handle=this._attach(t._node,r,!0)},detachDelegate:function(e,t){t.handle.detach()}},!0)}var n=e.Event,r=e.Lang,i=r.isString,s=e.Array.indexOf,o=r.isFunction(e.DOM.create('<p onbeforeactivate=";"/>').onbeforeactivate);o?(u("focus","beforeactivate","focusin"),u("blur","beforedeactivate","focusout")):(u("focus","focus","focus"),u("blur","blur","blur"))},"3.7.2",{requires:["event-synthetic"]});
|
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("event-move",function(e,t){var n=e.Event._GESTURE_MAP,r={start:n.start,end:n.end,move:n.move},i="start",s="move",o="end",u="gesture"+s,a=u+o,f=u+i,l="_msh",c="_mh",h="_meh",p="_dmsh",d="_dmh",v="_dmeh",m="_ms",g="_m",y="minTime",b="minDistance",w="preventDefault",E="button",S="ownerDocument",x="currentTarget",T="target",N="nodeType",C=function(t,n,r){var i=r?4:3,s=n.length>i?e.merge(n.splice(i,1)[0]):{};return w in s||(s[w]=t.PREVENT_DEFAULT),s},k=function(e,t){return t._extra.root||e.get(N)===9?e:e.get(S)},L=function(e,t,n){e.pageX=t.pageX,e.pageY=t.pageY,e.screenX=t.screenX,e.screenY=t.screenY,e.clientX=t.clientX,e.clientY=t.clientY,e[T]=e[T]||t[T],e[x]=e[x]||t[x],e[E]=n&&n[E]||1},A=function(e,t){t&&(!t.call||t(e))&&e.preventDefault()},O=e.Event.define;O(f,{on:function(e,t,n){t[l]=e.on(r[i],this._onStart,this,e,t,n)},delegate:function(e,t,n,s){var o=this;t[p]=e.delegate(r[i],function(r){o._onStart(r,e,t,n,!0)},s)},detachDelegate:function(e,t,n,r){var i=t[p];i&&(i.detach(),t[p]=null)},detach:function(e,t,n){var r=t[l];r&&(r.detach(),t[l]=null)},processArgs:function(e,t){var n=C(this,e,t);return y in n||(n[y]=this.MIN_TIME),b in n||(n[b]=this.MIN_DISTANCE),n},_onStart:function(t,n,i,u,a){a&&(n=t[x]);var f=i._extra,l=!0,c=f[y],h=f[b],p=f.button,d=f[w],v=k(n,i),m;t.touches?t.touches.length===1?L(t,t.touches[0],f):l=!1:l=p===undefined||p===t.button,l&&(A(t,d),c===0||h===0?this._start(t,n,u,f):(m=[t.pageX,t.pageY],c>0&&(f._ht=e.later(c,this,this._start,[t,n,u,f]),f._hme=v.on(r[o],e.bind(function(){this._cancel(f)},this))),h>0&&(f._hm=v.on(r[s],e.bind(function(e){(Math.abs(e.pageX-m[0])>h||Math.abs(e.pageY-m[1])>h)&&this._start(t,n,u,f)},this)))))},_cancel:function(e){e._ht&&(e._ht.cancel(),e._ht=null),e._hme&&(e._hme.detach(),e._hme=null),e._hm&&(e._hm.detach(),e._hm=null)},_start:function(e,t,n,r){r&&this._cancel(r),e.type=f,t.setData(m,e),n.fire(e)},MIN_TIME:0,MIN_DISTANCE:0,PREVENT_DEFAULT:!1}),O(u,{on:function(e,t,n){var i=k(e,t),o=i.on(r[s],this._onMove,this,e,t,n);t[c]=o},delegate:function(e,t,n,i){var o=this;t[d]=e.delegate(r[s],function(r){o._onMove(r,e,t,n,!0)},i)},detach:function(e,t,n){var r=t[c];r&&(r.detach(),t[c]=null)},detachDelegate:function(e,t,n,r){var i=t[d];i&&(i.detach(),t[d]=null)},processArgs:function(e,t){return C(this,e,t)},_onMove:function(e,t,n,r,i){i&&(t=e[x]);var s=n._extra.standAlone||t.getData(m),o=n._extra.preventDefault;s&&(e.touches&&(e.touches.length===1?L(e,e.touches[0]):s=!1),s&&(A(e,o),e.type=u,r.fire(e)))},PREVENT_DEFAULT:!1}),O(a,{on:function(e,t,n){var i=k(e,t),s=i.on(r[o],this._onEnd,this,e,t,n);t[h]=s},delegate:function(e,t,n,i){var s=this;t[v]=e.delegate(r[o],function(r){s._onEnd(r,e,t,n,!0)},i)},detachDelegate:function(e,t,n,r){var i=t[v];i&&(i.detach(),t[v]=null)},detach:function(e,t,n){var r=t[h];r&&(r.detach(),t[h]=null)},processArgs:function(e,t){return C(this,e,t)},_onEnd:function(e,t,n,r,i){i&&(t=e[x]);var s=n._extra.standAlone||t.getData(g)||t.getData(m),o=n._extra.preventDefault;s&&(e.changedTouches&&(e.changedTouches.length===1?L(e,e.changedTouches[0]):s=!1),s&&(A(e,o),e.type=a,r.fire(e),t.clearData(m),t.clearData(g)))},PREVENT_DEFAULT:!1})},"3.7.2",{requires:["node-base","event-touch","event-synthetic"]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("features",function(e,t){var n={};e.mix(e.namespace("Features"),{tests:n,add:function(e,t,r){n[e]=n[e]||{},n[e][t]=r},all:function(t,r){var i=n[t],s=[];return i&&e.Object.each(i,function(n,i){s.push(i+":"+(e.Features.test(t,i,r)?1:0))}),s.length?s.join(";"):""},test:function(t,r,i){i=i||[];var s,o,u,a=n[t],f=a&&a[r];return!f||(s=f.result,e.Lang.isUndefined(s)&&(o=f.ua,o&&(s=e.UA[o]),u=f.test,u&&(!o||s)&&(s=u.apply(e,i)),f.result=s)),s}});var r=e.Features.add;r("load","0",{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:!1},trigger:"app-transitions"}),r("load","1",{name:"autocomplete-list-keys",test:function(e){return!e.UA.ios&&!e.UA.android},trigger:"autocomplete-list"}),r("load","2",{name:"dd-gestures",test:function(e){return e.config.win&&"ontouchstart"in e.config.win&&!(e.UA.chrome&&e.UA.chrome<6)},trigger:"dd-drag"}),r("load","3",{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"}),r("load","4",{name:"editor-para-ie",trigger:"editor-para",ua:"ie",when:"instead"}),r("load","5",{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"}),r("load","6",{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"}),r("load","7",{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"}),r("load","8",{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"}),r("load","9",{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"}),r("load","10",{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"}),r("load","11",{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"}),r("load","12",{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"}),r("load","13",{name:"io-nodejs",trigger:"io-base",ua:"nodejs"}),r("load","14",{name:"scrollview-base-ie",trigger:"scrollview-base",ua:"ie"}),r("load","15",{name:"selector-css2",test:function(e){var t=e.config.doc,n=t&&!("querySelectorAll"in t);return n},trigger:"selector"}),r("load","16",{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)),r},trigger:"transition"}),r("load","17",{name:"widget-base-ie",trigger:"widget-base",ua:"ie"})},"3.7.2",{requires:["yui-base"]});
|
File diff suppressed because one or more lines are too long
7
lib/yuilib/3.7.2/build/frame/frame-min.js
vendored
7
lib/yuilib/3.7.2/build/frame/frame-min.js
vendored
File diff suppressed because one or more lines are too long
7
lib/yuilib/3.7.2/build/get/get-min.js
vendored
7
lib/yuilib/3.7.2/build/get/get-min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,246 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
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/io-queue/io-queue.js"] = {
|
||||
lines: {},
|
||||
functions: {},
|
||||
coveredLines: 0,
|
||||
calledLines: 0,
|
||||
coveredFunctions: 0,
|
||||
calledFunctions: 0,
|
||||
path: "build/io-queue/io-queue.js",
|
||||
code: []
|
||||
};
|
||||
_yuitest_coverage["build/io-queue/io-queue.js"].code=["YUI.add('io-queue', function (Y, NAME) {","","/**","Extends IO to implement Queue for synchronous","transaction processing.","@module io","@submodule io-queue","@for IO","**/","var io = Y.io._map['io:0'] || new Y.IO();","","Y.mix(Y.IO.prototype, {"," /**"," * Array of transactions queued for processing"," *"," * @property _q"," * @private"," * @static"," * @type {Object}"," */"," _q: new Y.Queue(),"," _qActiveId: null,"," _qInit: false,"," /**"," * Property to determine whether the queue is set to"," * 1 (active) or 0 (inactive). When inactive, transactions"," * will be stored in the queue until the queue is set to active."," *"," * @property _qState"," * @private"," * @static"," * @type {Number}"," */"," _qState: 1,",""," /**"," * Method Process the first transaction from the"," * queue in FIFO order."," *"," * @method _qShift"," * @private"," * @static"," */"," _qShift: function() {"," var io = this,"," o = io._q.next();",""," io._qActiveId = o.id;"," io._qState = 0;"," io.send(o.uri, o.cfg, o.id);"," },",""," /**"," * Method for queueing a transaction before the request is sent to the"," * resource, to ensure sequential processing."," *"," * @method queue"," * @static"," * @return {Object}"," */"," queue: function(uri, c) {"," var io = this,"," o = { uri: uri, cfg:c, id: this._id++ };",""," if(!io._qInit) {"," Y.on('io:complete', function(id, o) { io._qNext(id); }, io);"," io._qInit = true;"," }",""," io._q.add(o);"," if (io._qState === 1) {"," io._qShift();"," }",""," return o;"," },",""," _qNext: function(id) {"," var io = this;"," io._qState = 1;"," if (io._qActiveId === id && io._q.size() > 0) {"," io._qShift();"," }"," },",""," /**"," * Method for promoting a transaction to the top of the queue."," *"," * @method promote"," * @static"," */"," qPromote: function(o) {"," this._q.promote(o);"," },",""," /**"," * Method for removing a specific, pending transaction from"," * the queue."," *"," * @method remove"," * @private"," * @static"," */"," qRemove: function(o) {"," this._q.remove(o);"," },",""," qStart: function() {"," var io = this;"," io._qState = 1;",""," if (io._q.size() > 0) {"," io._qShift();"," }"," },",""," /**"," * Method for setting queue processing to inactive."," * Transaction requests to YUI.io.queue() will be stored in the queue, but"," * not processed until the queue is reset to \"active\"."," *"," * @method _stop"," * @private"," * @static"," */"," qStop: function() {"," this._qState = 0;"," },",""," /**"," * Method to query the current size of the queue."," *"," * @method _size"," * @private"," * @static"," * @return {Number}"," */"," qSize: function() {"," return this._q.size();"," }","","}, true);","","function _queue(u, c) {"," return io.queue.apply(io, [u, c]);","}","","_queue.start = function () { io.qStart(); };","_queue.stop = function () { io.qStop(); };","_queue.promote = function (o) { io.qPromote(o); };","_queue.remove = function (o) { io.qRemove(o); };","_queue.size = function () { io.qSize(); };","Y.io.queue = _queue;","","","}, '3.7.2', {\"requires\": [\"io-base\", \"queue-promote\"]});"];
|
||||
_yuitest_coverage["build/io-queue/io-queue.js"].lines = {"1":0,"10":0,"12":0,"45":0,"48":0,"49":0,"50":0,"62":0,"65":0,"66":0,"67":0,"70":0,"71":0,"72":0,"75":0,"79":0,"80":0,"81":0,"82":0,"93":0,"105":0,"109":0,"110":0,"112":0,"113":0,"127":0,"139":0,"144":0,"145":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0};
|
||||
_yuitest_coverage["build/io-queue/io-queue.js"].functions = {"_qShift:44":0,"(anonymous 2):66":0,"queue:61":0,"_qNext:78":0,"qPromote:92":0,"qRemove:104":0,"qStart:108":0,"qStop:126":0,"qSize:138":0,"_queue:144":0,"start:148":0,"stop:149":0,"promote:150":0,"remove:151":0,"size:152":0,"(anonymous 1):1":0};
|
||||
_yuitest_coverage["build/io-queue/io-queue.js"].coveredLines = 35;
|
||||
_yuitest_coverage["build/io-queue/io-queue.js"].coveredFunctions = 16;
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 1);
|
||||
YUI.add('io-queue', function (Y, NAME) {
|
||||
|
||||
/**
|
||||
Extends IO to implement Queue for synchronous
|
||||
transaction processing.
|
||||
@module io
|
||||
@submodule io-queue
|
||||
@for IO
|
||||
**/
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "(anonymous 1)", 1);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 10);
|
||||
var io = Y.io._map['io:0'] || new Y.IO();
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 12);
|
||||
Y.mix(Y.IO.prototype, {
|
||||
/**
|
||||
* Array of transactions queued for processing
|
||||
*
|
||||
* @property _q
|
||||
* @private
|
||||
* @static
|
||||
* @type {Object}
|
||||
*/
|
||||
_q: new Y.Queue(),
|
||||
_qActiveId: null,
|
||||
_qInit: false,
|
||||
/**
|
||||
* Property to determine whether the queue is set to
|
||||
* 1 (active) or 0 (inactive). When inactive, transactions
|
||||
* will be stored in the queue until the queue is set to active.
|
||||
*
|
||||
* @property _qState
|
||||
* @private
|
||||
* @static
|
||||
* @type {Number}
|
||||
*/
|
||||
_qState: 1,
|
||||
|
||||
/**
|
||||
* Method Process the first transaction from the
|
||||
* queue in FIFO order.
|
||||
*
|
||||
* @method _qShift
|
||||
* @private
|
||||
* @static
|
||||
*/
|
||||
_qShift: function() {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "_qShift", 44);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 45);
|
||||
var io = this,
|
||||
o = io._q.next();
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 48);
|
||||
io._qActiveId = o.id;
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 49);
|
||||
io._qState = 0;
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 50);
|
||||
io.send(o.uri, o.cfg, o.id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method for queueing a transaction before the request is sent to the
|
||||
* resource, to ensure sequential processing.
|
||||
*
|
||||
* @method queue
|
||||
* @static
|
||||
* @return {Object}
|
||||
*/
|
||||
queue: function(uri, c) {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "queue", 61);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 62);
|
||||
var io = this,
|
||||
o = { uri: uri, cfg:c, id: this._id++ };
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 65);
|
||||
if(!io._qInit) {
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 66);
|
||||
Y.on('io:complete', function(id, o) { _yuitest_coverfunc("build/io-queue/io-queue.js", "(anonymous 2)", 66);
|
||||
io._qNext(id); }, io);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 67);
|
||||
io._qInit = true;
|
||||
}
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 70);
|
||||
io._q.add(o);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 71);
|
||||
if (io._qState === 1) {
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 72);
|
||||
io._qShift();
|
||||
}
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 75);
|
||||
return o;
|
||||
},
|
||||
|
||||
_qNext: function(id) {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "_qNext", 78);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 79);
|
||||
var io = this;
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 80);
|
||||
io._qState = 1;
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 81);
|
||||
if (io._qActiveId === id && io._q.size() > 0) {
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 82);
|
||||
io._qShift();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method for promoting a transaction to the top of the queue.
|
||||
*
|
||||
* @method promote
|
||||
* @static
|
||||
*/
|
||||
qPromote: function(o) {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "qPromote", 92);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 93);
|
||||
this._q.promote(o);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method for removing a specific, pending transaction from
|
||||
* the queue.
|
||||
*
|
||||
* @method remove
|
||||
* @private
|
||||
* @static
|
||||
*/
|
||||
qRemove: function(o) {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "qRemove", 104);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 105);
|
||||
this._q.remove(o);
|
||||
},
|
||||
|
||||
qStart: function() {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "qStart", 108);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 109);
|
||||
var io = this;
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 110);
|
||||
io._qState = 1;
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 112);
|
||||
if (io._q.size() > 0) {
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 113);
|
||||
io._qShift();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method for setting queue processing to inactive.
|
||||
* Transaction requests to YUI.io.queue() will be stored in the queue, but
|
||||
* not processed until the queue is reset to "active".
|
||||
*
|
||||
* @method _stop
|
||||
* @private
|
||||
* @static
|
||||
*/
|
||||
qStop: function() {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "qStop", 126);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 127);
|
||||
this._qState = 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* Method to query the current size of the queue.
|
||||
*
|
||||
* @method _size
|
||||
* @private
|
||||
* @static
|
||||
* @return {Number}
|
||||
*/
|
||||
qSize: function() {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "qSize", 138);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 139);
|
||||
return this._q.size();
|
||||
}
|
||||
|
||||
}, true);
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 144);
|
||||
function _queue(u, c) {
|
||||
_yuitest_coverfunc("build/io-queue/io-queue.js", "_queue", 144);
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 145);
|
||||
return io.queue.apply(io, [u, c]);
|
||||
}
|
||||
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 148);
|
||||
_queue.start = function () { _yuitest_coverfunc("build/io-queue/io-queue.js", "start", 148);
|
||||
io.qStart(); };
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 149);
|
||||
_queue.stop = function () { _yuitest_coverfunc("build/io-queue/io-queue.js", "stop", 149);
|
||||
io.qStop(); };
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 150);
|
||||
_queue.promote = function (o) { _yuitest_coverfunc("build/io-queue/io-queue.js", "promote", 150);
|
||||
io.qPromote(o); };
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 151);
|
||||
_queue.remove = function (o) { _yuitest_coverfunc("build/io-queue/io-queue.js", "remove", 151);
|
||||
io.qRemove(o); };
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 152);
|
||||
_queue.size = function () { _yuitest_coverfunc("build/io-queue/io-queue.js", "size", 152);
|
||||
io.qSize(); };
|
||||
_yuitest_coverline("build/io-queue/io-queue.js", 153);
|
||||
Y.io.queue = _queue;
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["io-base", "queue-promote"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("io-upload-iframe",function(e,t){function o(t,n,r){var i=e.Node.create('<iframe src="#" id="io_iframe'+t.id+'" name="io_iframe'+t.id+'" />');i._node.style.position="absolute",i._node.style.top="-1000px",i._node.style.left="-1000px",e.one("body").appendChild(i),e.on("load",function(){r._uploadComplete(t,n)},"#io_iframe"+t.id)}function u(t){e.Event.purgeElement("#io_iframe"+t,!1),e.one("body").removeChild(e.one("#io_iframe"+t))}var n=e.config.win,r=e.config.doc,i=r.documentMode&&r.documentMode>=8,s=decodeURIComponent;e.mix(e.IO.prototype,{_addData:function(t,n){e.Lang.isObject(n)&&(n=e.QueryString.stringify(n));var i=[],o=n.split("="),u,a;for(u=0,a=o.length-1;u<a;u++)i[u]=r.createElement("input"),i[u].type="hidden",i[u].name=s(o[u].substring(o[u].lastIndexOf("&")+1)),i[u].value=u+1===a?s(o[u+1]):s(o[u+1].substring(0,o[u+1].lastIndexOf("&"))),t.appendChild(i[u]);return i},_removeData:function(e,t){var n,r;for(n=0,r=t.length;n<r;n++)e.removeChild(t[n])},_setAttrs:function(t,n,r){t.setAttribute("action",r),t.setAttribute("method","POST"),t.setAttribute("target","io_iframe"+n),t.setAttribute(e.UA.ie&&!i?"encoding":"enctype","multipart/form-data")},_resetAttrs:function(t,n){e.Object.each(n,function(e,n){e?t.setAttribute(n,e):t.removeAttribute(n)})},_startUploadTimeout:function(e,t){var r=this;r._timeout[e.id]=n.setTimeout(function(){e.status=0,e.statusText="timeout",r.complete(e,t),r.end(e,t)},t.timeout)},_clearUploadTimeout:function(e){var t=this;n.clearTimeout(t._timeout[e]),delete t._timeout[e]},_uploadComplete:function(t,r){var i=this,s=e.one("#io_iframe"+t.id).get("contentWindow.document"),o=s.one("body"),a;r.timeout&&i._clearUploadTimeout(t.id);try{o?(a=o.one("pre:first-child"),t.c.responseText=a?a.get("text"):o.get("text")):t.c.responseXML=s._node}catch(f){t.e="upload failure"}i.complete(t,r),i.end(t,r),n.setTimeout(function(){u(t.id)},0)},_upload:function(t,n,i){var s=this,o=typeof i.form.id=="string"?r.getElementById(i.form.id):i.form.id,a={action:o.getAttribute("action"),target:o.getAttribute("target")},f;return s._setAttrs(o,t.id,n),i.data&&(f=s._addData(o,i.data)),i.timeout&&s._startUploadTimeout(t,i),o.submit(),s.start(t,i),i.data&&s._removeData(o,f),s._resetAttrs(o,a),{id:t.id,abort:function(){t.status=0,t.statusText="abort";if(!e.one("#io_iframe"+t.id))return!1;u(t.id),s.complete(t,i),s.end(t,i)},isInProgress:function(){return e.one("#io_iframe"+t.id)?!0:!1},io:s}},upload:function(e,t,n){return o(e,n,this),this._upload(e,t,n)}})},"3.7.2",{requires:["io-base","node-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("json-parse",function(e,t){function n(t){return(e.config.win||this||{})[t]}function d(e,t){return e==="ok"?!0:t}var r=n("JSON"),i=Object.prototype.toString.call(r)==="[object JSON]"&&r,s=!!i,o=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,a=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,f=/(?:^|:|,)(?:\s*\[)+/g,l=/[^\],:{}\s]/,c=function(e){return"\\u"+("0000"+(+e.charCodeAt(0)).toString(16)).slice(-4)},h=function(e,t){var n=function(e,r){var i,s,o=e[r];if(o&&typeof o=="object")for(i in o)o.hasOwnProperty(i)&&(s=n(o,i),s===undefined?delete o[i]:o[i]=s);return t.call(e,r,o)};return typeof t=="function"?n({"":e},""):e},p=function(e,t){e=e.replace(o,c);if(!l.test(e.replace(u,"@").replace(a,"]").replace(f,"")))return h(eval("("+e+")"),t);throw new SyntaxError("JSON.parse")};e.namespace("JSON").parse=function(t,n){return typeof t!="string"&&(t+=""),i&&e.JSON.useNativeParse?i.parse(t,n):p(t,n)};if(i)try{s=i.parse('{"ok":false}',d).ok}catch(v){s=!1}e.JSON.useNativeParse=s},"3.7.2",{requires:["yui-base"]});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("json-stringify",function(e,t){function H(e){var t=typeof e;return g[t]||g[u.call(e)]||(t===c?e?c:h:l)}function B(e){return _[e]||(_[e]="\\u"+("0000"+(+e.charCodeAt(0)).toString(16)).slice(-4),D[e]=0),++D[e]===P&&(O.push([new RegExp(e,"g"),_[e]]),M=O.length),_[e]}function j(e){var t,n;for(t=0;t<M;t++)n=O[t],e=e.replace(n[0],n[1]);return L+e.replace(A,B)+L}function F(e,t){return e.replace(/^/gm,t)}function I(t,n,r){function M(e,t){var u=e[t],f=H(u),L=[],A=r?k:C,O,_,D,P,B;s(u)&&i(u.toJSON)?u=u.toJSON(t):f===m&&(u=l(u)),i(a)&&(u=a.call(e,t,u)),u!==e[t]&&(f=H(u));switch(f){case m:case c:break;case p:return j(u);case d:return isFinite(u)?u+y:h;case v:return u+y;case h:return h;default:return undefined}for(_=g.length-1;_>=0;--_)if(g[_]===u)throw new Error("JSON.stringify. Cyclical reference");O=o(u),g.push(u);if(O)for(_=u.length-1;_>=0;--_)L[_]=M(u,_)||h;else{D=n||u,_=0;for(P in D)D.hasOwnProperty(P)&&(B=M(u,P),B&&(L[_++]=j(P)+A+B))}return g.pop(),r&&L.length?O?E+N+F(L.join(T),r)+N+S:b+N+F(L.join(T),r)+N+w:O?E+L.join(x)+S:b+L.join(x)+w}if(t===undefined)return undefined;var a=i(n)?n:null,f=u.call(r).match(/String|Number/)||[],l=e.JSON.dateToString,g=[],L,A,O;D={},P=e.JSON.charCacheThreshold;if(a||!o(n))n=undefined;if(n){L={};for(A=0,O=n.length;A<O;++A)L[n[A]]=!0;n=L}return r=f[0]==="Number"?(new Array(Math.min(Math.max(0,r),10)+1)).join(" "):(r||y).slice(0,10),M({"":t},"")}var n=(e.config.win||{}).JSON,r=e.Lang,i=r.isFunction,s=r.isObject,o=r.isArray,u=Object.prototype.toString,a=u.call(n)==="[object JSON]"&&n,f=!!a,l="undefined",c="object",h="null",p="string",d="number",v="boolean",m="date",g={"undefined":l,string:p,"[object String]":p,number:d,"[object Number]":d,"boolean":v,"[object Boolean]":v,"[object Date]":m,"[object RegExp]":c},y="",b="{",w="}",E="[",S="]",x=",",T=",\n",N="\n",C=":",k=": ",L='"',A=/[\x00-\x07\x0b\x0e-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,O=[[/\\/g,"\\\\"],[/\"/g,'\\"'],[/\x08/g,"\\b"],[/\x09/g,"\\t"],[/\x0a/g,"\\n"],[/\x0c/g,"\\f"],[/\x0d/g,"\\r"]],M=O.length,_={},D,P;if(a)try{f="0"===a.stringify(0)}catch(q){f=!1}e.mix(e.namespace("JSON"),{useNativeStringify:f,dateToString:function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+C+t(e.getUTCMinutes())+C+t(e.getUTCSeconds())+"Z"},stringify:function(t,n,r){return a&&e.JSON.useNativeStringify?a.stringify(t,n,r):I(t,n,r)},charCacheThreshold:100})},"3.7.2",{requires:["yui-base"]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
lib/yuilib/3.7.2/build/loader/loader-min.js
vendored
7
lib/yuilib/3.7.2/build/loader/loader-min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,461 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('resize-constrain', function (Y, NAME) {
|
||||
|
||||
var Lang = Y.Lang,
|
||||
isBoolean = Lang.isBoolean,
|
||||
isNumber = Lang.isNumber,
|
||||
isString = Lang.isString,
|
||||
capitalize = Y.Resize.capitalize,
|
||||
|
||||
isNode = function(v) {
|
||||
return (v instanceof Y.Node);
|
||||
},
|
||||
|
||||
toNumber = function(num) {
|
||||
return parseFloat(num) || 0;
|
||||
},
|
||||
|
||||
BORDER_BOTTOM_WIDTH = 'borderBottomWidth',
|
||||
BORDER_LEFT_WIDTH = 'borderLeftWidth',
|
||||
BORDER_RIGHT_WIDTH = 'borderRightWidth',
|
||||
BORDER_TOP_WIDTH = 'borderTopWidth',
|
||||
BORDER = 'border',
|
||||
BOTTOM = 'bottom',
|
||||
CON = 'con',
|
||||
CONSTRAIN = 'constrain',
|
||||
HOST = 'host',
|
||||
LEFT = 'left',
|
||||
MAX_HEIGHT = 'maxHeight',
|
||||
MAX_WIDTH = 'maxWidth',
|
||||
MIN_HEIGHT = 'minHeight',
|
||||
MIN_WIDTH = 'minWidth',
|
||||
NODE = 'node',
|
||||
OFFSET_HEIGHT = 'offsetHeight',
|
||||
OFFSET_WIDTH = 'offsetWidth',
|
||||
PRESEVE_RATIO = 'preserveRatio',
|
||||
REGION = 'region',
|
||||
RESIZE_CONTRAINED = 'resizeConstrained',
|
||||
RIGHT = 'right',
|
||||
TICK_X = 'tickX',
|
||||
TICK_Y = 'tickY',
|
||||
TOP = 'top',
|
||||
WIDTH = 'width',
|
||||
VIEW = 'view',
|
||||
VIEWPORT_REGION = 'viewportRegion';
|
||||
|
||||
/**
|
||||
A Resize plugin that will attempt to constrain the resize node to the boundaries.
|
||||
@module resize
|
||||
@submodule resize-contrain
|
||||
@class ResizeConstrained
|
||||
@param config {Object} Object literal specifying widget configuration properties.
|
||||
@constructor
|
||||
@extends Plugin.Base
|
||||
@namespace Plugin
|
||||
*/
|
||||
|
||||
function ResizeConstrained() {
|
||||
ResizeConstrained.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Y.mix(ResizeConstrained, {
|
||||
NAME: RESIZE_CONTRAINED,
|
||||
|
||||
NS: CON,
|
||||
|
||||
ATTRS: {
|
||||
/**
|
||||
* Will attempt to constrain the resize node to the boundaries. Arguments:<br>
|
||||
* 'view': Contrain to Viewport<br>
|
||||
* '#selector_string': Constrain to this node<br>
|
||||
* '{Region Object}': An Object Literal containing a valid region (top, right, bottom, left) of page positions
|
||||
*
|
||||
* @attribute constrain
|
||||
* @type {String|Object|Node}
|
||||
*/
|
||||
constrain: {
|
||||
setter: function(v) {
|
||||
if (v && (isNode(v) || isString(v) || v.nodeType)) {
|
||||
v = Y.one(v);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* The minimum height of the element
|
||||
*
|
||||
* @attribute minHeight
|
||||
* @default 15
|
||||
* @type Number
|
||||
*/
|
||||
minHeight: {
|
||||
value: 15,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* The minimum width of the element
|
||||
*
|
||||
* @attribute minWidth
|
||||
* @default 15
|
||||
* @type Number
|
||||
*/
|
||||
minWidth: {
|
||||
value: 15,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum height of the element
|
||||
*
|
||||
* @attribute maxHeight
|
||||
* @default Infinity
|
||||
* @type Number
|
||||
*/
|
||||
maxHeight: {
|
||||
value: Infinity,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum width of the element
|
||||
*
|
||||
* @attribute maxWidth
|
||||
* @default Infinity
|
||||
* @type Number
|
||||
*/
|
||||
maxWidth: {
|
||||
value: Infinity,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* Maintain the element's ratio when resizing.
|
||||
*
|
||||
* @attribute preserveRatio
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
preserveRatio: {
|
||||
value: false,
|
||||
validator: isBoolean
|
||||
},
|
||||
|
||||
/**
|
||||
* The number of x ticks to span the resize to.
|
||||
*
|
||||
* @attribute tickX
|
||||
* @default false
|
||||
* @type Number | false
|
||||
*/
|
||||
tickX: {
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* The number of y ticks to span the resize to.
|
||||
*
|
||||
* @attribute tickY
|
||||
* @default false
|
||||
* @type Number | false
|
||||
*/
|
||||
tickY: {
|
||||
value: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Y.extend(ResizeConstrained, Y.Plugin.Base, {
|
||||
/**
|
||||
* Stores the <code>constrain</code>
|
||||
* surrounding information retrieved from
|
||||
* <a href="Resize.html#method__getBoxSurroundingInfo">_getBoxSurroundingInfo</a>.
|
||||
*
|
||||
* @property constrainSurrounding
|
||||
* @type Object
|
||||
* @default null
|
||||
*/
|
||||
constrainSurrounding: null,
|
||||
|
||||
initializer: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST);
|
||||
|
||||
host.delegate.dd.plug(
|
||||
Y.Plugin.DDConstrained,
|
||||
{
|
||||
tickX: instance.get(TICK_X),
|
||||
tickY: instance.get(TICK_Y)
|
||||
}
|
||||
);
|
||||
|
||||
host.after('resize:align', Y.bind(instance._handleResizeAlignEvent, instance));
|
||||
host.on('resize:start', Y.bind(instance._handleResizeStartEvent, instance));
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper method to update the current values on
|
||||
* <a href="Resize.html#property_info">info</a> to respect the
|
||||
* constrain node.
|
||||
*
|
||||
* @method _checkConstrain
|
||||
* @param {String} axis 'top' or 'left'
|
||||
* @param {String} axisConstrain 'bottom' or 'right'
|
||||
* @param {String} offset 'offsetHeight' or 'offsetWidth'
|
||||
* @protected
|
||||
*/
|
||||
_checkConstrain: function(axis, axisConstrain, offset) {
|
||||
var instance = this,
|
||||
point1,
|
||||
point1Constrain,
|
||||
point2,
|
||||
point2Constrain,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
constrainBorders = instance.constrainSurrounding.border,
|
||||
region = instance._getConstrainRegion();
|
||||
|
||||
if (region) {
|
||||
point1 = info[axis] + info[offset];
|
||||
point1Constrain = region[axisConstrain] - toNumber(constrainBorders[capitalize(BORDER, axisConstrain, WIDTH)]);
|
||||
|
||||
if (point1 >= point1Constrain) {
|
||||
info[offset] -= (point1 - point1Constrain);
|
||||
}
|
||||
|
||||
point2 = info[axis];
|
||||
point2Constrain = region[axis] + toNumber(constrainBorders[capitalize(BORDER, axis, WIDTH)]);
|
||||
|
||||
if (point2 <= point2Constrain) {
|
||||
info[axis] += (point2Constrain - point2);
|
||||
info[offset] -= (point2Constrain - point2);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the current values on <a href="Resize.html#property_info">info</a>
|
||||
* to respect the maxHeight and minHeight.
|
||||
*
|
||||
* @method _checkHeight
|
||||
* @protected
|
||||
*/
|
||||
_checkHeight: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
maxHeight = (instance.get(MAX_HEIGHT) + host.totalVSurrounding),
|
||||
minHeight = (instance.get(MIN_HEIGHT) + host.totalVSurrounding);
|
||||
|
||||
instance._checkConstrain(TOP, BOTTOM, OFFSET_HEIGHT);
|
||||
|
||||
if (info.offsetHeight > maxHeight) {
|
||||
host._checkSize(OFFSET_HEIGHT, maxHeight);
|
||||
}
|
||||
|
||||
if (info.offsetHeight < minHeight) {
|
||||
host._checkSize(OFFSET_HEIGHT, minHeight);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the current values on <a href="Resize.html#property_info">info</a>
|
||||
* calculating the correct ratio for the other values.
|
||||
*
|
||||
* @method _checkRatio
|
||||
* @protected
|
||||
*/
|
||||
_checkRatio: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
originalInfo = host.originalInfo,
|
||||
oWidth = originalInfo.offsetWidth,
|
||||
oHeight = originalInfo.offsetHeight,
|
||||
oTop = originalInfo.top,
|
||||
oLeft = originalInfo.left,
|
||||
oBottom = originalInfo.bottom,
|
||||
oRight = originalInfo.right,
|
||||
// wRatio/hRatio functions keep the ratio information always synced with the current info information
|
||||
// RETURN: percentage how much width/height has changed from the original width/height
|
||||
wRatio = function() {
|
||||
return (info.offsetWidth/oWidth);
|
||||
},
|
||||
hRatio = function() {
|
||||
return (info.offsetHeight/oHeight);
|
||||
},
|
||||
isClosestToHeight = host.changeHeightHandles,
|
||||
bottomDiff,
|
||||
constrainBorders,
|
||||
constrainRegion,
|
||||
leftDiff,
|
||||
rightDiff,
|
||||
topDiff;
|
||||
|
||||
// check whether the resizable node is closest to height or not
|
||||
if (instance.get(CONSTRAIN) && host.changeHeightHandles && host.changeWidthHandles) {
|
||||
constrainRegion = instance._getConstrainRegion();
|
||||
constrainBorders = instance.constrainSurrounding.border;
|
||||
bottomDiff = (constrainRegion.bottom - toNumber(constrainBorders[BORDER_BOTTOM_WIDTH])) - oBottom;
|
||||
leftDiff = oLeft - (constrainRegion.left + toNumber(constrainBorders[BORDER_LEFT_WIDTH]));
|
||||
rightDiff = (constrainRegion.right - toNumber(constrainBorders[BORDER_RIGHT_WIDTH])) - oRight;
|
||||
topDiff = oTop - (constrainRegion.top + toNumber(constrainBorders[BORDER_TOP_WIDTH]));
|
||||
|
||||
if (host.changeLeftHandles && host.changeTopHandles) {
|
||||
isClosestToHeight = (topDiff < leftDiff);
|
||||
}
|
||||
else if (host.changeLeftHandles) {
|
||||
isClosestToHeight = (bottomDiff < leftDiff);
|
||||
}
|
||||
else if (host.changeTopHandles) {
|
||||
isClosestToHeight = (topDiff < rightDiff);
|
||||
}
|
||||
else {
|
||||
isClosestToHeight = (bottomDiff < rightDiff);
|
||||
}
|
||||
}
|
||||
|
||||
// when the height of the resizable element touch the border of the constrain first
|
||||
// force the offsetWidth to be calculated based on the height ratio
|
||||
if (isClosestToHeight) {
|
||||
info.offsetWidth = oWidth*hRatio();
|
||||
instance._checkWidth();
|
||||
info.offsetHeight = oHeight*wRatio();
|
||||
}
|
||||
else {
|
||||
info.offsetHeight = oHeight*wRatio();
|
||||
instance._checkHeight();
|
||||
info.offsetWidth = oWidth*hRatio();
|
||||
}
|
||||
|
||||
// fixing the top on handles which are able to change top
|
||||
// the idea here is change the top based on how much the height has changed instead of follow the dy
|
||||
if (host.changeTopHandles) {
|
||||
info.top = oTop + (oHeight - info.offsetHeight);
|
||||
}
|
||||
|
||||
// fixing the left on handles which are able to change left
|
||||
// the idea here is change the left based on how much the width has changed instead of follow the dx
|
||||
if (host.changeLeftHandles) {
|
||||
info.left = oLeft + (oWidth - info.offsetWidth);
|
||||
}
|
||||
|
||||
// rounding values to avoid pixel jumpings
|
||||
Y.each(info, function(value, key) {
|
||||
if (isNumber(value)) {
|
||||
info[key] = Math.round(value);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether the resizable node is inside the constrain region.
|
||||
*
|
||||
* @method _checkRegion
|
||||
* @protected
|
||||
* @return {boolean}
|
||||
*/
|
||||
_checkRegion: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
region = instance._getConstrainRegion();
|
||||
|
||||
return Y.DOM.inRegion(null, region, true, host.info);
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the current values on <a href="Resize.html#property_info">info</a>
|
||||
* to respect the maxWidth and minWidth.
|
||||
*
|
||||
* @method _checkWidth
|
||||
* @protected
|
||||
*/
|
||||
_checkWidth: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
maxWidth = (instance.get(MAX_WIDTH) + host.totalHSurrounding),
|
||||
minWidth = (instance.get(MIN_WIDTH) + host.totalHSurrounding);
|
||||
|
||||
instance._checkConstrain(LEFT, RIGHT, OFFSET_WIDTH);
|
||||
|
||||
if (info.offsetWidth < minWidth) {
|
||||
host._checkSize(OFFSET_WIDTH, minWidth);
|
||||
}
|
||||
|
||||
if (info.offsetWidth > maxWidth) {
|
||||
host._checkSize(OFFSET_WIDTH, maxWidth);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the constrain region based on the <code>constrain</code>
|
||||
* attribute.
|
||||
*
|
||||
* @method _getConstrainRegion
|
||||
* @protected
|
||||
* @return {Object Region}
|
||||
*/
|
||||
_getConstrainRegion: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
node = host.get(NODE),
|
||||
constrain = instance.get(CONSTRAIN),
|
||||
region = null;
|
||||
|
||||
if (constrain) {
|
||||
if (constrain == VIEW) {
|
||||
region = node.get(VIEWPORT_REGION);
|
||||
}
|
||||
else if (isNode(constrain)) {
|
||||
region = constrain.get(REGION);
|
||||
}
|
||||
else {
|
||||
region = constrain;
|
||||
}
|
||||
}
|
||||
|
||||
return region;
|
||||
},
|
||||
|
||||
_handleResizeAlignEvent: function(event) {
|
||||
var instance = this,
|
||||
host = instance.get(HOST);
|
||||
|
||||
// check the max/min height and locking top when these values are reach
|
||||
instance._checkHeight();
|
||||
|
||||
// check the max/min width and locking left when these values are reach
|
||||
instance._checkWidth();
|
||||
|
||||
// calculating the ratio, for proportionally resizing
|
||||
if (instance.get(PRESEVE_RATIO)) {
|
||||
instance._checkRatio();
|
||||
}
|
||||
|
||||
if (instance.get(CONSTRAIN) && !instance._checkRegion()) {
|
||||
host.info = host.lastInfo;
|
||||
}
|
||||
},
|
||||
|
||||
_handleResizeStartEvent: function(event) {
|
||||
var instance = this,
|
||||
constrain = instance.get(CONSTRAIN),
|
||||
host = instance.get(HOST);
|
||||
|
||||
instance.constrainSurrounding = host._getBoxSurroundingInfo(constrain);
|
||||
}
|
||||
});
|
||||
|
||||
Y.namespace('Plugin');
|
||||
Y.Plugin.ResizeConstrained = ResizeConstrained;
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["plugin", "resize-base"]});
|
@ -1,461 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('resize-constrain', function (Y, NAME) {
|
||||
|
||||
var Lang = Y.Lang,
|
||||
isBoolean = Lang.isBoolean,
|
||||
isNumber = Lang.isNumber,
|
||||
isString = Lang.isString,
|
||||
capitalize = Y.Resize.capitalize,
|
||||
|
||||
isNode = function(v) {
|
||||
return (v instanceof Y.Node);
|
||||
},
|
||||
|
||||
toNumber = function(num) {
|
||||
return parseFloat(num) || 0;
|
||||
},
|
||||
|
||||
BORDER_BOTTOM_WIDTH = 'borderBottomWidth',
|
||||
BORDER_LEFT_WIDTH = 'borderLeftWidth',
|
||||
BORDER_RIGHT_WIDTH = 'borderRightWidth',
|
||||
BORDER_TOP_WIDTH = 'borderTopWidth',
|
||||
BORDER = 'border',
|
||||
BOTTOM = 'bottom',
|
||||
CON = 'con',
|
||||
CONSTRAIN = 'constrain',
|
||||
HOST = 'host',
|
||||
LEFT = 'left',
|
||||
MAX_HEIGHT = 'maxHeight',
|
||||
MAX_WIDTH = 'maxWidth',
|
||||
MIN_HEIGHT = 'minHeight',
|
||||
MIN_WIDTH = 'minWidth',
|
||||
NODE = 'node',
|
||||
OFFSET_HEIGHT = 'offsetHeight',
|
||||
OFFSET_WIDTH = 'offsetWidth',
|
||||
PRESEVE_RATIO = 'preserveRatio',
|
||||
REGION = 'region',
|
||||
RESIZE_CONTRAINED = 'resizeConstrained',
|
||||
RIGHT = 'right',
|
||||
TICK_X = 'tickX',
|
||||
TICK_Y = 'tickY',
|
||||
TOP = 'top',
|
||||
WIDTH = 'width',
|
||||
VIEW = 'view',
|
||||
VIEWPORT_REGION = 'viewportRegion';
|
||||
|
||||
/**
|
||||
A Resize plugin that will attempt to constrain the resize node to the boundaries.
|
||||
@module resize
|
||||
@submodule resize-contrain
|
||||
@class ResizeConstrained
|
||||
@param config {Object} Object literal specifying widget configuration properties.
|
||||
@constructor
|
||||
@extends Plugin.Base
|
||||
@namespace Plugin
|
||||
*/
|
||||
|
||||
function ResizeConstrained() {
|
||||
ResizeConstrained.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Y.mix(ResizeConstrained, {
|
||||
NAME: RESIZE_CONTRAINED,
|
||||
|
||||
NS: CON,
|
||||
|
||||
ATTRS: {
|
||||
/**
|
||||
* Will attempt to constrain the resize node to the boundaries. Arguments:<br>
|
||||
* 'view': Contrain to Viewport<br>
|
||||
* '#selector_string': Constrain to this node<br>
|
||||
* '{Region Object}': An Object Literal containing a valid region (top, right, bottom, left) of page positions
|
||||
*
|
||||
* @attribute constrain
|
||||
* @type {String|Object|Node}
|
||||
*/
|
||||
constrain: {
|
||||
setter: function(v) {
|
||||
if (v && (isNode(v) || isString(v) || v.nodeType)) {
|
||||
v = Y.one(v);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* The minimum height of the element
|
||||
*
|
||||
* @attribute minHeight
|
||||
* @default 15
|
||||
* @type Number
|
||||
*/
|
||||
minHeight: {
|
||||
value: 15,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* The minimum width of the element
|
||||
*
|
||||
* @attribute minWidth
|
||||
* @default 15
|
||||
* @type Number
|
||||
*/
|
||||
minWidth: {
|
||||
value: 15,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum height of the element
|
||||
*
|
||||
* @attribute maxHeight
|
||||
* @default Infinity
|
||||
* @type Number
|
||||
*/
|
||||
maxHeight: {
|
||||
value: Infinity,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum width of the element
|
||||
*
|
||||
* @attribute maxWidth
|
||||
* @default Infinity
|
||||
* @type Number
|
||||
*/
|
||||
maxWidth: {
|
||||
value: Infinity,
|
||||
validator: isNumber
|
||||
},
|
||||
|
||||
/**
|
||||
* Maintain the element's ratio when resizing.
|
||||
*
|
||||
* @attribute preserveRatio
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
preserveRatio: {
|
||||
value: false,
|
||||
validator: isBoolean
|
||||
},
|
||||
|
||||
/**
|
||||
* The number of x ticks to span the resize to.
|
||||
*
|
||||
* @attribute tickX
|
||||
* @default false
|
||||
* @type Number | false
|
||||
*/
|
||||
tickX: {
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* The number of y ticks to span the resize to.
|
||||
*
|
||||
* @attribute tickY
|
||||
* @default false
|
||||
* @type Number | false
|
||||
*/
|
||||
tickY: {
|
||||
value: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Y.extend(ResizeConstrained, Y.Plugin.Base, {
|
||||
/**
|
||||
* Stores the <code>constrain</code>
|
||||
* surrounding information retrieved from
|
||||
* <a href="Resize.html#method__getBoxSurroundingInfo">_getBoxSurroundingInfo</a>.
|
||||
*
|
||||
* @property constrainSurrounding
|
||||
* @type Object
|
||||
* @default null
|
||||
*/
|
||||
constrainSurrounding: null,
|
||||
|
||||
initializer: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST);
|
||||
|
||||
host.delegate.dd.plug(
|
||||
Y.Plugin.DDConstrained,
|
||||
{
|
||||
tickX: instance.get(TICK_X),
|
||||
tickY: instance.get(TICK_Y)
|
||||
}
|
||||
);
|
||||
|
||||
host.after('resize:align', Y.bind(instance._handleResizeAlignEvent, instance));
|
||||
host.on('resize:start', Y.bind(instance._handleResizeStartEvent, instance));
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper method to update the current values on
|
||||
* <a href="Resize.html#property_info">info</a> to respect the
|
||||
* constrain node.
|
||||
*
|
||||
* @method _checkConstrain
|
||||
* @param {String} axis 'top' or 'left'
|
||||
* @param {String} axisConstrain 'bottom' or 'right'
|
||||
* @param {String} offset 'offsetHeight' or 'offsetWidth'
|
||||
* @protected
|
||||
*/
|
||||
_checkConstrain: function(axis, axisConstrain, offset) {
|
||||
var instance = this,
|
||||
point1,
|
||||
point1Constrain,
|
||||
point2,
|
||||
point2Constrain,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
constrainBorders = instance.constrainSurrounding.border,
|
||||
region = instance._getConstrainRegion();
|
||||
|
||||
if (region) {
|
||||
point1 = info[axis] + info[offset];
|
||||
point1Constrain = region[axisConstrain] - toNumber(constrainBorders[capitalize(BORDER, axisConstrain, WIDTH)]);
|
||||
|
||||
if (point1 >= point1Constrain) {
|
||||
info[offset] -= (point1 - point1Constrain);
|
||||
}
|
||||
|
||||
point2 = info[axis];
|
||||
point2Constrain = region[axis] + toNumber(constrainBorders[capitalize(BORDER, axis, WIDTH)]);
|
||||
|
||||
if (point2 <= point2Constrain) {
|
||||
info[axis] += (point2Constrain - point2);
|
||||
info[offset] -= (point2Constrain - point2);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the current values on <a href="Resize.html#property_info">info</a>
|
||||
* to respect the maxHeight and minHeight.
|
||||
*
|
||||
* @method _checkHeight
|
||||
* @protected
|
||||
*/
|
||||
_checkHeight: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
maxHeight = (instance.get(MAX_HEIGHT) + host.totalVSurrounding),
|
||||
minHeight = (instance.get(MIN_HEIGHT) + host.totalVSurrounding);
|
||||
|
||||
instance._checkConstrain(TOP, BOTTOM, OFFSET_HEIGHT);
|
||||
|
||||
if (info.offsetHeight > maxHeight) {
|
||||
host._checkSize(OFFSET_HEIGHT, maxHeight);
|
||||
}
|
||||
|
||||
if (info.offsetHeight < minHeight) {
|
||||
host._checkSize(OFFSET_HEIGHT, minHeight);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the current values on <a href="Resize.html#property_info">info</a>
|
||||
* calculating the correct ratio for the other values.
|
||||
*
|
||||
* @method _checkRatio
|
||||
* @protected
|
||||
*/
|
||||
_checkRatio: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
originalInfo = host.originalInfo,
|
||||
oWidth = originalInfo.offsetWidth,
|
||||
oHeight = originalInfo.offsetHeight,
|
||||
oTop = originalInfo.top,
|
||||
oLeft = originalInfo.left,
|
||||
oBottom = originalInfo.bottom,
|
||||
oRight = originalInfo.right,
|
||||
// wRatio/hRatio functions keep the ratio information always synced with the current info information
|
||||
// RETURN: percentage how much width/height has changed from the original width/height
|
||||
wRatio = function() {
|
||||
return (info.offsetWidth/oWidth);
|
||||
},
|
||||
hRatio = function() {
|
||||
return (info.offsetHeight/oHeight);
|
||||
},
|
||||
isClosestToHeight = host.changeHeightHandles,
|
||||
bottomDiff,
|
||||
constrainBorders,
|
||||
constrainRegion,
|
||||
leftDiff,
|
||||
rightDiff,
|
||||
topDiff;
|
||||
|
||||
// check whether the resizable node is closest to height or not
|
||||
if (instance.get(CONSTRAIN) && host.changeHeightHandles && host.changeWidthHandles) {
|
||||
constrainRegion = instance._getConstrainRegion();
|
||||
constrainBorders = instance.constrainSurrounding.border;
|
||||
bottomDiff = (constrainRegion.bottom - toNumber(constrainBorders[BORDER_BOTTOM_WIDTH])) - oBottom;
|
||||
leftDiff = oLeft - (constrainRegion.left + toNumber(constrainBorders[BORDER_LEFT_WIDTH]));
|
||||
rightDiff = (constrainRegion.right - toNumber(constrainBorders[BORDER_RIGHT_WIDTH])) - oRight;
|
||||
topDiff = oTop - (constrainRegion.top + toNumber(constrainBorders[BORDER_TOP_WIDTH]));
|
||||
|
||||
if (host.changeLeftHandles && host.changeTopHandles) {
|
||||
isClosestToHeight = (topDiff < leftDiff);
|
||||
}
|
||||
else if (host.changeLeftHandles) {
|
||||
isClosestToHeight = (bottomDiff < leftDiff);
|
||||
}
|
||||
else if (host.changeTopHandles) {
|
||||
isClosestToHeight = (topDiff < rightDiff);
|
||||
}
|
||||
else {
|
||||
isClosestToHeight = (bottomDiff < rightDiff);
|
||||
}
|
||||
}
|
||||
|
||||
// when the height of the resizable element touch the border of the constrain first
|
||||
// force the offsetWidth to be calculated based on the height ratio
|
||||
if (isClosestToHeight) {
|
||||
info.offsetWidth = oWidth*hRatio();
|
||||
instance._checkWidth();
|
||||
info.offsetHeight = oHeight*wRatio();
|
||||
}
|
||||
else {
|
||||
info.offsetHeight = oHeight*wRatio();
|
||||
instance._checkHeight();
|
||||
info.offsetWidth = oWidth*hRatio();
|
||||
}
|
||||
|
||||
// fixing the top on handles which are able to change top
|
||||
// the idea here is change the top based on how much the height has changed instead of follow the dy
|
||||
if (host.changeTopHandles) {
|
||||
info.top = oTop + (oHeight - info.offsetHeight);
|
||||
}
|
||||
|
||||
// fixing the left on handles which are able to change left
|
||||
// the idea here is change the left based on how much the width has changed instead of follow the dx
|
||||
if (host.changeLeftHandles) {
|
||||
info.left = oLeft + (oWidth - info.offsetWidth);
|
||||
}
|
||||
|
||||
// rounding values to avoid pixel jumpings
|
||||
Y.each(info, function(value, key) {
|
||||
if (isNumber(value)) {
|
||||
info[key] = Math.round(value);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether the resizable node is inside the constrain region.
|
||||
*
|
||||
* @method _checkRegion
|
||||
* @protected
|
||||
* @return {boolean}
|
||||
*/
|
||||
_checkRegion: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
region = instance._getConstrainRegion();
|
||||
|
||||
return Y.DOM.inRegion(null, region, true, host.info);
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the current values on <a href="Resize.html#property_info">info</a>
|
||||
* to respect the maxWidth and minWidth.
|
||||
*
|
||||
* @method _checkWidth
|
||||
* @protected
|
||||
*/
|
||||
_checkWidth: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
info = host.info,
|
||||
maxWidth = (instance.get(MAX_WIDTH) + host.totalHSurrounding),
|
||||
minWidth = (instance.get(MIN_WIDTH) + host.totalHSurrounding);
|
||||
|
||||
instance._checkConstrain(LEFT, RIGHT, OFFSET_WIDTH);
|
||||
|
||||
if (info.offsetWidth < minWidth) {
|
||||
host._checkSize(OFFSET_WIDTH, minWidth);
|
||||
}
|
||||
|
||||
if (info.offsetWidth > maxWidth) {
|
||||
host._checkSize(OFFSET_WIDTH, maxWidth);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the constrain region based on the <code>constrain</code>
|
||||
* attribute.
|
||||
*
|
||||
* @method _getConstrainRegion
|
||||
* @protected
|
||||
* @return {Object Region}
|
||||
*/
|
||||
_getConstrainRegion: function() {
|
||||
var instance = this,
|
||||
host = instance.get(HOST),
|
||||
node = host.get(NODE),
|
||||
constrain = instance.get(CONSTRAIN),
|
||||
region = null;
|
||||
|
||||
if (constrain) {
|
||||
if (constrain == VIEW) {
|
||||
region = node.get(VIEWPORT_REGION);
|
||||
}
|
||||
else if (isNode(constrain)) {
|
||||
region = constrain.get(REGION);
|
||||
}
|
||||
else {
|
||||
region = constrain;
|
||||
}
|
||||
}
|
||||
|
||||
return region;
|
||||
},
|
||||
|
||||
_handleResizeAlignEvent: function(event) {
|
||||
var instance = this,
|
||||
host = instance.get(HOST);
|
||||
|
||||
// check the max/min height and locking top when these values are reach
|
||||
instance._checkHeight();
|
||||
|
||||
// check the max/min width and locking left when these values are reach
|
||||
instance._checkWidth();
|
||||
|
||||
// calculating the ratio, for proportionally resizing
|
||||
if (instance.get(PRESEVE_RATIO)) {
|
||||
instance._checkRatio();
|
||||
}
|
||||
|
||||
if (instance.get(CONSTRAIN) && !instance._checkRegion()) {
|
||||
host.info = host.lastInfo;
|
||||
}
|
||||
},
|
||||
|
||||
_handleResizeStartEvent: function(event) {
|
||||
var instance = this,
|
||||
constrain = instance.get(CONSTRAIN),
|
||||
host = instance.get(HOST);
|
||||
|
||||
instance.constrainSurrounding = host._getBoxSurroundingInfo(constrain);
|
||||
}
|
||||
});
|
||||
|
||||
Y.namespace('Plugin');
|
||||
Y.Plugin.ResizeConstrained = ResizeConstrained;
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["plugin", "resize-base"]});
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
.yui3-resize-handle-inner-r,
|
||||
.yui3-resize-handle-inner-l,
|
||||
.yui3-resize-handle-inner-t,
|
||||
.yui3-resize-handle-inner-b,
|
||||
.yui3-resize-handle-inner-tr,
|
||||
.yui3-resize-handle-inner-br,
|
||||
.yui3-resize-handle-inner-tl,
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-repeat: no-repeat;
|
||||
background: url(arrows.png) no-repeat 0 0;
|
||||
display: block;
|
||||
height: 15px;
|
||||
overflow: hidden;
|
||||
text-indent: -99999em;
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-br {
|
||||
background-position: -30px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tr {
|
||||
background-position: -58px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-position: -75px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tl {
|
||||
background-position: -47px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-t {
|
||||
background-position: -15px 0;
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
.yui3-resize-handle-inner-r,
|
||||
.yui3-resize-handle-inner-l,
|
||||
.yui3-resize-handle-inner-t,
|
||||
.yui3-resize-handle-inner-b,
|
||||
.yui3-resize-handle-inner-tr,
|
||||
.yui3-resize-handle-inner-br,
|
||||
.yui3-resize-handle-inner-tl,
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-repeat: no-repeat;
|
||||
background: url(arrows.png) no-repeat 0 0;
|
||||
display: block;
|
||||
height: 15px;
|
||||
overflow: hidden;
|
||||
text-indent: -99999em;
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-br {
|
||||
background-position: -30px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tr {
|
||||
background-position: -58px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-position: -75px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tl {
|
||||
background-position: -47px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-t {
|
||||
background-position: -15px 0;
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
.yui3-resize-handle-inner-r,
|
||||
.yui3-resize-handle-inner-l,
|
||||
.yui3-resize-handle-inner-t,
|
||||
.yui3-resize-handle-inner-b,
|
||||
.yui3-resize-handle-inner-tr,
|
||||
.yui3-resize-handle-inner-br,
|
||||
.yui3-resize-handle-inner-tl,
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-repeat: no-repeat;
|
||||
background: url(arrows.png) no-repeat 0 0;
|
||||
display: block;
|
||||
height: 15px;
|
||||
overflow: hidden;
|
||||
text-indent: -99999em;
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-br {
|
||||
background-position: -30px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tr {
|
||||
background-position: -58px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-position: -75px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tl {
|
||||
background-position: -47px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-t {
|
||||
background-position: -15px 0;
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
.yui3-resize-handle-inner-r,
|
||||
.yui3-resize-handle-inner-l,
|
||||
.yui3-resize-handle-inner-t,
|
||||
.yui3-resize-handle-inner-b,
|
||||
.yui3-resize-handle-inner-tr,
|
||||
.yui3-resize-handle-inner-br,
|
||||
.yui3-resize-handle-inner-tl,
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-repeat: no-repeat;
|
||||
background: url(arrows.png) no-repeat 0 0;
|
||||
display: block;
|
||||
height: 15px;
|
||||
overflow: hidden;
|
||||
text-indent: -99999em;
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-br {
|
||||
background-position: -30px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tr {
|
||||
background-position: -58px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-bl {
|
||||
background-position: -75px 0;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-tl {
|
||||
background-position: -47px 0;
|
||||
bottom: 0;
|
||||
right: -2px;
|
||||
|
||||
}
|
||||
|
||||
.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-t {
|
||||
background-position: -15px 0;
|
||||
}
|
@ -1,248 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
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/resize-proxy/resize-proxy.js"] = {
|
||||
lines: {},
|
||||
functions: {},
|
||||
coveredLines: 0,
|
||||
calledLines: 0,
|
||||
coveredFunctions: 0,
|
||||
calledFunctions: 0,
|
||||
path: "build/resize-proxy/resize-proxy.js",
|
||||
code: []
|
||||
};
|
||||
_yuitest_coverage["build/resize-proxy/resize-proxy.js"].code=["YUI.add('resize-proxy', function (Y, NAME) {","","var ACTIVE_HANDLE_NODE = 'activeHandleNode',"," CURSOR = 'cursor',"," DRAG_CURSOR = 'dragCursor',"," HOST = 'host',"," PARENT_NODE = 'parentNode',"," PROXY = 'proxy',"," PROXY_NODE = 'proxyNode',"," RESIZE = 'resize',"," RESIZE_PROXY = 'resize-proxy',"," WRAPPER = 'wrapper',",""," getCN = Y.ClassNameManager.getClassName,",""," CSS_RESIZE_PROXY = getCN(RESIZE, PROXY);","","","/**","Adds a `proxyNode` attribute and resizes it instead of the actual node. __very similar to DDProxy__",""," var resize = new Y.Resize({"," //Selector of the node to resize"," node: '#demo'"," });"," resize.plug(Y.Plugin.ResizeProxy);"," ","","@class ResizeProxy","@module resize","@submodule resize-proxy","@constructor","@extends Plugin.Base","@namespace Plugin","*/","","","function ResizeProxy() {"," ResizeProxy.superclass.constructor.apply(this, arguments);","}","","Y.mix(ResizeProxy, {"," NAME: RESIZE_PROXY,",""," NS: PROXY,",""," ATTRS: {"," /**"," * The Resize proxy element."," *"," * @attribute proxyNode"," * @default Generated using an internal HTML markup"," * @type String|Node"," */"," proxyNode: {"," setter: Y.one,"," valueFn: function() {"," return Y.Node.create(this.PROXY_TEMPLATE);"," }"," }"," }","});","","Y.extend(ResizeProxy, Y.Plugin.Base, {"," /**"," * Template used to create the resize proxy."," *"," * @property PROXY_TEMPLATE"," * @type {String}"," */"," PROXY_TEMPLATE: '<div class=\"'+CSS_RESIZE_PROXY+'\"></div>',",""," initializer: function() {"," var instance = this;",""," instance.afterHostEvent('resize:start', instance._afterResizeStart);"," instance.beforeHostMethod('_resize', instance._beforeHostResize);"," instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd);"," },",""," destructor: function() {"," var instance = this;",""," instance.get(PROXY_NODE).remove(true);"," },",""," _afterHostResizeEnd: function(event) {"," var instance = this,"," drag = event.dragEvent.target;",""," // reseting actXY from drag when drag end"," drag.actXY = [];",""," // if proxy is true, hide it on resize end"," instance._syncProxyUI();",""," instance.get(PROXY_NODE).hide();"," },",""," _afterResizeStart: function(event) {"," var instance = this;",""," instance._renderProxy();"," },",""," _beforeHostResize: function(event) {"," var instance = this,"," host = this.get(HOST);",""," host._handleResizeAlignEvent(event.dragEvent);",""," // if proxy is true _syncProxyUI instead of _syncUI"," instance._syncProxyUI();",""," return new Y.Do.Prevent();"," },",""," /**"," * Render the <a href=\"ResizeProxy.html#attr_proxyNode\">proxyNode</a> element and"," * make it sibling of the <a href=\"Resize.html#attr_node\">node</a>."," *"," * @method _renderProxy"," * @protected"," */"," _renderProxy: function() {"," var instance = this,"," host = this.get(HOST),"," proxyNode = instance.get(PROXY_NODE);",""," if (!proxyNode.inDoc()) {"," host.get(WRAPPER).get(PARENT_NODE).append("," proxyNode.hide()"," );"," }"," },",""," /**"," * Sync the proxy UI with internal values from"," * <a href=\"ResizeProxy.html#property_info\">info</a>."," *"," * @method _syncProxyUI"," * @protected"," */"," _syncProxyUI: function() {"," var instance = this,"," host = this.get(HOST),"," info = host.info,"," activeHandleNode = host.get(ACTIVE_HANDLE_NODE),"," proxyNode = instance.get(PROXY_NODE),"," cursor = activeHandleNode.getStyle(CURSOR);",""," proxyNode.show().setStyle(CURSOR, cursor);",""," host.delegate.dd.set(DRAG_CURSOR, cursor);",""," proxyNode.sizeTo(info.offsetWidth, info.offsetHeight);",""," proxyNode.setXY([ info.left, info.top ]);"," }","});","","Y.namespace('Plugin');","Y.Plugin.ResizeProxy = ResizeProxy;","","","}, '3.7.2', {\"requires\": [\"plugin\", \"resize-base\"]});"];
|
||||
_yuitest_coverage["build/resize-proxy/resize-proxy.js"].lines = {"1":0,"3":0,"38":0,"39":0,"42":0,"58":0,"64":0,"74":0,"76":0,"77":0,"78":0,"82":0,"84":0,"88":0,"92":0,"95":0,"97":0,"101":0,"103":0,"107":0,"110":0,"113":0,"115":0,"126":0,"130":0,"131":0,"145":0,"152":0,"154":0,"156":0,"158":0,"162":0,"163":0};
|
||||
_yuitest_coverage["build/resize-proxy/resize-proxy.js"].functions = {"ResizeProxy:38":0,"valueFn:57":0,"initializer:73":0,"destructor:81":0,"_afterHostResizeEnd:87":0,"_afterResizeStart:100":0,"_beforeHostResize:106":0,"_renderProxy:125":0,"_syncProxyUI:144":0,"(anonymous 1):1":0};
|
||||
_yuitest_coverage["build/resize-proxy/resize-proxy.js"].coveredLines = 33;
|
||||
_yuitest_coverage["build/resize-proxy/resize-proxy.js"].coveredFunctions = 10;
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 1);
|
||||
YUI.add('resize-proxy', function (Y, NAME) {
|
||||
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "(anonymous 1)", 1);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 3);
|
||||
var ACTIVE_HANDLE_NODE = 'activeHandleNode',
|
||||
CURSOR = 'cursor',
|
||||
DRAG_CURSOR = 'dragCursor',
|
||||
HOST = 'host',
|
||||
PARENT_NODE = 'parentNode',
|
||||
PROXY = 'proxy',
|
||||
PROXY_NODE = 'proxyNode',
|
||||
RESIZE = 'resize',
|
||||
RESIZE_PROXY = 'resize-proxy',
|
||||
WRAPPER = 'wrapper',
|
||||
|
||||
getCN = Y.ClassNameManager.getClassName,
|
||||
|
||||
CSS_RESIZE_PROXY = getCN(RESIZE, PROXY);
|
||||
|
||||
|
||||
/**
|
||||
Adds a `proxyNode` attribute and resizes it instead of the actual node. __very similar to DDProxy__
|
||||
|
||||
var resize = new Y.Resize({
|
||||
//Selector of the node to resize
|
||||
node: '#demo'
|
||||
});
|
||||
resize.plug(Y.Plugin.ResizeProxy);
|
||||
|
||||
|
||||
@class ResizeProxy
|
||||
@module resize
|
||||
@submodule resize-proxy
|
||||
@constructor
|
||||
@extends Plugin.Base
|
||||
@namespace Plugin
|
||||
*/
|
||||
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 38);
|
||||
function ResizeProxy() {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "ResizeProxy", 38);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 39);
|
||||
ResizeProxy.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 42);
|
||||
Y.mix(ResizeProxy, {
|
||||
NAME: RESIZE_PROXY,
|
||||
|
||||
NS: PROXY,
|
||||
|
||||
ATTRS: {
|
||||
/**
|
||||
* The Resize proxy element.
|
||||
*
|
||||
* @attribute proxyNode
|
||||
* @default Generated using an internal HTML markup
|
||||
* @type String|Node
|
||||
*/
|
||||
proxyNode: {
|
||||
setter: Y.one,
|
||||
valueFn: function() {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "valueFn", 57);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 58);
|
||||
return Y.Node.create(this.PROXY_TEMPLATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 64);
|
||||
Y.extend(ResizeProxy, Y.Plugin.Base, {
|
||||
/**
|
||||
* Template used to create the resize proxy.
|
||||
*
|
||||
* @property PROXY_TEMPLATE
|
||||
* @type {String}
|
||||
*/
|
||||
PROXY_TEMPLATE: '<div class="'+CSS_RESIZE_PROXY+'"></div>',
|
||||
|
||||
initializer: function() {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "initializer", 73);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 74);
|
||||
var instance = this;
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 76);
|
||||
instance.afterHostEvent('resize:start', instance._afterResizeStart);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 77);
|
||||
instance.beforeHostMethod('_resize', instance._beforeHostResize);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 78);
|
||||
instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd);
|
||||
},
|
||||
|
||||
destructor: function() {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "destructor", 81);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 82);
|
||||
var instance = this;
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 84);
|
||||
instance.get(PROXY_NODE).remove(true);
|
||||
},
|
||||
|
||||
_afterHostResizeEnd: function(event) {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "_afterHostResizeEnd", 87);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 88);
|
||||
var instance = this,
|
||||
drag = event.dragEvent.target;
|
||||
|
||||
// reseting actXY from drag when drag end
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 92);
|
||||
drag.actXY = [];
|
||||
|
||||
// if proxy is true, hide it on resize end
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 95);
|
||||
instance._syncProxyUI();
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 97);
|
||||
instance.get(PROXY_NODE).hide();
|
||||
},
|
||||
|
||||
_afterResizeStart: function(event) {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "_afterResizeStart", 100);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 101);
|
||||
var instance = this;
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 103);
|
||||
instance._renderProxy();
|
||||
},
|
||||
|
||||
_beforeHostResize: function(event) {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "_beforeHostResize", 106);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 107);
|
||||
var instance = this,
|
||||
host = this.get(HOST);
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 110);
|
||||
host._handleResizeAlignEvent(event.dragEvent);
|
||||
|
||||
// if proxy is true _syncProxyUI instead of _syncUI
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 113);
|
||||
instance._syncProxyUI();
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 115);
|
||||
return new Y.Do.Prevent();
|
||||
},
|
||||
|
||||
/**
|
||||
* Render the <a href="ResizeProxy.html#attr_proxyNode">proxyNode</a> element and
|
||||
* make it sibling of the <a href="Resize.html#attr_node">node</a>.
|
||||
*
|
||||
* @method _renderProxy
|
||||
* @protected
|
||||
*/
|
||||
_renderProxy: function() {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "_renderProxy", 125);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 126);
|
||||
var instance = this,
|
||||
host = this.get(HOST),
|
||||
proxyNode = instance.get(PROXY_NODE);
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 130);
|
||||
if (!proxyNode.inDoc()) {
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 131);
|
||||
host.get(WRAPPER).get(PARENT_NODE).append(
|
||||
proxyNode.hide()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sync the proxy UI with internal values from
|
||||
* <a href="ResizeProxy.html#property_info">info</a>.
|
||||
*
|
||||
* @method _syncProxyUI
|
||||
* @protected
|
||||
*/
|
||||
_syncProxyUI: function() {
|
||||
_yuitest_coverfunc("build/resize-proxy/resize-proxy.js", "_syncProxyUI", 144);
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 145);
|
||||
var instance = this,
|
||||
host = this.get(HOST),
|
||||
info = host.info,
|
||||
activeHandleNode = host.get(ACTIVE_HANDLE_NODE),
|
||||
proxyNode = instance.get(PROXY_NODE),
|
||||
cursor = activeHandleNode.getStyle(CURSOR);
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 152);
|
||||
proxyNode.show().setStyle(CURSOR, cursor);
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 154);
|
||||
host.delegate.dd.set(DRAG_CURSOR, cursor);
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 156);
|
||||
proxyNode.sizeTo(info.offsetWidth, info.offsetHeight);
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 158);
|
||||
proxyNode.setXY([ info.left, info.top ]);
|
||||
}
|
||||
});
|
||||
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 162);
|
||||
Y.namespace('Plugin');
|
||||
_yuitest_coverline("build/resize-proxy/resize-proxy.js", 163);
|
||||
Y.Plugin.ResizeProxy = ResizeProxy;
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["plugin", "resize-base"]});
|
@ -1,172 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('resize-proxy', function (Y, NAME) {
|
||||
|
||||
var ACTIVE_HANDLE_NODE = 'activeHandleNode',
|
||||
CURSOR = 'cursor',
|
||||
DRAG_CURSOR = 'dragCursor',
|
||||
HOST = 'host',
|
||||
PARENT_NODE = 'parentNode',
|
||||
PROXY = 'proxy',
|
||||
PROXY_NODE = 'proxyNode',
|
||||
RESIZE = 'resize',
|
||||
RESIZE_PROXY = 'resize-proxy',
|
||||
WRAPPER = 'wrapper',
|
||||
|
||||
getCN = Y.ClassNameManager.getClassName,
|
||||
|
||||
CSS_RESIZE_PROXY = getCN(RESIZE, PROXY);
|
||||
|
||||
|
||||
/**
|
||||
Adds a `proxyNode` attribute and resizes it instead of the actual node. __very similar to DDProxy__
|
||||
|
||||
var resize = new Y.Resize({
|
||||
//Selector of the node to resize
|
||||
node: '#demo'
|
||||
});
|
||||
resize.plug(Y.Plugin.ResizeProxy);
|
||||
|
||||
|
||||
@class ResizeProxy
|
||||
@module resize
|
||||
@submodule resize-proxy
|
||||
@constructor
|
||||
@extends Plugin.Base
|
||||
@namespace Plugin
|
||||
*/
|
||||
|
||||
|
||||
function ResizeProxy() {
|
||||
ResizeProxy.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Y.mix(ResizeProxy, {
|
||||
NAME: RESIZE_PROXY,
|
||||
|
||||
NS: PROXY,
|
||||
|
||||
ATTRS: {
|
||||
/**
|
||||
* The Resize proxy element.
|
||||
*
|
||||
* @attribute proxyNode
|
||||
* @default Generated using an internal HTML markup
|
||||
* @type String|Node
|
||||
*/
|
||||
proxyNode: {
|
||||
setter: Y.one,
|
||||
valueFn: function() {
|
||||
return Y.Node.create(this.PROXY_TEMPLATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Y.extend(ResizeProxy, Y.Plugin.Base, {
|
||||
/**
|
||||
* Template used to create the resize proxy.
|
||||
*
|
||||
* @property PROXY_TEMPLATE
|
||||
* @type {String}
|
||||
*/
|
||||
PROXY_TEMPLATE: '<div class="'+CSS_RESIZE_PROXY+'"></div>',
|
||||
|
||||
initializer: function() {
|
||||
var instance = this;
|
||||
|
||||
instance.afterHostEvent('resize:start', instance._afterResizeStart);
|
||||
instance.beforeHostMethod('_resize', instance._beforeHostResize);
|
||||
instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd);
|
||||
},
|
||||
|
||||
destructor: function() {
|
||||
var instance = this;
|
||||
|
||||
instance.get(PROXY_NODE).remove(true);
|
||||
},
|
||||
|
||||
_afterHostResizeEnd: function(event) {
|
||||
var instance = this,
|
||||
drag = event.dragEvent.target;
|
||||
|
||||
// reseting actXY from drag when drag end
|
||||
drag.actXY = [];
|
||||
|
||||
// if proxy is true, hide it on resize end
|
||||
instance._syncProxyUI();
|
||||
|
||||
instance.get(PROXY_NODE).hide();
|
||||
},
|
||||
|
||||
_afterResizeStart: function(event) {
|
||||
var instance = this;
|
||||
|
||||
instance._renderProxy();
|
||||
},
|
||||
|
||||
_beforeHostResize: function(event) {
|
||||
var instance = this,
|
||||
host = this.get(HOST);
|
||||
|
||||
host._handleResizeAlignEvent(event.dragEvent);
|
||||
|
||||
// if proxy is true _syncProxyUI instead of _syncUI
|
||||
instance._syncProxyUI();
|
||||
|
||||
return new Y.Do.Prevent();
|
||||
},
|
||||
|
||||
/**
|
||||
* Render the <a href="ResizeProxy.html#attr_proxyNode">proxyNode</a> element and
|
||||
* make it sibling of the <a href="Resize.html#attr_node">node</a>.
|
||||
*
|
||||
* @method _renderProxy
|
||||
* @protected
|
||||
*/
|
||||
_renderProxy: function() {
|
||||
var instance = this,
|
||||
host = this.get(HOST),
|
||||
proxyNode = instance.get(PROXY_NODE);
|
||||
|
||||
if (!proxyNode.inDoc()) {
|
||||
host.get(WRAPPER).get(PARENT_NODE).append(
|
||||
proxyNode.hide()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sync the proxy UI with internal values from
|
||||
* <a href="ResizeProxy.html#property_info">info</a>.
|
||||
*
|
||||
* @method _syncProxyUI
|
||||
* @protected
|
||||
*/
|
||||
_syncProxyUI: function() {
|
||||
var instance = this,
|
||||
host = this.get(HOST),
|
||||
info = host.info,
|
||||
activeHandleNode = host.get(ACTIVE_HANDLE_NODE),
|
||||
proxyNode = instance.get(PROXY_NODE),
|
||||
cursor = activeHandleNode.getStyle(CURSOR);
|
||||
|
||||
proxyNode.show().setStyle(CURSOR, cursor);
|
||||
|
||||
host.delegate.dd.set(DRAG_CURSOR, cursor);
|
||||
|
||||
proxyNode.sizeTo(info.offsetWidth, info.offsetHeight);
|
||||
|
||||
proxyNode.setXY([ info.left, info.top ]);
|
||||
}
|
||||
});
|
||||
|
||||
Y.namespace('Plugin');
|
||||
Y.Plugin.ResizeProxy = ResizeProxy;
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["plugin", "resize-base"]});
|
@ -1,172 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('resize-proxy', function (Y, NAME) {
|
||||
|
||||
var ACTIVE_HANDLE_NODE = 'activeHandleNode',
|
||||
CURSOR = 'cursor',
|
||||
DRAG_CURSOR = 'dragCursor',
|
||||
HOST = 'host',
|
||||
PARENT_NODE = 'parentNode',
|
||||
PROXY = 'proxy',
|
||||
PROXY_NODE = 'proxyNode',
|
||||
RESIZE = 'resize',
|
||||
RESIZE_PROXY = 'resize-proxy',
|
||||
WRAPPER = 'wrapper',
|
||||
|
||||
getCN = Y.ClassNameManager.getClassName,
|
||||
|
||||
CSS_RESIZE_PROXY = getCN(RESIZE, PROXY);
|
||||
|
||||
|
||||
/**
|
||||
Adds a `proxyNode` attribute and resizes it instead of the actual node. __very similar to DDProxy__
|
||||
|
||||
var resize = new Y.Resize({
|
||||
//Selector of the node to resize
|
||||
node: '#demo'
|
||||
});
|
||||
resize.plug(Y.Plugin.ResizeProxy);
|
||||
|
||||
|
||||
@class ResizeProxy
|
||||
@module resize
|
||||
@submodule resize-proxy
|
||||
@constructor
|
||||
@extends Plugin.Base
|
||||
@namespace Plugin
|
||||
*/
|
||||
|
||||
|
||||
function ResizeProxy() {
|
||||
ResizeProxy.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Y.mix(ResizeProxy, {
|
||||
NAME: RESIZE_PROXY,
|
||||
|
||||
NS: PROXY,
|
||||
|
||||
ATTRS: {
|
||||
/**
|
||||
* The Resize proxy element.
|
||||
*
|
||||
* @attribute proxyNode
|
||||
* @default Generated using an internal HTML markup
|
||||
* @type String|Node
|
||||
*/
|
||||
proxyNode: {
|
||||
setter: Y.one,
|
||||
valueFn: function() {
|
||||
return Y.Node.create(this.PROXY_TEMPLATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Y.extend(ResizeProxy, Y.Plugin.Base, {
|
||||
/**
|
||||
* Template used to create the resize proxy.
|
||||
*
|
||||
* @property PROXY_TEMPLATE
|
||||
* @type {String}
|
||||
*/
|
||||
PROXY_TEMPLATE: '<div class="'+CSS_RESIZE_PROXY+'"></div>',
|
||||
|
||||
initializer: function() {
|
||||
var instance = this;
|
||||
|
||||
instance.afterHostEvent('resize:start', instance._afterResizeStart);
|
||||
instance.beforeHostMethod('_resize', instance._beforeHostResize);
|
||||
instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd);
|
||||
},
|
||||
|
||||
destructor: function() {
|
||||
var instance = this;
|
||||
|
||||
instance.get(PROXY_NODE).remove(true);
|
||||
},
|
||||
|
||||
_afterHostResizeEnd: function(event) {
|
||||
var instance = this,
|
||||
drag = event.dragEvent.target;
|
||||
|
||||
// reseting actXY from drag when drag end
|
||||
drag.actXY = [];
|
||||
|
||||
// if proxy is true, hide it on resize end
|
||||
instance._syncProxyUI();
|
||||
|
||||
instance.get(PROXY_NODE).hide();
|
||||
},
|
||||
|
||||
_afterResizeStart: function(event) {
|
||||
var instance = this;
|
||||
|
||||
instance._renderProxy();
|
||||
},
|
||||
|
||||
_beforeHostResize: function(event) {
|
||||
var instance = this,
|
||||
host = this.get(HOST);
|
||||
|
||||
host._handleResizeAlignEvent(event.dragEvent);
|
||||
|
||||
// if proxy is true _syncProxyUI instead of _syncUI
|
||||
instance._syncProxyUI();
|
||||
|
||||
return new Y.Do.Prevent();
|
||||
},
|
||||
|
||||
/**
|
||||
* Render the <a href="ResizeProxy.html#attr_proxyNode">proxyNode</a> element and
|
||||
* make it sibling of the <a href="Resize.html#attr_node">node</a>.
|
||||
*
|
||||
* @method _renderProxy
|
||||
* @protected
|
||||
*/
|
||||
_renderProxy: function() {
|
||||
var instance = this,
|
||||
host = this.get(HOST),
|
||||
proxyNode = instance.get(PROXY_NODE);
|
||||
|
||||
if (!proxyNode.inDoc()) {
|
||||
host.get(WRAPPER).get(PARENT_NODE).append(
|
||||
proxyNode.hide()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Sync the proxy UI with internal values from
|
||||
* <a href="ResizeProxy.html#property_info">info</a>.
|
||||
*
|
||||
* @method _syncProxyUI
|
||||
* @protected
|
||||
*/
|
||||
_syncProxyUI: function() {
|
||||
var instance = this,
|
||||
host = this.get(HOST),
|
||||
info = host.info,
|
||||
activeHandleNode = host.get(ACTIVE_HANDLE_NODE),
|
||||
proxyNode = instance.get(PROXY_NODE),
|
||||
cursor = activeHandleNode.getStyle(CURSOR);
|
||||
|
||||
proxyNode.show().setStyle(CURSOR, cursor);
|
||||
|
||||
host.delegate.dd.set(DRAG_CURSOR, cursor);
|
||||
|
||||
proxyNode.sizeTo(info.offsetWidth, info.offsetHeight);
|
||||
|
||||
proxyNode.setXY([ info.left, info.top ]);
|
||||
}
|
||||
});
|
||||
|
||||
Y.namespace('Plugin');
|
||||
Y.Plugin.ResizeProxy = ResizeProxy;
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["plugin", "resize-base"]});
|
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("scrollview-scrollbars",function(e,t){function O(){O.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r,i=e.Transition,s=i.useNative,o="scrollbar",u="scrollview",a="verticalNode",f="horizontalNode",l="childCache",c="top",h="left",p="width",d="height",v="scrollWidth",m="scrollHeight",g="_sbh",y="_sbv",b=i._VENDOR_PREFIX+"TransitionProperty",w="transform",E="translateX(",S="translateY(",x="scaleX(",T="scaleY(",N="scrollX",C="scrollY",k="px",L=")",A=k+L;O.CLASS_NAMES={showing:n(u,o,"showing"),scrollbar:n(u,o),scrollbarV:n(u,o,"vert"),scrollbarH:n(u,o,"horiz"),scrollbarVB:n(u,o,"vert","basic"),scrollbarHB:n(u,o,"horiz","basic"),child:n(u,"child"),first:n(u,"first"),middle:n(u,"middle"),last:n(u,"last")},r=O.CLASS_NAMES,O.NAME="pluginScrollViewScrollbars",O.NS="scrollbars",O.SCROLLBAR_TEMPLATE=["<div>",'<span class="'+r.child+" "+r.first+'"></span>','<span class="'+r.child+" "+r.middle+'"></span>','<span class="'+r.child+" "+r.last+'"></span>',"</div>"].join(""),O.ATTRS={verticalNode:{setter:"_setNode",valueFn:"_defaultNode"},horizontalNode:{setter:"_setNode",valueFn:"_defaultNode"}},e.namespace("Plugin").ScrollViewScrollbars=e.extend(O,e.Plugin.Base,{initializer:function(){this._host=this.get("host"),this.afterHostEvent("scrollEnd",this._hostScrollEnd),this.afterHostMethod("scrollTo",this._update),this.afterHostMethod("_uiDimensionsChange",this._hostDimensionsChange)},_hostDimensionsChange:function(){var t=this._host,n=t._cAxis;this._dims=t._getScrollDims(),n&&n.y&&this._renderBar(this.get(a),!0,"vert"),n&&n.x&&this._renderBar(this.get(f),!0,"horiz"),this._update(),e.later(500,this,"flash",!0)},_hostScrollEnd:function(e){this._host._flicking||this.flash()},_renderBar:function(e,t){var n=e.inDoc(),i=this._host._bb,s=e.getData("isHoriz")?r.scrollbarHB:r.scrollbarVB;t&&!n?(i.append(e),e.toggleClass(s,this._basic),this._setChildCache(e)):!t&&n&&(e.remove(),this._clearChildCache(e))},_setChildCache:function(e){var t=e.get("children"),n=t.item(0),r=t.item(1),i=t.item(2),s=e.getData("isHoriz")?"offsetWidth":"offsetHeight";e.setStyle(b,w),r.setStyle(b,w),i.setStyle(b,w),e.setData(l,{fc:n,lc:i,mc:r,fcSize:n&&n.get(s),lcSize:i&&i.get(s)})},_clearChildCache:function(e){e.clearData(l)},_updateBar:function(e,t,n,r){var i=this._host,o=this._basic,u=i._cb,a=0,f=1,v=e.getData(l),m=v.lc,b=v.mc,O=v.fcSize,M=v.lcSize,_,D,P,H,B,j,F,I,q,R;r?(j=p,F=h,I=g,q=this._dims.offsetWidth,R=this._dims.scrollWidth,H=E,B=x,t=t!==undefined?t:i.get(N)):(j=d,F=c,I=y,q=this._dims.offsetHeight,R=this._dims.scrollHeight,H=S,B=T,t=t!==undefined?t:i.get(C)),a=Math.floor(q*(q/R)),f=Math.floor(t/(R-q)*(q-a)),a>q&&(a=1),f>q-a?a-=f-(q-a):f<0&&(a=f+a,f=0),_=a-(O+M),_<0&&(_=0),_===0&&f!==0&&(f=q-(O+M)-1),n!==0?(P={duration:n},s?P.transform=H+f+A:P[F]=f+k,e.transition(P)):s?e.setStyle(w,H+f+A):e.setStyle(F,f+k);if(this[I]!==_){this[I]=_;if(_>0){n!==0?(P={duration:n},s?P.transform=B+_+L:P[j]=_+k,b.transition(P)):s?b.setStyle(w,B+_+L):b.setStyle(j,_+k);if(!r||!o)D=a-M,n!==0?(P={duration:n},s?P.transform=H+D+A:P[F]=D,m.transition(P)):s?m.setStyle(w,H+D+A):m.setStyle(F,D+k)}}},_update:function(e,t,n,r){var i=this.get(a),s=this.get(f),o=this._host,u=o._cAxis;n=(n||0)/1e3,this._showing||this.show(),u&&u.y&&i&&this._updateBar(i,t,n,!1),u&&u.x&&s&&this._updateBar(s,e,n,!0)},show:function(e){this._show(!0,e)},hide:function(e){this._show(!1,e)},_show:function(e,t){var n=this.get(a),r=this.get(f),i=t?.6:0,s=e?1:0,o;this._showing=e,this._flashTimer&&this._flashTimer.cancel(),o={duration:i,opacity:s},n&&n.transition(o),r&&r.transition(o)},flash:function(){var t=this._host;this.show(!0),this._flashTimer=e.later(800,this,"hide",!0)},_setNode:function(t,n){var i=n===f;return t=e.one(t),t&&(t.addClass(r.scrollbar),t.addClass(i?r.scrollbarH:r.scrollbarV),t.setData("isHoriz",i)),t},_defaultNode:function(){return e.Node.create(O.SCROLLBAR_TEMPLATE)},_basic:e.UA.ie&&e.UA.ie<=8})},"3.7.2",{requires:["classnamemanager","transition","plugin"],skinnable:!0});
|
File diff suppressed because one or more lines are too long
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("sortable",function(e,t){var n=function(e){n.superclass.constructor.apply(this,arguments)},r="currentNode",i="opacityNode",s="container",o="id",u="zIndex",a="opacity",f="parentNode",l="nodes",c="node";e.extend(n,e.Base,{delegate:null,drop:null,initializer:function(){var t="sortable-"+e.guid(),r={container:this.get(s),nodes:this.get(l),target:!0,invalid:this.get("invalid"),dragConfig:{groups:[t]}},i;this.get("handles")&&(r.handles=this.get("handles")),i=new e.DD.Delegate(r),this.set(o,t),i.dd.plug(e.Plugin.DDProxy,{moveOnEnd:!1,cloneNode:!0}),this.drop=new e.DD.Drop({node:this.get(s),bubbleTarget:i,groups:i.dd.get("groups")}),this.drop.on("drop:enter",e.bind(this._onDropEnter,this)),i.on({"drag:start":e.bind(this._onDragStart,this),"drag:end":e.bind(this._onDragEnd,this),"drag:over":e.bind(this._onDragOver,this),"drag:drag":e.bind(this._onDrag,this)}),this.delegate=i,n.reg(this,t)},_up:null,_y:null,_onDrag:function(e){e.pageY<this._y?this._up=!0:e.pageY>this._y&&(this._up=!1),this._y=e.pageY},_onDropEnter:function(e){var t=e.drop.get(c),n=e.drag.get(c);!t.test(this.get(l))&&!n.get(f).compareTo(t)&&t.append(n)},_onDragOver:function(t){if(!t.drop.get(c).test(this.get(l)))return;if(t.drag.get(c)==t.drop.get(c))return;if(t.drag.get(c).contains(t.drop.get(c)))return;var n=!1,r,i,u,a,h,p=this.get("moveType").toLowerCase();t.drag.get(c).get(f).contains(t.drop.get(c))&&(n=!0),n&&p=="move"&&(p="insert");switch(p){case"insert":r=this._up?"before":"after",h=t.drop.get(c),e.Sortable._test(h,this.get(s))?h.append(t.drag.get(c)):h.insert(t.drag.get(c),r);break;case"swap":e.DD.DDM.swapNode(t.drag,t.drop);break;case"move":case"copy":a=e.Sortable.getSortable(t.drop.get(c).get(f));if(!a)return;e.DD.DDM.getDrop(t.drag.get(c)).addToGroup(a.get(o)),n?e.DD.DDM.swapNode(t.drag,t.drop):(this.get("moveType")=="copy"&&(i=t.drag.get(c),u=i.cloneNode(!0),u.set(o,""),t.drag.set(c,u),a.delegate.createDrop(u,[a.get(o)]),i.setStyles({top:"",left:""})),t.drop.get(c).insert(t.drag.get(c),"before"))}this.fire(p,{same:n,drag:t.drag,drop:t.drop}),this.fire("moved",{same:n,drag:t.drag,drop:t.drop})},_onDragStart:function(e){var t=this.delegate,n=t.get("lastNode");n&&n.getDOMNode()&&n.setStyle(u,""),t.get(this.get(i)).setStyle(a,this.get(a)),t.get(r).setStyle(u,"999")},_onDragEnd:function(e){this.delegate.get(this.get(i)).setStyle(a,1),this.delegate.get(r).setStyles({top:"",left:""}),this.sync()},plug:function(e,t){return e&&e.NAME.substring(0,4).toLowerCase()==="sort"?this.constructor.superclass.plug.call(this,e,t):this.delegate.dd.plug(e,t),this},sync:function(){return this.delegate.syncTargets(),this},destructor:function(){this.drop.destroy(),this.delegate.destroy(),n.unreg(this,this.get(o))},join:function(t,n){if(t instanceof e.Sortable){n||(n="full"),n=n.toLowerCase();var r="_join_"+n;return this[r]&&this[r](t),this}return e.error("Sortable: join needs a Sortable Instance"),this},_join_none:function(e){this.delegate.dd.removeFromGroup(e.get(o)),e.delegate.dd.removeFromGroup(this.get(o))},_join_full:function(e){this.delegate.dd.addToGroup(e.get(o)),e.delegate.dd.addToGroup(this.get(o))},_join_outer:function(e){this.delegate.dd.addToGroup(e.get(o))},_join_inner:function(e){e.delegate.dd.addToGroup(this.get(o))},getOrdering:function(t){var n=[];return e.Lang.isFunction(t)||(t=function(e){return e}),e.one(this.get(s)).all(this.get(l)).each(function(e){n.push(t(e))}),n}},{NAME:"sortable",ATTRS:{handles:{value:!1},container:{value:"body"},nodes:{value:".dd-draggable"},opacity:{value:".75"},opacityNode:{value:"currentNode"},id:{value:null},moveType:{value:"insert"},invalid:{value:""}},_sortables:{},_test:function(t,n){var r;return n instanceof e.Node?r=n===t:r=t.test(n),r},getSortable:function(t){var n=null,r=null;return t=e.one(t),r=t.get(o),r&&e.Sortable._sortables[r]?e.Sortable._sortables[r]:(e.Object.each(e.Sortable._sortables,function(r){e.Sortable._test(t,r.get(s))&&(n=r)}),n)},reg:function(t,n){n||(n=t.get(o)),e.Sortable._sortables[n]=t},unreg:function(t,r){r||(r=t.get(o));if(r&&e.Sortable._sortables[r]){delete e.Sortable._sortables[r];return}e.Object.each(e.Sortable._sortables,function(e,r){e===t&&delete n._sortables[r]})}}),e.Sortable=n},"3.7.2",{requires:["dd-delegate","dd-drop-plugin","dd-proxy"]});
|
@ -1,219 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
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/test-console/test-console.js"] = {
|
||||
lines: {},
|
||||
functions: {},
|
||||
coveredLines: 0,
|
||||
calledLines: 0,
|
||||
coveredFunctions: 0,
|
||||
calledFunctions: 0,
|
||||
path: "build/test-console/test-console.js",
|
||||
code: []
|
||||
};
|
||||
_yuitest_coverage["build/test-console/test-console.js"].code=["YUI.add('test-console', function (Y, NAME) {","","/**","Provides a specialized log console widget that's pre-configured to display YUI","Test output with no extra configuration.","","@example",""," <div id=\"log\" class=\"yui3-skin-sam\"></div>",""," <script>"," YUI().use('test-console', function (Y) {"," // ... set up your test cases here ...",""," // Render the console inside the #log div, then run the tests."," new Y.Test.Console().render('#log');"," Y.Test.Runner.run();"," });"," </script>","","@module test-console","@namespace Test","@class Console","@extends Console","@constructor","","@param {Object} [config] Config attributes."," @param {Object} [config.filters] Category filter configuration.","","@since 3.5.0","**/","","function TestConsole() {"," TestConsole.superclass.constructor.apply(this, arguments);","}","","Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, {"," initializer: function (config) {"," this.on('entry', this._onEntry);",""," this.plug(Y.Plugin.ConsoleFilters, {"," category: Y.merge({"," info : true,"," pass : false,"," fail : true,"," status: false"," }, (config && config.filters) || {}),",""," defaultVisibility: false,",""," source: {"," TestRunner: true"," }"," });",""," Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this));"," },",""," // -- Protected Coverage Parser ---------------------------------------------"," /**"," * Parses YUITest coverage results if they are available and logs them."," * @method _parseCoverage"," * @private"," */"," _parseCoverage: function() {"," var coverage = Y.Test.Runner.getCoverage();"," if (!coverage) {"," return;"," }",""," var cov = {"," lines: {"," hit: 0,"," miss: 0,"," total: 0,"," percent: 0"," },"," functions: {"," hit: 0,"," miss: 0,"," total: 0,"," percent: 0"," }"," };",""," Y.Object.each(coverage, function(info) {"," cov.lines.total += info.coveredLines;"," cov.lines.hit += info.calledLines;"," cov.lines.miss += (info.coveredLines - info.calledLines);"," cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100);"," "," cov.functions.total += info.coveredFunctions;"," cov.functions.hit += info.calledFunctions;"," cov.functions.miss += (info.coveredFunctions - info.calledFunctions);"," cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100);"," });",""," "," var coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\\n';"," coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%';",""," this.log('Coverage: ' + coverageLog, 'info', 'TestRunner');"," },",""," // -- Protected Event Handlers ---------------------------------------------"," _onEntry: function (e) {"," var msg = e.message;",""," if (msg.category === 'info'"," && /\\s(?:case|suite)\\s|yuitests\\d+|began/.test(msg.message)) {"," msg.category = 'status';"," } else if (msg.category === 'fail') {"," this.printBuffer();"," }"," }","}, {"," NAME: 'testConsole',",""," ATTRS: {"," entryTemplate: {"," value:"," '<div class=\"{entry_class} {cat_class} {src_class}\">' +"," '<div class=\"{entry_content_class}\">{message}</div>' +"," '</div>'"," },",""," height: {"," value: '350px'"," },",""," newestOnTop: {"," value: false"," },",""," style: {"," value: 'block'"," },",""," width: {"," value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit'"," }"," }","});","","","}, '3.7.2', {\"requires\": [\"console-filters\", \"test\"], \"skinnable\": true});"];
|
||||
_yuitest_coverage["build/test-console/test-console.js"].lines = {"1":0,"33":0,"34":0,"37":0,"39":0,"41":0,"56":0,"66":0,"67":0,"68":0,"71":0,"86":0,"87":0,"88":0,"89":0,"90":0,"92":0,"93":0,"94":0,"95":0,"99":0,"100":0,"102":0,"107":0,"109":0,"111":0,"112":0,"113":0};
|
||||
_yuitest_coverage["build/test-console/test-console.js"].functions = {"TestConsole:33":0,"initializer:38":0,"(anonymous 2):86":0,"_parseCoverage:65":0,"_onEntry:106":0,"(anonymous 1):1":0};
|
||||
_yuitest_coverage["build/test-console/test-console.js"].coveredLines = 28;
|
||||
_yuitest_coverage["build/test-console/test-console.js"].coveredFunctions = 6;
|
||||
_yuitest_coverline("build/test-console/test-console.js", 1);
|
||||
YUI.add('test-console', function (Y, NAME) {
|
||||
|
||||
/**
|
||||
Provides a specialized log console widget that's pre-configured to display YUI
|
||||
Test output with no extra configuration.
|
||||
|
||||
@example
|
||||
|
||||
<div id="log" class="yui3-skin-sam"></div>
|
||||
|
||||
<script>
|
||||
YUI().use('test-console', function (Y) {
|
||||
// ... set up your test cases here ...
|
||||
|
||||
// Render the console inside the #log div, then run the tests.
|
||||
new Y.Test.Console().render('#log');
|
||||
Y.Test.Runner.run();
|
||||
});
|
||||
</script>
|
||||
|
||||
@module test-console
|
||||
@namespace Test
|
||||
@class Console
|
||||
@extends Console
|
||||
@constructor
|
||||
|
||||
@param {Object} [config] Config attributes.
|
||||
@param {Object} [config.filters] Category filter configuration.
|
||||
|
||||
@since 3.5.0
|
||||
**/
|
||||
|
||||
_yuitest_coverfunc("build/test-console/test-console.js", "(anonymous 1)", 1);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 33);
|
||||
function TestConsole() {
|
||||
_yuitest_coverfunc("build/test-console/test-console.js", "TestConsole", 33);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 34);
|
||||
TestConsole.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 37);
|
||||
Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, {
|
||||
initializer: function (config) {
|
||||
_yuitest_coverfunc("build/test-console/test-console.js", "initializer", 38);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 39);
|
||||
this.on('entry', this._onEntry);
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 41);
|
||||
this.plug(Y.Plugin.ConsoleFilters, {
|
||||
category: Y.merge({
|
||||
info : true,
|
||||
pass : false,
|
||||
fail : true,
|
||||
status: false
|
||||
}, (config && config.filters) || {}),
|
||||
|
||||
defaultVisibility: false,
|
||||
|
||||
source: {
|
||||
TestRunner: true
|
||||
}
|
||||
});
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 56);
|
||||
Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this));
|
||||
},
|
||||
|
||||
// -- Protected Coverage Parser ---------------------------------------------
|
||||
/**
|
||||
* Parses YUITest coverage results if they are available and logs them.
|
||||
* @method _parseCoverage
|
||||
* @private
|
||||
*/
|
||||
_parseCoverage: function() {
|
||||
_yuitest_coverfunc("build/test-console/test-console.js", "_parseCoverage", 65);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 66);
|
||||
var coverage = Y.Test.Runner.getCoverage();
|
||||
_yuitest_coverline("build/test-console/test-console.js", 67);
|
||||
if (!coverage) {
|
||||
_yuitest_coverline("build/test-console/test-console.js", 68);
|
||||
return;
|
||||
}
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 71);
|
||||
var cov = {
|
||||
lines: {
|
||||
hit: 0,
|
||||
miss: 0,
|
||||
total: 0,
|
||||
percent: 0
|
||||
},
|
||||
functions: {
|
||||
hit: 0,
|
||||
miss: 0,
|
||||
total: 0,
|
||||
percent: 0
|
||||
}
|
||||
};
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 86);
|
||||
Y.Object.each(coverage, function(info) {
|
||||
_yuitest_coverfunc("build/test-console/test-console.js", "(anonymous 2)", 86);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 87);
|
||||
cov.lines.total += info.coveredLines;
|
||||
_yuitest_coverline("build/test-console/test-console.js", 88);
|
||||
cov.lines.hit += info.calledLines;
|
||||
_yuitest_coverline("build/test-console/test-console.js", 89);
|
||||
cov.lines.miss += (info.coveredLines - info.calledLines);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 90);
|
||||
cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100);
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 92);
|
||||
cov.functions.total += info.coveredFunctions;
|
||||
_yuitest_coverline("build/test-console/test-console.js", 93);
|
||||
cov.functions.hit += info.calledFunctions;
|
||||
_yuitest_coverline("build/test-console/test-console.js", 94);
|
||||
cov.functions.miss += (info.coveredFunctions - info.calledFunctions);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 95);
|
||||
cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100);
|
||||
});
|
||||
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 99);
|
||||
var coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\n';
|
||||
_yuitest_coverline("build/test-console/test-console.js", 100);
|
||||
coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%';
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 102);
|
||||
this.log('Coverage: ' + coverageLog, 'info', 'TestRunner');
|
||||
},
|
||||
|
||||
// -- Protected Event Handlers ---------------------------------------------
|
||||
_onEntry: function (e) {
|
||||
_yuitest_coverfunc("build/test-console/test-console.js", "_onEntry", 106);
|
||||
_yuitest_coverline("build/test-console/test-console.js", 107);
|
||||
var msg = e.message;
|
||||
|
||||
_yuitest_coverline("build/test-console/test-console.js", 109);
|
||||
if (msg.category === 'info'
|
||||
&& /\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message)) {
|
||||
_yuitest_coverline("build/test-console/test-console.js", 111);
|
||||
msg.category = 'status';
|
||||
} else {_yuitest_coverline("build/test-console/test-console.js", 112);
|
||||
if (msg.category === 'fail') {
|
||||
_yuitest_coverline("build/test-console/test-console.js", 113);
|
||||
this.printBuffer();
|
||||
}}
|
||||
}
|
||||
}, {
|
||||
NAME: 'testConsole',
|
||||
|
||||
ATTRS: {
|
||||
entryTemplate: {
|
||||
value:
|
||||
'<div class="{entry_class} {cat_class} {src_class}">' +
|
||||
'<div class="{entry_content_class}">{message}</div>' +
|
||||
'</div>'
|
||||
},
|
||||
|
||||
height: {
|
||||
value: '350px'
|
||||
},
|
||||
|
||||
newestOnTop: {
|
||||
value: false
|
||||
},
|
||||
|
||||
style: {
|
||||
value: 'block'
|
||||
},
|
||||
|
||||
width: {
|
||||
value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["console-filters", "test"], "skinnable": true});
|
@ -1,152 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('test-console', function (Y, NAME) {
|
||||
|
||||
/**
|
||||
Provides a specialized log console widget that's pre-configured to display YUI
|
||||
Test output with no extra configuration.
|
||||
|
||||
@example
|
||||
|
||||
<div id="log" class="yui3-skin-sam"></div>
|
||||
|
||||
<script>
|
||||
YUI().use('test-console', function (Y) {
|
||||
// ... set up your test cases here ...
|
||||
|
||||
// Render the console inside the #log div, then run the tests.
|
||||
new Y.Test.Console().render('#log');
|
||||
Y.Test.Runner.run();
|
||||
});
|
||||
</script>
|
||||
|
||||
@module test-console
|
||||
@namespace Test
|
||||
@class Console
|
||||
@extends Console
|
||||
@constructor
|
||||
|
||||
@param {Object} [config] Config attributes.
|
||||
@param {Object} [config.filters] Category filter configuration.
|
||||
|
||||
@since 3.5.0
|
||||
**/
|
||||
|
||||
function TestConsole() {
|
||||
TestConsole.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, {
|
||||
initializer: function (config) {
|
||||
this.on('entry', this._onEntry);
|
||||
|
||||
this.plug(Y.Plugin.ConsoleFilters, {
|
||||
category: Y.merge({
|
||||
info : true,
|
||||
pass : false,
|
||||
fail : true,
|
||||
status: false
|
||||
}, (config && config.filters) || {}),
|
||||
|
||||
defaultVisibility: false,
|
||||
|
||||
source: {
|
||||
TestRunner: true
|
||||
}
|
||||
});
|
||||
|
||||
Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this));
|
||||
},
|
||||
|
||||
// -- Protected Coverage Parser ---------------------------------------------
|
||||
/**
|
||||
* Parses YUITest coverage results if they are available and logs them.
|
||||
* @method _parseCoverage
|
||||
* @private
|
||||
*/
|
||||
_parseCoverage: function() {
|
||||
var coverage = Y.Test.Runner.getCoverage();
|
||||
if (!coverage) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cov = {
|
||||
lines: {
|
||||
hit: 0,
|
||||
miss: 0,
|
||||
total: 0,
|
||||
percent: 0
|
||||
},
|
||||
functions: {
|
||||
hit: 0,
|
||||
miss: 0,
|
||||
total: 0,
|
||||
percent: 0
|
||||
}
|
||||
};
|
||||
|
||||
Y.Object.each(coverage, function(info) {
|
||||
cov.lines.total += info.coveredLines;
|
||||
cov.lines.hit += info.calledLines;
|
||||
cov.lines.miss += (info.coveredLines - info.calledLines);
|
||||
cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100);
|
||||
|
||||
cov.functions.total += info.coveredFunctions;
|
||||
cov.functions.hit += info.calledFunctions;
|
||||
cov.functions.miss += (info.coveredFunctions - info.calledFunctions);
|
||||
cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100);
|
||||
});
|
||||
|
||||
|
||||
var coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\n';
|
||||
coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%';
|
||||
|
||||
this.log('Coverage: ' + coverageLog, 'info', 'TestRunner');
|
||||
},
|
||||
|
||||
// -- Protected Event Handlers ---------------------------------------------
|
||||
_onEntry: function (e) {
|
||||
var msg = e.message;
|
||||
|
||||
if (msg.category === 'info'
|
||||
&& /\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message)) {
|
||||
msg.category = 'status';
|
||||
} else if (msg.category === 'fail') {
|
||||
this.printBuffer();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
NAME: 'testConsole',
|
||||
|
||||
ATTRS: {
|
||||
entryTemplate: {
|
||||
value:
|
||||
'<div class="{entry_class} {cat_class} {src_class}">' +
|
||||
'<div class="{entry_content_class}">{message}</div>' +
|
||||
'</div>'
|
||||
},
|
||||
|
||||
height: {
|
||||
value: '350px'
|
||||
},
|
||||
|
||||
newestOnTop: {
|
||||
value: false
|
||||
},
|
||||
|
||||
style: {
|
||||
value: 'block'
|
||||
},
|
||||
|
||||
width: {
|
||||
value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["console-filters", "test"], "skinnable": true});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("test-console",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}e.namespace("Test").Console=e.extend(n,e.Console,{initializer:function(t){this.on("entry",this._onEntry),this.plug(e.Plugin.ConsoleFilters,{category:e.merge({info:!0,pass:!1,fail:!0,status:!1},t&&t.filters||{}),defaultVisibility:!1,source:{TestRunner:!0}}),e.Test.Runner.on("complete",e.bind(this._parseCoverage,this))},_parseCoverage:function(){var t=e.Test.Runner.getCoverage();if(!t)return;var n={lines:{hit:0,miss:0,total:0,percent:0},functions:{hit:0,miss:0,total:0,percent:0}};e.Object.each(t,function(e){n.lines.total+=e.coveredLines,n.lines.hit+=e.calledLines,n.lines.miss+=e.coveredLines-e.calledLines,n.lines.percent=Math.floor(n.lines.hit/n.lines.total*100),n.functions.total+=e.coveredFunctions,n.functions.hit+=e.calledFunctions,n.functions.miss+=e.coveredFunctions-e.calledFunctions,n.functions.percent=Math.floor(n.functions.hit/n.functions.total*100)});var r="Lines: Hit:"+n.lines.hit+" Missed:"+n.lines.miss+" Total:"+n.lines.total+" Percent:"+n.lines.percent+"%\n";r+="Functions: Hit:"+n.functions.hit+" Missed:"+n.functions.miss+" Total:"+n.functions.total+" Percent:"+n.functions.percent+"%",this.log("Coverage: "+r,"info","TestRunner")},_onEntry:function(e){var t=e.message;t.category==="info"&&/\s(?:case|suite)\s|yuitests\d+|began/.test(t.message)?t.category="status":t.category==="fail"&&this.printBuffer()}},{NAME:"testConsole",ATTRS:{entryTemplate:{value:'<div class="{entry_class} {cat_class} {src_class}"><div class="{entry_content_class}">{message}</div></div>'},height:{value:"350px"},newestOnTop:{value:!1},style:{value:"block"},width:{value:e.UA.ie&&e.UA.ie<9?"100%":"inherit"}}})},"3.7.2",{requires:["console-filters","test"],skinnable:!0});
|
@ -1,152 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('test-console', function (Y, NAME) {
|
||||
|
||||
/**
|
||||
Provides a specialized log console widget that's pre-configured to display YUI
|
||||
Test output with no extra configuration.
|
||||
|
||||
@example
|
||||
|
||||
<div id="log" class="yui3-skin-sam"></div>
|
||||
|
||||
<script>
|
||||
YUI().use('test-console', function (Y) {
|
||||
// ... set up your test cases here ...
|
||||
|
||||
// Render the console inside the #log div, then run the tests.
|
||||
new Y.Test.Console().render('#log');
|
||||
Y.Test.Runner.run();
|
||||
});
|
||||
</script>
|
||||
|
||||
@module test-console
|
||||
@namespace Test
|
||||
@class Console
|
||||
@extends Console
|
||||
@constructor
|
||||
|
||||
@param {Object} [config] Config attributes.
|
||||
@param {Object} [config.filters] Category filter configuration.
|
||||
|
||||
@since 3.5.0
|
||||
**/
|
||||
|
||||
function TestConsole() {
|
||||
TestConsole.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Y.namespace('Test').Console = Y.extend(TestConsole, Y.Console, {
|
||||
initializer: function (config) {
|
||||
this.on('entry', this._onEntry);
|
||||
|
||||
this.plug(Y.Plugin.ConsoleFilters, {
|
||||
category: Y.merge({
|
||||
info : true,
|
||||
pass : false,
|
||||
fail : true,
|
||||
status: false
|
||||
}, (config && config.filters) || {}),
|
||||
|
||||
defaultVisibility: false,
|
||||
|
||||
source: {
|
||||
TestRunner: true
|
||||
}
|
||||
});
|
||||
|
||||
Y.Test.Runner.on('complete', Y.bind(this._parseCoverage, this));
|
||||
},
|
||||
|
||||
// -- Protected Coverage Parser ---------------------------------------------
|
||||
/**
|
||||
* Parses YUITest coverage results if they are available and logs them.
|
||||
* @method _parseCoverage
|
||||
* @private
|
||||
*/
|
||||
_parseCoverage: function() {
|
||||
var coverage = Y.Test.Runner.getCoverage();
|
||||
if (!coverage) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cov = {
|
||||
lines: {
|
||||
hit: 0,
|
||||
miss: 0,
|
||||
total: 0,
|
||||
percent: 0
|
||||
},
|
||||
functions: {
|
||||
hit: 0,
|
||||
miss: 0,
|
||||
total: 0,
|
||||
percent: 0
|
||||
}
|
||||
};
|
||||
|
||||
Y.Object.each(coverage, function(info) {
|
||||
cov.lines.total += info.coveredLines;
|
||||
cov.lines.hit += info.calledLines;
|
||||
cov.lines.miss += (info.coveredLines - info.calledLines);
|
||||
cov.lines.percent = Math.floor((cov.lines.hit / cov.lines.total) * 100);
|
||||
|
||||
cov.functions.total += info.coveredFunctions;
|
||||
cov.functions.hit += info.calledFunctions;
|
||||
cov.functions.miss += (info.coveredFunctions - info.calledFunctions);
|
||||
cov.functions.percent = Math.floor((cov.functions.hit / cov.functions.total) * 100);
|
||||
});
|
||||
|
||||
|
||||
var coverageLog = 'Lines: Hit:' + cov.lines.hit + ' Missed:' + cov.lines.miss + ' Total:' + cov.lines.total + ' Percent:' + cov.lines.percent + '%\n';
|
||||
coverageLog += 'Functions: Hit:' + cov.functions.hit + ' Missed:' + cov.functions.miss + ' Total:' + cov.functions.total + ' Percent:' + cov.functions.percent + '%';
|
||||
|
||||
this.log('Coverage: ' + coverageLog, 'info', 'TestRunner');
|
||||
},
|
||||
|
||||
// -- Protected Event Handlers ---------------------------------------------
|
||||
_onEntry: function (e) {
|
||||
var msg = e.message;
|
||||
|
||||
if (msg.category === 'info'
|
||||
&& /\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message)) {
|
||||
msg.category = 'status';
|
||||
} else if (msg.category === 'fail') {
|
||||
this.printBuffer();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
NAME: 'testConsole',
|
||||
|
||||
ATTRS: {
|
||||
entryTemplate: {
|
||||
value:
|
||||
'<div class="{entry_class} {cat_class} {src_class}">' +
|
||||
'<div class="{entry_content_class}">{message}</div>' +
|
||||
'</div>'
|
||||
},
|
||||
|
||||
height: {
|
||||
value: '350px'
|
||||
},
|
||||
|
||||
newestOnTop: {
|
||||
value: false
|
||||
},
|
||||
|
||||
style: {
|
||||
value: 'block'
|
||||
},
|
||||
|
||||
width: {
|
||||
value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["console-filters", "test"], "skinnable": true});
|
7
lib/yuilib/3.7.2/build/test/test-min.js
vendored
7
lib/yuilib/3.7.2/build/test/test-min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,718 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('transition-native', function(Y) {
|
||||
|
||||
/**
|
||||
* Provides the transition method for Node.
|
||||
* Transition has no API of its own, but adds the transition method to Node.
|
||||
*
|
||||
* @module transition
|
||||
* @requires node-style
|
||||
*/
|
||||
|
||||
var CAMEL_VENDOR_PREFIX = '',
|
||||
VENDOR_PREFIX = '',
|
||||
DOCUMENT = Y.config.doc,
|
||||
DOCUMENT_ELEMENT = 'documentElement',
|
||||
TRANSITION = 'transition',
|
||||
TRANSITION_CAMEL = 'Transition',
|
||||
TRANSITION_PROPERTY_CAMEL,
|
||||
TRANSITION_PROPERTY,
|
||||
TRANSITION_DURATION,
|
||||
TRANSITION_TIMING_FUNCTION,
|
||||
TRANSITION_DELAY,
|
||||
TRANSITION_END,
|
||||
ON_TRANSITION_END,
|
||||
TRANSFORM_CAMEL,
|
||||
|
||||
EMPTY_OBJ = {},
|
||||
|
||||
VENDORS = [
|
||||
'Webkit',
|
||||
'Moz'
|
||||
],
|
||||
|
||||
VENDOR_TRANSITION_END = {
|
||||
Webkit: 'webkitTransitionEnd'
|
||||
},
|
||||
|
||||
/**
|
||||
* A class for constructing transition instances.
|
||||
* Adds the "transition" method to Node.
|
||||
* @class Transition
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
Transition = function() {
|
||||
this.init.apply(this, arguments);
|
||||
};
|
||||
|
||||
Transition._toCamel = function(property) {
|
||||
property = property.replace(/-([a-z])/gi, function(m0, m1) {
|
||||
return m1.toUpperCase();
|
||||
});
|
||||
|
||||
return property;
|
||||
};
|
||||
|
||||
Transition._toHyphen = function(property) {
|
||||
property = property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g, function(m0, m1, m2, m3) {
|
||||
var str = ((m1) ? '-' + m1.toLowerCase() : '') + m2;
|
||||
|
||||
if (m3) {
|
||||
str += '-' + m3.toLowerCase();
|
||||
}
|
||||
|
||||
return str;
|
||||
});
|
||||
|
||||
return property;
|
||||
};
|
||||
|
||||
Transition.SHOW_TRANSITION = 'fadeIn';
|
||||
Transition.HIDE_TRANSITION = 'fadeOut';
|
||||
|
||||
Transition.useNative = false;
|
||||
|
||||
Y.Array.each(VENDORS, function(val) { // then vendor specific
|
||||
var property = val + TRANSITION_CAMEL;
|
||||
if (property in DOCUMENT[DOCUMENT_ELEMENT].style) {
|
||||
CAMEL_VENDOR_PREFIX = val;
|
||||
VENDOR_PREFIX = Transition._toHyphen(val) + '-';
|
||||
|
||||
Transition.useNative = true;
|
||||
Transition.supported = true; // TODO: remove
|
||||
}
|
||||
});
|
||||
|
||||
TRANSITION_CAMEL = CAMEL_VENDOR_PREFIX + TRANSITION_CAMEL;
|
||||
TRANSITION_PROPERTY_CAMEL = CAMEL_VENDOR_PREFIX + 'TransitionProperty';
|
||||
TRANSITION_PROPERTY = VENDOR_PREFIX + 'transition-property';
|
||||
TRANSITION_DURATION = VENDOR_PREFIX + 'transition-duration';
|
||||
TRANSITION_TIMING_FUNCTION = VENDOR_PREFIX + 'transition-timing-function';
|
||||
TRANSITION_DELAY = VENDOR_PREFIX + 'transition-delay';
|
||||
TRANSITION_END = 'transitionend';
|
||||
ON_TRANSITION_END = 'on' + CAMEL_VENDOR_PREFIX.toLowerCase() + 'transitionend';
|
||||
|
||||
TRANSITION_END = VENDOR_TRANSITION_END[CAMEL_VENDOR_PREFIX] || TRANSITION_END;
|
||||
|
||||
TRANSFORM_CAMEL = CAMEL_VENDOR_PREFIX + 'Transform';
|
||||
|
||||
Transition.fx = {};
|
||||
Transition.toggles = {};
|
||||
|
||||
Transition._hasEnd = {};
|
||||
|
||||
Transition._reKeywords = /^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;
|
||||
|
||||
Y.Node.DOM_EVENTS[TRANSITION_END] = 1;
|
||||
|
||||
Transition.NAME = 'transition';
|
||||
|
||||
Transition.DEFAULT_EASING = 'ease';
|
||||
Transition.DEFAULT_DURATION = 0.5;
|
||||
Transition.DEFAULT_DELAY = 0;
|
||||
|
||||
Transition._nodeAttrs = {};
|
||||
|
||||
Transition.prototype = {
|
||||
constructor: Transition,
|
||||
init: function(node, config) {
|
||||
var anim = this;
|
||||
anim._node = node;
|
||||
if (!anim._running && config) {
|
||||
anim._config = config;
|
||||
node._transition = anim; // cache for reuse
|
||||
|
||||
anim._duration = ('duration' in config) ?
|
||||
config.duration: anim.constructor.DEFAULT_DURATION;
|
||||
|
||||
anim._delay = ('delay' in config) ?
|
||||
config.delay: anim.constructor.DEFAULT_DELAY;
|
||||
|
||||
anim._easing = config.easing || anim.constructor.DEFAULT_EASING;
|
||||
anim._count = 0; // track number of animated properties
|
||||
anim._running = false;
|
||||
|
||||
}
|
||||
|
||||
return anim;
|
||||
},
|
||||
|
||||
addProperty: function(prop, config) {
|
||||
var anim = this,
|
||||
node = this._node,
|
||||
uid = Y.stamp(node),
|
||||
nodeInstance = Y.one(node),
|
||||
attrs = Transition._nodeAttrs[uid],
|
||||
computed,
|
||||
compareVal,
|
||||
dur,
|
||||
attr,
|
||||
val;
|
||||
|
||||
if (!attrs) {
|
||||
attrs = Transition._nodeAttrs[uid] = {};
|
||||
}
|
||||
|
||||
attr = attrs[prop];
|
||||
|
||||
// might just be a value
|
||||
if (config && config.value !== undefined) {
|
||||
val = config.value;
|
||||
} else if (config !== undefined) {
|
||||
val = config;
|
||||
config = EMPTY_OBJ;
|
||||
}
|
||||
|
||||
if (typeof val === 'function') {
|
||||
val = val.call(nodeInstance, nodeInstance);
|
||||
}
|
||||
|
||||
if (attr && attr.transition) {
|
||||
// take control if another transition owns this property
|
||||
if (attr.transition !== anim) {
|
||||
attr.transition._count--; // remapping attr to this transition
|
||||
}
|
||||
}
|
||||
|
||||
anim._count++; // properties per transition
|
||||
|
||||
// make 0 async and fire events
|
||||
dur = ((typeof config.duration != 'undefined') ? config.duration :
|
||||
anim._duration) || 0.0001;
|
||||
|
||||
attrs[prop] = {
|
||||
value: val,
|
||||
duration: dur,
|
||||
delay: (typeof config.delay != 'undefined') ? config.delay :
|
||||
anim._delay,
|
||||
|
||||
easing: config.easing || anim._easing,
|
||||
|
||||
transition: anim
|
||||
};
|
||||
|
||||
// native end event doesnt fire when setting to same value
|
||||
// supplementing with timer
|
||||
// val may be a string or number (height: 0, etc), but computedStyle is always string
|
||||
computed = Y.DOM.getComputedStyle(node, prop);
|
||||
compareVal = (typeof val === 'string') ? computed : parseFloat(computed);
|
||||
|
||||
if (Transition.useNative && compareVal === val) {
|
||||
setTimeout(function() {
|
||||
anim._onNativeEnd.call(node, {
|
||||
propertyName: prop,
|
||||
elapsedTime: dur
|
||||
});
|
||||
}, dur * 1000);
|
||||
}
|
||||
},
|
||||
|
||||
removeProperty: function(prop) {
|
||||
var anim = this,
|
||||
attrs = Transition._nodeAttrs[Y.stamp(anim._node)];
|
||||
|
||||
if (attrs && attrs[prop]) {
|
||||
delete attrs[prop];
|
||||
anim._count--;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
initAttrs: function(config) {
|
||||
var attr,
|
||||
node = this._node;
|
||||
|
||||
if (config.transform && !config[TRANSFORM_CAMEL]) {
|
||||
config[TRANSFORM_CAMEL] = config.transform;
|
||||
delete config.transform; // TODO: copy
|
||||
}
|
||||
|
||||
for (attr in config) {
|
||||
if (config.hasOwnProperty(attr) && !Transition._reKeywords.test(attr)) {
|
||||
this.addProperty(attr, config[attr]);
|
||||
|
||||
// when size is auto or % webkit starts from zero instead of computed
|
||||
// (https://bugs.webkit.org/show_bug.cgi?id=16020)
|
||||
// TODO: selective set
|
||||
if (node.style[attr] === '') {
|
||||
Y.DOM.setStyle(node, attr, Y.DOM.getComputedStyle(node, attr));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Starts or an animation.
|
||||
* @method run
|
||||
* @chainable
|
||||
* @private
|
||||
*/
|
||||
run: function(callback) {
|
||||
var anim = this,
|
||||
node = anim._node,
|
||||
config = anim._config,
|
||||
data = {
|
||||
type: 'transition:start',
|
||||
config: config
|
||||
};
|
||||
|
||||
|
||||
if (!anim._running) {
|
||||
anim._running = true;
|
||||
|
||||
//anim._node.fire('transition:start', data);
|
||||
|
||||
if (config.on && config.on.start) {
|
||||
config.on.start.call(Y.one(node), data);
|
||||
}
|
||||
|
||||
anim.initAttrs(anim._config);
|
||||
|
||||
anim._callback = callback;
|
||||
anim._start();
|
||||
}
|
||||
|
||||
|
||||
return anim;
|
||||
},
|
||||
|
||||
_start: function() {
|
||||
this._runNative();
|
||||
},
|
||||
|
||||
_prepDur: function(dur) {
|
||||
dur = parseFloat(dur);
|
||||
|
||||
return dur + 's';
|
||||
},
|
||||
|
||||
_runNative: function(time) {
|
||||
var anim = this,
|
||||
node = anim._node,
|
||||
uid = Y.stamp(node),
|
||||
style = node.style,
|
||||
computed = getComputedStyle(node),
|
||||
attrs = Transition._nodeAttrs[uid],
|
||||
cssText = '',
|
||||
cssTransition = computed[Transition._toCamel(TRANSITION_PROPERTY)],
|
||||
|
||||
transitionText = TRANSITION_PROPERTY + ': ',
|
||||
duration = TRANSITION_DURATION + ': ',
|
||||
easing = TRANSITION_TIMING_FUNCTION + ': ',
|
||||
delay = TRANSITION_DELAY + ': ',
|
||||
hyphy,
|
||||
attr,
|
||||
name;
|
||||
|
||||
// preserve existing transitions
|
||||
if (cssTransition !== 'all') {
|
||||
transitionText += cssTransition + ',';
|
||||
duration += computed[Transition._toCamel(TRANSITION_DURATION)] + ',';
|
||||
easing += computed[Transition._toCamel(TRANSITION_TIMING_FUNCTION)] + ',';
|
||||
delay += computed[Transition._toCamel(TRANSITION_DELAY)] + ',';
|
||||
|
||||
}
|
||||
|
||||
// run transitions mapped to this instance
|
||||
for (name in attrs) {
|
||||
hyphy = Transition._toHyphen(name);
|
||||
attr = attrs[name];
|
||||
if ((attr = attrs[name]) && attr.transition === anim) {
|
||||
if (name in node.style) { // only native styles allowed
|
||||
duration += anim._prepDur(attr.duration) + ',';
|
||||
delay += anim._prepDur(attr.delay) + ',';
|
||||
easing += (attr.easing) + ',';
|
||||
|
||||
transitionText += hyphy + ',';
|
||||
cssText += hyphy + ': ' + attr.value + '; ';
|
||||
} else {
|
||||
this.removeProperty(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
transitionText = transitionText.replace(/,$/, ';');
|
||||
duration = duration.replace(/,$/, ';');
|
||||
easing = easing.replace(/,$/, ';');
|
||||
delay = delay.replace(/,$/, ';');
|
||||
|
||||
// only one native end event per node
|
||||
if (!Transition._hasEnd[uid]) {
|
||||
//anim._detach = Y.on(TRANSITION_END, anim._onNativeEnd, node);
|
||||
//node[ON_TRANSITION_END] = anim._onNativeEnd;
|
||||
node.addEventListener(TRANSITION_END, anim._onNativeEnd, '');
|
||||
Transition._hasEnd[uid] = true;
|
||||
|
||||
}
|
||||
|
||||
//setTimeout(function() { // allow updates to apply (size fix, onstart, etc)
|
||||
style.cssText += transitionText + duration + easing + delay + cssText;
|
||||
//}, 1);
|
||||
|
||||
},
|
||||
|
||||
_end: function(elapsed) {
|
||||
var anim = this,
|
||||
node = anim._node,
|
||||
callback = anim._callback,
|
||||
config = anim._config,
|
||||
data = {
|
||||
type: 'transition:end',
|
||||
config: config,
|
||||
elapsedTime: elapsed
|
||||
},
|
||||
|
||||
nodeInstance = Y.one(node);
|
||||
|
||||
anim._running = false;
|
||||
anim._callback = null;
|
||||
|
||||
if (node) {
|
||||
if (config.on && config.on.end) {
|
||||
setTimeout(function() { // IE: allow previous update to finish
|
||||
config.on.end.call(nodeInstance, data);
|
||||
|
||||
// nested to ensure proper fire order
|
||||
if (callback) {
|
||||
callback.call(nodeInstance, data);
|
||||
}
|
||||
|
||||
}, 1);
|
||||
} else if (callback) {
|
||||
setTimeout(function() { // IE: allow previous update to finish
|
||||
callback.call(nodeInstance, data);
|
||||
}, 1);
|
||||
}
|
||||
//node.fire('transition:end', data);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
_endNative: function(name) {
|
||||
var node = this._node,
|
||||
value = node.ownerDocument.defaultView.getComputedStyle(node, '')[Transition._toCamel(TRANSITION_PROPERTY)];
|
||||
|
||||
if (typeof value === 'string') {
|
||||
value = value.replace(new RegExp('(?:^|,\\s)' + name + ',?'), ',');
|
||||
value = value.replace(/^,|,$/, '');
|
||||
node.style[TRANSITION_CAMEL] = value;
|
||||
}
|
||||
},
|
||||
|
||||
_onNativeEnd: function(e) {
|
||||
var node = this,
|
||||
uid = Y.stamp(node),
|
||||
event = e,//e._event,
|
||||
name = Transition._toCamel(event.propertyName),
|
||||
elapsed = event.elapsedTime,
|
||||
attrs = Transition._nodeAttrs[uid],
|
||||
attr = attrs[name],
|
||||
anim = (attr) ? attr.transition : null,
|
||||
data,
|
||||
config;
|
||||
|
||||
if (anim) {
|
||||
anim.removeProperty(name);
|
||||
anim._endNative(name);
|
||||
config = anim._config[name];
|
||||
|
||||
data = {
|
||||
type: 'propertyEnd',
|
||||
propertyName: name,
|
||||
elapsedTime: elapsed,
|
||||
config: config
|
||||
};
|
||||
|
||||
if (config && config.on && config.on.end) {
|
||||
config.on.end.call(Y.one(node), data);
|
||||
}
|
||||
|
||||
//node.fire('transition:propertyEnd', data);
|
||||
|
||||
if (anim._count <= 0) { // after propertyEnd fires
|
||||
anim._end(elapsed);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
var anim = this,
|
||||
node = anim._node;
|
||||
/*
|
||||
if (anim._detach) {
|
||||
anim._detach.detach();
|
||||
}
|
||||
*/
|
||||
//anim._node[ON_TRANSITION_END] = null;
|
||||
if (node) {
|
||||
node.removeEventListener(TRANSITION_END, anim._onNativeEnd, false);
|
||||
anim._node = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Y.Transition = Transition;
|
||||
Y.TransitionNative = Transition; // TODO: remove
|
||||
|
||||
/**
|
||||
* Animate one or more css properties to a given value. Requires the "transition" module.
|
||||
* <pre>example usage:
|
||||
* Y.one('#demo').transition({
|
||||
* duration: 1, // in seconds, default is 0.5
|
||||
* easing: 'ease-out', // default is 'ease'
|
||||
* delay: '1', // delay start for 1 second, default is 0
|
||||
*
|
||||
* height: '10px',
|
||||
* width: '10px',
|
||||
*
|
||||
* opacity: { // per property
|
||||
* value: 0,
|
||||
* duration: 2,
|
||||
* delay: 2,
|
||||
* easing: 'ease-in'
|
||||
* }
|
||||
* });
|
||||
* </pre>
|
||||
* @for Node
|
||||
* @method transition
|
||||
* @param {Object} config An object containing one or more style properties, a duration and an easing.
|
||||
* @param {Function} callback A function to run after the transition has completed.
|
||||
* @chainable
|
||||
*/
|
||||
Y.Node.prototype.transition = function(name, config, callback) {
|
||||
var
|
||||
transitionAttrs = Transition._nodeAttrs[Y.stamp(this._node)],
|
||||
anim = (transitionAttrs) ? transitionAttrs.transition || null : null,
|
||||
fxConfig,
|
||||
prop;
|
||||
|
||||
if (typeof name === 'string') { // named effect, pull config from registry
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = null;
|
||||
}
|
||||
|
||||
fxConfig = Transition.fx[name];
|
||||
|
||||
if (config && typeof config !== 'boolean') {
|
||||
config = Y.clone(config);
|
||||
|
||||
for (prop in fxConfig) {
|
||||
if (fxConfig.hasOwnProperty(prop)) {
|
||||
if (! (prop in config)) {
|
||||
config[prop] = fxConfig[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
config = fxConfig;
|
||||
}
|
||||
|
||||
} else { // name is a config, config is a callback or undefined
|
||||
callback = config;
|
||||
config = name;
|
||||
}
|
||||
|
||||
if (anim && !anim._running) {
|
||||
anim.init(this, config);
|
||||
} else {
|
||||
anim = new Transition(this._node, config);
|
||||
}
|
||||
|
||||
anim.run(callback);
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.Node.prototype.show = function(name, config, callback) {
|
||||
this._show(); // show prior to transition
|
||||
if (name && Y.Transition) {
|
||||
if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = name;
|
||||
}
|
||||
name = Transition.SHOW_TRANSITION;
|
||||
}
|
||||
this.transition(name, config, callback);
|
||||
}
|
||||
else if (name && !Y.Transition) { Y.log('unable to transition show; missing transition module', 'warn', 'node'); }
|
||||
return this;
|
||||
};
|
||||
|
||||
var _wrapCallBack = function(anim, fn, callback) {
|
||||
return function() {
|
||||
if (fn) {
|
||||
fn.call(anim);
|
||||
}
|
||||
if (callback) {
|
||||
callback.apply(anim._node, arguments);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Y.Node.prototype.hide = function(name, config, callback) {
|
||||
if (name && Y.Transition) {
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = null;
|
||||
}
|
||||
|
||||
callback = _wrapCallBack(this, this._hide, callback); // wrap with existing callback
|
||||
if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = name;
|
||||
}
|
||||
name = Transition.HIDE_TRANSITION;
|
||||
}
|
||||
this.transition(name, config, callback);
|
||||
} else if (name && !Y.Transition) { Y.log('unable to transition hide; missing transition module', 'warn', 'node'); // end if on nex
|
||||
} else {
|
||||
this._hide();
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Animate one or more css properties to a given value. Requires the "transition" module.
|
||||
* <pre>example usage:
|
||||
* Y.all('.demo').transition({
|
||||
* duration: 1, // in seconds, default is 0.5
|
||||
* easing: 'ease-out', // default is 'ease'
|
||||
* delay: '1', // delay start for 1 second, default is 0
|
||||
*
|
||||
* height: '10px',
|
||||
* width: '10px',
|
||||
*
|
||||
* opacity: { // per property
|
||||
* value: 0,
|
||||
* duration: 2,
|
||||
* delay: 2,
|
||||
* easing: 'ease-in'
|
||||
* }
|
||||
* });
|
||||
* </pre>
|
||||
* @for NodeList
|
||||
* @method transition
|
||||
* @param {Object} config An object containing one or more style properties, a duration and an easing.
|
||||
* @param {Function} callback A function to run after the transition has completed. The callback fires
|
||||
* once per item in the NodeList.
|
||||
* @chainable
|
||||
*/
|
||||
Y.NodeList.prototype.transition = function(config, callback) {
|
||||
var nodes = this._nodes,
|
||||
i = 0,
|
||||
node;
|
||||
|
||||
while ((node = nodes[i++])) {
|
||||
Y.one(node).transition(config, callback);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.Node.prototype.toggleView = function(name, on, callback) {
|
||||
this._toggles = this._toggles || [];
|
||||
callback = arguments[arguments.length - 1];
|
||||
|
||||
if (typeof name == 'boolean') { // no transition, just toggle
|
||||
on = name;
|
||||
name = null;
|
||||
}
|
||||
|
||||
name = name || Y.Transition.DEFAULT_TOGGLE;
|
||||
|
||||
if (typeof on == 'undefined' && name in this._toggles) { // reverse current toggle
|
||||
on = ! this._toggles[name];
|
||||
}
|
||||
|
||||
on = (on) ? 1 : 0;
|
||||
if (on) {
|
||||
this._show();
|
||||
} else {
|
||||
callback = _wrapCallBack(this, this._hide, callback);
|
||||
}
|
||||
|
||||
this._toggles[name] = on;
|
||||
this.transition(Y.Transition.toggles[name][on], callback);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.NodeList.prototype.toggleView = function(name, on, callback) {
|
||||
var nodes = this._nodes,
|
||||
i = 0,
|
||||
node;
|
||||
|
||||
while ((node = nodes[i++])) {
|
||||
Y.one(node).toggleView(name, on, callback);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.mix(Transition.fx, {
|
||||
fadeOut: {
|
||||
opacity: 0,
|
||||
duration: 0.5,
|
||||
easing: 'ease-out'
|
||||
},
|
||||
|
||||
fadeIn: {
|
||||
opacity: 1,
|
||||
duration: 0.5,
|
||||
easing: 'ease-in'
|
||||
},
|
||||
|
||||
sizeOut: {
|
||||
height: 0,
|
||||
width: 0,
|
||||
duration: 0.75,
|
||||
easing: 'ease-out'
|
||||
},
|
||||
|
||||
sizeIn: {
|
||||
height: function(node) {
|
||||
return node.get('scrollHeight') + 'px';
|
||||
},
|
||||
width: function(node) {
|
||||
return node.get('scrollWidth') + 'px';
|
||||
},
|
||||
duration: 0.5,
|
||||
easing: 'ease-in',
|
||||
|
||||
on: {
|
||||
start: function() {
|
||||
var overflow = this.getStyle('overflow');
|
||||
if (overflow !== 'hidden') { // enable scrollHeight/Width
|
||||
this.setStyle('overflow', 'hidden');
|
||||
this._transitionOverflow = overflow;
|
||||
}
|
||||
},
|
||||
|
||||
end: function() {
|
||||
if (this._transitionOverflow) { // revert overridden value
|
||||
this.setStyle('overflow', this._transitionOverflow);
|
||||
delete this._transitionOverflow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Y.mix(Transition.toggles, {
|
||||
size: ['sizeOut', 'sizeIn'],
|
||||
fade: ['fadeOut', 'fadeIn']
|
||||
});
|
||||
|
||||
Transition.DEFAULT_TOGGLE = 'fade';
|
||||
|
||||
|
||||
|
||||
}, '3.7.2' ,{requires:['node-base']});
|
File diff suppressed because one or more lines are too long
@ -1,716 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add('transition-native', function(Y) {
|
||||
|
||||
/**
|
||||
* Provides the transition method for Node.
|
||||
* Transition has no API of its own, but adds the transition method to Node.
|
||||
*
|
||||
* @module transition
|
||||
* @requires node-style
|
||||
*/
|
||||
|
||||
var CAMEL_VENDOR_PREFIX = '',
|
||||
VENDOR_PREFIX = '',
|
||||
DOCUMENT = Y.config.doc,
|
||||
DOCUMENT_ELEMENT = 'documentElement',
|
||||
TRANSITION = 'transition',
|
||||
TRANSITION_CAMEL = 'Transition',
|
||||
TRANSITION_PROPERTY_CAMEL,
|
||||
TRANSITION_PROPERTY,
|
||||
TRANSITION_DURATION,
|
||||
TRANSITION_TIMING_FUNCTION,
|
||||
TRANSITION_DELAY,
|
||||
TRANSITION_END,
|
||||
ON_TRANSITION_END,
|
||||
TRANSFORM_CAMEL,
|
||||
|
||||
EMPTY_OBJ = {},
|
||||
|
||||
VENDORS = [
|
||||
'Webkit',
|
||||
'Moz'
|
||||
],
|
||||
|
||||
VENDOR_TRANSITION_END = {
|
||||
Webkit: 'webkitTransitionEnd'
|
||||
},
|
||||
|
||||
/**
|
||||
* A class for constructing transition instances.
|
||||
* Adds the "transition" method to Node.
|
||||
* @class Transition
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
Transition = function() {
|
||||
this.init.apply(this, arguments);
|
||||
};
|
||||
|
||||
Transition._toCamel = function(property) {
|
||||
property = property.replace(/-([a-z])/gi, function(m0, m1) {
|
||||
return m1.toUpperCase();
|
||||
});
|
||||
|
||||
return property;
|
||||
};
|
||||
|
||||
Transition._toHyphen = function(property) {
|
||||
property = property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g, function(m0, m1, m2, m3) {
|
||||
var str = ((m1) ? '-' + m1.toLowerCase() : '') + m2;
|
||||
|
||||
if (m3) {
|
||||
str += '-' + m3.toLowerCase();
|
||||
}
|
||||
|
||||
return str;
|
||||
});
|
||||
|
||||
return property;
|
||||
};
|
||||
|
||||
Transition.SHOW_TRANSITION = 'fadeIn';
|
||||
Transition.HIDE_TRANSITION = 'fadeOut';
|
||||
|
||||
Transition.useNative = false;
|
||||
|
||||
Y.Array.each(VENDORS, function(val) { // then vendor specific
|
||||
var property = val + TRANSITION_CAMEL;
|
||||
if (property in DOCUMENT[DOCUMENT_ELEMENT].style) {
|
||||
CAMEL_VENDOR_PREFIX = val;
|
||||
VENDOR_PREFIX = Transition._toHyphen(val) + '-';
|
||||
|
||||
Transition.useNative = true;
|
||||
Transition.supported = true; // TODO: remove
|
||||
}
|
||||
});
|
||||
|
||||
TRANSITION_CAMEL = CAMEL_VENDOR_PREFIX + TRANSITION_CAMEL;
|
||||
TRANSITION_PROPERTY_CAMEL = CAMEL_VENDOR_PREFIX + 'TransitionProperty';
|
||||
TRANSITION_PROPERTY = VENDOR_PREFIX + 'transition-property';
|
||||
TRANSITION_DURATION = VENDOR_PREFIX + 'transition-duration';
|
||||
TRANSITION_TIMING_FUNCTION = VENDOR_PREFIX + 'transition-timing-function';
|
||||
TRANSITION_DELAY = VENDOR_PREFIX + 'transition-delay';
|
||||
TRANSITION_END = 'transitionend';
|
||||
ON_TRANSITION_END = 'on' + CAMEL_VENDOR_PREFIX.toLowerCase() + 'transitionend';
|
||||
|
||||
TRANSITION_END = VENDOR_TRANSITION_END[CAMEL_VENDOR_PREFIX] || TRANSITION_END;
|
||||
|
||||
TRANSFORM_CAMEL = CAMEL_VENDOR_PREFIX + 'Transform';
|
||||
|
||||
Transition.fx = {};
|
||||
Transition.toggles = {};
|
||||
|
||||
Transition._hasEnd = {};
|
||||
|
||||
Transition._reKeywords = /^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i;
|
||||
|
||||
Y.Node.DOM_EVENTS[TRANSITION_END] = 1;
|
||||
|
||||
Transition.NAME = 'transition';
|
||||
|
||||
Transition.DEFAULT_EASING = 'ease';
|
||||
Transition.DEFAULT_DURATION = 0.5;
|
||||
Transition.DEFAULT_DELAY = 0;
|
||||
|
||||
Transition._nodeAttrs = {};
|
||||
|
||||
Transition.prototype = {
|
||||
constructor: Transition,
|
||||
init: function(node, config) {
|
||||
var anim = this;
|
||||
anim._node = node;
|
||||
if (!anim._running && config) {
|
||||
anim._config = config;
|
||||
node._transition = anim; // cache for reuse
|
||||
|
||||
anim._duration = ('duration' in config) ?
|
||||
config.duration: anim.constructor.DEFAULT_DURATION;
|
||||
|
||||
anim._delay = ('delay' in config) ?
|
||||
config.delay: anim.constructor.DEFAULT_DELAY;
|
||||
|
||||
anim._easing = config.easing || anim.constructor.DEFAULT_EASING;
|
||||
anim._count = 0; // track number of animated properties
|
||||
anim._running = false;
|
||||
|
||||
}
|
||||
|
||||
return anim;
|
||||
},
|
||||
|
||||
addProperty: function(prop, config) {
|
||||
var anim = this,
|
||||
node = this._node,
|
||||
uid = Y.stamp(node),
|
||||
nodeInstance = Y.one(node),
|
||||
attrs = Transition._nodeAttrs[uid],
|
||||
computed,
|
||||
compareVal,
|
||||
dur,
|
||||
attr,
|
||||
val;
|
||||
|
||||
if (!attrs) {
|
||||
attrs = Transition._nodeAttrs[uid] = {};
|
||||
}
|
||||
|
||||
attr = attrs[prop];
|
||||
|
||||
// might just be a value
|
||||
if (config && config.value !== undefined) {
|
||||
val = config.value;
|
||||
} else if (config !== undefined) {
|
||||
val = config;
|
||||
config = EMPTY_OBJ;
|
||||
}
|
||||
|
||||
if (typeof val === 'function') {
|
||||
val = val.call(nodeInstance, nodeInstance);
|
||||
}
|
||||
|
||||
if (attr && attr.transition) {
|
||||
// take control if another transition owns this property
|
||||
if (attr.transition !== anim) {
|
||||
attr.transition._count--; // remapping attr to this transition
|
||||
}
|
||||
}
|
||||
|
||||
anim._count++; // properties per transition
|
||||
|
||||
// make 0 async and fire events
|
||||
dur = ((typeof config.duration != 'undefined') ? config.duration :
|
||||
anim._duration) || 0.0001;
|
||||
|
||||
attrs[prop] = {
|
||||
value: val,
|
||||
duration: dur,
|
||||
delay: (typeof config.delay != 'undefined') ? config.delay :
|
||||
anim._delay,
|
||||
|
||||
easing: config.easing || anim._easing,
|
||||
|
||||
transition: anim
|
||||
};
|
||||
|
||||
// native end event doesnt fire when setting to same value
|
||||
// supplementing with timer
|
||||
// val may be a string or number (height: 0, etc), but computedStyle is always string
|
||||
computed = Y.DOM.getComputedStyle(node, prop);
|
||||
compareVal = (typeof val === 'string') ? computed : parseFloat(computed);
|
||||
|
||||
if (Transition.useNative && compareVal === val) {
|
||||
setTimeout(function() {
|
||||
anim._onNativeEnd.call(node, {
|
||||
propertyName: prop,
|
||||
elapsedTime: dur
|
||||
});
|
||||
}, dur * 1000);
|
||||
}
|
||||
},
|
||||
|
||||
removeProperty: function(prop) {
|
||||
var anim = this,
|
||||
attrs = Transition._nodeAttrs[Y.stamp(anim._node)];
|
||||
|
||||
if (attrs && attrs[prop]) {
|
||||
delete attrs[prop];
|
||||
anim._count--;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
initAttrs: function(config) {
|
||||
var attr,
|
||||
node = this._node;
|
||||
|
||||
if (config.transform && !config[TRANSFORM_CAMEL]) {
|
||||
config[TRANSFORM_CAMEL] = config.transform;
|
||||
delete config.transform; // TODO: copy
|
||||
}
|
||||
|
||||
for (attr in config) {
|
||||
if (config.hasOwnProperty(attr) && !Transition._reKeywords.test(attr)) {
|
||||
this.addProperty(attr, config[attr]);
|
||||
|
||||
// when size is auto or % webkit starts from zero instead of computed
|
||||
// (https://bugs.webkit.org/show_bug.cgi?id=16020)
|
||||
// TODO: selective set
|
||||
if (node.style[attr] === '') {
|
||||
Y.DOM.setStyle(node, attr, Y.DOM.getComputedStyle(node, attr));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Starts or an animation.
|
||||
* @method run
|
||||
* @chainable
|
||||
* @private
|
||||
*/
|
||||
run: function(callback) {
|
||||
var anim = this,
|
||||
node = anim._node,
|
||||
config = anim._config,
|
||||
data = {
|
||||
type: 'transition:start',
|
||||
config: config
|
||||
};
|
||||
|
||||
|
||||
if (!anim._running) {
|
||||
anim._running = true;
|
||||
|
||||
//anim._node.fire('transition:start', data);
|
||||
|
||||
if (config.on && config.on.start) {
|
||||
config.on.start.call(Y.one(node), data);
|
||||
}
|
||||
|
||||
anim.initAttrs(anim._config);
|
||||
|
||||
anim._callback = callback;
|
||||
anim._start();
|
||||
}
|
||||
|
||||
|
||||
return anim;
|
||||
},
|
||||
|
||||
_start: function() {
|
||||
this._runNative();
|
||||
},
|
||||
|
||||
_prepDur: function(dur) {
|
||||
dur = parseFloat(dur);
|
||||
|
||||
return dur + 's';
|
||||
},
|
||||
|
||||
_runNative: function(time) {
|
||||
var anim = this,
|
||||
node = anim._node,
|
||||
uid = Y.stamp(node),
|
||||
style = node.style,
|
||||
computed = getComputedStyle(node),
|
||||
attrs = Transition._nodeAttrs[uid],
|
||||
cssText = '',
|
||||
cssTransition = computed[Transition._toCamel(TRANSITION_PROPERTY)],
|
||||
|
||||
transitionText = TRANSITION_PROPERTY + ': ',
|
||||
duration = TRANSITION_DURATION + ': ',
|
||||
easing = TRANSITION_TIMING_FUNCTION + ': ',
|
||||
delay = TRANSITION_DELAY + ': ',
|
||||
hyphy,
|
||||
attr,
|
||||
name;
|
||||
|
||||
// preserve existing transitions
|
||||
if (cssTransition !== 'all') {
|
||||
transitionText += cssTransition + ',';
|
||||
duration += computed[Transition._toCamel(TRANSITION_DURATION)] + ',';
|
||||
easing += computed[Transition._toCamel(TRANSITION_TIMING_FUNCTION)] + ',';
|
||||
delay += computed[Transition._toCamel(TRANSITION_DELAY)] + ',';
|
||||
|
||||
}
|
||||
|
||||
// run transitions mapped to this instance
|
||||
for (name in attrs) {
|
||||
hyphy = Transition._toHyphen(name);
|
||||
attr = attrs[name];
|
||||
if ((attr = attrs[name]) && attr.transition === anim) {
|
||||
if (name in node.style) { // only native styles allowed
|
||||
duration += anim._prepDur(attr.duration) + ',';
|
||||
delay += anim._prepDur(attr.delay) + ',';
|
||||
easing += (attr.easing) + ',';
|
||||
|
||||
transitionText += hyphy + ',';
|
||||
cssText += hyphy + ': ' + attr.value + '; ';
|
||||
} else {
|
||||
this.removeProperty(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
transitionText = transitionText.replace(/,$/, ';');
|
||||
duration = duration.replace(/,$/, ';');
|
||||
easing = easing.replace(/,$/, ';');
|
||||
delay = delay.replace(/,$/, ';');
|
||||
|
||||
// only one native end event per node
|
||||
if (!Transition._hasEnd[uid]) {
|
||||
//anim._detach = Y.on(TRANSITION_END, anim._onNativeEnd, node);
|
||||
//node[ON_TRANSITION_END] = anim._onNativeEnd;
|
||||
node.addEventListener(TRANSITION_END, anim._onNativeEnd, '');
|
||||
Transition._hasEnd[uid] = true;
|
||||
|
||||
}
|
||||
|
||||
//setTimeout(function() { // allow updates to apply (size fix, onstart, etc)
|
||||
style.cssText += transitionText + duration + easing + delay + cssText;
|
||||
//}, 1);
|
||||
|
||||
},
|
||||
|
||||
_end: function(elapsed) {
|
||||
var anim = this,
|
||||
node = anim._node,
|
||||
callback = anim._callback,
|
||||
config = anim._config,
|
||||
data = {
|
||||
type: 'transition:end',
|
||||
config: config,
|
||||
elapsedTime: elapsed
|
||||
},
|
||||
|
||||
nodeInstance = Y.one(node);
|
||||
|
||||
anim._running = false;
|
||||
anim._callback = null;
|
||||
|
||||
if (node) {
|
||||
if (config.on && config.on.end) {
|
||||
setTimeout(function() { // IE: allow previous update to finish
|
||||
config.on.end.call(nodeInstance, data);
|
||||
|
||||
// nested to ensure proper fire order
|
||||
if (callback) {
|
||||
callback.call(nodeInstance, data);
|
||||
}
|
||||
|
||||
}, 1);
|
||||
} else if (callback) {
|
||||
setTimeout(function() { // IE: allow previous update to finish
|
||||
callback.call(nodeInstance, data);
|
||||
}, 1);
|
||||
}
|
||||
//node.fire('transition:end', data);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
_endNative: function(name) {
|
||||
var node = this._node,
|
||||
value = node.ownerDocument.defaultView.getComputedStyle(node, '')[Transition._toCamel(TRANSITION_PROPERTY)];
|
||||
|
||||
if (typeof value === 'string') {
|
||||
value = value.replace(new RegExp('(?:^|,\\s)' + name + ',?'), ',');
|
||||
value = value.replace(/^,|,$/, '');
|
||||
node.style[TRANSITION_CAMEL] = value;
|
||||
}
|
||||
},
|
||||
|
||||
_onNativeEnd: function(e) {
|
||||
var node = this,
|
||||
uid = Y.stamp(node),
|
||||
event = e,//e._event,
|
||||
name = Transition._toCamel(event.propertyName),
|
||||
elapsed = event.elapsedTime,
|
||||
attrs = Transition._nodeAttrs[uid],
|
||||
attr = attrs[name],
|
||||
anim = (attr) ? attr.transition : null,
|
||||
data,
|
||||
config;
|
||||
|
||||
if (anim) {
|
||||
anim.removeProperty(name);
|
||||
anim._endNative(name);
|
||||
config = anim._config[name];
|
||||
|
||||
data = {
|
||||
type: 'propertyEnd',
|
||||
propertyName: name,
|
||||
elapsedTime: elapsed,
|
||||
config: config
|
||||
};
|
||||
|
||||
if (config && config.on && config.on.end) {
|
||||
config.on.end.call(Y.one(node), data);
|
||||
}
|
||||
|
||||
//node.fire('transition:propertyEnd', data);
|
||||
|
||||
if (anim._count <= 0) { // after propertyEnd fires
|
||||
anim._end(elapsed);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
var anim = this,
|
||||
node = anim._node;
|
||||
/*
|
||||
if (anim._detach) {
|
||||
anim._detach.detach();
|
||||
}
|
||||
*/
|
||||
//anim._node[ON_TRANSITION_END] = null;
|
||||
if (node) {
|
||||
node.removeEventListener(TRANSITION_END, anim._onNativeEnd, false);
|
||||
anim._node = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Y.Transition = Transition;
|
||||
Y.TransitionNative = Transition; // TODO: remove
|
||||
|
||||
/**
|
||||
* Animate one or more css properties to a given value. Requires the "transition" module.
|
||||
* <pre>example usage:
|
||||
* Y.one('#demo').transition({
|
||||
* duration: 1, // in seconds, default is 0.5
|
||||
* easing: 'ease-out', // default is 'ease'
|
||||
* delay: '1', // delay start for 1 second, default is 0
|
||||
*
|
||||
* height: '10px',
|
||||
* width: '10px',
|
||||
*
|
||||
* opacity: { // per property
|
||||
* value: 0,
|
||||
* duration: 2,
|
||||
* delay: 2,
|
||||
* easing: 'ease-in'
|
||||
* }
|
||||
* });
|
||||
* </pre>
|
||||
* @for Node
|
||||
* @method transition
|
||||
* @param {Object} config An object containing one or more style properties, a duration and an easing.
|
||||
* @param {Function} callback A function to run after the transition has completed.
|
||||
* @chainable
|
||||
*/
|
||||
Y.Node.prototype.transition = function(name, config, callback) {
|
||||
var
|
||||
transitionAttrs = Transition._nodeAttrs[Y.stamp(this._node)],
|
||||
anim = (transitionAttrs) ? transitionAttrs.transition || null : null,
|
||||
fxConfig,
|
||||
prop;
|
||||
|
||||
if (typeof name === 'string') { // named effect, pull config from registry
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = null;
|
||||
}
|
||||
|
||||
fxConfig = Transition.fx[name];
|
||||
|
||||
if (config && typeof config !== 'boolean') {
|
||||
config = Y.clone(config);
|
||||
|
||||
for (prop in fxConfig) {
|
||||
if (fxConfig.hasOwnProperty(prop)) {
|
||||
if (! (prop in config)) {
|
||||
config[prop] = fxConfig[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
config = fxConfig;
|
||||
}
|
||||
|
||||
} else { // name is a config, config is a callback or undefined
|
||||
callback = config;
|
||||
config = name;
|
||||
}
|
||||
|
||||
if (anim && !anim._running) {
|
||||
anim.init(this, config);
|
||||
} else {
|
||||
anim = new Transition(this._node, config);
|
||||
}
|
||||
|
||||
anim.run(callback);
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.Node.prototype.show = function(name, config, callback) {
|
||||
this._show(); // show prior to transition
|
||||
if (name && Y.Transition) {
|
||||
if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = name;
|
||||
}
|
||||
name = Transition.SHOW_TRANSITION;
|
||||
}
|
||||
this.transition(name, config, callback);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
var _wrapCallBack = function(anim, fn, callback) {
|
||||
return function() {
|
||||
if (fn) {
|
||||
fn.call(anim);
|
||||
}
|
||||
if (callback) {
|
||||
callback.apply(anim._node, arguments);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Y.Node.prototype.hide = function(name, config, callback) {
|
||||
if (name && Y.Transition) {
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = null;
|
||||
}
|
||||
|
||||
callback = _wrapCallBack(this, this._hide, callback); // wrap with existing callback
|
||||
if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default
|
||||
if (typeof config === 'function') {
|
||||
callback = config;
|
||||
config = name;
|
||||
}
|
||||
name = Transition.HIDE_TRANSITION;
|
||||
}
|
||||
this.transition(name, config, callback);
|
||||
} else {
|
||||
this._hide();
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Animate one or more css properties to a given value. Requires the "transition" module.
|
||||
* <pre>example usage:
|
||||
* Y.all('.demo').transition({
|
||||
* duration: 1, // in seconds, default is 0.5
|
||||
* easing: 'ease-out', // default is 'ease'
|
||||
* delay: '1', // delay start for 1 second, default is 0
|
||||
*
|
||||
* height: '10px',
|
||||
* width: '10px',
|
||||
*
|
||||
* opacity: { // per property
|
||||
* value: 0,
|
||||
* duration: 2,
|
||||
* delay: 2,
|
||||
* easing: 'ease-in'
|
||||
* }
|
||||
* });
|
||||
* </pre>
|
||||
* @for NodeList
|
||||
* @method transition
|
||||
* @param {Object} config An object containing one or more style properties, a duration and an easing.
|
||||
* @param {Function} callback A function to run after the transition has completed. The callback fires
|
||||
* once per item in the NodeList.
|
||||
* @chainable
|
||||
*/
|
||||
Y.NodeList.prototype.transition = function(config, callback) {
|
||||
var nodes = this._nodes,
|
||||
i = 0,
|
||||
node;
|
||||
|
||||
while ((node = nodes[i++])) {
|
||||
Y.one(node).transition(config, callback);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.Node.prototype.toggleView = function(name, on, callback) {
|
||||
this._toggles = this._toggles || [];
|
||||
callback = arguments[arguments.length - 1];
|
||||
|
||||
if (typeof name == 'boolean') { // no transition, just toggle
|
||||
on = name;
|
||||
name = null;
|
||||
}
|
||||
|
||||
name = name || Y.Transition.DEFAULT_TOGGLE;
|
||||
|
||||
if (typeof on == 'undefined' && name in this._toggles) { // reverse current toggle
|
||||
on = ! this._toggles[name];
|
||||
}
|
||||
|
||||
on = (on) ? 1 : 0;
|
||||
if (on) {
|
||||
this._show();
|
||||
} else {
|
||||
callback = _wrapCallBack(this, this._hide, callback);
|
||||
}
|
||||
|
||||
this._toggles[name] = on;
|
||||
this.transition(Y.Transition.toggles[name][on], callback);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.NodeList.prototype.toggleView = function(name, on, callback) {
|
||||
var nodes = this._nodes,
|
||||
i = 0,
|
||||
node;
|
||||
|
||||
while ((node = nodes[i++])) {
|
||||
Y.one(node).toggleView(name, on, callback);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Y.mix(Transition.fx, {
|
||||
fadeOut: {
|
||||
opacity: 0,
|
||||
duration: 0.5,
|
||||
easing: 'ease-out'
|
||||
},
|
||||
|
||||
fadeIn: {
|
||||
opacity: 1,
|
||||
duration: 0.5,
|
||||
easing: 'ease-in'
|
||||
},
|
||||
|
||||
sizeOut: {
|
||||
height: 0,
|
||||
width: 0,
|
||||
duration: 0.75,
|
||||
easing: 'ease-out'
|
||||
},
|
||||
|
||||
sizeIn: {
|
||||
height: function(node) {
|
||||
return node.get('scrollHeight') + 'px';
|
||||
},
|
||||
width: function(node) {
|
||||
return node.get('scrollWidth') + 'px';
|
||||
},
|
||||
duration: 0.5,
|
||||
easing: 'ease-in',
|
||||
|
||||
on: {
|
||||
start: function() {
|
||||
var overflow = this.getStyle('overflow');
|
||||
if (overflow !== 'hidden') { // enable scrollHeight/Width
|
||||
this.setStyle('overflow', 'hidden');
|
||||
this._transitionOverflow = overflow;
|
||||
}
|
||||
},
|
||||
|
||||
end: function() {
|
||||
if (this._transitionOverflow) { // revert overridden value
|
||||
this.setStyle('overflow', this._transitionOverflow);
|
||||
delete this._transitionOverflow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Y.mix(Transition.toggles, {
|
||||
size: ['sizeOut', 'sizeIn'],
|
||||
fade: ['fadeOut', 'fadeIn']
|
||||
});
|
||||
|
||||
Transition.DEFAULT_TOGGLE = 'fade';
|
||||
|
||||
|
||||
|
||||
}, '3.7.2' ,{requires:['node-base']});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,26 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
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;
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
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;
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
lib/yuilib/3.7.2/build/yui/yui-min.js
vendored
7
lib/yuilib/3.7.2/build/yui/yui-min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -196,4 +196,4 @@ YUI.add('align-plugin', function (Y, NAME) {
|
||||
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["node-screen", "node-pluginhost"]});
|
||||
}, '3.7.3', {"requires": ["node-screen", "node-pluginhost"]});
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("align-plugin",function(e,t){function s(e){e.host&&(this._host=e.host)}var n="offsetWidth",r="offsetHeight",i=i;s.prototype={to:function(t,o,u,a){this._syncArgs=e.Array(arguments),t.top===i&&(t=e.one(t).get("region"));if(t){var f=[t.left,t.top],l=[t.width,t.height],c=s.points,h=this._host,p=null,d=h.getAttrs([r,n]),v=[0-d[n],0-d[r]],m=o?c[o.charAt(0)]:p,g=o&&o!=="cc"?c[o.charAt(1)]:p,y=u?c[u.charAt(0)]:p,b=u&&u!=="cc"?c[u.charAt(1)]:p;m&&(f=m(f,l,o)),g&&(f=g(f,l,o)),y&&(f=y(f,v,u)),b&&(f=b(f,v,u)),f&&h&&h.setXY(f),this._resize(a)}return this},sync:function(){return this.to.apply(this,this._syncArgs),this},_resize:function(t){var n=this._handle;t&&!n?this._handle=e.on("resize",this._onresize,window,this):!t&&n&&n.detach()},_onresize:function(){var e=this;setTimeout(function(){e.sync()})},center:function(e,t){return this.to(e,"cc","cc",t),this},destroy:function(){var e=this._handle;e&&e.detach()}},s.points={t:function(e,t){return e},r:function(e,t){return[e[0]+t[0],e[1]]},b:function(e,t){return[e[0],e[1]+t[1]]},l:function(e,t){return e},c:function(e,t,n){var r=n[0]==="t"||n[0]==="b"?0:1,i,s;return n==="cc"?i=[e[0]+t[0]/2,e[1]+t[1]/2]:(s=e[r]+t[r]/2,i=r?[e[0],s]:[s,e[1]]),i}},s.NAME="Align",s.NS="align",s.prototype.constructor=s,e.namespace("Plugin"),e.Plugin.Align=s},"3.7.2",{requires:["node-screen","node-pluginhost"]});
|
||||
YUI.add("align-plugin",function(e,t){function s(e){e.host&&(this._host=e.host)}var n="offsetWidth",r="offsetHeight",i=i;s.prototype={to:function(t,o,u,a){this._syncArgs=e.Array(arguments),t.top===i&&(t=e.one(t).get("region"));if(t){var f=[t.left,t.top],l=[t.width,t.height],c=s.points,h=this._host,p=null,d=h.getAttrs([r,n]),v=[0-d[n],0-d[r]],m=o?c[o.charAt(0)]:p,g=o&&o!=="cc"?c[o.charAt(1)]:p,y=u?c[u.charAt(0)]:p,b=u&&u!=="cc"?c[u.charAt(1)]:p;m&&(f=m(f,l,o)),g&&(f=g(f,l,o)),y&&(f=y(f,v,u)),b&&(f=b(f,v,u)),f&&h&&h.setXY(f),this._resize(a)}return this},sync:function(){return this.to.apply(this,this._syncArgs),this},_resize:function(t){var n=this._handle;t&&!n?this._handle=e.on("resize",this._onresize,window,this):!t&&n&&n.detach()},_onresize:function(){var e=this;setTimeout(function(){e.sync()})},center:function(e,t){return this.to(e,"cc","cc",t),this},destroy:function(){var e=this._handle;e&&e.detach()}},s.points={t:function(e,t){return e},r:function(e,t){return[e[0]+t[0],e[1]]},b:function(e,t){return[e[0],e[1]+t[1]]},l:function(e,t){return e},c:function(e,t,n){var r=n[0]==="t"||n[0]==="b"?0:1,i,s;return n==="cc"?i=[e[0]+t[0]/2,e[1]+t[1]/2]:(s=e[r]+t[r]/2,i=r?[e[0],s]:[s,e[1]]),i}},s.NAME="Align",s.NS="align",s.prototype.constructor=s,e.namespace("Plugin"),e.Plugin.Align=s},"3.7.3",{requires:["node-screen","node-pluginhost"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -196,4 +196,4 @@ YUI.add('align-plugin', function (Y, NAME) {
|
||||
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["node-screen", "node-pluginhost"]});
|
||||
}, '3.7.3', {"requires": ["node-screen", "node-pluginhost"]});
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -687,4 +687,4 @@ YUI.add('anim-base', function (Y, NAME) {
|
||||
Y.extend(Y.Anim, Y.Base, proto);
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["base-base", "node-style"]});
|
||||
}, '3.7.3', {"requires": ["base-base", "node-style"]});
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("anim-base",function(e,t){var n="running",r="startTime",i="elapsedTime",s="start",o="tween",u="end",a="node",f="paused",l="reverse",c="iterationCount",h=Number,p={},d;e.Anim=function(){e.Anim.superclass.constructor.apply(this,arguments),e.Anim._instances[e.stamp(this)]=this},e.Anim.NAME="anim",e.Anim._instances={},e.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,e.Anim.DEFAULT_UNIT="px",e.Anim.DEFAULT_EASING=function(e,t,n,r){return n*e/r+t},e.Anim._intervalTime=20,e.Anim.behaviors={left:{get:function(e,t){return e._getOffset(t)}}},e.Anim.behaviors.top=e.Anim.behaviors.left,e.Anim.DEFAULT_SETTER=function(t,n,r,i,s,o,u,a){var f=t._node,l=f._node,c=u(s,h(r),h(i)-h(r),o);l?"style"in l&&(n in l.style||n in e.DOM.CUSTOM_STYLES)?(a=a||"",f.setStyle(n,c+a)):"attributes"in l&&n in l.attributes?f.setAttribute(n,c):n in l&&(l[n]=c):f.set?f.set(n,c):n in f&&(f[n]=c)},e.Anim.DEFAULT_GETTER=function(t,n){var r=t._node,i=r._node,s="";return i?"style"in i&&(n in i.style||n in e.DOM.CUSTOM_STYLES)?s=r.getComputedStyle(n):"attributes"in i&&n in i.attributes?s=r.getAttribute(n):n in i&&(s=i[n]):r.get?s=r.get(n):n in r&&(s=r[n]),s},e.Anim.ATTRS={node:{setter:function(t){return t&&(typeof t=="string"||t.nodeType)&&(t=e.one(t)),this._node=t,!t,t}},duration:{value:1},easing:{value:e.Anim.DEFAULT_EASING,setter:function(t){if(typeof t=="string"&&e.Easing)return e.Easing[t]}},from:{},to:{},startTime:{value:0,readOnly:!0},elapsedTime:{value:0,readOnly:!0},running:{getter:function(){return!!p[e.stamp(this)]},value:!1,readOnly:!0},iterations:{value:1},iterationCount:{value:0,readOnly:!0},direction:{value:"normal"},paused:{readOnly:!0,value:!1},reverse:{value:!1}},e.Anim.run=function(){var t=e.Anim._instances;for(var n in t)t[n].run&&t[n].run()},e.Anim.pause=function(){for(var t in p)p[t].pause&&p[t].pause();e.Anim._stopTimer()},e.Anim.stop=function(){for(var t in p)p[t].stop&&p[t].stop();e.Anim._stopTimer()},e.Anim._startTimer=function(){d||(d=setInterval(e.Anim._runFrame,e.Anim._intervalTime))},e.Anim._stopTimer=function(){clearInterval(d),d=0},e.Anim._runFrame=function(){var t=!0;for(var n in p)p[n]._runFrame&&(t=!1,p[n]._runFrame());t&&e.Anim._stopTimer()},e.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var v={run:function(){return this.get(f)?this._resume():this.get(n)||this._start(),this},pause:function(){return this.get(n)&&this._pause(),this},stop:function(e){return(this.get(n)||this.get(f))&&this._end(e),this},_added:!1,_start:function(){this._set(r,new Date-this.get(i)),this._actualFrames=0,this.get(f)||this._initAnimAttr(),p[e.stamp(this)]=this,e.Anim._startTimer(),this.fire(s)},_pause:function(){this._set(r,null),this._set(f,!0),delete p[e.stamp(this)],this.fire("pause")},_resume:function(){this._set(f,!1),p[e.stamp(this)]=this,this._set(r,new Date-this.get(i)),e.Anim._startTimer(),this.fire("resume")},_end:function(t){var n=this.get("duration")*1e3;t&&this._runAttrs(n,n,this.get(l)),this._set(r,null),this._set(i,0),this._set(f,!1),delete p[e.stamp(this)],this.fire(u,{elapsed:this.get(i)})},_runFrame:function(){var e=this._runtimeAttr.duration,t=new Date-this.get(r),n=this.get(l),s=t>=e,u,a;this._runAttrs(t,e,n),this._actualFrames+=1,this._set(i,t),this.fire(o),s&&this._lastFrame()},_runAttrs:function(t,n,r){var i=this._runtimeAttr,s=e.Anim.behaviors,o=i.easing,u=n,a=!1,f,l,c;t>=n&&(a=!0),r&&(t=n-t,u=0);for(c in i)i[c].to&&(f=i[c],l=c in s&&"set"in s[c]?s[c].set:e.Anim.DEFAULT_SETTER,a?l(this,c,f.from,f.to,u,n,o,f.unit):l(this,c,f.from,f.to,t,n,o,f.unit))},_lastFrame:function(){var e=this.get("iterations"),t=this.get(c);t+=1,e==="infinite"||t<e?(this.get("direction")==="alternate"&&this.set(l,!this.get(l)),this.fire("iteration")):(t=0,this._end()),this._set(r,new Date),this._set(c,t)},_initAnimAttr:function(){var t=this.get("from")||{},n=this.get("to")||{},r={duration:this.get("duration")*1e3,easing:this.get("easing")},i=e.Anim.behaviors,s=this.get(a),o,u,f;e.each(n,function(n,a){typeof n=="function"&&(n=n.call(this,s)),u=t[a],u===undefined?u=a in i&&"get"in i[a]?i[a].get(this,a):e.Anim.DEFAULT_GETTER(this,a):typeof u=="function"&&(u=u.call(this,s));var l=e.Anim.RE_UNITS.exec(u),c=e.Anim.RE_UNITS.exec(n);u=l?l[1]:u,f=c?c[1]:n,o=c?c[2]:l?l[2]:"",!o&&e.Anim.RE_DEFAULT_UNIT.test(a)&&(o=e.Anim.DEFAULT_UNIT);if(!u||!f){e.error('invalid "from" or "to" for "'+a+'"',"Anim");return}r[a]={from:e.Lang.isObject(u)?e.clone(u):u,to:f,unit:o}},this),this._runtimeAttr=r},_getOffset:function(e){var t=this._node,n=t.getComputedStyle(e),r=e==="left"?"getX":"getY",i=e==="left"?"setX":"setY";if(n==="auto"){var s=t.getStyle("position");s==="absolute"||s==="fixed"?(n=t[r](),t[i](n)):n=0}return n},destructor:function(){delete e.Anim._instances[e.stamp(this)]}};e.extend(e.Anim,e.Base,v)},"3.7.2",{requires:["base-base","node-style"]});
|
||||
YUI.add("anim-base",function(e,t){var n="running",r="startTime",i="elapsedTime",s="start",o="tween",u="end",a="node",f="paused",l="reverse",c="iterationCount",h=Number,p={},d;e.Anim=function(){e.Anim.superclass.constructor.apply(this,arguments),e.Anim._instances[e.stamp(this)]=this},e.Anim.NAME="anim",e.Anim._instances={},e.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i,e.Anim.DEFAULT_UNIT="px",e.Anim.DEFAULT_EASING=function(e,t,n,r){return n*e/r+t},e.Anim._intervalTime=20,e.Anim.behaviors={left:{get:function(e,t){return e._getOffset(t)}}},e.Anim.behaviors.top=e.Anim.behaviors.left,e.Anim.DEFAULT_SETTER=function(t,n,r,i,s,o,u,a){var f=t._node,l=f._node,c=u(s,h(r),h(i)-h(r),o);l?"style"in l&&(n in l.style||n in e.DOM.CUSTOM_STYLES)?(a=a||"",f.setStyle(n,c+a)):"attributes"in l&&n in l.attributes?f.setAttribute(n,c):n in l&&(l[n]=c):f.set?f.set(n,c):n in f&&(f[n]=c)},e.Anim.DEFAULT_GETTER=function(t,n){var r=t._node,i=r._node,s="";return i?"style"in i&&(n in i.style||n in e.DOM.CUSTOM_STYLES)?s=r.getComputedStyle(n):"attributes"in i&&n in i.attributes?s=r.getAttribute(n):n in i&&(s=i[n]):r.get?s=r.get(n):n in r&&(s=r[n]),s},e.Anim.ATTRS={node:{setter:function(t){return t&&(typeof t=="string"||t.nodeType)&&(t=e.one(t)),this._node=t,!t,t}},duration:{value:1},easing:{value:e.Anim.DEFAULT_EASING,setter:function(t){if(typeof t=="string"&&e.Easing)return e.Easing[t]}},from:{},to:{},startTime:{value:0,readOnly:!0},elapsedTime:{value:0,readOnly:!0},running:{getter:function(){return!!p[e.stamp(this)]},value:!1,readOnly:!0},iterations:{value:1},iterationCount:{value:0,readOnly:!0},direction:{value:"normal"},paused:{readOnly:!0,value:!1},reverse:{value:!1}},e.Anim.run=function(){var t=e.Anim._instances;for(var n in t)t[n].run&&t[n].run()},e.Anim.pause=function(){for(var t in p)p[t].pause&&p[t].pause();e.Anim._stopTimer()},e.Anim.stop=function(){for(var t in p)p[t].stop&&p[t].stop();e.Anim._stopTimer()},e.Anim._startTimer=function(){d||(d=setInterval(e.Anim._runFrame,e.Anim._intervalTime))},e.Anim._stopTimer=function(){clearInterval(d),d=0},e.Anim._runFrame=function(){var t=!0;for(var n in p)p[n]._runFrame&&(t=!1,p[n]._runFrame());t&&e.Anim._stopTimer()},e.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var v={run:function(){return this.get(f)?this._resume():this.get(n)||this._start(),this},pause:function(){return this.get(n)&&this._pause(),this},stop:function(e){return(this.get(n)||this.get(f))&&this._end(e),this},_added:!1,_start:function(){this._set(r,new Date-this.get(i)),this._actualFrames=0,this.get(f)||this._initAnimAttr(),p[e.stamp(this)]=this,e.Anim._startTimer(),this.fire(s)},_pause:function(){this._set(r,null),this._set(f,!0),delete p[e.stamp(this)],this.fire("pause")},_resume:function(){this._set(f,!1),p[e.stamp(this)]=this,this._set(r,new Date-this.get(i)),e.Anim._startTimer(),this.fire("resume")},_end:function(t){var n=this.get("duration")*1e3;t&&this._runAttrs(n,n,this.get(l)),this._set(r,null),this._set(i,0),this._set(f,!1),delete p[e.stamp(this)],this.fire(u,{elapsed:this.get(i)})},_runFrame:function(){var e=this._runtimeAttr.duration,t=new Date-this.get(r),n=this.get(l),s=t>=e,u,a;this._runAttrs(t,e,n),this._actualFrames+=1,this._set(i,t),this.fire(o),s&&this._lastFrame()},_runAttrs:function(t,n,r){var i=this._runtimeAttr,s=e.Anim.behaviors,o=i.easing,u=n,a=!1,f,l,c;t>=n&&(a=!0),r&&(t=n-t,u=0);for(c in i)i[c].to&&(f=i[c],l=c in s&&"set"in s[c]?s[c].set:e.Anim.DEFAULT_SETTER,a?l(this,c,f.from,f.to,u,n,o,f.unit):l(this,c,f.from,f.to,t,n,o,f.unit))},_lastFrame:function(){var e=this.get("iterations"),t=this.get(c);t+=1,e==="infinite"||t<e?(this.get("direction")==="alternate"&&this.set(l,!this.get(l)),this.fire("iteration")):(t=0,this._end()),this._set(r,new Date),this._set(c,t)},_initAnimAttr:function(){var t=this.get("from")||{},n=this.get("to")||{},r={duration:this.get("duration")*1e3,easing:this.get("easing")},i=e.Anim.behaviors,s=this.get(a),o,u,f;e.each(n,function(n,a){typeof n=="function"&&(n=n.call(this,s)),u=t[a],u===undefined?u=a in i&&"get"in i[a]?i[a].get(this,a):e.Anim.DEFAULT_GETTER(this,a):typeof u=="function"&&(u=u.call(this,s));var l=e.Anim.RE_UNITS.exec(u),c=e.Anim.RE_UNITS.exec(n);u=l?l[1]:u,f=c?c[1]:n,o=c?c[2]:l?l[2]:"",!o&&e.Anim.RE_DEFAULT_UNIT.test(a)&&(o=e.Anim.DEFAULT_UNIT);if(!u||!f){e.error('invalid "from" or "to" for "'+a+'"',"Anim");return}r[a]={from:e.Lang.isObject(u)?e.clone(u):u,to:f,unit:o}},this),this._runtimeAttr=r},_getOffset:function(e){var t=this._node,n=t.getComputedStyle(e),r=e==="left"?"getX":"getY",i=e==="left"?"setX":"setY";if(n==="auto"){var s=t.getStyle("position");s==="absolute"||s==="fixed"?(n=t[r](),t[i](n)):n=0}return n},destructor:function(){delete e.Anim._instances[e.stamp(this)]}};e.extend(e.Anim,e.Base,v)},"3.7.3",{requires:["base-base","node-style"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -686,4 +686,4 @@ YUI.add('anim-base', function (Y, NAME) {
|
||||
Y.extend(Y.Anim, Y.Base, proto);
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["base-base", "node-style"]});
|
||||
}, '3.7.3', {"requires": ["base-base", "node-style"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -32,7 +32,7 @@ _yuitest_coverage["build/anim-color/anim-color.js"] = {
|
||||
path: "build/anim-color/anim-color.js",
|
||||
code: []
|
||||
};
|
||||
_yuitest_coverage["build/anim-color/anim-color.js"].code=["YUI.add('anim-color', function (Y, NAME) {","","/**"," * Adds support for color properties in <code>to</code>"," * and <code>from</code> attributes."," * @module anim"," * @submodule anim-color"," */","","var NUM = Number;","","Y.Anim.getUpdatedColorValue = function(fromColor, toColor, elapsed, duration, fn)","{"," fromColor = Y.Color.re_RGB.exec(Y.Color.toRGB(fromColor));"," toColor = Y.Color.re_RGB.exec(Y.Color.toRGB(toColor));",""," if (!fromColor || fromColor.length < 3 || !toColor || toColor.length < 3) {"," Y.error('invalid from or to passed to color behavior');"," }",""," return 'rgb(' + ["," Math.floor(fn(elapsed, NUM(fromColor[1]), NUM(toColor[1]) - NUM(fromColor[1]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[2]), NUM(toColor[2]) - NUM(fromColor[2]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[3]), NUM(toColor[3]) - NUM(fromColor[3]), duration))"," ].join(', ') + ')';","};","","Y.Anim.behaviors.color = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn)); "," },"," "," // TODO: default bgcolor const"," get: function(anim, att) {"," var val = anim._node.getComputedStyle(att);"," val = (val === 'transparent') ? 'rgb(255, 255, 255)' : val;"," return val;"," }","};","","Y.each(['backgroundColor',"," 'borderColor',"," 'borderTopColor',"," 'borderRightColor', "," 'borderBottomColor', "," 'borderLeftColor'],"," function(v, i) {"," Y.Anim.behaviors[v] = Y.Anim.behaviors.color;"," }",");","","","}, '3.7.2', {\"requires\": [\"anim-base\"]});"];
|
||||
_yuitest_coverage["build/anim-color/anim-color.js"].code=["YUI.add('anim-color', function (Y, NAME) {","","/**"," * Adds support for color properties in <code>to</code>"," * and <code>from</code> attributes."," * @module anim"," * @submodule anim-color"," */","","var NUM = Number;","","Y.Anim.getUpdatedColorValue = function(fromColor, toColor, elapsed, duration, fn)","{"," fromColor = Y.Color.re_RGB.exec(Y.Color.toRGB(fromColor));"," toColor = Y.Color.re_RGB.exec(Y.Color.toRGB(toColor));",""," if (!fromColor || fromColor.length < 3 || !toColor || toColor.length < 3) {"," Y.error('invalid from or to passed to color behavior');"," }",""," return 'rgb(' + ["," Math.floor(fn(elapsed, NUM(fromColor[1]), NUM(toColor[1]) - NUM(fromColor[1]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[2]), NUM(toColor[2]) - NUM(fromColor[2]), duration)),"," Math.floor(fn(elapsed, NUM(fromColor[3]), NUM(toColor[3]) - NUM(fromColor[3]), duration))"," ].join(', ') + ')';","};","","Y.Anim.behaviors.color = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," anim._node.setStyle(att, Y.Anim.getUpdatedColorValue(from, to, elapsed, duration, fn)); "," },"," "," // TODO: default bgcolor const"," get: function(anim, att) {"," var val = anim._node.getComputedStyle(att);"," val = (val === 'transparent') ? 'rgb(255, 255, 255)' : val;"," return val;"," }","};","","Y.each(['backgroundColor',"," 'borderColor',"," 'borderTopColor',"," 'borderRightColor', "," 'borderBottomColor', "," 'borderLeftColor'],"," function(v, i) {"," Y.Anim.behaviors[v] = Y.Anim.behaviors.color;"," }",");","","","}, '3.7.3', {\"requires\": [\"anim-base\"]});"];
|
||||
_yuitest_coverage["build/anim-color/anim-color.js"].lines = {"1":0,"10":0,"12":0,"14":0,"15":0,"17":0,"18":0,"21":0,"28":0,"30":0,"35":0,"36":0,"37":0,"41":0,"48":0};
|
||||
_yuitest_coverage["build/anim-color/anim-color.js"].functions = {"getUpdatedColorValue:12":0,"set:29":0,"get:34":0,"(anonymous 2):47":0,"(anonymous 1):1":0};
|
||||
_yuitest_coverage["build/anim-color/anim-color.js"].coveredLines = 15;
|
||||
@ -109,4 +109,4 @@ Y.Anim.behaviors[v] = Y.Anim.behaviors.color;
|
||||
);
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["anim-base"]});
|
||||
}, '3.7.3', {"requires": ["anim-base"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -56,4 +56,4 @@ Y.each(['backgroundColor',
|
||||
);
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["anim-base"]});
|
||||
}, '3.7.3', {"requires": ["anim-base"]});
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("anim-color",function(e,t){var n=Number;e.Anim.getUpdatedColorValue=function(t,r,i,s,o){return t=e.Color.re_RGB.exec(e.Color.toRGB(t)),r=e.Color.re_RGB.exec(e.Color.toRGB(r)),(!t||t.length<3||!r||r.length<3)&&e.error("invalid from or to passed to color behavior"),"rgb("+[Math.floor(o(i,n(t[1]),n(r[1])-n(t[1]),s)),Math.floor(o(i,n(t[2]),n(r[2])-n(t[2]),s)),Math.floor(o(i,n(t[3]),n(r[3])-n(t[3]),s))].join(", ")+")"},e.Anim.behaviors.color={set:function(t,n,r,i,s,o,u){t._node.setStyle(n,e.Anim.getUpdatedColorValue(r,i,s,o,u))},get:function(e,t){var n=e._node.getComputedStyle(t);return n=n==="transparent"?"rgb(255, 255, 255)":n,n}},e.each(["backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],function(t,n){e.Anim.behaviors[t]=e.Anim.behaviors.color})},"3.7.2",{requires:["anim-base"]});
|
||||
YUI.add("anim-color",function(e,t){var n=Number;e.Anim.getUpdatedColorValue=function(t,r,i,s,o){return t=e.Color.re_RGB.exec(e.Color.toRGB(t)),r=e.Color.re_RGB.exec(e.Color.toRGB(r)),(!t||t.length<3||!r||r.length<3)&&e.error("invalid from or to passed to color behavior"),"rgb("+[Math.floor(o(i,n(t[1]),n(r[1])-n(t[1]),s)),Math.floor(o(i,n(t[2]),n(r[2])-n(t[2]),s)),Math.floor(o(i,n(t[3]),n(r[3])-n(t[3]),s))].join(", ")+")"},e.Anim.behaviors.color={set:function(t,n,r,i,s,o,u){t._node.setStyle(n,e.Anim.getUpdatedColorValue(r,i,s,o,u))},get:function(e,t){var n=e._node.getComputedStyle(t);return n=n==="transparent"?"rgb(255, 255, 255)":n,n}},e.each(["backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],function(t,n){e.Anim.behaviors[t]=e.Anim.behaviors.color})},"3.7.3",{requires:["anim-base"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -56,4 +56,4 @@ Y.each(['backgroundColor',
|
||||
);
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["anim-base"]});
|
||||
}, '3.7.3', {"requires": ["anim-base"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -32,7 +32,7 @@ _yuitest_coverage["build/anim-curve/anim-curve.js"] = {
|
||||
path: "build/anim-curve/anim-curve.js",
|
||||
code: []
|
||||
};
|
||||
_yuitest_coverage["build/anim-curve/anim-curve.js"].code=["YUI.add('anim-curve', function (Y, NAME) {","","/**"," * Adds support for the <code>curve</code> property for the <code>to</code> "," * attribute. A curve is zero or more control points and an end point."," * @module anim"," * @submodule anim-curve"," */","","Y.Anim.behaviors.curve = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," from = from.slice.call(from);"," to = to.slice.call(to);"," var t = fn(elapsed, 0, 100, duration) / 100;"," to.unshift(from);"," anim._node.setXY(Y.Anim.getBezier(to, t));"," },",""," get: function(anim, att) {"," return anim._node.getXY();"," }","};","","/**"," * Get the current position of the animated element based on t."," * Each point is an array of \"x\" and \"y\" values (0 = x, 1 = y)"," * At least 2 points are required (start and end)."," * First point is start. Last point is end."," * Additional control points are optional. "," * @for Anim"," * @method getBezier"," * @static"," * @param {Array} points An array containing Bezier points"," * @param {Number} t A number between 0 and 1 which is the basis for determining current position"," * @return {Array} An array containing int x and y member data"," */","Y.Anim.getBezier = function(points, t) { "," var n = points.length;"," var tmp = [];",""," for (var i = 0; i < n; ++i){"," tmp[i] = [points[i][0], points[i][1]]; // save input"," }"," "," for (var j = 1; j < n; ++j) {"," for (i = 0; i < n - j; ++i) {"," tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];"," tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; "," }"," }",""," return [ tmp[0][0], tmp[0][1] ]; ","","};","","","}, '3.7.2', {\"requires\": [\"anim-xy\"]});"];
|
||||
_yuitest_coverage["build/anim-curve/anim-curve.js"].code=["YUI.add('anim-curve', function (Y, NAME) {","","/**"," * Adds support for the <code>curve</code> property for the <code>to</code> "," * attribute. A curve is zero or more control points and an end point."," * @module anim"," * @submodule anim-curve"," */","","Y.Anim.behaviors.curve = {"," set: function(anim, att, from, to, elapsed, duration, fn) {"," from = from.slice.call(from);"," to = to.slice.call(to);"," var t = fn(elapsed, 0, 100, duration) / 100;"," to.unshift(from);"," anim._node.setXY(Y.Anim.getBezier(to, t));"," },",""," get: function(anim, att) {"," return anim._node.getXY();"," }","};","","/**"," * Get the current position of the animated element based on t."," * Each point is an array of \"x\" and \"y\" values (0 = x, 1 = y)"," * At least 2 points are required (start and end)."," * First point is start. Last point is end."," * Additional control points are optional. "," * @for Anim"," * @method getBezier"," * @static"," * @param {Array} points An array containing Bezier points"," * @param {Number} t A number between 0 and 1 which is the basis for determining current position"," * @return {Array} An array containing int x and y member data"," */","Y.Anim.getBezier = function(points, t) { "," var n = points.length;"," var tmp = [];",""," for (var i = 0; i < n; ++i){"," tmp[i] = [points[i][0], points[i][1]]; // save input"," }"," "," for (var j = 1; j < n; ++j) {"," for (i = 0; i < n - j; ++i) {"," tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0];"," tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; "," }"," }",""," return [ tmp[0][0], tmp[0][1] ]; ","","};","","","}, '3.7.3', {\"requires\": [\"anim-xy\"]});"];
|
||||
_yuitest_coverage["build/anim-curve/anim-curve.js"].lines = {"1":0,"10":0,"12":0,"13":0,"14":0,"15":0,"16":0,"20":0,"37":0,"38":0,"39":0,"41":0,"42":0,"45":0,"46":0,"47":0,"48":0,"52":0};
|
||||
_yuitest_coverage["build/anim-curve/anim-curve.js"].functions = {"set:11":0,"get:19":0,"getBezier:37":0,"(anonymous 1):1":0};
|
||||
_yuitest_coverage["build/anim-curve/anim-curve.js"].coveredLines = 18;
|
||||
@ -115,4 +115,4 @@ return [ tmp[0][0], tmp[0][1] ];
|
||||
};
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["anim-xy"]});
|
||||
}, '3.7.3', {"requires": ["anim-xy"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -60,4 +60,4 @@ Y.Anim.getBezier = function(points, t) {
|
||||
};
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["anim-xy"]});
|
||||
}, '3.7.3', {"requires": ["anim-xy"]});
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("anim-curve",function(e,t){e.Anim.behaviors.curve={set:function(t,n,r,i,s,o,u){r=r.slice.call(r),i=i.slice.call(i);var a=u(s,0,100,o)/100;i.unshift(r),t._node.setXY(e.Anim.getBezier(i,a))},get:function(e,t){return e._node.getXY()}},e.Anim.getBezier=function(e,t){var n=e.length,r=[];for(var i=0;i<n;++i)r[i]=[e[i][0],e[i][1]];for(var s=1;s<n;++s)for(i=0;i<n-s;++i)r[i][0]=(1-t)*r[i][0]+t*r[parseInt(i+1,10)][0],r[i][1]=(1-t)*r[i][1]+t*r[parseInt(i+1,10)][1];return[r[0][0],r[0][1]]}},"3.7.2",{requires:["anim-xy"]});
|
||||
YUI.add("anim-curve",function(e,t){e.Anim.behaviors.curve={set:function(t,n,r,i,s,o,u){r=r.slice.call(r),i=i.slice.call(i);var a=u(s,0,100,o)/100;i.unshift(r),t._node.setXY(e.Anim.getBezier(i,a))},get:function(e,t){return e._node.getXY()}},e.Anim.getBezier=function(e,t){var n=e.length,r=[];for(var i=0;i<n;++i)r[i]=[e[i][0],e[i][1]];for(var s=1;s<n;++s)for(i=0;i<n-s;++i)r[i][0]=(1-t)*r[i][0]+t*r[parseInt(i+1,10)][0],r[i][1]=(1-t)*r[i][1]+t*r[parseInt(i+1,10)][1];return[r[0][0],r[0][1]]}},"3.7.3",{requires:["anim-xy"]});
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -60,4 +60,4 @@ Y.Anim.getBezier = function(points, t) {
|
||||
};
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["anim-xy"]});
|
||||
}, '3.7.3', {"requires": ["anim-xy"]});
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
@ -353,4 +353,4 @@ var Easing = {
|
||||
Y.Easing = Easing;
|
||||
|
||||
|
||||
}, '3.7.2', {"requires": ["anim-base"]});
|
||||
}, '3.7.3', {"requires": ["anim-base"]});
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
YUI 3.7.2 (build 5639)
|
||||
YUI 3.7.3 (build 5687)
|
||||
Copyright 2012 Yahoo! Inc. All rights reserved.
|
||||
Licensed under the BSD License.
|
||||
http://yuilibrary.com/license/
|
||||
*/
|
||||
YUI.add("anim-easing",function(e,t){var n={easeNone:function(e,t,n,r){return n*e/r+t},easeIn:function(e,t,n,r){return n*(e/=r)*e+t},easeOut:function(e,t,n,r){return-n*(e/=r)*(e-2)+t},easeBoth:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},easeInStrong:function(e,t,n,r){return n*(e/=r)*e*e*e+t},easeOutStrong:function(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t},easeBothStrong:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t},elasticIn:function(e,t,n,r,i,s){var o;return e===0?t:(e/=r)===1?t+n:(s||(s=r*.3),!i||i<Math.abs(n)?(i=n,o=s/4):o=s/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*2*Math.PI/s))+t)},elasticOut:function(e,t,n,r,i,s){var o;return e===0?t:(e/=r)===1?t+n:(s||(s=r*.3),!i||i<Math.abs(n)?(i=n,o=s/4):o=s/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*e)*Math.sin((e*r-o)*2*Math.PI/s)+n+t)},elasticBoth:function(e,t,n,r,i,s){var o;return e===0?t:(e/=r/2)===2?t+n:(s||(s=r*.3*1.5),!i||i<Math.abs(n)?(i=n,o=s/4):o=s/(2*Math.PI)*Math.asin(n/i),e<1?-0.5*i*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*2*Math.PI/s)+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*2*Math.PI/s)*.5+n+t)},backIn:function(e,t,n,r,i){return i===undefined&&(i=1.70158),e===r&&(e-=.001),n*(e/=r)*e*((i+1)*e-i)+t},backOut:function(e,t,n,r,i){return typeof i=="undefined"&&(i=1.70158),n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},backBoth:function(e,t,n,r,i){return typeof i=="undefined"&&(i=1.70158),(e/=r/2)<1?n/2*e*e*(((i*=1.525)+1)*e-i)+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},bounceIn:function(t,n,r,i){return r-e.Easing.bounceOut(i-t,0,r,i)+n},bounceOut:function(e,t,n,r){return(e/=r)<1/2.75?n*7.5625*e*e+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},bounceBoth:function(t,n,r,i){return t<i/2?e.Easing.bounceIn(t*2,0,r,i)*.5+n:e.Easing.bounceOut(t*2-i,0,r,i)*.5+r*.5+n}};e.Easing=n},"3.7.2",{requires:["anim-base"]});
|
||||
YUI.add("anim-easing",function(e,t){var n={easeNone:function(e,t,n,r){return n*e/r+t},easeIn:function(e,t,n,r){return n*(e/=r)*e+t},easeOut:function(e,t,n,r){return-n*(e/=r)*(e-2)+t},easeBoth:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},easeInStrong:function(e,t,n,r){return n*(e/=r)*e*e*e+t},easeOutStrong:function(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t},easeBothStrong:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t},elasticIn:function(e,t,n,r,i,s){var o;return e===0?t:(e/=r)===1?t+n:(s||(s=r*.3),!i||i<Math.abs(n)?(i=n,o=s/4):o=s/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*2*Math.PI/s))+t)},elasticOut:function(e,t,n,r,i,s){var o;return e===0?t:(e/=r)===1?t+n:(s||(s=r*.3),!i||i<Math.abs(n)?(i=n,o=s/4):o=s/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*e)*Math.sin((e*r-o)*2*Math.PI/s)+n+t)},elasticBoth:function(e,t,n,r,i,s){var o;return e===0?t:(e/=r/2)===2?t+n:(s||(s=r*.3*1.5),!i||i<Math.abs(n)?(i=n,o=s/4):o=s/(2*Math.PI)*Math.asin(n/i),e<1?-0.5*i*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*2*Math.PI/s)+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*2*Math.PI/s)*.5+n+t)},backIn:function(e,t,n,r,i){return i===undefined&&(i=1.70158),e===r&&(e-=.001),n*(e/=r)*e*((i+1)*e-i)+t},backOut:function(e,t,n,r,i){return typeof i=="undefined"&&(i=1.70158),n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},backBoth:function(e,t,n,r,i){return typeof i=="undefined"&&(i=1.70158),(e/=r/2)<1?n/2*e*e*(((i*=1.525)+1)*e-i)+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},bounceIn:function(t,n,r,i){return r-e.Easing.bounceOut(i-t,0,r,i)+n},bounceOut:function(e,t,n,r){return(e/=r)<1/2.75?n*7.5625*e*e+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},bounceBoth:function(t,n,r,i){return t<i/2?e.Easing.bounceIn(t*2,0,r,i)*.5+n:e.Easing.bounceOut(t*2-i,0,r,i)*.5+r*.5+n}};e.Easing=n},"3.7.3",{requires:["anim-base"]});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user