MDL-34701 import latest YUI 3.6.0

This commit is contained in:
Petr Škoda 2012-08-02 16:49:19 +02:00
parent 470d47f512
commit af7879701b
1493 changed files with 36925 additions and 24436 deletions

View File

@ -222,7 +222,7 @@ umask(0000);
// exact version of currently used yui2 and 3 library
$CFG->yui2version = '2.9.0';
$CFG->yui3version = '3.5.1';
$CFG->yui3version = '3.6.0';
// special support for highly optimised scripts that do not need libraries and DB connection

View File

@ -193,7 +193,7 @@
<location>yui</location>
<name>YUI</name>
<license>BSD</license>
<version>3.5.1</version>
<version>3.6.0</version>
<licenseversion></licenseversion>
</library>
<library>

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("app-base",function(c){var g=c.Lang,i=c.Object,a=c.PjaxBase,d=c.Router,b=c.View,e=c.ClassNameManager.getClassName,h=c.config.win,f;f=c.Base.create("app",c.Base,[b,d,a],{views:{},initializer:function(k){k||(k={});var j={};function l(m,n){j[n]=c.merge(j[n],m);}i.each(this.views,l);i.each(k.views,l);this.views=j;this._viewInfoMap={};this.after("activeViewChange",c.bind("_afterActiveViewChange",this));if(!this.get("serverRouting")){this._pjaxBindUI();}},createView:function(m,l){var k=this.getViewInfo(m),n=(k&&k.type)||b,o,j;o=g.isString(n)?i.getValue(c,n.split(".")):n;j=new o(l);this._viewInfoMap[c.stamp(j,true)]=k;return j;},getViewInfo:function(j){if(g.isString(j)){return this.views[j];}return j&&this._viewInfoMap[c.stamp(j,true)];},render:function(){var k=this.get("container"),j=this.get("viewContainer"),l=this.get("activeView"),n=l&&l.get("container"),m=k.compareTo(j);k.addClass(f.CSS_CLASS);j.addClass(f.VIEWS_CSS_CLASS);if(l&&!j.contains(n)){j.appendChild(n);}if(!k.contains(j)&&!m){k.appendChild(j);}return this;},showView:function(j,m,l,o){var k,n;l||(l={});if(o){l.callback=o;}else{if(g.isFunction(l)){l={callback:l};}}if(g.isString(j)){k=this.getViewInfo(j);if(k&&k.preserve&&k.instance){j=k.instance;this._viewInfoMap[c.stamp(j,true)]=k;}else{j=this.createView(j,m);n=true;}}if(l.update&&!n){j.setAttrs(m);}if("render" in l){l.render&&j.render();}else{if(n){j.render();}}return this._set("activeView",j,{options:l});},_attachView:function(k,l){if(!k){return;}var m=this.getViewInfo(k),j=this.get("viewContainer");k.addTarget(this);m&&(m.instance=k);j[l?"prepend":"append"](k.get("container"));},_destroyContainer:function(){var k=this.get("container"),j=this.get("viewContainer"),l=k.compareTo(j);if(c.one("body").compareTo(k)){this.detachEvents();k&&k.removeClass(f.CSS_CLASS);if(l){k&&k.removeClass(f.VIEWS_CSS_CLASS);}else{j&&j.remove(true);}return;}j&&j.remove(true);!l&&k&&k.remove(true);},_detachView:function(j){if(!j){return;}var k=this.getViewInfo(j)||{};if(k.preserve){j.remove();}else{j.destroy({remove:true});delete this._viewInfoMap[c.stamp(j,true)];if(j===k.instance){delete k.instance;}}j.removeTarget(this);},_getViewContainer:function(j){if(!j&&!this._viewContainer){j=this._viewContainer=this.create();this._set("viewContainer",j);}return j;},_getURL:function(){var j=c.getLocation().toString();return this._html5?j:this._upgradeURL(j);},_initHtml5:function(){if(this.get("serverRouting")===false){return false;}else{return d.html5;}},_isChildView:function(j,m){var l=this.getViewInfo(j),k=this.getViewInfo(m);if(l&&k){return this.getViewInfo(l.parent)===k;}return false;},_isParentView:function(j,m){var k=this.getViewInfo(j),l=this.getViewInfo(m);if(k&&l){return this.getViewInfo(l.parent)===k;}return false;},_navigate:function(k,j){k=this._upgradeURL(k);j||(j={});if(!this.get("serverRouting")){"force" in j||(j.force=true);}return a.prototype._navigate.call(this,k,j);},_save:function(j,k){if(this.get("serverRouting")&&!this.get("html5")){if(!this._hasSameOrigin(j)){c.error("Security error: The new URL must be of the same origin as the current URL.");return this;}j=this._joinURL(j||"");if(k){h&&h.location.replace(j);}else{h&&(h.location=j);}return this;}return d.prototype._save.apply(this,arguments);},_uiSetActiveView:function(p,n,m){m||(m={});var o=m.callback,j=this._isChildView(p,n),l=!j&&this._isParentView(p,n),k=!!m.prepend||l;if(p===n){return o&&o.call(this,p);}this._attachView(p,k);this._detachView(n);o&&o.call(this,p);},_upgradeURL:function(k){if(!this._hasSameOrigin(k)){return k;}var l=(k.match(/#(.*)$/)||[])[1]||"",j=c.HistoryHash.hashPrefix;if(j&&l.indexOf(j)===0){l=l.replace(j,"");}if(l&&l.charAt(0)==="/"){k=this._resolveURL(this._joinURL(l));}return k;},_afterActiveViewChange:function(j){this._uiSetActiveView(j.newVal,j.prevVal,j.options);}},{ATTRS:{activeView:{value:null,readOnly:true},container:{valueFn:function(){return c.one("body");}},html5:{valueFn:"_initHtml5"},linkSelector:{value:"a"},serverRouting:{value:undefined,writeOnce:"initOnly"},viewContainer:{getter:"_getViewContainer",setter:c.one,writeOnce:true}},CSS_CLASS:e("app"),VIEWS_CSS_CLASS:e("app","views"),_NON_ATTRS_CFG:["views"]});c.namespace("App").Base=f;c.App=c.mix(c.Base.create("app",c.App.Base,[]),c.App,true);},"3.5.1",{requires:["classnamemanager","pjax-base","router","view"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
.yui3-app-transitioning .yui3-app-views,.yui3-app-views.yui3-app-transitioning{overflow-x:hidden;position:relative;white-space:nowrap}.yui3-app-transitioning .yui3-app-views>*,.yui3-app-views.yui3-app-transitioning>*{display:inline-block;width:100%;vertical-align:top;white-space:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#yui3-css-stamp.app-transitions-css{display:none}

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("app-transitions-native",function(c){var a=c.App.Transitions;function b(){}b.prototype={initializer:function(){this._transitioning=false;this._viewTransitionQueue=[];c.Do.before(this._queueActiveView,this,"_uiSetActiveView");},_dequeueActiveView:function(){var d=this._viewTransitionQueue,f=d.shift(),e;if(f){if(d.length){e=c.merge(f[2],{transition:false});f.splice(2,1,e);}this._uiTransitionActiveView.apply(this,f);}},_getFx:function(h,d,g){var e=a.FX,f=this.get("transitions");if(g===false||!f){return null;}if(g){return e[g];}if(this._isChildView(h,d)){return e[f.toChild];}if(this._isParentView(h,d)){return e[f.toParent];}return e[f.navigate];},_queueActiveView:function(){var d=c.Array(arguments,0,true);this._viewTransitionQueue.push(d);if(!this._transitioning){this._dequeueActiveView();}return new c.Do.Prevent();},_uiTransitionActiveView:function(i,l,p){p||(p={});var n=p.callback,d,m,e,j,o,h,g,k;if(i===l){n&&n.call(this,i);this._transitioning=false;return this._dequeueActiveView();}h=this._getFx(i,l,p.transition);e=this._isChildView(i,l);j=!e&&this._isParentView(i,l);o=!!p.prepend||j;if(!h){this._attachView(i,o);this._detachView(l);n&&n.call(this,i);this._transitioning=false;return this._dequeueActiveView();}this._transitioning=true;d=this.get("container");m=a.CLASS_NAMES.transitioning;d.addClass(m);this._attachView(i,o);function f(){this._detachView(l);d.removeClass(m);n&&n.call(this,i);this._transitioning=false;return this._dequeueActiveView();}k=new c.Parallel({context:this});g={crossView:!!l&&!!i,prepended:o};if(i&&h.viewIn){i.get("container").transition(h.viewIn,g,k.add());}if(l&&h.viewOut){l.get("container").transition(h.viewOut,g,k.add());}k.done(f);}};c.mix(c.Transition.fx,{"app:fadeIn":{opacity:1,duration:0.3,on:{start:function(f){var e={opacity:0},d=f.config;if(d.crossView&&!d.prepended){e.transform="translateX(-100%)";}this.setStyles(e);},end:function(){this.setStyle("transform","translateX(0)");}}},"app:fadeOut":{opacity:0,duration:0.3,on:{start:function(f){var e={opacity:1},d=f.config;if(d.crossView&&d.prepended){e.transform="translateX(-100%)";}this.setStyles(e);},end:function(){this.setStyle("transform","translateX(0)");}}},"app:slideLeft":{duration:0.3,transform:"translateX(-100%)",on:{start:function(){this.setStyles({opacity:1,transform:"translateX(0%)"});},end:function(){this.setStyle("transform","translateX(0)");}}},"app:slideRight":{duration:0.3,transform:"translateX(0)",on:{start:function(){this.setStyles({opacity:1,transform:"translateX(-100%)"});},end:function(){this.setStyle("transform","translateX(0)");}}}});c.App.TransitionsNative=b;c.Base.mix(c.App,[b]);},"3.5.1",{requires:["app-transitions","app-transitions-css","parallel","transition"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("app-transitions",function(b){function a(){}a.ATTRS={transitions:{setter:"_setTransitions",value:false}};a.CLASS_NAMES={transitioning:b.ClassNameManager.getClassName("app","transitioning")};a.FX={fade:{viewIn:"app:fadeIn",viewOut:"app:fadeOut"},slideLeft:{viewIn:"app:slideLeft",viewOut:"app:slideLeft"},slideRight:{viewIn:"app:slideRight",viewOut:"app:slideRight"}};a.prototype={transitions:{navigate:"fade",toChild:"slideLeft",toParent:"slideRight"},_setTransitions:function(d){var c=this.transitions;if(d&&d===true){return b.merge(c);}return d;}};b.App.Transitions=a;b.Base.mix(b.App,[a]);},"3.5.1",{requires:["app-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("array-extras",function(d){var b=d.Array,a=d.Lang,c=Array.prototype;b.lastIndexOf=a._isNative(c.lastIndexOf)?function(e,g,f){return f||f===0?e.lastIndexOf(g,f):e.lastIndexOf(g);}:function(f,j,h){var e=f.length,g=e-1;if(h||h===0){g=Math.min(h<0?e+h:h,e);}if(g>-1&&e>0){for(;g>-1;--g){if(g in f&&f[g]===j){return g;}}}return -1;};b.unique=function(f,l){var k=0,e=f.length,h=[],m,g;for(;k<e;++k){m=f[k];for(g=h.length;g>-1;--g){if(m===h[g]){break;}}if(g===-1){h.push(m);}}if(l){if(a.isNumber(h[0])){h.sort(b.numericSort);}else{h.sort();}}return h;};b.filter=a._isNative(c.filter)?function(e,g,h){return e.filter(g,h);}:function(g,l,m){var j=0,e=g.length,h=[],k;for(;j<e;++j){if(j in g){k=g[j];if(l.call(m,k,j,g)){h.push(k);}}}return h;};b.reject=function(e,g,h){return b.filter(e,function(k,j,f){return !g.call(h,k,j,f);});};b.every=a._isNative(c.every)?function(e,g,h){return e.every(g,h);}:function(g,j,k){for(var h=0,e=g.length;h<e;++h){if(h in g&&!j.call(k,g[h],h,g)){return false;}}return true;};b.map=a._isNative(c.map)?function(e,g,h){return e.map(g,h);}:function(g,k,l){var j=0,e=g.length,h=g.concat();for(;j<e;++j){if(j in g){h[j]=k.call(l,g[j],j,g);}}return h;};b.reduce=a._isNative(c.reduce)?function(e,i,g,h){return e.reduce(function(l,k,j,f){return g.call(h,l,k,j,f);},i);}:function(h,m,k,l){var j=0,g=h.length,e=m;for(;j<g;++j){if(j in h){e=k.call(l,e,h[j],j,h);}}return e;};b.find=function(g,j,k){for(var h=0,e=g.length;h<e;h++){if(h in g&&j.call(k,g[h],h,g)){return g[h];}}return null;};b.grep=function(e,f){return b.filter(e,function(h,g){return f.test(h);});};b.partition=function(e,h,i){var g={matches:[],rejects:[]};b.each(e,function(j,f){var k=h.call(i,j,f,e)?g.matches:g.rejects;k.push(j);});return g;};b.zip=function(f,e){var g=[];b.each(f,function(i,h){g.push([i,e[h]]);});return g;};},"3.5.1",{requires:["yui-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("attribute-complex",function(b){var a=b.Object,c=".";b.Attribute.Complex=function(){};b.Attribute.Complex.prototype={_normAttrVals:function(g){var i={},h={},j,d,f,e;if(g){for(e in g){if(g.hasOwnProperty(e)){if(e.indexOf(c)!==-1){j=e.split(c);d=j.shift();f=h[d]=h[d]||[];f[f.length]={path:j,value:g[e]};}else{i[e]=g[e];}}}return{simple:i,complex:h};}else{return null;}},_getAttrInitVal:function(m,j,p){var e=j.value,o=j.valueFn,d,f,h,g,q,n,k;if(o){if(!o.call){o=this[o];}if(o){e=o.call(this,m);}}if(!j.readOnly&&p){d=p.simple;if(d&&d.hasOwnProperty(m)){e=d[m];}f=p.complex;if(f&&f.hasOwnProperty(m)){k=f[m];for(h=0,g=k.length;h<g;++h){q=k[h].path;n=k[h].value;a.setValue(e,q,n);}}}return e;}};b.mix(b.Attribute,b.Attribute.Complex,true,null,1);b.AttributeComplex=b.Attribute.Complex;},"3.5.1",{requires:["attribute-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("attribute-events",function(e){var f=e.EventTarget,d="Change",a="broadcast",c="published";function b(){this._ATTR_E_FACADE={};f.call(this,{emitFacade:true});}b._ATTR_CFG=[a];b.prototype={set:function(g,i,h){return this._setAttr(g,i,h);},_set:function(g,i,h){return this._setAttr(g,i,h,true);},setAttrs:function(g,h){return this._setAttrs(g,h);},_fireAttrChange:function(o,n,k,j,g){var q=this,m=o+d,i=q._state,p,l,h;if(!i.get(o,c)){h={queuable:false,defaultTargetOnly:true,defaultFn:q._defAttrChangeFn,silent:true};l=i.get(o,a);if(l!==undefined){h.broadcast=l;}q.publish(m,h);i.add(o,c,true);}p=(g)?e.merge(g):q._ATTR_E_FACADE;p.attrName=o;p.subAttrName=n;p.prevVal=k;p.newVal=j;q.fire(m,p);},_defAttrChangeFn:function(g){if(!this._setAttrVal(g.attrName,g.subAttrName,g.prevVal,g.newVal)){g.stopImmediatePropagation();}else{g.newVal=this.get(g.attrName);}}};e.mix(b,f,false,null,1);e.AttributeEvents=b;},"3.5.1",{requires:["event-custom"]});

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("autocomplete-sources",function(g){var a=g.AutoCompleteBase,f=g.Lang,b="_sourceSuccess",d="maxResults",e="requestTemplate",c="resultListLocator";g.mix(a.prototype,{_YQL_SOURCE_REGEX:/^(?:select|set|use)\s+/i,_beforeCreateObjectSource:function(h){if(h instanceof g.Node&&h.get("nodeName").toLowerCase()==="select"){return this._createSelectSource(h);}if(g.JSONPRequest&&h instanceof g.JSONPRequest){return this._createJSONPSource(h);}return this._createObjectSource(h);},_createIOSource:function(l){var j={type:"io"},k=this,n,i,m;function h(o){var q=o.request,p=o.query;if(k._cache&&q in k._cache){k[b](k._cache[q],o);return;}if(n&&n.isInProgress()){n.abort();}n=g.io(k._getXHRUrl(l,o),{on:{success:function(u,r){var t;try{t=g.JSON.parse(r.responseText);}catch(s){g.error("JSON parse error",s);}if(t){k._cache&&(k._cache[q]=t);k[b](t,o);}}}});}j.sendRequest=function(o){i=o;if(m){return;}m=true;g.use("io-base","json-parse",function(){j.sendRequest=h;h(i);});};return j;},_createJSONPSource:function(l){var j={type:"jsonp"},k=this,i,m;function h(n){var p=n.request,o=n.query;if(k._cache&&p in k._cache){k[b](k._cache[p],n);return;}l._config.on.success=function(q){k._cache&&(k._cache[p]=q);k[b](q,n);};l.send(o);}j.sendRequest=function(n){i=n;if(m){return;}m=true;g.use("jsonp",function(){if(!(l instanceof g.JSONPRequest)){l=new g.JSONPRequest(l,{format:g.bind(k._jsonpFormatter,k)});}j.sendRequest=h;h(i);});};return j;},_createSelectSource:function(i){var h=this;return{type:"select",sendRequest:function(k){var j=[];i.get("options").each(function(l){j.push({html:l.get("innerHTML"),index:l.get("index"),node:l,selected:l.get("selected"),text:l.get("text"),value:l.get("value")});});h[b](j,k);}};},_createStringSource:function(h){if(this._YQL_SOURCE_REGEX.test(h)){return this._createYQLSource(h);}else{if(h.indexOf("{callback}")!==-1){return this._createJSONPSource(h);}else{return this._createIOSource(h);}}},_createYQLSource:function(l){var k=this,m={type:"yql"},i,n,j;if(!k.get(c)){k.set(c,k._defaultYQLLocator);}function h(s){var t=s.query,q=k.get("yqlEnv"),o=k.get(d),u,r,p;p=f.sub(l,{maxResults:o>0?o:1000,request:s.request,query:t});if(k._cache&&p in k._cache){k[b](k._cache[p],s);return;}u=function(v){k._cache&&(k._cache[p]=v);k[b](v,s);};r={proto:k.get("yqlProtocol")};if(j){j._callback=u;j._opts=r;j._params.q=p;if(q){j._params.env=q;}}else{j=new g.YQLRequest(p,{on:{success:u},allowCache:false},q?{env:q}:null,r);}j.send();}m.sendRequest=function(o){i=o;if(!n){n=true;g.use("yql",function(){m.sendRequest=h;h(i);});}};return m;},_defaultYQLLocator:function(i){var j=i&&i.query&&i.query.results,h;if(j&&f.isObject(j)){h=g.Object.values(j)||[];j=h.length===1?h[0]:h;if(!f.isArray(j)){j=[j];}}else{j=[];}return j;},_getXHRUrl:function(i,j){var h=this.get(d);if(j.query!==j.request){i+=j.request;}return f.sub(i,{maxResults:h>0?h:1000,query:encodeURIComponent(j.query)});},_jsonpFormatter:function(i,j,k){var h=this.get(d),l=this.get(e);if(l){i+=l(k);}return f.sub(i,{callback:j,maxResults:h>0?h:1000,query:encodeURIComponent(k)});}});g.mix(a.ATTRS,{yqlEnv:{value:null},yqlProtocol:{value:"http"}});g.mix(a.SOURCE_TYPES,{io:"_createIOSource",jsonp:"_createJSONPSource",object:"_beforeCreateObjectSource",select:"_createSelectSource",string:"_createStringSource",yql:"_createYQLSource"},true);},"3.5.1",{optional:["io-base","json-parse","jsonp","yql"],requires:["autocomplete-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("base-core",function(a){var e=a.Object,i=a.Lang,h=".",l="initialized",d="destroyed",c="initializer",b=Object.prototype.constructor,j="deep",m="shallow",k="destructor",g=a.AttributeCore,f=function(t,q,o){var u;for(u in q){if(o[u]){t[u]=q[u];}}return t;};function n(o){if(!this._BaseInvoked){this._BaseInvoked=true;this._initBase(o);}}n._ATTR_CFG=g._ATTR_CFG.concat("cloneDefaultValue");n._ATTR_CFG_HASH=a.Array.hash(n._ATTR_CFG);n._NON_ATTRS_CFG=["plugins"];n.NAME="baseCore";n.ATTRS={initialized:{readOnly:true,value:false},destroyed:{readOnly:true,value:false}};n.prototype={_initBase:function(o){a.stamp(this);this._initAttribute(o);var p=a.Plugin&&a.Plugin.Host;if(this._initPlugins&&p){p.call(this);}if(this._lazyAddAttrs!==false){this._lazyAddAttrs=true;}this.name=this.constructor.NAME;this.init.apply(this,arguments);},_initAttribute:function(){g.apply(this);},init:function(o){this._baseInit(o);return this;},_baseInit:function(o){this._initHierarchy(o);if(this._initPlugins){this._initPlugins(o);}this._set(l,true);},destroy:function(){this._baseDestroy();return this;},_baseDestroy:function(){if(this._destroyPlugins){this._destroyPlugins();}this._destroyHierarchy();this._set(d,true);},_getClasses:function(){if(!this._classes){this._initHierarchyData();}return this._classes;},_getAttrCfgs:function(){if(!this._attrs){this._initHierarchyData();}return this._attrs;},_filterAttrCfgs:function(s,p){var q=null,o,r=s.ATTRS;if(r){for(o in r){if(p[o]){q=q||{};q[o]=p[o];p[o]=null;}}}return q;},_filterAdHocAttrs:function(r,p){var q,s=this._nonAttrs,o;if(p){q={};for(o in p){if(!r[o]&&!s[o]&&p.hasOwnProperty(o)){q[o]={value:p[o]};}}}return q;},_initHierarchyData:function(){var u=this.constructor,r,o,s,t=(this._allowAdHocAttrs)?{}:null,q=[],p=[];while(u){q[q.length]=u;if(u.ATTRS){p[p.length]=u.ATTRS;}if(this._allowAdHocAttrs){s=u._NON_ATTRS_CFG;if(s){for(r=0,o=s.length;r<o;r++){t[s[r]]=true;}}}u=u.superclass?u.superclass.constructor:null;}this._classes=q;this._nonAttrs=t;this._attrs=this._aggregateAttrs(p);},_attrCfgHash:function(){return n._ATTR_CFG_HASH;},_aggregateAttrs:function(v){var r,w,q,o,x,p,u,t=this._attrCfgHash(),s={};if(v){for(p=v.length-1;p>=0;--p){w=v[p];for(r in w){if(w.hasOwnProperty(r)){q=f({},w[r],t);o=q.value;u=q.cloneDefaultValue;if(o){if((u===undefined&&(b===o.constructor||i.isArray(o)))||u===j||u===true){q.value=a.clone(o);}else{if(u===m){q.value=a.merge(o);}}}x=null;if(r.indexOf(h)!==-1){x=r.split(h);r=x.shift();}if(x&&s[r]&&s[r].value){e.setValue(s[r].value,x,o);}else{if(!x){if(!s[r]){s[r]=q;}else{f(s[r],q,t);}}}}}}}return s;},_initHierarchy:function(u){var q=this._lazyAddAttrs,v,x,z,s,p,y,t,r=this._getClasses(),o=this._getAttrCfgs(),w=r.length-1;for(z=w;z>=0;z--){v=r[z];x=v.prototype;t=v._yuibuild&&v._yuibuild.exts;if(t){for(s=0,p=t.length;s<p;s++){t[s].apply(this,arguments);}}this.addAttrs(this._filterAttrCfgs(v,o),u,q);if(this._allowAdHocAttrs&&z===w){this.addAttrs(this._filterAdHocAttrs(o,u),u,q);}if(x.hasOwnProperty(c)){x.initializer.apply(this,arguments);}if(t){for(s=0;s<p;s++){y=t[s].prototype;if(y.hasOwnProperty(c)){y.initializer.apply(this,arguments);}}}}},_destroyHierarchy:function(){var s,t,w,u,q,o,r,v,p=this._getClasses();for(w=0,u=p.length;w<u;w++){s=p[w];t=s.prototype;r=s._yuibuild&&s._yuibuild.exts;if(r){for(q=0,o=r.length;q<o;q++){v=r[q].prototype;if(v.hasOwnProperty(k)){v.destructor.apply(this,arguments);}}}if(t.hasOwnProperty(k)){t.destructor.apply(this,arguments);}}},toString:function(){return this.name+"["+a.stamp(this,true)+"]";}};a.mix(n,g,false,null,1);n.prototype.constructor=n;a.BaseCore=n;},"3.5.1",{requires:["attribute-core"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("button-group",function(f){var a="contentBox",e="button, input[type=button], input[type=reset], input[type=submit]",c="click",d=f.ButtonCore.CLASS_NAMES;function b(){b.superclass.constructor.apply(this,arguments);}f.ButtonGroup=f.extend(b,f.Widget,{renderUI:function(){this.getButtons().plug(f.Plugin.Button);},bindUI:function(){var h=this,g=h.get(a);g.delegate(c,h._handleClick,e,h);},getButtons:function(){var g=this.get(a);return g.all(e);},getSelectedButtons:function(){var j=this,h=[],i=j.getButtons(),g=b.CLASS_NAMES.SELECTED;i.each(function(k){if(k.hasClass(g)){h.push(k);}});return h;},getSelectedValues:function(){var k=this,j,g=[],i=k.getSelectedButtons(),h=b.CLASS_NAMES.SELECTED;f.Array.each(i,function(l){if(l.hasClass(h)){j=l.getContent();g.push(j);}});return g;},_handleClick:function(m){var k,h=m.target,l=this,j=l.get("type"),i=b.CLASS_NAMES.SELECTED,g=h.hasClass(i);if(j==="checkbox"){h.toggleClass(i,!g);l.fire("selectionChange",{originEvent:m});}else{if(j==="radio"){if(!g){k=l.getButtons();k.removeClass(i);h.addClass(i);l.fire("selectionChange",{originEvent:m});}}}}},{NAME:"buttongroup",ATTRS:{type:{writeOnce:"initOnly",value:"radio"}},CLASS_NAMES:d});},"3.5.1",{requires:["button-plugin","cssbutton","widget"]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("calendarnavigator",function(a){var n="contentBox",p="host",l="rendered",b=a.ClassNameManager.getClassName,i=a.substitute,c=a.Node,h=c.create,o="calendar",f="calendarnav",j=b(o,"header"),d=b(f,"prevmonth"),e=b(f,"nextmonth"),g=b(f,"month-disabled"),m=a.DataType.Date;function k(q){k.superclass.constructor.apply(this,arguments);}k.NS="navigator";k.NAME="pluginCalendarNavigator";k.ATTRS={shiftByMonths:{value:1}};k.CALENDARNAV_STRINGS={prev_month_class:d,next_month_class:e};k.PREV_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {prev_month_class}" role="button" aria-label="{prev_month_arialabel}" tabindex="{control_tabindex}">'+"<span>&lt;</span>"+"</a>";k.NEXT_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {next_month_class}" role="button" aria-label="{next_month_arialabel}" tabindex="{control_tabindex}">'+"<span>&gt;</span>"+"</a>";a.extend(k,a.Plugin.Base,{_eventAttachments:{},_controls:{},initializer:function(q){this._controls={};this._eventAttachments={};this.afterHostMethod("renderUI",this._initNavigationControls);},destructor:function(){},_subtractMonths:function(s){if((s.type==="click")||(s.type==="keydown"&&(s.keyCode==13||s.keyCode==32))){var r=this.get(p);var q=r.get("date");r.set("date",m.addMonths(q,-1*this.get("shiftByMonths")));s.preventDefault();}},_addMonths:function(s){if((s.type==="click")||(s.type==="keydown"&&(s.keyCode==13||s.keyCode==32))){var r=this.get(p);var q=r.get("date");r.set("date",m.addMonths(q,this.get("shiftByMonths")));s.preventDefault();}},_updateControlState:function(){var q=this.get(p);if(m.areEqual(q.get("minimumDate"),q.get("date"))){if(this._eventAttachments.prevMonth){this._eventAttachments.prevMonth.detach();this._eventAttachments.prevMonth=false;}if(!this._controls.prevMonth.hasClass(g)){this._controls.prevMonth.addClass(g).setAttribute("aria-disabled","true");}}else{if(!this._eventAttachments.prevMonth){this._eventAttachments.prevMonth=this._controls.prevMonth.on(["click","keydown"],this._subtractMonths,this);}if(this._controls.prevMonth.hasClass(g)){this._controls.prevMonth.removeClass(g).setAttribute("aria-disabled","false");}}if(m.areEqual(q.get("maximumDate"),m.addMonths(q.get("date"),q._paneNumber-1))){if(this._eventAttachments.nextMonth){this._eventAttachments.nextMonth.detach();this._eventAttachments.nextMonth=false;}if(!this._controls.nextMonth.hasClass(g)){this._controls.nextMonth.addClass(g).setAttribute("aria-disabled","true");}}else{if(!this._eventAttachments.nextMonth){this._eventAttachments.nextMonth=this._controls.nextMonth.on(["click","keydown"],this._addMonths,this);}if(this._controls.nextMonth.hasClass(g)){this._controls.nextMonth.removeClass(g).setAttribute("aria-disabled","false");}}},_renderPrevControls:function(){var q=h(i(k.PREV_MONTH_CONTROL_TEMPLATE,k.CALENDARNAV_STRINGS));q.on("selectstart",function(r){r.preventDefault();});return q;},_renderNextControls:function(){var q=h(i(k.NEXT_MONTH_CONTROL_TEMPLATE,k.CALENDARNAV_STRINGS));q.on("selectstart",function(r){r.preventDefault();});return q;},_initNavigationControls:function(){var q=this.get(p);k.CALENDARNAV_STRINGS["control_tabindex"]=q.get("tabIndex");k.CALENDARNAV_STRINGS["prev_month_arialabel"]="Go to previous month";k.CALENDARNAV_STRINGS["next_month_arialabel"]="Go to next month";var r=q.get(n).one("."+j);this._controls.prevMonth=this._renderPrevControls();this._controls.nextMonth=this._renderNextControls();this._updateControlState();q.after("dateChange",this._updateControlState,this);r.prepend(this._controls.prevMonth);r.append(this._controls.nextMonth);}});a.namespace("Plugin").CalendarNavigator=k;},"3.5.1",{requires:["plugin","classnamemanager","datatype-date","node","substitute"]});

File diff suppressed because one or more lines are too long

View File

@ -1,241 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('datatable-base', function(Y) {
/**
A Widget for displaying tabular data. The base implementation of DataTable
provides the ability to dynamically generate an HTML table from a set of column
configurations and row data.
Two classes are included in the `datatable-base` module: `Y.DataTable` and
`Y.DataTable.Base`.
@module datatable
@submodule datatable-base
@main datatable
@since 3.5.0
**/
// DataTable API docs included before DataTable.Base to make yuidoc work
/**
A Widget for displaying tabular data. Before feature modules are `use()`d,
this class is functionally equivalent to DataTable.Base. However, feature
modules can modify this class in non-destructive ways, expanding the API and
functionality.
This is the primary DataTable class. Out of the box, it provides the ability
to dynamically generate an HTML table from a set of column configurations and
row data. But feature module inclusion can add table sorting, pagintaion,
highlighting, selection, and more.
<pre><code>
// The functionality of this table would require additional modules be use()d,
// but the feature APIs are aggregated onto Y.DataTable.
// (Snippet is for illustration. Not all features are available today.)
var table = new Y.DataTable({
columns: [
{ type: 'checkbox', defaultChecked: true },
{ key: 'firstName', sortable: true, resizable: true },
{ key: 'lastName', sortable: true },
{ key: 'role', formatter: toRoleName }
],
data: {
source: 'http://myserver.com/service/json',
type: 'json',
schema: {
resultListLocator: 'results.users',
fields: [
'username',
'firstName',
'lastName',
{ key: 'role', type: 'number' }
]
}
},
recordType: UserModel,
pagedData: {
location: 'footer',
pageSizes: [20, 50, 'all'],
rowsPerPage: 20,
pageLinks: 5
},
editable: true
});
</code></pre>
### Column Configuration
The column configurations are set in the form of an array of objects, where
each object corresponds to a column. For columns populated directly from the
row data, a 'key' property is required to bind the column to that property or
attribute in the row data.
Not all columns need to relate to row data, nor do all properties or attributes
of the row data need to have a corresponding column. However, only those
columns included in the `columns` configuration attribute will be rendered.
Other column configuration properties are supported by the configured
`headerView`, `bodyView`, `footerView` classes as well as any features added by
plugins or class extensions. See the description of DataTable.HeaderView,
DataTable.BodyView, and other DataTable feature classes to see what column
properties they support.
Some examples of column configurations would be:
<pre><code>
// Basic
var columns = [{ key: 'firstName' }, { key: 'lastName' }, { key: 'age' }];
// For columns without any additional configuration, strings can be used
var columns = ['firstName', 'lastName', 'age'];
// Multi-row column headers (see DataTable.HeaderView for details)
var columns = [
{
label: 'Name',
children: [
{ key: 'firstName' },
{ key: 'lastName' }
]
},
'age' // mixing and matching objects and strings is ok
];
// Including columns that are not related 1:1 to row data fields/attributes
// (See DataTable.BodyView for details)
var columns = [
{
label: 'Name', // Needed for the column header
formatter: function (o) {
// Fill the column cells with data from firstName and lastName
if (o.data.age > 55) {
o.className += ' senior';
}
return o.data.lastName + ', ' + o.data.firstName;
}
},
'age'
];
// Columns that include feature configurations (for illustration; not all
// features are available today).
var columns = [
{ type: 'checkbox', defaultChecked: true },
{ key: 'firstName', sortable: true, resizable: true, min-width: '300px' },
{ key: 'lastName', sortable: true, resizable: true, min-width: '300px' },
{ key: 'age', emptyCellValue: '<em>unknown</em>' }
];
</code></pre>
### Row Data Configuration
The `data` configuration attribute is responsible for housing the data objects that will be rendered as rows. You can provide this information in two ways by default:
1. An array of simple objects with key:value pairs
2. A ModelList of Base-based class instances (presumably Model subclass
instances)
If an array of objects is passed, it will be translated into a ModelList filled
with instances of the class provided to the `recordType` attribute. This
attribute can also create a custom Model subclass from an array of field names
or an object of attribute configurations. If no `recordType` is provided, one
will be created for you from available information (see `_initRecordType`).
Providing either your own ModelList instance for `data`, or at least Model
class for `recordType`, is the best way to control client-server
synchronization when modifying data on the client side.
The ModelList instance that manages the table's data is available in the `data`
property on the DataTable instance.
### Rendering
Table rendering is a collaborative process between the DataTable and its
configured `headerView`, `bodyView`, and `footerView`. The DataTable renders
the `<table>` and `<caption>`, but the contents of the table are delegated to
instances of the classes provided to the `headerView`, `bodyView`, and
`footerView` attributes. If any of these attributes is unset, that portion of
the table won't be rendered.
DataTable.Base assigns the default `headerView` to `Y.DataTable.HeaderView` and
the default `bodyView` to `Y.DataTable.BodyView`, though either can be
overridden for custom rendering. No default `footerView` is assigned. See
those classes for more details about how they operate.
@class DataTable
@extends DataTable.Base
@since 3.5.0
**/
// DataTable API docs included before DataTable.Base to make yuidoc work
/**
The baseline implementation of a DataTable. This class should be used
primarily as a superclass for a custom DataTable with a specific set of
features. Because features can be composed onto `Y.DataTable`, custom
subclasses of DataTable.Base will remain unmodified when new feature modules
are loaded.
Example usage might look like this:
<pre><code>
// Custom subclass with only sorting and mutability added. If other datatable
// feature modules are loaded, this class will not be affected.
var MyTableClass = Y.Base.create('table', Y.DataTable.Base,
[ Y.DataTable.Sort, Y.DataTable.Mutable ]);
var table = new MyTableClass({
columns: ['firstName', 'lastName', 'age'],
data: [
{ firstName: 'Frank', lastName: 'Zappa', age: 71 },
{ firstName: 'Frank', lastName: 'Lloyd Wright', age: 144 },
{ firstName: 'Albert', lastName: 'Einstein', age: 132 },
...
]
});
table.render('#over-there');
// DataTable.Base can be instantiated if a featureless table is needed.
var table = new Y.DataTable.Base({
columns: ['firstName', 'lastName', 'age'],
data: [
{ firstName: 'Frank', lastName: 'Zappa', age: 71 },
{ firstName: 'Frank', lastName: 'Lloyd Wright', age: 144 },
{ firstName: 'Albert', lastName: 'Einstein', age: 132 },
...
]
});
table.render('#in-here');
</code></pre>
DataTable.Base is built from DataTable.Core, and sets the default `headerView`
to `Y.DataTable.HeaderView` and default `bodyView` to `Y.DataTable.BodyView`.
@class Base
@extends Widget
@uses DataTable.Core
@namespace DataTable
@since 3.5.0
**/
Y.DataTable.Base = Y.Base.create('datatable', Y.Widget, [Y.DataTable.Core],
null, {
ATTRS: {
// Default head and body views
headerView: { value: Y.DataTable.HeaderView },
bodyView : { value: Y.DataTable.BodyView }
}
});
// The DataTable API docs are above DataTable.Base docs.
Y.DataTable = Y.mix(
Y.Base.create('datatable', Y.DataTable.Base, []), // Create the class
Y.DataTable); // Migrate static and namespaced classes
}, '3.5.1' ,{requires:['datatable-core', 'base-build', 'widget', 'datatable-head', 'datatable-body']});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatable-base",function(a){a.DataTable.Base=a.Base.create("datatable",a.Widget,[a.DataTable.Core],null,{ATTRS:{headerView:{value:a.DataTable.HeaderView},bodyView:{value:a.DataTable.BodyView}}});a.DataTable=a.mix(a.Base.create("datatable",a.DataTable.Base,[]),a.DataTable);},"3.5.1",{requires:["datatable-core","base-build","widget","datatable-head","datatable-body"]});

View File

@ -1,241 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('datatable-base', function(Y) {
/**
A Widget for displaying tabular data. The base implementation of DataTable
provides the ability to dynamically generate an HTML table from a set of column
configurations and row data.
Two classes are included in the `datatable-base` module: `Y.DataTable` and
`Y.DataTable.Base`.
@module datatable
@submodule datatable-base
@main datatable
@since 3.5.0
**/
// DataTable API docs included before DataTable.Base to make yuidoc work
/**
A Widget for displaying tabular data. Before feature modules are `use()`d,
this class is functionally equivalent to DataTable.Base. However, feature
modules can modify this class in non-destructive ways, expanding the API and
functionality.
This is the primary DataTable class. Out of the box, it provides the ability
to dynamically generate an HTML table from a set of column configurations and
row data. But feature module inclusion can add table sorting, pagintaion,
highlighting, selection, and more.
<pre><code>
// The functionality of this table would require additional modules be use()d,
// but the feature APIs are aggregated onto Y.DataTable.
// (Snippet is for illustration. Not all features are available today.)
var table = new Y.DataTable({
columns: [
{ type: 'checkbox', defaultChecked: true },
{ key: 'firstName', sortable: true, resizable: true },
{ key: 'lastName', sortable: true },
{ key: 'role', formatter: toRoleName }
],
data: {
source: 'http://myserver.com/service/json',
type: 'json',
schema: {
resultListLocator: 'results.users',
fields: [
'username',
'firstName',
'lastName',
{ key: 'role', type: 'number' }
]
}
},
recordType: UserModel,
pagedData: {
location: 'footer',
pageSizes: [20, 50, 'all'],
rowsPerPage: 20,
pageLinks: 5
},
editable: true
});
</code></pre>
### Column Configuration
The column configurations are set in the form of an array of objects, where
each object corresponds to a column. For columns populated directly from the
row data, a 'key' property is required to bind the column to that property or
attribute in the row data.
Not all columns need to relate to row data, nor do all properties or attributes
of the row data need to have a corresponding column. However, only those
columns included in the `columns` configuration attribute will be rendered.
Other column configuration properties are supported by the configured
`headerView`, `bodyView`, `footerView` classes as well as any features added by
plugins or class extensions. See the description of DataTable.HeaderView,
DataTable.BodyView, and other DataTable feature classes to see what column
properties they support.
Some examples of column configurations would be:
<pre><code>
// Basic
var columns = [{ key: 'firstName' }, { key: 'lastName' }, { key: 'age' }];
// For columns without any additional configuration, strings can be used
var columns = ['firstName', 'lastName', 'age'];
// Multi-row column headers (see DataTable.HeaderView for details)
var columns = [
{
label: 'Name',
children: [
{ key: 'firstName' },
{ key: 'lastName' }
]
},
'age' // mixing and matching objects and strings is ok
];
// Including columns that are not related 1:1 to row data fields/attributes
// (See DataTable.BodyView for details)
var columns = [
{
label: 'Name', // Needed for the column header
formatter: function (o) {
// Fill the column cells with data from firstName and lastName
if (o.data.age > 55) {
o.className += ' senior';
}
return o.data.lastName + ', ' + o.data.firstName;
}
},
'age'
];
// Columns that include feature configurations (for illustration; not all
// features are available today).
var columns = [
{ type: 'checkbox', defaultChecked: true },
{ key: 'firstName', sortable: true, resizable: true, min-width: '300px' },
{ key: 'lastName', sortable: true, resizable: true, min-width: '300px' },
{ key: 'age', emptyCellValue: '<em>unknown</em>' }
];
</code></pre>
### Row Data Configuration
The `data` configuration attribute is responsible for housing the data objects that will be rendered as rows. You can provide this information in two ways by default:
1. An array of simple objects with key:value pairs
2. A ModelList of Base-based class instances (presumably Model subclass
instances)
If an array of objects is passed, it will be translated into a ModelList filled
with instances of the class provided to the `recordType` attribute. This
attribute can also create a custom Model subclass from an array of field names
or an object of attribute configurations. If no `recordType` is provided, one
will be created for you from available information (see `_initRecordType`).
Providing either your own ModelList instance for `data`, or at least Model
class for `recordType`, is the best way to control client-server
synchronization when modifying data on the client side.
The ModelList instance that manages the table's data is available in the `data`
property on the DataTable instance.
### Rendering
Table rendering is a collaborative process between the DataTable and its
configured `headerView`, `bodyView`, and `footerView`. The DataTable renders
the `<table>` and `<caption>`, but the contents of the table are delegated to
instances of the classes provided to the `headerView`, `bodyView`, and
`footerView` attributes. If any of these attributes is unset, that portion of
the table won't be rendered.
DataTable.Base assigns the default `headerView` to `Y.DataTable.HeaderView` and
the default `bodyView` to `Y.DataTable.BodyView`, though either can be
overridden for custom rendering. No default `footerView` is assigned. See
those classes for more details about how they operate.
@class DataTable
@extends DataTable.Base
@since 3.5.0
**/
// DataTable API docs included before DataTable.Base to make yuidoc work
/**
The baseline implementation of a DataTable. This class should be used
primarily as a superclass for a custom DataTable with a specific set of
features. Because features can be composed onto `Y.DataTable`, custom
subclasses of DataTable.Base will remain unmodified when new feature modules
are loaded.
Example usage might look like this:
<pre><code>
// Custom subclass with only sorting and mutability added. If other datatable
// feature modules are loaded, this class will not be affected.
var MyTableClass = Y.Base.create('table', Y.DataTable.Base,
[ Y.DataTable.Sort, Y.DataTable.Mutable ]);
var table = new MyTableClass({
columns: ['firstName', 'lastName', 'age'],
data: [
{ firstName: 'Frank', lastName: 'Zappa', age: 71 },
{ firstName: 'Frank', lastName: 'Lloyd Wright', age: 144 },
{ firstName: 'Albert', lastName: 'Einstein', age: 132 },
...
]
});
table.render('#over-there');
// DataTable.Base can be instantiated if a featureless table is needed.
var table = new Y.DataTable.Base({
columns: ['firstName', 'lastName', 'age'],
data: [
{ firstName: 'Frank', lastName: 'Zappa', age: 71 },
{ firstName: 'Frank', lastName: 'Lloyd Wright', age: 144 },
{ firstName: 'Albert', lastName: 'Einstein', age: 132 },
...
]
});
table.render('#in-here');
</code></pre>
DataTable.Base is built from DataTable.Core, and sets the default `headerView`
to `Y.DataTable.HeaderView` and default `bodyView` to `Y.DataTable.BodyView`.
@class Base
@extends Widget
@uses DataTable.Core
@namespace DataTable
@since 3.5.0
**/
Y.DataTable.Base = Y.Base.create('datatable', Y.Widget, [Y.DataTable.Core],
null, {
ATTRS: {
// Default head and body views
headerView: { value: Y.DataTable.HeaderView },
bodyView : { value: Y.DataTable.BodyView }
}
});
// The DataTable API docs are above DataTable.Base docs.
Y.DataTable = Y.mix(
Y.Base.create('datatable', Y.DataTable.Base, []), // Create the class
Y.DataTable); // Migrate static and namespaced classes
}, '3.5.1' ,{requires:['datatable-core', 'base-build', 'widget', 'datatable-head', 'datatable-body']});

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatable-column-widths",function(d){var c=d.Lang.isNumber,a=d.Array.indexOf;d.Features.add("table","badColWidth",{test:function(){var e=d.one("body"),g,f;if(e){g=e.insertBefore('<table style="position:absolute;visibility:hidden;border:0 none">'+'<colgroup><col style="width:9px"></colgroup>'+"<tbody><tr>"+'<td style="'+"padding:0 4px;"+"font:normal 2px/2px arial;"+'border:0 none">'+"."+"</td></tr></tbody>"+"</table>",e.get("firstChild"));f=g.one("td").getComputedStyle("width")!=="1px";g.remove(true);}return f;}});function b(){}d.mix(b.prototype,{COL_TEMPLATE:"<col/>",COLGROUP_TEMPLATE:"<colgroup/>",setColumnWidth:function(h,g){var f=this.getColumn(h),e=f&&a(this._displayColumns,f);if(e>-1){if(c(g)){g+="px";}f.width=g;this._setColumnWidth(e,g);}return this;},_createColumnGroup:function(){return d.Node.create(this.COLGROUP_TEMPLATE);},initializer:function(e){this.after("renderTable",function(f){this._uiSetColumns();this.after("columnsChange",this._uiSetColumns);});},_setColumnWidth:function(i,j){var g=this._colgroupNode,h=g&&g.all("col").item(i),k,f,e;if(h){if(j&&c(j)){j+="px";}h.setStyle("width",j);if(j&&d.Features.test("table","badColWidth")){k=this._tbodyNode&&this._tbodyNode.one("tr");f=k&&k.all("td").item(i);if(f){e=function(l){return parseInt(f.getComputedStyle(l),10)|0;};h.setStyle("width",parseInt(j,10)-e("paddingLeft")-e("paddingRight")-e("borderLeftWidth")-e("borderRightWidth")+"px");}}}},_uiSetColumns:function(){var j=this.COL_TEMPLATE,f=this._colgroupNode,h=this._displayColumns,g,e;if(!f){f=this._colgroupNode=this._createColumnGroup();this._tableNode.insertBefore(f,this._tableNode.one("> thead, > tfoot, > tbody"));}else{f.empty();}for(g=0,e=h.length;g<e;++g){f.append(j);this._setColumnWidth(g,h[g].width);}}},true);d.DataTable.ColumnWidths=b;d.Base.mix(d.DataTable,[b]);},"3.5.1",{requires:["datatable-base"]});

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

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatable-head",function(g){var d=g.Lang,f=d.sub,a=d.isArray,b=g.Array,e=g.ClassNameManager,c=e.getClassName;g.namespace("DataTable").HeaderView=g.Base.create("tableHeader",g.View,[],{CELL_TEMPLATE:'<th id="{id}" colspan="{_colspan}" rowspan="{_rowspan}" class="{className}" scope="col" {_id}{abbr}>{content}</th>',ROW_TEMPLATE:"<tr>{content}</tr>",getClassName:function(){var h=b(arguments);h.unshift(this._cssPrefix);h.push(true);return c.apply(e,h);},render:function(){var r=this.get("container"),k=this.columns,l={_colspan:1,_rowspan:1,abbr:""},n,p,m,t,h,o,q,s;if(r&&k){o="";if(k.length){for(n=0,p=k.length;n<p;++n){q="";for(m=0,t=k[n].length;m<t;++m){h=k[n][m];s=g.merge(l,h,{className:this.getClassName("header"),content:h.label||h.key||("Column "+(m+1))});s._id=h._id?' data-yui3-col-id="'+h._id+'"':"";if(h.abbr){s.abbr=' abbr="'+h.abbr+'"';}if(h.className){s.className+=" "+h.className;}if(h._first){s.className+=" "+this.getClassName("first","header");}if(h._id){s.className+=" "+this.getClassName("col",h._id);}q+=f(h.headerTemplate||this.CELL_TEMPLATE,s);}o+=f(this.ROW_TEMPLATE,{content:q});}}r.setContent(o);}this.bindUI();return this;},_cssPrefix:e.getClassName("table"),_afterColumnsChange:function(h){this.columns=this._parseColumns(h.newVal);this.render();},bindUI:function(){if(this.source&&!this._eventHandles.columnsChange){this._eventHandles.columnsChange=this.source.after("columnsChange",g.bind("_afterColumnsChange",this));}},destructor:function(){(new g.EventHandle(g.Object.values(this._eventHandles))).detach();},initializer:function(h){h||(h={});var i=h.cssPrefix||(h.source||{}).cssPrefix;this.source=h.source;this.columns=this._parseColumns(h.columns);this._eventHandles=[];if(i){this._cssPrefix=i;}},_parseColumns:function(o){var l=[],r=[],q=1,t,u,k,h,s,n,p,m;if(a(o)&&o.length){r.push([o,-1]);while(r.length){t=r[r.length-1];u=t[0];n=t[1]+1;for(p=u.length;n<p;++n){k=u[n];h=k.children;g.stamp(k);if(a(h)&&h.length){r.push([h,-1]);t[1]=n;q=Math.max(q,r.length);break;}else{k._colspan=1;}}if(n>=p){if(r.length>1){t=r[r.length-2];s=t[0][t[1]];s._colspan=0;for(n=0,p=u.length;n<p;++n){s._colspan+=u[n]._colspan;}}r.pop();}}for(n=0;n<q;++n){l.push([]);}r.push([o,-1]);while(r.length){t=r[r.length-1];u=t[0];n=t[1]+1;for(p=u.length;n<p;++n){k=u[n];h=k.children;l[r.length-1].push(k);t[1]=n;k._headers=[k.id];for(m=r.length-2;m>=0;--m){s=r[m][0][r[m][1]];k._headers.unshift(s.id);}if(h&&h.length){r.push([h,-1]);break;}else{k._rowspan=q-r.length+1;}}if(n>=p){r.pop();}}}for(n=0,p=l.length;n<p;n+=k._rowspan){k=l[n][0];k._first=true;}return l;}});},"3.5.1",{requires:["datatable-core","view","classnamemanager"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatable-message",function(b){var a;b.namespace("DataTable").Message=a=function(){};a.ATTRS={showMessages:{value:true,validator:b.Lang.isBoolean}};b.mix(a.prototype,{MESSAGE_TEMPLATE:'<tbody class="{className}"><tr><td class="{contentClass}" colspan="{colspan}"></td></tr></tbody>',hideMessage:function(){this.get("boundingBox").removeClass(this.getClassName("message","visible"));return this;},showMessage:function(d){var c=this.getString(d)||d;if(!this._messageNode){this._initMessageNode();}if(this.get("showMessages")){if(c){this._messageNode.one("."+this.getClassName("message","content")).setContent(c);this.get("boundingBox").addClass(this.getClassName("message","visible"));}else{this.hideMessage();}}return this;},_afterMessageColumnsChange:function(d){var c;if(this._messageNode){c=this._messageNode.one("."+this.getClassName("message","content"));if(c){c.set("colSpan",this._displayColumns.length);}}},_afterMessageDataChange:function(c){this._uiSetMessage();},_afterShowMessagesChange:function(c){if(c.newVal){this._uiSetMessage(c);}else{if(this._messageNode){this.get("boundingBox").removeClass(this.getClassName("message","visible"));this._messageNode.remove().destroy(true);this._messageNode=null;}}},_bindMessageUI:function(){this.after(["dataChange","*:add","*:remove","*:reset"],b.bind("_afterMessageDataChange",this));this.after("columnsChange",b.bind("_afterMessageColumnsChange",this));this.after("showMessagesChange",b.bind("_afterShowMessagesChange",this));},initializer:function(){this._initMessageStrings();if(this.get("showMessages")){this.after("renderBody",b.bind("_initMessageNode",this));}this.after(b.bind("_bindMessageUI",this),this,"bindUI");this.after(b.bind("_syncMessageUI",this),this,"syncUI");},_initMessageNode:function(){if(!this._messageNode){this._messageNode=b.Node.create(b.Lang.sub(this.MESSAGE_TEMPLATE,{className:this.getClassName("message"),contentClass:this.getClassName("message","content"),colspan:this._displayColumns.length||1}));this._tableNode.insertBefore(this._messageNode,this._tbodyNode);}},_initMessageStrings:function(){this.set("strings",b.mix((this.get("strings")||{}),b.Intl.get("datatable-message")));},_syncMessageUI:function(){this._uiSetMessage();},_uiSetMessage:function(c){if(!this.data.size()){this.showMessage((c&&c.message)||"emptyMessage");}else{this.hideMessage();}}});if(b.Lang.isFunction(b.DataTable)){b.Base.mix(b.DataTable,[a]);}},"3.5.1",{requires:["datatable-base"],skinnable:true,lang:["en"]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatype-date-format",function(d){var a=function(e,g,f){if(typeof f==="undefined"){f=10;}g=g.toString();for(;parseInt(e,10)<f&&f>1;f/=10){e=g+e;}return e.toString();};var c={formats:{a:function(f,e){return e.a[f.getDay()];},A:function(f,e){return e.A[f.getDay()];},b:function(f,e){return e.b[f.getMonth()];},B:function(f,e){return e.B[f.getMonth()];},C:function(e){return a(parseInt(e.getFullYear()/100,10),0);},d:["getDate","0"],e:["getDate"," "],g:function(e){return a(parseInt(c.formats.G(e)%100,10),0);},G:function(g){var h=g.getFullYear();var f=parseInt(c.formats.V(g),10);var e=parseInt(c.formats.W(g),10);if(e>f){h++;}else{if(e===0&&f>=52){h--;}}return h;},H:["getHours","0"],I:function(f){var e=f.getHours()%12;return a(e===0?12:e,0);},j:function(i){var h=new Date(""+i.getFullYear()+"/1/1 GMT");var f=new Date(""+i.getFullYear()+"/"+(i.getMonth()+1)+"/"+i.getDate()+" GMT");var e=f-h;var g=parseInt(e/60000/60/24,10)+1;return a(g,0,100);},k:["getHours"," "],l:function(f){var e=f.getHours()%12;return a(e===0?12:e," ");},m:function(e){return a(e.getMonth()+1,0);},M:["getMinutes","0"],p:function(f,e){return e.p[f.getHours()>=12?1:0];},P:function(f,e){return e.P[f.getHours()>=12?1:0];},s:function(f,e){return parseInt(f.getTime()/1000,10);},S:["getSeconds","0"],u:function(e){var f=e.getDay();return f===0?7:f;},U:function(h){var e=parseInt(c.formats.j(h),10);var g=6-h.getDay();var f=parseInt((e+g)/7,10);return a(f,0);},V:function(h){var g=parseInt(c.formats.W(h),10);var e=(new Date(""+h.getFullYear()+"/1/1")).getDay();var f=g+(e>4||e<=1?0:1);if(f===53&&(new Date(""+h.getFullYear()+"/12/31")).getDay()<4){f=1;}else{if(f===0){f=c.formats.V(new Date(""+(h.getFullYear()-1)+"/12/31"));}}return a(f,0);},w:"getDay",W:function(h){var e=parseInt(c.formats.j(h),10);var g=7-c.formats.u(h);var f=parseInt((e+g)/7,10);return a(f,0,10);},y:function(e){return a(e.getFullYear()%100,0);},Y:"getFullYear",z:function(g){var f=g.getTimezoneOffset();var e=a(parseInt(Math.abs(f/60),10),0);var h=a(Math.abs(f%60),0);return(f>0?"-":"+")+e+h;},Z:function(e){var f=e.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");if(f.length>4){f=c.formats.z(e);}return f;},"%":function(e){return"%";}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(o,j){j=j||{};if(!d.Lang.isDate(o)){return d.Lang.isValue(o)?o:"";}var n,e,i,g,m;n=j.format||d.config.dateFormat||"%Y-%m-%d";i=d.Lang.isUndefined(d.config.lang)&&(d.Lang.isValue(j.locale)||d.Lang.isValue(d.config.locale));if(i){g=j.locale||d.config.locale;m=d.DataType.Date.Locale;g=g.replace(/_/g,"-");if(!m[g]){var h=g.replace(/-[a-zA-Z]+$/,"");if(h in m){g=h;}else{if(d.config.locale in m){g=d.config.locale;}else{g="en";}}}e=m[g];}else{e=d.Intl.get("datatype-date-format");}var k=function(q,p){if(i&&p==="r"){return e[p];}var r=c.aggregates[p];return(r==="locale"?e[p]:r);};var f=function(q,p){var r=c.formats[p];switch(d.Lang.type(r)){case"string":return o[r]();case"function":return r.call(o,o,e);case"array":if(d.Lang.type(r[0])==="string"){return a(o[r[0]](),r[1]);}default:return p;}};while(n.match(/%[cDFhnrRtTxX]/)){n=n.replace(/%([cDFhnrRtTxX])/g,k);}var l=n.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,f);k=f=undefined;return l;}};d.mix(d.namespace("DataType.Date"),c);var b={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%d/%m/%y",X:"%T"};d.namespace("DataType.Date.Locale");d.DataType.Date.Locale["en"]=b;d.DataType.Date.Locale["en-US"]=d.merge(b,{c:"%a %d %b %Y %I:%M:%S %p %Z",x:"%m/%d/%Y",X:"%I:%M:%S %p"});d.DataType.Date.Locale["en-GB"]=d.merge(b,{r:"%l:%M:%S %P %Z"});d.DataType.Date.Locale["en-AU"]=d.merge(b);},"3.5.1",{lang:["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]});

View File

@ -1,563 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('dd-constrain', function(Y) {
/**
* The Drag & Drop Utility allows you to create a draggable interface efficiently, buffering you from browser-level abnormalities and enabling you to focus on the interesting logic surrounding your particular implementation. This component enables you to create a variety of standard draggable objects with just a few lines of code and then, using its extensive API, add your own specific implementation logic.
* @module dd
* @main dd
* @submodule dd-constrain
*/
/**
* Plugin for the dd-drag module to add the constraining methods to it. It supports constraining to a node or viewport. It supports tick based moves and XY axis constraints.
* @class DDConstrained
* @extends Base
* @constructor
* @namespace Plugin
*/
var DRAG_NODE = 'dragNode',
OFFSET_HEIGHT = 'offsetHeight',
OFFSET_WIDTH = 'offsetWidth',
HOST = 'host',
TICK_X_ARRAY = 'tickXArray',
TICK_Y_ARRAY = 'tickYArray',
DDM = Y.DD.DDM,
TOP = 'top',
RIGHT = 'right',
BOTTOM = 'bottom',
LEFT = 'left',
VIEW = 'view',
proto = null,
/**
* @event drag:tickAlignX
* @description Fires when this node is aligned with the tickX value.
* @param {EventFacade} event An Event Facade object
* @type {CustomEvent}
*/
EV_TICK_ALIGN_X = 'drag:tickAlignX',
/**
* @event drag:tickAlignY
* @description Fires when this node is aligned with the tickY value.
* @param {EventFacade} event An Event Facade object
* @type {CustomEvent}
*/
EV_TICK_ALIGN_Y = 'drag:tickAlignY',
C = function(config) {
this._lazyAddAttrs = false;
C.superclass.constructor.apply(this, arguments);
};
C.NAME = 'ddConstrained';
/**
* @property NS
* @default con
* @readonly
* @protected
* @static
* @description The Constrained instance will be placed on the Drag instance under the con namespace.
* @type {String}
*/
C.NS = 'con';
C.ATTRS = {
host: {
},
/**
* @attribute stickX
* @description Stick the drag movement to the X-Axis. Default: false
* @type Boolean
*/
stickX: {
value: false
},
/**
* @attribute stickY
* @description Stick the drag movement to the Y-Axis
* @type Boolean
*/
stickY: {
value: false
},
/**
* @attribute tickX
* @description The X tick offset the drag node should snap to on each drag move. False for no ticks. Default: false
* @type Number/false
*/
tickX: {
value: false
},
/**
* @attribute tickY
* @description The Y tick offset the drag node should snap to on each drag move. False for no ticks. Default: false
* @type Number/false
*/
tickY: {
value: false
},
/**
* @attribute tickXArray
* @description An array of page coordinates to use as X ticks for drag movement.
* @type Array
*/
tickXArray: {
value: false
},
/**
* @attribute tickYArray
* @description An array of page coordinates to use as Y ticks for drag movement.
* @type Array
*/
tickYArray: {
value: false
},
/**
* @attribute gutter
* @description CSS style string for the gutter of a region (supports negative values): '5 0' (sets top and bottom to 5px, left and right to 0px), '1 2 3 4' (top 1px, right 2px, bottom 3px, left 4px)
* @type String
*/
gutter: {
value: '0',
setter: function(gutter) {
return Y.DD.DDM.cssSizestoObject(gutter);
}
},
/**
* @attribute constrain
* @description Will attempt to constrain the drag 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
* @type {String/Object/Node}
*/
constrain: {
value: VIEW,
setter: function(con) {
var node = Y.one(con);
if (node) {
con = node;
}
return con;
}
},
/**
* @deprecated
* @attribute constrain2region
* @description An Object Literal containing a valid region (top, right, bottom, left) of page positions to constrain the drag node to.
* @type Object
*/
constrain2region: {
setter: function(r) {
return this.set('constrain', r);
}
},
/**
* @deprecated
* @attribute constrain2node
* @description Will attempt to constrain the drag node to the boundaries of this node.
* @type Object
*/
constrain2node: {
setter: function(n) {
return this.set('constrain', Y.one(n));
}
},
/**
* @deprecated
* @attribute constrain2view
* @description Will attempt to constrain the drag node to the boundaries of the viewport region.
* @type Object
*/
constrain2view: {
setter: function(n) {
return this.set('constrain', VIEW);
}
},
/**
* @attribute cacheRegion
* @description Should the region be cached for performace. Default: true
* @type Boolean
*/
cacheRegion: {
value: true
}
};
proto = {
_lastTickXFired: null,
_lastTickYFired: null,
initializer: function() {
this._createEvents();
this.get(HOST).on('drag:end', Y.bind(this._handleEnd, this));
this.get(HOST).on('drag:start', Y.bind(this._handleStart, this));
this.get(HOST).after('drag:align', Y.bind(this.align, this));
this.get(HOST).after('drag:drag', Y.bind(this.drag, this));
},
destructor: function() {
if (this._cacheHandle) {
this._cacheHandle.detach();
}
this._cacheHandle = null;
},
/**
* @private
* @method _createEvents
* @description This method creates all the events for this Event Target and publishes them so we get Event Bubbling.
*/
_createEvents: function() {
var instance = this;
var ev = [
EV_TICK_ALIGN_X,
EV_TICK_ALIGN_Y
];
Y.each(ev, function(v, k) {
this.publish(v, {
type: v,
emitFacade: true,
bubbles: true,
queuable: false,
prefix: 'drag'
});
}, this);
},
/**
* @private
* @method _handleEnd
* @description Fires on drag:end
*/
_handleEnd: function() {
this._lastTickYFired = null;
this._lastTickXFired = null;
},
/**
* @private
* @method _handleStart
* @description Fires on drag:start and clears the _regionCache
*/
_handleStart: function() {
this.resetCache();
},
/**
* @private
* @property _regionCache
* @description Store a cache of the region that we are constraining to
* @type Object
*/
_regionCache: null,
/**
* Event handle for window resize event.
* @private
* @property _cacheHandle
* @type {Event}
*/
_cacheHandle: null,
/**
* @private
* @method _cacheRegion
* @description Get's the region and caches it, called from window.resize and when the cache is null
*/
_cacheRegion: function() {
this._regionCache = this.get('constrain').get('region');
},
/**
* @method resetCache
* @description Reset the internal region cache.
*/
resetCache: function() {
this._regionCache = null;
},
/**
* @private
* @method _getConstraint
* @description Standardizes the 'constraint' attribute
*/
_getConstraint: function() {
var con = this.get('constrain'),
g = this.get('gutter'),
region;
if (con) {
if (con instanceof Y.Node) {
if (!this._regionCache) {
this._cacheHandle = Y.on('resize', Y.bind(this._cacheRegion, this), Y.config.win);
this._cacheRegion();
}
region = Y.clone(this._regionCache);
if (!this.get('cacheRegion')) {
this.resetCache();
}
} else if (Y.Lang.isObject(con)) {
region = Y.clone(con);
}
}
if (!con || !region) {
con = VIEW;
}
if (con === VIEW) {
region = this.get(HOST).get(DRAG_NODE).get('viewportRegion');
}
Y.each(g, function(i, n) {
if ((n == RIGHT) || (n == BOTTOM)) {
region[n] -= i;
} else {
region[n] += i;
}
});
return region;
},
/**
* @method getRegion
* @description Get the active region: viewport, node, custom region
* @param {Boolean} inc Include the node's height and width
* @return {Object} The active region.
*/
getRegion: function(inc) {
var r = {}, oh = null, ow = null,
host = this.get(HOST);
r = this._getConstraint();
if (inc) {
oh = host.get(DRAG_NODE).get(OFFSET_HEIGHT);
ow = host.get(DRAG_NODE).get(OFFSET_WIDTH);
r[RIGHT] = r[RIGHT] - ow;
r[BOTTOM] = r[BOTTOM] - oh;
}
return r;
},
/**
* @private
* @method _checkRegion
* @description Check if xy is inside a given region, if not change to it be inside.
* @param {Array} _xy The XY to check if it's in the current region, if it isn't inside the region, it will reset the xy array to be inside the region.
* @return {Array} The new XY that is inside the region
*/
_checkRegion: function(_xy) {
var oxy = _xy,
r = this.getRegion(),
host = this.get(HOST),
oh = host.get(DRAG_NODE).get(OFFSET_HEIGHT),
ow = host.get(DRAG_NODE).get(OFFSET_WIDTH);
if (oxy[1] > (r[BOTTOM] - oh)) {
_xy[1] = (r[BOTTOM] - oh);
}
if (r[TOP] > oxy[1]) {
_xy[1] = r[TOP];
}
if (oxy[0] > (r[RIGHT] - ow)) {
_xy[0] = (r[RIGHT] - ow);
}
if (r[LEFT] > oxy[0]) {
_xy[0] = r[LEFT];
}
return _xy;
},
/**
* @method inRegion
* @description Checks if the XY passed or the dragNode is inside the active region.
* @param {Array} xy Optional XY to check, if not supplied this.get('dragNode').getXY() is used.
* @return {Boolean} True if the XY is inside the region, false otherwise.
*/
inRegion: function(xy) {
xy = xy || this.get(HOST).get(DRAG_NODE).getXY();
var _xy = this._checkRegion([xy[0], xy[1]]),
inside = false;
if ((xy[0] === _xy[0]) && (xy[1] === _xy[1])) {
inside = true;
}
return inside;
},
/**
* @method align
* @description Modifies the Drag.actXY method from the after drag:align event. This is where the constraining happens.
*/
align: function() {
var host = this.get(HOST),
_xy = [host.actXY[0], host.actXY[1]],
r = this.getRegion(true);
if (this.get('stickX')) {
_xy[1] = (host.startXY[1] - host.deltaXY[1]);
}
if (this.get('stickY')) {
_xy[0] = (host.startXY[0] - host.deltaXY[0]);
}
if (r) {
_xy = this._checkRegion(_xy);
}
_xy = this._checkTicks(_xy, r);
host.actXY = _xy;
},
/**
* @method drag
* @description Fires after drag:drag. Handle the tickX and tickX align events.
*/
drag: function(event) {
var host = this.get(HOST),
xt = this.get('tickX'),
yt = this.get('tickY'),
_xy = [host.actXY[0], host.actXY[1]];
if ((Y.Lang.isNumber(xt) || this.get(TICK_X_ARRAY)) && (this._lastTickXFired !== _xy[0])) {
this._tickAlignX();
this._lastTickXFired = _xy[0];
}
if ((Y.Lang.isNumber(yt) || this.get(TICK_Y_ARRAY)) && (this._lastTickYFired !== _xy[1])) {
this._tickAlignY();
this._lastTickYFired = _xy[1];
}
},
/**
* @private
* @method _checkTicks
* @description This method delegates the proper helper method for tick calculations
* @param {Array} xy The XY coords for the Drag
* @param {Object} r The optional region that we are bound to.
* @return {Array} The calced XY coords
*/
_checkTicks: function(xy, r) {
var host = this.get(HOST),
lx = (host.startXY[0] - host.deltaXY[0]),
ly = (host.startXY[1] - host.deltaXY[1]),
xt = this.get('tickX'),
yt = this.get('tickY');
if (xt && !this.get(TICK_X_ARRAY)) {
xy[0] = DDM._calcTicks(xy[0], lx, xt, r[LEFT], r[RIGHT]);
}
if (yt && !this.get(TICK_Y_ARRAY)) {
xy[1] = DDM._calcTicks(xy[1], ly, yt, r[TOP], r[BOTTOM]);
}
if (this.get(TICK_X_ARRAY)) {
xy[0] = DDM._calcTickArray(xy[0], this.get(TICK_X_ARRAY), r[LEFT], r[RIGHT]);
}
if (this.get(TICK_Y_ARRAY)) {
xy[1] = DDM._calcTickArray(xy[1], this.get(TICK_Y_ARRAY), r[TOP], r[BOTTOM]);
}
return xy;
},
/**
* @private
* @method _tickAlignX
* @description Fires when the actXY[0] reach a new value respecting the tickX gap.
*/
_tickAlignX: function() {
this.fire(EV_TICK_ALIGN_X);
},
/**
* @private
* @method _tickAlignY
* @description Fires when the actXY[1] reach a new value respecting the tickY gap.
*/
_tickAlignY: function() {
this.fire(EV_TICK_ALIGN_Y);
}
};
Y.namespace('Plugin');
Y.extend(C, Y.Base, proto);
Y.Plugin.DDConstrained = C;
Y.mix(DDM, {
/**
* @for DDM
* @namespace DD
* @private
* @method _calcTicks
* @description Helper method to calculate the tick offsets for a given position
* @param {Number} pos The current X or Y position
* @param {Number} start The start X or Y position
* @param {Number} tick The X or Y tick increment
* @param {Number} off1 The min offset that we can't pass (region)
* @param {Number} off2 The max offset that we can't pass (region)
* @return {Number} The new position based on the tick calculation
*/
_calcTicks: function(pos, start, tick, off1, off2) {
var ix = ((pos - start) / tick),
min = Math.floor(ix),
max = Math.ceil(ix);
if ((min !== 0) || (max !== 0)) {
if ((ix >= min) && (ix <= max)) {
pos = (start + (tick * min));
if (off1 && off2) {
if (pos < off1) {
pos = (start + (tick * (min + 1)));
}
if (pos > off2) {
pos = (start + (tick * (min - 1)));
}
}
}
}
return pos;
},
/**
* @for DDM
* @namespace DD
* @private
* @method _calcTickArray
* @description This method is used with the tickXArray and tickYArray config options
* @param {Number} pos The current X or Y position
* @param {Number} ticks The array containing our custom tick positions.
* @param {Number} off1 The min offset that we can't pass (region)
* @param {Number} off2 The max offset that we can't pass (region)
* @return The tick position
*/
_calcTickArray: function(pos, ticks, off1, off2) {
var i = 0, len = ticks.length, next = 0,
diff1, diff2, ret;
if (!ticks || (ticks.length === 0)) {
return pos;
} else if (ticks[0] >= pos) {
return ticks[0];
} else {
for (i = 0; i < len; i++) {
next = (i + 1);
if (ticks[next] && ticks[next] >= pos) {
diff1 = pos - ticks[i];
diff2 = ticks[next] - pos;
ret = (diff2 > diff1) ? ticks[i] : ticks[next];
if (off1 && off2) {
if (ret > off2) {
if (ticks[i]) {
ret = ticks[i];
} else {
ret = ticks[len - 1];
}
}
}
return ret;
}
}
return ticks[ticks.length - 1];
}
}
});
}, '3.5.1' ,{skinnable:false, requires:['dd-drag']});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("dd-constrain",function(b){var l="dragNode",n="offsetHeight",e="offsetWidth",q="host",f="tickXArray",o="tickYArray",p=b.DD.DDM,d="top",j="right",m="bottom",c="left",k="view",h=null,i="drag:tickAlignX",g="drag:tickAlignY",a=function(r){this._lazyAddAttrs=false;a.superclass.constructor.apply(this,arguments);};a.NAME="ddConstrained";a.NS="con";a.ATTRS={host:{},stickX:{value:false},stickY:{value:false},tickX:{value:false},tickY:{value:false},tickXArray:{value:false},tickYArray:{value:false},gutter:{value:"0",setter:function(r){return b.DD.DDM.cssSizestoObject(r);}},constrain:{value:k,setter:function(r){var s=b.one(r);if(s){r=s;}return r;}},constrain2region:{setter:function(s){return this.set("constrain",s);}},constrain2node:{setter:function(r){return this.set("constrain",b.one(r));}},constrain2view:{setter:function(r){return this.set("constrain",k);}},cacheRegion:{value:true}};h={_lastTickXFired:null,_lastTickYFired:null,initializer:function(){this._createEvents();this.get(q).on("drag:end",b.bind(this._handleEnd,this));this.get(q).on("drag:start",b.bind(this._handleStart,this));this.get(q).after("drag:align",b.bind(this.align,this));this.get(q).after("drag:drag",b.bind(this.drag,this));},destructor:function(){if(this._cacheHandle){this._cacheHandle.detach();}this._cacheHandle=null;},_createEvents:function(){var r=this;var s=[i,g];b.each(s,function(u,t){this.publish(u,{type:u,emitFacade:true,bubbles:true,queuable:false,prefix:"drag"});},this);},_handleEnd:function(){this._lastTickYFired=null;this._lastTickXFired=null;},_handleStart:function(){this.resetCache();},_regionCache:null,_cacheHandle:null,_cacheRegion:function(){this._regionCache=this.get("constrain").get("region");},resetCache:function(){this._regionCache=null;},_getConstraint:function(){var r=this.get("constrain"),s=this.get("gutter"),t;if(r){if(r instanceof b.Node){if(!this._regionCache){this._cacheHandle=b.on("resize",b.bind(this._cacheRegion,this),b.config.win);this._cacheRegion();}t=b.clone(this._regionCache);if(!this.get("cacheRegion")){this.resetCache();}}else{if(b.Lang.isObject(r)){t=b.clone(r);}}}if(!r||!t){r=k;}if(r===k){t=this.get(q).get(l).get("viewportRegion");}b.each(s,function(u,v){if((v==j)||(v==m)){t[v]-=u;}else{t[v]+=u;}});return t;},getRegion:function(w){var u={},v=null,s=null,t=this.get(q);u=this._getConstraint();if(w){v=t.get(l).get(n);s=t.get(l).get(e);u[j]=u[j]-s;u[m]=u[m]-v;}return u;},_checkRegion:function(s){var u=s,w=this.getRegion(),v=this.get(q),x=v.get(l).get(n),t=v.get(l).get(e);if(u[1]>(w[m]-x)){s[1]=(w[m]-x);}if(w[d]>u[1]){s[1]=w[d];}if(u[0]>(w[j]-t)){s[0]=(w[j]-t);}if(w[c]>u[0]){s[0]=w[c];}return s;},inRegion:function(t){t=t||this.get(q).get(l).getXY();var s=this._checkRegion([t[0],t[1]]),r=false;if((t[0]===s[0])&&(t[1]===s[1])){r=true;}return r;},align:function(){var u=this.get(q),s=[u.actXY[0],u.actXY[1]],t=this.getRegion(true);if(this.get("stickX")){s[1]=(u.startXY[1]-u.deltaXY[1]);}if(this.get("stickY")){s[0]=(u.startXY[0]-u.deltaXY[0]);}if(t){s=this._checkRegion(s);}s=this._checkTicks(s,t);u.actXY=s;},drag:function(v){var u=this.get(q),s=this.get("tickX"),t=this.get("tickY"),r=[u.actXY[0],u.actXY[1]];if((b.Lang.isNumber(s)||this.get(f))&&(this._lastTickXFired!==r[0])){this._tickAlignX();this._lastTickXFired=r[0];}if((b.Lang.isNumber(t)||this.get(o))&&(this._lastTickYFired!==r[1])){this._tickAlignY();this._lastTickYFired=r[1];}},_checkTicks:function(y,w){var v=this.get(q),x=(v.startXY[0]-v.deltaXY[0]),u=(v.startXY[1]-v.deltaXY[1]),s=this.get("tickX"),t=this.get("tickY");if(s&&!this.get(f)){y[0]=p._calcTicks(y[0],x,s,w[c],w[j]);}if(t&&!this.get(o)){y[1]=p._calcTicks(y[1],u,t,w[d],w[m]);}if(this.get(f)){y[0]=p._calcTickArray(y[0],this.get(f),w[c],w[j]);}if(this.get(o)){y[1]=p._calcTickArray(y[1],this.get(o),w[d],w[m]);}return y;},_tickAlignX:function(){this.fire(i);},_tickAlignY:function(){this.fire(g);}};b.namespace("Plugin");b.extend(a,b.Base,h);b.Plugin.DDConstrained=a;b.mix(p,{_calcTicks:function(y,x,u,w,v){var s=((y-x)/u),t=Math.floor(s),r=Math.ceil(s);if((t!==0)||(r!==0)){if((s>=t)&&(s<=r)){y=(x+(u*t));if(w&&v){if(y<w){y=(x+(u*(t+1)));}if(y>v){y=(x+(u*(t-1)));}}}}return y;},_calcTickArray:function(z,A,y,v){var s=0,w=A.length,u=0,t,r,x;if(!A||(A.length===0)){return z;}else{if(A[0]>=z){return A[0];}else{for(s=0;s<w;s++){u=(s+1);if(A[u]&&A[u]>=z){t=z-A[s];r=A[u]-z;x=(r>t)?A[s]:A[u];if(y&&v){if(x>v){if(A[s]){x=A[s];}else{x=A[w-1];}}}return x;}}return A[A.length-1];}}}});},"3.5.1",{skinnable:false,requires:["dd-drag"]});

View File

@ -1,563 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('dd-constrain', function(Y) {
/**
* The Drag & Drop Utility allows you to create a draggable interface efficiently, buffering you from browser-level abnormalities and enabling you to focus on the interesting logic surrounding your particular implementation. This component enables you to create a variety of standard draggable objects with just a few lines of code and then, using its extensive API, add your own specific implementation logic.
* @module dd
* @main dd
* @submodule dd-constrain
*/
/**
* Plugin for the dd-drag module to add the constraining methods to it. It supports constraining to a node or viewport. It supports tick based moves and XY axis constraints.
* @class DDConstrained
* @extends Base
* @constructor
* @namespace Plugin
*/
var DRAG_NODE = 'dragNode',
OFFSET_HEIGHT = 'offsetHeight',
OFFSET_WIDTH = 'offsetWidth',
HOST = 'host',
TICK_X_ARRAY = 'tickXArray',
TICK_Y_ARRAY = 'tickYArray',
DDM = Y.DD.DDM,
TOP = 'top',
RIGHT = 'right',
BOTTOM = 'bottom',
LEFT = 'left',
VIEW = 'view',
proto = null,
/**
* @event drag:tickAlignX
* @description Fires when this node is aligned with the tickX value.
* @param {EventFacade} event An Event Facade object
* @type {CustomEvent}
*/
EV_TICK_ALIGN_X = 'drag:tickAlignX',
/**
* @event drag:tickAlignY
* @description Fires when this node is aligned with the tickY value.
* @param {EventFacade} event An Event Facade object
* @type {CustomEvent}
*/
EV_TICK_ALIGN_Y = 'drag:tickAlignY',
C = function(config) {
this._lazyAddAttrs = false;
C.superclass.constructor.apply(this, arguments);
};
C.NAME = 'ddConstrained';
/**
* @property NS
* @default con
* @readonly
* @protected
* @static
* @description The Constrained instance will be placed on the Drag instance under the con namespace.
* @type {String}
*/
C.NS = 'con';
C.ATTRS = {
host: {
},
/**
* @attribute stickX
* @description Stick the drag movement to the X-Axis. Default: false
* @type Boolean
*/
stickX: {
value: false
},
/**
* @attribute stickY
* @description Stick the drag movement to the Y-Axis
* @type Boolean
*/
stickY: {
value: false
},
/**
* @attribute tickX
* @description The X tick offset the drag node should snap to on each drag move. False for no ticks. Default: false
* @type Number/false
*/
tickX: {
value: false
},
/**
* @attribute tickY
* @description The Y tick offset the drag node should snap to on each drag move. False for no ticks. Default: false
* @type Number/false
*/
tickY: {
value: false
},
/**
* @attribute tickXArray
* @description An array of page coordinates to use as X ticks for drag movement.
* @type Array
*/
tickXArray: {
value: false
},
/**
* @attribute tickYArray
* @description An array of page coordinates to use as Y ticks for drag movement.
* @type Array
*/
tickYArray: {
value: false
},
/**
* @attribute gutter
* @description CSS style string for the gutter of a region (supports negative values): '5 0' (sets top and bottom to 5px, left and right to 0px), '1 2 3 4' (top 1px, right 2px, bottom 3px, left 4px)
* @type String
*/
gutter: {
value: '0',
setter: function(gutter) {
return Y.DD.DDM.cssSizestoObject(gutter);
}
},
/**
* @attribute constrain
* @description Will attempt to constrain the drag 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
* @type {String/Object/Node}
*/
constrain: {
value: VIEW,
setter: function(con) {
var node = Y.one(con);
if (node) {
con = node;
}
return con;
}
},
/**
* @deprecated
* @attribute constrain2region
* @description An Object Literal containing a valid region (top, right, bottom, left) of page positions to constrain the drag node to.
* @type Object
*/
constrain2region: {
setter: function(r) {
return this.set('constrain', r);
}
},
/**
* @deprecated
* @attribute constrain2node
* @description Will attempt to constrain the drag node to the boundaries of this node.
* @type Object
*/
constrain2node: {
setter: function(n) {
return this.set('constrain', Y.one(n));
}
},
/**
* @deprecated
* @attribute constrain2view
* @description Will attempt to constrain the drag node to the boundaries of the viewport region.
* @type Object
*/
constrain2view: {
setter: function(n) {
return this.set('constrain', VIEW);
}
},
/**
* @attribute cacheRegion
* @description Should the region be cached for performace. Default: true
* @type Boolean
*/
cacheRegion: {
value: true
}
};
proto = {
_lastTickXFired: null,
_lastTickYFired: null,
initializer: function() {
this._createEvents();
this.get(HOST).on('drag:end', Y.bind(this._handleEnd, this));
this.get(HOST).on('drag:start', Y.bind(this._handleStart, this));
this.get(HOST).after('drag:align', Y.bind(this.align, this));
this.get(HOST).after('drag:drag', Y.bind(this.drag, this));
},
destructor: function() {
if (this._cacheHandle) {
this._cacheHandle.detach();
}
this._cacheHandle = null;
},
/**
* @private
* @method _createEvents
* @description This method creates all the events for this Event Target and publishes them so we get Event Bubbling.
*/
_createEvents: function() {
var instance = this;
var ev = [
EV_TICK_ALIGN_X,
EV_TICK_ALIGN_Y
];
Y.each(ev, function(v, k) {
this.publish(v, {
type: v,
emitFacade: true,
bubbles: true,
queuable: false,
prefix: 'drag'
});
}, this);
},
/**
* @private
* @method _handleEnd
* @description Fires on drag:end
*/
_handleEnd: function() {
this._lastTickYFired = null;
this._lastTickXFired = null;
},
/**
* @private
* @method _handleStart
* @description Fires on drag:start and clears the _regionCache
*/
_handleStart: function() {
this.resetCache();
},
/**
* @private
* @property _regionCache
* @description Store a cache of the region that we are constraining to
* @type Object
*/
_regionCache: null,
/**
* Event handle for window resize event.
* @private
* @property _cacheHandle
* @type {Event}
*/
_cacheHandle: null,
/**
* @private
* @method _cacheRegion
* @description Get's the region and caches it, called from window.resize and when the cache is null
*/
_cacheRegion: function() {
this._regionCache = this.get('constrain').get('region');
},
/**
* @method resetCache
* @description Reset the internal region cache.
*/
resetCache: function() {
this._regionCache = null;
},
/**
* @private
* @method _getConstraint
* @description Standardizes the 'constraint' attribute
*/
_getConstraint: function() {
var con = this.get('constrain'),
g = this.get('gutter'),
region;
if (con) {
if (con instanceof Y.Node) {
if (!this._regionCache) {
this._cacheHandle = Y.on('resize', Y.bind(this._cacheRegion, this), Y.config.win);
this._cacheRegion();
}
region = Y.clone(this._regionCache);
if (!this.get('cacheRegion')) {
this.resetCache();
}
} else if (Y.Lang.isObject(con)) {
region = Y.clone(con);
}
}
if (!con || !region) {
con = VIEW;
}
if (con === VIEW) {
region = this.get(HOST).get(DRAG_NODE).get('viewportRegion');
}
Y.each(g, function(i, n) {
if ((n == RIGHT) || (n == BOTTOM)) {
region[n] -= i;
} else {
region[n] += i;
}
});
return region;
},
/**
* @method getRegion
* @description Get the active region: viewport, node, custom region
* @param {Boolean} inc Include the node's height and width
* @return {Object} The active region.
*/
getRegion: function(inc) {
var r = {}, oh = null, ow = null,
host = this.get(HOST);
r = this._getConstraint();
if (inc) {
oh = host.get(DRAG_NODE).get(OFFSET_HEIGHT);
ow = host.get(DRAG_NODE).get(OFFSET_WIDTH);
r[RIGHT] = r[RIGHT] - ow;
r[BOTTOM] = r[BOTTOM] - oh;
}
return r;
},
/**
* @private
* @method _checkRegion
* @description Check if xy is inside a given region, if not change to it be inside.
* @param {Array} _xy The XY to check if it's in the current region, if it isn't inside the region, it will reset the xy array to be inside the region.
* @return {Array} The new XY that is inside the region
*/
_checkRegion: function(_xy) {
var oxy = _xy,
r = this.getRegion(),
host = this.get(HOST),
oh = host.get(DRAG_NODE).get(OFFSET_HEIGHT),
ow = host.get(DRAG_NODE).get(OFFSET_WIDTH);
if (oxy[1] > (r[BOTTOM] - oh)) {
_xy[1] = (r[BOTTOM] - oh);
}
if (r[TOP] > oxy[1]) {
_xy[1] = r[TOP];
}
if (oxy[0] > (r[RIGHT] - ow)) {
_xy[0] = (r[RIGHT] - ow);
}
if (r[LEFT] > oxy[0]) {
_xy[0] = r[LEFT];
}
return _xy;
},
/**
* @method inRegion
* @description Checks if the XY passed or the dragNode is inside the active region.
* @param {Array} xy Optional XY to check, if not supplied this.get('dragNode').getXY() is used.
* @return {Boolean} True if the XY is inside the region, false otherwise.
*/
inRegion: function(xy) {
xy = xy || this.get(HOST).get(DRAG_NODE).getXY();
var _xy = this._checkRegion([xy[0], xy[1]]),
inside = false;
if ((xy[0] === _xy[0]) && (xy[1] === _xy[1])) {
inside = true;
}
return inside;
},
/**
* @method align
* @description Modifies the Drag.actXY method from the after drag:align event. This is where the constraining happens.
*/
align: function() {
var host = this.get(HOST),
_xy = [host.actXY[0], host.actXY[1]],
r = this.getRegion(true);
if (this.get('stickX')) {
_xy[1] = (host.startXY[1] - host.deltaXY[1]);
}
if (this.get('stickY')) {
_xy[0] = (host.startXY[0] - host.deltaXY[0]);
}
if (r) {
_xy = this._checkRegion(_xy);
}
_xy = this._checkTicks(_xy, r);
host.actXY = _xy;
},
/**
* @method drag
* @description Fires after drag:drag. Handle the tickX and tickX align events.
*/
drag: function(event) {
var host = this.get(HOST),
xt = this.get('tickX'),
yt = this.get('tickY'),
_xy = [host.actXY[0], host.actXY[1]];
if ((Y.Lang.isNumber(xt) || this.get(TICK_X_ARRAY)) && (this._lastTickXFired !== _xy[0])) {
this._tickAlignX();
this._lastTickXFired = _xy[0];
}
if ((Y.Lang.isNumber(yt) || this.get(TICK_Y_ARRAY)) && (this._lastTickYFired !== _xy[1])) {
this._tickAlignY();
this._lastTickYFired = _xy[1];
}
},
/**
* @private
* @method _checkTicks
* @description This method delegates the proper helper method for tick calculations
* @param {Array} xy The XY coords for the Drag
* @param {Object} r The optional region that we are bound to.
* @return {Array} The calced XY coords
*/
_checkTicks: function(xy, r) {
var host = this.get(HOST),
lx = (host.startXY[0] - host.deltaXY[0]),
ly = (host.startXY[1] - host.deltaXY[1]),
xt = this.get('tickX'),
yt = this.get('tickY');
if (xt && !this.get(TICK_X_ARRAY)) {
xy[0] = DDM._calcTicks(xy[0], lx, xt, r[LEFT], r[RIGHT]);
}
if (yt && !this.get(TICK_Y_ARRAY)) {
xy[1] = DDM._calcTicks(xy[1], ly, yt, r[TOP], r[BOTTOM]);
}
if (this.get(TICK_X_ARRAY)) {
xy[0] = DDM._calcTickArray(xy[0], this.get(TICK_X_ARRAY), r[LEFT], r[RIGHT]);
}
if (this.get(TICK_Y_ARRAY)) {
xy[1] = DDM._calcTickArray(xy[1], this.get(TICK_Y_ARRAY), r[TOP], r[BOTTOM]);
}
return xy;
},
/**
* @private
* @method _tickAlignX
* @description Fires when the actXY[0] reach a new value respecting the tickX gap.
*/
_tickAlignX: function() {
this.fire(EV_TICK_ALIGN_X);
},
/**
* @private
* @method _tickAlignY
* @description Fires when the actXY[1] reach a new value respecting the tickY gap.
*/
_tickAlignY: function() {
this.fire(EV_TICK_ALIGN_Y);
}
};
Y.namespace('Plugin');
Y.extend(C, Y.Base, proto);
Y.Plugin.DDConstrained = C;
Y.mix(DDM, {
/**
* @for DDM
* @namespace DD
* @private
* @method _calcTicks
* @description Helper method to calculate the tick offsets for a given position
* @param {Number} pos The current X or Y position
* @param {Number} start The start X or Y position
* @param {Number} tick The X or Y tick increment
* @param {Number} off1 The min offset that we can't pass (region)
* @param {Number} off2 The max offset that we can't pass (region)
* @return {Number} The new position based on the tick calculation
*/
_calcTicks: function(pos, start, tick, off1, off2) {
var ix = ((pos - start) / tick),
min = Math.floor(ix),
max = Math.ceil(ix);
if ((min !== 0) || (max !== 0)) {
if ((ix >= min) && (ix <= max)) {
pos = (start + (tick * min));
if (off1 && off2) {
if (pos < off1) {
pos = (start + (tick * (min + 1)));
}
if (pos > off2) {
pos = (start + (tick * (min - 1)));
}
}
}
}
return pos;
},
/**
* @for DDM
* @namespace DD
* @private
* @method _calcTickArray
* @description This method is used with the tickXArray and tickYArray config options
* @param {Number} pos The current X or Y position
* @param {Number} ticks The array containing our custom tick positions.
* @param {Number} off1 The min offset that we can't pass (region)
* @param {Number} off2 The max offset that we can't pass (region)
* @return The tick position
*/
_calcTickArray: function(pos, ticks, off1, off2) {
var i = 0, len = ticks.length, next = 0,
diff1, diff2, ret;
if (!ticks || (ticks.length === 0)) {
return pos;
} else if (ticks[0] >= pos) {
return ticks[0];
} else {
for (i = 0; i < len; i++) {
next = (i + 1);
if (ticks[next] && ticks[next] >= pos) {
diff1 = pos - ticks[i];
diff2 = ticks[next] - pos;
ret = (diff2 > diff1) ? ticks[i] : ticks[next];
if (off1 && off2) {
if (ret > off2) {
if (ticks[i]) {
ret = ticks[i];
} else {
ret = ticks[len - 1];
}
}
}
return ret;
}
}
return ticks[ticks.length - 1];
}
}
});
}, '3.5.1' ,{skinnable:false, requires:['dd-drag']});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("dd-delegate",function(e){var d=function(f){d.superclass.constructor.apply(this,arguments);},c="container",b="nodes",a=e.Node.create("<div>Temp Node</div>");e.extend(d,e.Base,{_bubbleTargets:e.DD.DDM,dd:null,_shimState:null,_handles:null,_onNodeChange:function(f){this.set("dragNode",f.newVal);},_afterDragEnd:function(f){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",a);},_delMouseDown:function(h){var g=h.currentTarget,f=this.dd;if(g.test(this.get(b))&&!g.test(this.get("invalid"))){this._shimState=e.DD.DDM._noShim;e.DD.DDM._noShim=true;this.set("currentNode",g);f.set("node",g);if(f.proxy){f.set("dragNode",e.DD.DDM._proxy);}else{f.set("dragNode",g);}f._prep();f.fire("drag:mouseDown",{ev:h});}},_onMouseEnter:function(f){this._shimState=e.DD.DDM._noShim;e.DD.DDM._noShim=true;},_onMouseLeave:function(f){e.DD.DDM._noShim=this._shimState;},initializer:function(g){this._handles=[];var h=this.get("dragConfig")||{},f=this.get(c);h.node=a.cloneNode(true);h.bubbleTargets=this;if(this.get("handles")){h.handles=this.get("handles");}this.dd=new e.DD.Drag(h);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),f,this.get(b)));this._handles.push(e.on("mouseenter",e.bind(this._onMouseEnter,this),f));this._handles.push(e.on("mouseleave",e.bind(this._onMouseLeave,this),f));e.later(50,this,this.syncTargets);e.DD.DDM.regDelegate(this);},syncTargets:function(){if(!e.Plugin.Drop||this.get("destroyed")){return;}var g,f,h;if(this.get("target")){g=e.one(this.get(c)).all(this.get(b));f=this.dd.get("groups");h=this.get("dragConfig");if(h&&"groups" in h){f=h.groups;}g.each(function(j){this.createDrop(j,f);},this);}return this;},createDrop:function(h,f){var g={useShim:false,bubbleTargets:this};if(!h.drop){h.plug(e.Plugin.Drop,g);}h.drop.set("groups",f);return h;},destructor:function(){if(this.dd){this.dd.destroy();}if(e.Plugin.Drop){var f=e.one(this.get(c)).all(this.get(b));f.unplug(e.Plugin.Drop);}e.each(this._handles,function(g){g.detach();});}},{NAME:"delegate",ATTRS:{container:{value:"body"},nodes:{value:".dd-draggable"},invalid:{value:"input, select, button, a, textarea"},lastNode:{value:a},currentNode:{value:a},dragNode:{value:a},over:{value:false},target:{value:false},dragConfig:{value:null},handles:{value:null}}});e.mix(e.DD.DDM,{_delegates:[],regDelegate:function(f){this._delegates.push(f);},getDelegate:function(g){var f=null;g=e.one(g);e.each(this._delegates,function(h){if(g.test(h.get(c))){f=h;}},this);return f;}});e.namespace("DD");e.DD.Delegate=d;},"3.5.1",{skinnable:false,requires:["dd-drag","event-mouseenter","dd-drop-plugin"]});

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 one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("event-focus",function(f){var d=f.Event,c=f.Lang,a=c.isString,e=f.Array.indexOf,b=c.isFunction(f.DOM.create('<p onbeforeactivate=";"/>').onbeforeactivate);function g(i,h,k){var j="_"+i+"Notifiers";f.Event.define(i,{_attach:function(m,n,l){if(f.DOM.isWindow(m)){return d._attach([i,function(o){n.fire(o);},m]);}else{return d._attach([h,this._proxy,m,this,n,l],{capture:true});}},_proxy:function(o,s,q){var p=o.target,m=o.currentTarget,r=p.getData(j),t=f.stamp(m._node),l=(b||p!==m),n;s.currentTarget=(q)?p:m;s.container=(q)?m:null;if(!r){r={};p.setData(j,r);if(l){n=d._attach([k,this._notify,p._node]).sub;n.once=true;}}else{l=true;}if(!r[t]){r[t]=[];}r[t].push(s);if(!l){this._notify(o);}},_notify:function(w,q){var C=w.currentTarget,l=C.getData(j),x=C.ancestors(),B=C.get("ownerDocument"),s=[],m=l?f.Object.keys(l).length:0,A,r,t,n,o,y,u,v,p,z;C.clearData(j);x.push(C);if(B){x.unshift(B);}x._nodes.reverse();y=m;x.some(function(H){var G=f.stamp(H),E=l[G],F,D;if(E){m--;for(F=0,D=E.length;F<D;++F){if(E[F].handle.sub.filter){s.push(E[F]);}}}return !m;});m=y;while(m&&(A=x.shift())){n=f.stamp(A);r=l[n];if(r){for(u=0,v=r.length;u<v;++u){t=r[u];p=t.handle.sub;o=true;w.currentTarget=A;if(p.filter){o=p.filter.apply(A,[A,w].concat(p.args||[]));s.splice(e(s,t),1);}if(o){w.container=t.container;z=t.fire(w);}if(z===false||w.stopped===2){break;}}delete r[n];m--;}if(w.stopped!==2){for(u=0,v=s.length;u<v;++u){t=s[u];p=t.handle.sub;if(p.filter.apply(A,[A,w].concat(p.args||[]))){w.container=t.container;w.currentTarget=A;z=t.fire(w);}if(z===false||w.stopped===2){break;}}}if(w.stopped){break;}}},on:function(n,l,m){l.handle=this._attach(n._node,m);},detach:function(m,l){l.handle.detach();},delegate:function(o,m,n,l){if(a(l)){m.filter=function(p){return f.Selector.test(p._node,l,o===p?null:o._node);};}m.handle=this._attach(o._node,n,true);},detachDelegate:function(m,l){l.handle.detach();}},true);}if(b){g("focus","beforeactivate","focusin");g("blur","beforedeactivate","focusout");}else{g("focus","focus","focus");g("blur","blur","blur");}},"3.5.1",{requires:["event-synthetic"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("event-simulate",function(a){(function(){var k=a.Lang,j=a.Array,f=k.isFunction,d=k.isString,g=k.isBoolean,o=k.isObject,n=k.isNumber,m=a.config.doc,p={click:1,dblclick:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,mousemove:1,contextmenu:1},l={keydown:1,keyup:1,keypress:1},c={blur:1,change:1,focus:1,resize:1,scroll:1,select:1},e={scroll:1,resize:1,reset:1,submit:1,change:1,select:1,error:1,abort:1};a.mix(e,p);a.mix(e,l);function i(v,z,u,s,B,r,q,A,x,D,C){if(!v){a.error("simulateKeyEvent(): Invalid target.");}if(d(z)){z=z.toLowerCase();switch(z){case"textevent":z="keypress";break;case"keyup":case"keydown":case"keypress":break;default:a.error("simulateKeyEvent(): Event type '"+z+"' not supported.");}}else{a.error("simulateKeyEvent(): Event type must be a string.");}if(!g(u)){u=true;}if(!g(s)){s=true;}if(!o(B)){B=a.config.win;}if(!g(r)){r=false;}if(!g(q)){q=false;}if(!g(A)){A=false;}if(!g(x)){x=false;}if(!n(D)){D=0;}if(!n(C)){C=0;}var y=null;if(f(m.createEvent)){try{y=m.createEvent("KeyEvents");y.initKeyEvent(z,u,s,B,r,q,A,x,D,C);}catch(w){try{y=m.createEvent("Events");}catch(t){y=m.createEvent("UIEvents");}finally{y.initEvent(z,u,s);y.view=B;y.altKey=q;y.ctrlKey=r;y.shiftKey=A;y.metaKey=x;y.keyCode=D;y.charCode=C;}}v.dispatchEvent(y);}else{if(o(m.createEventObject)){y=m.createEventObject();y.bubbles=u;y.cancelable=s;y.view=B;y.ctrlKey=r;y.altKey=q;y.shiftKey=A;y.metaKey=x;y.keyCode=(C>0)?C:D;v.fireEvent("on"+z,y);}else{a.error("simulateKeyEvent(): No event simulation framework present.");}}}function b(A,F,x,u,G,z,w,v,t,r,s,q,E,C,y,B){if(!A){a.error("simulateMouseEvent(): Invalid target.");}if(d(F)){F=F.toLowerCase();if(!p[F]){a.error("simulateMouseEvent(): Event type '"+F+"' not supported.");}}else{a.error("simulateMouseEvent(): Event type must be a string.");}if(!g(x)){x=true;}if(!g(u)){u=(F!="mousemove");}if(!o(G)){G=a.config.win;}if(!n(z)){z=1;}if(!n(w)){w=0;}if(!n(v)){v=0;}if(!n(t)){t=0;}if(!n(r)){r=0;}if(!g(s)){s=false;}if(!g(q)){q=false;}if(!g(E)){E=false;}if(!g(C)){C=false;}if(!n(y)){y=0;}B=B||null;var D=null;if(f(m.createEvent)){D=m.createEvent("MouseEvents");if(D.initMouseEvent){D.initMouseEvent(F,x,u,G,z,w,v,t,r,s,q,E,C,y,B);}else{D=m.createEvent("UIEvents");D.initEvent(F,x,u);D.view=G;D.detail=z;D.screenX=w;D.screenY=v;D.clientX=t;D.clientY=r;D.ctrlKey=s;D.altKey=q;D.metaKey=C;D.shiftKey=E;D.button=y;D.relatedTarget=B;}if(B&&!D.relatedTarget){if(F=="mouseout"){D.toElement=B;}else{if(F=="mouseover"){D.fromElement=B;}}}A.dispatchEvent(D);}else{if(o(m.createEventObject)){D=m.createEventObject();D.bubbles=x;D.cancelable=u;D.view=G;D.detail=z;D.screenX=w;D.screenY=v;D.clientX=t;D.clientY=r;D.ctrlKey=s;D.altKey=q;D.metaKey=C;D.shiftKey=E;switch(y){case 0:D.button=1;break;case 1:D.button=4;break;case 2:break;default:D.button=0;}D.relatedTarget=B;A.fireEvent("on"+F,D);}else{a.error("simulateMouseEvent(): No event simulation framework present.");}}}function h(w,v,s,r,q,u){if(!w){a.error("simulateUIEvent(): Invalid target.");}if(d(v)){v=v.toLowerCase();if(!c[v]){a.error("simulateUIEvent(): Event type '"+v+"' not supported.");}}else{a.error("simulateUIEvent(): Event type must be a string.");}var t=null;if(!g(s)){s=(v in e);}if(!g(r)){r=(v=="submit");}if(!o(q)){q=a.config.win;}if(!n(u)){u=1;}if(f(m.createEvent)){t=m.createEvent("UIEvents");t.initUIEvent(v,s,r,q,u);w.dispatchEvent(t);}else{if(o(m.createEventObject)){t=m.createEventObject();t.bubbles=s;t.cancelable=r;t.view=q;t.detail=u;w.fireEvent("on"+v,t);}else{a.error("simulateUIEvent(): No event simulation framework present.");}}}a.Event.simulate=function(s,r,q){q=q||{};if(p[r]){b(s,r,q.bubbles,q.cancelable,q.view,q.detail,q.screenX,q.screenY,q.clientX,q.clientY,q.ctrlKey,q.altKey,q.shiftKey,q.metaKey,q.button,q.relatedTarget);}else{if(l[r]){i(s,r,q.bubbles,q.cancelable,q.view,q.ctrlKey,q.altKey,q.shiftKey,q.metaKey,q.keyCode,q.charCode);}else{if(c[r]){h(s,r,q.bubbles,q.cancelable,q.view,q.detail);}else{a.error("simulate(): Event '"+r+"' can't be simulated.");}}}};})();},"3.5.1",{requires:["event-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("features",function(b){var c={};b.mix(b.namespace("Features"),{tests:c,add:function(d,e,f){c[d]=c[d]||{};c[d][e]=f;},all:function(e,f){var g=c[e],d=[];if(g){b.Object.each(g,function(i,h){d.push(h+":"+(b.Features.test(e,h,f)?1:0));});}return(d.length)?d.join(";"):"";},test:function(e,g,f){f=f||[];var d,i,k,j=c[e],h=j&&j[g];if(!h){}else{d=h.result;if(b.Lang.isUndefined(d)){i=h.ua;if(i){d=(b.UA[i]);}k=h.test;if(k&&((!i)||d)){d=k.apply(b,f);}h.result=d;}}return d;}});var a=b.Features.add;a("load","0",{"name":"io-nodejs","trigger":"io-base","ua":"nodejs"});a("load","1",{"name":"graphics-canvas-default","test":function(h){var f=h.config.doc,g=h.config.defaultGraphicEngine&&h.config.defaultGraphicEngine=="canvas",e=f&&f.createElement("canvas"),d=(f&&f.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return(!d||g)&&(e&&e.getContext&&e.getContext("2d"));},"trigger":"graphics"});a("load","2",{"name":"autocomplete-list-keys","test":function(d){return !(d.UA.ios||d.UA.android);},"trigger":"autocomplete-list"});a("load","3",{"name":"graphics-svg","test":function(h){var g=h.config.doc,f=!h.config.defaultGraphicEngine||h.config.defaultGraphicEngine!="canvas",e=g&&g.createElement("canvas"),d=(g&&g.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return d&&(f||!e);},"trigger":"graphics"});a("load","4",{"name":"editor-para-ie","trigger":"editor-para","ua":"ie","when":"instead"});a("load","5",{"name":"graphics-vml-default","test":function(f){var e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!d||!d.getContext||!d.getContext("2d")));},"trigger":"graphics"});a("load","6",{"name":"graphics-svg-default","test":function(h){var g=h.config.doc,f=!h.config.defaultGraphicEngine||h.config.defaultGraphicEngine!="canvas",e=g&&g.createElement("canvas"),d=(g&&g.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return d&&(f||!e);},"trigger":"graphics"});a("load","7",{"name":"history-hash-ie","test":function(e){var d=e.config.doc&&e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange" in e.config.win)||!d||d<8);},"trigger":"history-hash"});a("load","8",{"name":"transition-timer","test":function(g){var f=g.config.doc,e=(f)?f.documentElement:null,d=true;if(e&&e.style){d=!("MozTransition" in e.style||"WebkitTransition" in e.style);}return d;},"trigger":"transition"});a("load","9",{"name":"dom-style-ie","test":function(j){var h=j.Features.test,i=j.Features.add,f=j.config.win,g=j.config.doc,d="documentElement",e=false;i("style","computedStyle",{test:function(){return f&&"getComputedStyle" in f;}});i("style","opacity",{test:function(){return g&&"opacity" in g[d].style;}});e=(!h("style","opacity")&&!h("style","computedStyle"));return e;},"trigger":"dom-style"});a("load","10",{"name":"selector-css2","test":function(f){var e=f.config.doc,d=e&&!("querySelectorAll" in e);return d;},"trigger":"selector"});a("load","11",{"name":"widget-base-ie","trigger":"widget-base","ua":"ie"});a("load","12",{"name":"event-base-ie","test":function(e){var d=e.config.doc&&e.config.doc.implementation;return(d&&(!d.hasFeature("Events","2.0")));},"trigger":"node-base"});a("load","13",{"name":"dd-gestures","test":function(d){return((d.config.win&&("ontouchstart" in d.config.win))&&!(d.UA.chrome&&d.UA.chrome<6));},"trigger":"dd-drag"});a("load","14",{"name":"scrollview-base-ie","trigger":"scrollview-base","ua":"ie"});a("load","15",{"name":"app-transitions-native","test":function(f){var e=f.config.doc,d=e?e.documentElement:null;if(d&&d.style){return("MozTransition" in d.style||"WebkitTransition" in d.style);}return false;},"trigger":"app-transitions"});a("load","16",{"name":"graphics-canvas","test":function(h){var f=h.config.doc,g=h.config.defaultGraphicEngine&&h.config.defaultGraphicEngine=="canvas",e=f&&f.createElement("canvas"),d=(f&&f.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return(!d||g)&&(e&&e.getContext&&e.getContext("2d"));},"trigger":"graphics"});a("load","17",{"name":"graphics-vml","test":function(f){var e=f.config.doc,d=e&&e.createElement("canvas");return(e&&!e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!d||!d.getContext||!d.getContext("2d")));},"trigger":"graphics"});},"3.5.1",{requires:["yui-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("file-flash",function(b){var a=function(c){a.superclass.constructor.apply(this,arguments);};b.extend(a,b.Base,{initializer:function(c){if(!this.get("id")){this._set("id",b.guid("file"));}},_swfEventHandler:function(c){if(c.id===this.get("id")){switch(c.type){case"uploadstart":this.fire("uploadstart",{uploader:this.get("uploader")});break;case"uploadprogress":this.fire("uploadprogress",{originEvent:c,bytesLoaded:c.bytesLoaded,bytesTotal:c.bytesTotal,percentLoaded:Math.min(100,Math.round(10000*c.bytesLoaded/c.bytesTotal)/100)});this._set("bytesUploaded",c.bytesLoaded);break;case"uploadcomplete":this.fire("uploadfinished",{originEvent:c});break;case"uploadcompletedata":this.fire("uploadcomplete",{originEvent:c,data:c.data});break;case"uploadcancel":this.fire("uploadcancel",{originEvent:c});break;case"uploaderror":this.fire("uploaderror",{originEvent:c,statusText:c.text,status:c.status});}}},startUpload:function(d,f,h){if(this.get("uploader")){var e=this.get("uploader"),c=h||"Filedata",i=this.get("id"),g=f||null;this._set("bytesUploaded",0);e.on("uploadstart",this._swfEventHandler,this);e.on("uploadprogress",this._swfEventHandler,this);e.on("uploadcomplete",this._swfEventHandler,this);e.on("uploadcompletedata",this._swfEventHandler,this);e.on("uploaderror",this._swfEventHandler,this);e.callSWF("upload",[i,d,g,c]);}},cancelUpload:function(){if(this.get("uploader")){this.get("uploader").callSWF("cancel",[this.get("id")]);}}},{NAME:"file",TYPE:"flash",ATTRS:{id:{writeOnce:"initOnly",value:null},size:{writeOnce:"initOnly",value:0},name:{writeOnce:"initOnly",value:null},dateCreated:{writeOnce:"initOnly",value:null},dateModified:{writeOnce:"initOnly",value:null},bytesUploaded:{readOnly:true,value:0},type:{writeOnce:"initOnly",value:null},uploader:{writeOnce:"initOnly",value:null}}});b.FileFlash=a;},"3.5.1",{requires:["base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("file-html5",function(e){var c=e.Lang,d=e.bind,b=e.config.win;var a=function(g){var f=null;if(a.isValidFile(g)){f=g;}else{if(a.isValidFile(g.file)){f=g.file;}else{f=false;}}a.superclass.constructor.apply(this,arguments);if(f&&a.canUpload()){if(!this.get("file")){this._set("file",f);}if(!this.get("name")){this._set("name",f.name||f.fileName);}if(this.get("size")!=(f.size||f.fileSize)){this._set("size",f.size||f.fileSize);}if(!this.get("type")){this._set("type",f.type);}if(f.hasOwnProperty("lastModifiedDate")&&!this.get("dateModified")){this._set("dateModified",f.lastModifiedDate);}}};e.extend(a,e.Base,{initializer:function(f){if(!this.get("id")){this._set("id",e.guid("file"));}},_uploadEventHandler:function(g){switch(g.type){case"progress":this.fire("uploadprogress",{originEvent:g,bytesLoaded:g.loaded,bytesTotal:this.get("size"),percentLoaded:Math.min(100,Math.round(10000*g.loaded/this.get("size"))/100)});this._set("bytesUploaded",g.loaded);break;case"load":this.fire("uploadcomplete",{originEvent:g,data:g.target.responseText});var h=this.get("xhr").upload,i=this.get("xhr"),f=this.get("boundEventHandler");h.removeEventListener("progress",f);h.removeEventListener("error",f);h.removeEventListener("abort",f);i.removeEventListener("load",f);i.removeEventListener("readystatechange",f);this._set("xhr",null);break;case"error":var i=this.get("xhr");this.fire("uploaderror",{originEvent:g,status:i.status,statusText:i.statusText});break;case"abort":this.fire("uploadcancel",{originEvent:g});break;case"readystatechange":this.fire("readystatechange",{readyState:g.target.readyState,originEvent:g});break;}},startUpload:function(h,i,m){this._set("bytesUploaded",0);this._set("xhr",new XMLHttpRequest());this._set("boundEventHandler",d(this._uploadEventHandler,this));var k=new FormData(),f=m||"Filedata",l=this.get("xhr"),j=this.get("xhr").upload,g=this.get("boundEventHandler");e.each(i,function(o,n){k.append(n,o);});k.append(f,this.get("file"));j.addEventListener("progress",g,false);j.addEventListener("error",g,false);j.addEventListener("abort",g,false);l.addEventListener("load",g,false);l.addEventListener("readystatechange",g,false);l.open("POST",h,true);l.send(k);this.fire("uploadstart",{xhr:l});},cancelUpload:function(){this.get("xhr").abort();}},{NAME:"file",TYPE:"html5",ATTRS:{id:{writeOnce:"initOnly",value:null},size:{writeOnce:"initOnly",value:0},name:{writeOnce:"initOnly",value:null},dateCreated:{writeOnce:"initOnly",value:null},dateModified:{writeOnce:"initOnly",value:null},bytesUploaded:{readOnly:true,value:0},type:{writeOnce:"initOnly",value:null},file:{writeOnce:"initOnly",value:null},xhr:{readOnly:true,value:null},boundEventHandler:{readOnly:true,value:null}},isValidFile:function(f){return(b&&b.File&&f instanceof File);},canUpload:function(){return(b&&b.FormData&&b.XMLHttpRequest);}});e.FileHTML5=a;},"3.5.1",{requires:["base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("get",function(a){var i=require("path"),b=require("vm"),f=require("fs"),e=require("request");a.Get=function(){};a.config.base=i.join(__dirname,"../");YUI.require=require;YUI.process=process;var h=function(j){return j.replace(/\\/g,"\\\\");};a.Get._exec=function(p,l,j){var o=h(i.dirname(l));var q=h(l);if(o.match(/^https?:\/\//)){o=".";q="remoteResource";}var m="(function(YUI) { var __dirname = '"+o+"'; "+"var __filename = '"+q+"'; "+"var process = YUI.process;"+"var require = function(file) {"+" if (file.indexOf('./') === 0) {"+" file = __dirname + file.replace('./', '/'); }"+" return YUI.require(file); }; "+p+" ;return YUI; })";var k=b.createScript(m,l);var n=k.runInThisContext(m);YUI=n(YUI);j(null,l);};a.Get._include=function(m,j){var l=this;if(m.match(/^https?:\/\//)){var k={url:m,timeout:l.timeout};e(k,function(q,p,o){if(q){j(q,m);}else{a.Get._exec(o,m,j);}});}else{if(a.config.useSync){if(i.existsSync(m)){var n=f.readFileSync(m,"utf8");a.Get._exec(n,m,j);}else{j("Path does not exist: "+m,m);}}else{f.readFile(m,"utf8",function(p,o){if(p){j(p,m);}else{a.Get._exec(o,m,j);}});}}};var d=function(k,l,j){if(a.Lang.isFunction(k.onEnd)){k.onEnd.call(a,l,j);}},g=function(j){if(a.Lang.isFunction(j.onSuccess)){j.onSuccess.call(a,j);}d(j,"success","success");},c=function(j,k){if(a.Lang.isFunction(j.onFailure)){j.onFailure.call(a,k,j);}d(j,k,"fail");};a.Get.js=function(t,u){var m=a.Array,r=this,q=m(t),j,o,n=q.length,p=0,k=function(){if(p===n){g(u);}};for(o=0;o<n;o++){j=q[o];if(a.Lang.isObject(j)){j=j.url;}j=j.replace(/'/g,"%27");a.Get._include(j,function(s,l){if(!a.config){a.config={debug:true};}if(u.onProgress){u.onProgress.call(u.context||a,l);}if(s){c(u,s);}else{p++;k();}});}};a.Get.script=a.Get.js;a.Get.css=function(k,j){g(j);};},"3.5.1",{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

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("history-html5",function(g){var b=g.HistoryBase,c=g.Lang,f=g.config.win,d=g.config.useHistoryHTML5,h="popstate",e=b.SRC_REPLACE;function a(){a.superclass.constructor.apply(this,arguments);}g.extend(a,b,{_init:function(i){var j=f.history.state;i||(i={});if(i.initialState&&c.type(i.initialState)==="object"&&c.type(j)==="object"){this._initialState=g.merge(i.initialState,j);}else{this._initialState=j;}g.on("popstate",this._onPopState,f,this);a.superclass._init.apply(this,arguments);},_storeState:function(k,j,i){if(k!==h){f.history[k===e?"replaceState":"pushState"](j,i.title||g.config.doc.title||"",i.url||null);}a.superclass._storeState.apply(this,arguments);},_onPopState:function(i){this._resolveChanges(h,i._event.state||null);}},{NAME:"historyhtml5",SRC_POPSTATE:h});if(!g.Node.DOM_EVENTS.popstate){g.Node.DOM_EVENTS.popstate=1;}g.HistoryHTML5=a;if(d===true||(d!==false&&b.html5)){g.History=a;}},"3.5.1",{optional:["json"],requires:["event-base","history-base","node-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("io-nodejs",function(a){if(!a.IO.request){a.IO.request=require("request");}var b=function(d){var c=[];Object.keys(d).forEach(function(e){c.push(e+": "+d[e]);});return c.join("\n");};a.IO.transports.nodejs=function(){return{send:function(g,f,d){d.notify("start",g,d);d.method=d.method||"GET";var e={method:d.method,uri:f};if(d.data){e.body=d.data;}if(d.headers){e.headers=d.headers;}if(d.timeout){e.timeout=d.timeout;}if(d.request){a.mix(e,d.request);}a.IO.request(e,function(h,i){if(h){g.c=h;d.notify(((h.code==="ETIMEDOUT")?"timeout":"failure"),g,d);return;}if(i){g.c={status:i.statusCode,statusCode:i.statusCode,headers:i.headers,responseText:i.body,responseXML:null,getResponseHeader:function(j){return this.headers[j];},getAllResponseHeaders:function(){return b(this.headers);}};}d.notify("complete",g,d);d.notify(((i&&(i.statusCode>=200&&i.statusCode<=299))?"success":"failure"),g,d);});var c={io:g};return c;}};};a.IO.defaultTransport("nodejs");},"3.5.1",{requires:["io-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

File diff suppressed because one or more lines are too long

View File

@ -1,29 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('node-event-simulate', function(Y) {
/**
* Adds functionality to simulate events.
* @module node
* @submodule node-event-simulate
*/
/**
* Simulates an event on the node.
* @param {String} type The type of event to simulate (i.e., "click").
* @param {Object} options (Optional) Extra options to copy onto the event object.
* @return {void}
* @for Node
* @method simulate
*/
Y.Node.prototype.simulate = function(type, options) {
Y.Event.simulate(Y.Node.getDOMNode(this), type, options);
};
}, '3.5.1' ,{requires:['node-base', 'event-simulate']});

View File

@ -1,29 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('node-event-simulate', function(Y) {
/**
* Adds functionality to simulate events.
* @module node
* @submodule node-event-simulate
*/
/**
* Simulates an event on the node.
* @param {String} type The type of event to simulate (i.e., "click").
* @param {Object} options (Optional) Extra options to copy onto the event object.
* @return {void}
* @for Node
* @method simulate
*/
Y.Node.prototype.simulate = function(type, options) {
Y.Event.simulate(Y.Node.getDOMNode(this), type, options);
};
}, '3.5.1' ,{requires:['node-base', 'event-simulate']});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("parallel",function(a){a.Parallel=function(b){this.config=b||{};this.results=[];this.context=this.config.context||a;this.total=0;this.finished=0;};a.Parallel.prototype={results:null,total:null,finished:null,add:function(c){var b=this;b.total+=1;return function(){b.finished++;b.results.push(c&&c.apply(b.context,arguments));b.test();};},test:function(){var b=this;if(b.finished>=b.total&&b.callback){b.callback.call(b.context,b.results,b.data);}},done:function(c,b){this.callback=c;this.data=b;this.test();}};},"3.5.1",{requires:["yui-base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("pjax-base",function(f){var d=f.config.win,b=f.Lang,e=f.ClassNameManager.getClassName("pjax"),a="navigate";function c(){}c.prototype={_regexURL:/^((?:[^\/#?:]+:\/\/|\/\/)[^\/]*)?([^?#]*)(\?[^#]*)?(#.*)?$/,initializer:function(){this.publish(a,{defaultFn:this._defNavigateFn});if(this.get("html5")){this._pjaxBindUI();}},destructor:function(){this._pjaxEvents&&this._pjaxEvents.detach();},navigate:function(h,g){h=this._resolveURL(h);if(this._navigate(h,g)){return true;}if(!this._hasSameOrigin(h)){f.error("Security error: The new URL must be of the same origin as the current URL.");}return false;},_getRoot:function(){var h="/",i=f.getLocation().pathname,g;if(i.charAt(i.length-1)===h){return i;}g=i.split(h);g.pop();return g.join(h)+h;},_navigate:function(i,h){if(!this.hasRoute(i)){return false;}h||(h={});h.url=i;var k=this._getURL(),j,g;g=i.replace(/(#.*)$/,function(l,n,m){j=n;return l.substring(m);});if(j&&g===k.replace(/#.*$/,"")){if(!this.get("navigateOnHash")){return false;}h.hash=j;}"replace" in h||(h.replace=i===k);if(this.get("html5")||h.force){this.fire(a,h);}else{if(h.replace){d&&d.location.replace(i);}else{d&&(d.location=i);}}return true;},_normalizePath:function(p){var m="..",g="/",h,l,o,j,k,n;if(!p||p===g){return g;}j=p.split(g);n=[];for(h=0,l=j.length;h<l;++h){k=j[h];if(k===m){n.pop();}else{if(k){n.push(k);}}}o=g+n.join(g);if(o!==g&&p.charAt(p.length-1)===g){o+=g;}return o;},_pjaxBindUI:function(){if(!this._pjaxEvents){this._pjaxEvents=f.one("body").delegate("click",this._onLinkClick,this.get("linkSelector"),this);}},_resolvePath:function(g){if(!g){return this._getPath();}if(g.charAt(0)==="/"){return this._normalizePath(g);}return this._normalizePath(this._getRoot()+g);},_resolveURL:function(i){var m=i&&i.match(this._regexURL),h,l,j,k,g;if(!m){return this._getURL();}h=m[1];l=m[2];j=m[3];k=m[4];if(h){if(h.indexOf("//")===0){h=f.getLocation().protocol+h;}return h+(l||"/")+(j||"")+(k||"");}g=this._getOrigin()+this._resolvePath(l);if(l||j){return g+(j||"")+(k||"");}j=this._getQuery();return g+(j?("?"+j):"")+(k||"");},_defNavigateFn:function(g){this[g.replace?"replace":"save"](g.url);if(d&&this.get("scrollToTop")){setTimeout(function(){d.scroll(0,0);},1);}},_onLinkClick:function(h){var g;if(h.button!==1||h.ctrlKey||h.metaKey){return;}g=h.currentTarget.get("href");g&&this._navigate(g,{originEvent:h})&&h.preventDefault();}};c.ATTRS={linkSelector:{value:"a."+e,writeOnce:"initOnly"},navigateOnHash:{value:false},scrollToTop:{value:true}};f.PjaxBase=c;},"3.5.1",{requires:["classnamemanager","node-event-delegate","router"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("pluginhost-base",function(c){var a=c.Lang;function b(){this._plugins={};}b.prototype={plug:function(g,d){var e,h,f;if(a.isArray(g)){for(e=0,h=g.length;e<h;e++){this.plug(g[e]);}}else{if(g&&!a.isFunction(g)){d=g.cfg;g=g.fn;}if(g&&g.NS){f=g.NS;d=d||{};d.host=this;if(this.hasPlugin(f)){this[f].setAttrs(d);}else{this[f]=new g(d);this._plugins[f]=g;}}}return this;},unplug:function(f){var e=f,d=this._plugins;if(f){if(a.isFunction(f)){e=f.NS;if(e&&(!d[e]||d[e]!==f)){e=null;}}if(e){if(this[e]){this[e].destroy();delete this[e];}if(d[e]){delete d[e];}}}else{for(e in this._plugins){if(this._plugins.hasOwnProperty(e)){this.unplug(e);}}}return this;},hasPlugin:function(d){return(this._plugins[d]&&this[d]);},_initPlugins:function(d){this._plugins=this._plugins||{};if(this._initConfigPlugins){this._initConfigPlugins(d);}},_destroyPlugins:function(){this.unplug();}};c.namespace("Plugin").Host=b;},"3.5.1",{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

View File

@ -1,454 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('scrollview-paginator', function(Y) {
/**
* Provides a plugin, which adds pagination support to ScrollView instances
*
* @module scrollview-paginator
*/
var UI = (Y.ScrollView) ? Y.ScrollView.UI_SRC : "ui",
INDEX = "index",
PREVINDEX = "prevIndex",
SCROLL_X = "scrollX",
SCROLL_Y = "scrollY",
TOTAL = "total",
BOUNDING_BOX = "boundingBox",
CONTENT_BOX = "contentBox",
MAX_PAGE_COUNT = 3; // @TODO: Make configurable?
/**
* Scrollview plugin that adds support for paging
*
* @class ScrollViewPaginator
* @namespace Plugin
* @extends Plugin.Base
* @constructor
*/
function PaginatorPlugin() {
PaginatorPlugin.superclass.constructor.apply(this, arguments);
}
/**
* The identity of the plugin
*
* @property NAME
* @type String
* @default 'paginatorPlugin'
* @static
*/
PaginatorPlugin.NAME = 'pluginScrollViewPaginator';
/**
* The namespace on which the plugin will reside
*
* @property NS
* @type String
* @default 'pages'
* @static
*/
PaginatorPlugin.NS = 'pages';
/**
* The default attribute configuration for the plugin
*
* @property ATTRS
* @type Object
* @static
*/
PaginatorPlugin.ATTRS = {
/**
* CSS selector for a page inside the scrollview. The scrollview
* will snap to the closest page.
*
* @attribute selector
* @type {String}
*/
selector: {
value: null
},
/**
* The active page number for a paged scrollview
*
* @attribute index
* @type {Number}
* @default 0
*/
index: {
value: 0
},
/**
* The active page number for a paged scrollview
*
* @attribute index
* @type {Number}
* @default 0
*/
prevIndex: {
value: 0
},
/**
* The total number of pages
*
* @attribute total
* @type {Number}
* @default 0
*/
total: {
value: 0
}
};
Y.extend(PaginatorPlugin, Y.Plugin.Base, {
optimizeMemory: false,
_pageOffsets: null,
_pageNodes: null,
/**
* Designated initializer
*
* @method initializer
*/
initializer: function(config) {
var paginator = this,
optimizeMemory = config.optimizeMemory || optimizeMemory;
paginator._host = paginator.get('host');
paginator.beforeHostMethod('_flickFrame', paginator._flickFrame);
paginator.afterHostMethod('_uiDimensionsChange', paginator._calcOffsets);
paginator.afterHostEvent('scrollEnd', paginator._scrollEnded);
paginator.afterHostEvent('render', paginator._afterRender);
paginator.after('indexChange', paginator._afterIndexChange);
paginator.optimizeMemory = optimizeMemory;
paginator._pageNodes = new Y.NodeList();
},
/**
* Calculate the page boundary offsets
*
* @method _calcOffsets
* @protected
*/
_calcOffsets : function() {
var host = this._host,
cb = host.get(CONTENT_BOX),
bb = host.get(BOUNDING_BOX),
vert = host._scrollsVertical,
size = (vert) ? host._scrollHeight : host._scrollWidth,
pageSelector = this.get("selector"),
optimizeMemory = this.optimizeMemory,
currentIndex = this.get(INDEX),
pages,
offsets,
node;
pages = pageSelector ? cb.all(pageSelector) : cb.get("children");
this._pageNodes = pages;
//Set the total # of pages
this.set(TOTAL, pages.size());
// Determine the offsets
this._pageOffsets = pages.get((vert) ? "offsetTop" : "offsetLeft");
if (optimizeMemory) {
this.set(PREVINDEX, currentIndex);
// Reduce the scroll width to the size of (3) pages (or whatever MAX_PAGE_COUNT is)
host._maxScrollX = this._pageOffsets[MAX_PAGE_COUNT-1];
// Empty the content-box. @TODO: leave {MAX_PAGE_COUNT} items in?
cb.empty(true);
// Now, fill it with the first set of items
for (var i=0; i < MAX_PAGE_COUNT; i++) {
node = pages.item(currentIndex + i);
cb.append(node);
}
}
},
/**
* Return the offset value where scrollview should scroll to.
* Neccesary because index # doesn't nessecarily map up to location in the DOM because of this._manageDOM()
*
* @method _getTargetOffset
* @param index {Number}
* @returns {Number}
* @protected
*/
_getTargetOffset: function(index) {
var previous = this.get(PREVINDEX),
current = this.get(INDEX),
total = this.get(TOTAL),
forward = (previous < current) ? true : false,
pageOffsets = this._pageOffsets,
optimizeMemory = this.optimizeMemory,
offset, currentPageLocation;
// @todo: Clean this up. Probably do current (currentOffset - previousoffset) instead of assuming they're all the same width
if (optimizeMemory) {
if (forward) {
if (index > 1) {
currentPageLocation = 2;
}
else {
currentPageLocation = 1;
}
}
else {
if (current == (total-2)) {
currentPageLocation = 1;
}
else {
currentPageLocation = 0;
}
}
}
else {
currentPageLocation = index;
}
offset = pageOffsets[currentPageLocation]
return offset;
},
/**
* Executed to respond to the flick event, by over-riding the default flickFrame animation.
* This is needed to determine if the next or prev page should be activated.
*
* @method _flickFrame
* @protected
*/
_flickFrame: function() {
var host = this._host,
velocity = host._currentVelocity,
inc = velocity < 0,
pageIndex = this.get(INDEX),
pageCount = this.get(TOTAL);
if (velocity) {
if (inc && pageIndex < pageCount-1) {
this.next();
} else if (!inc && pageIndex > 0) {
this.prev();
}
}
return this._prevent;
},
/**
* After host render handler
*
* @method _afterRender
* @param {Event.Facade}
* @protected
*/
_afterRender: function(e) {
var host = this._host;
host.get("boundingBox").addClass(host.getClassName("paged"));
},
/**
* scrollEnd handler detects if a page needs to change
*
* @method _scrollEnded
* @param {Event.Facade}
* @protected
*/
_scrollEnded: function(e) {
var host = this._host,
pageIndex = this.get(INDEX),
pageCount = this.get(TOTAL),
trans = PaginatorPlugin.SNAP_TO_CURRENT,
optimizeMemory = this.optimizeMemory;
if(e.onGestureMoveEnd && !host._flicking) {
if(host._scrolledHalfway) {
if(host._scrolledForward && pageIndex < pageCount-1) {
this.next();
} else if (pageIndex > 0) {
this.prev();
} else {
this.snapToCurrent(trans.duration, trans.easing);
}
} else {
this.snapToCurrent(trans.duration, trans.easing);
}
}
if (!e.onGestureMoveEnd){
if (optimizeMemory) {
this._manageDOM();
}
this.set(PREVINDEX, pageIndex);
}
},
/**
* Manages adding & removing slides from the DOM, to improve performance & memory usage
*
* @since 3.5.0
* @method _manageDOM
* @protected
*/
_manageDOM: function(){
var newSlide, addSlideMethod, nodeToRemove,
host = this._host,
cb = host.get(CONTENT_BOX),
currentIndex = this.get(INDEX),
previousIndex = this.get(PREVINDEX),
total = this.get(TOTAL),
isForward = (previousIndex < currentIndex) ? true : false,
cbChildren = cb.get('children'),
pageNodes = this._pageNodes,
targetOffset;
if (pageNodes && pageNodes.size() > 0) {
if (isForward) {
newSlide = pageNodes.item(currentIndex+1);
addSlideMethod = cb.append;
}
else {
newSlide = pageNodes.item(currentIndex-1);
addSlideMethod = cb.prepend;
}
// Append/Prepend the new item to the DOM
if (cbChildren.indexOf(newSlide) === -1) {
addSlideMethod.call(cb, newSlide);
}
// Since we modified the DOM, get an updated reference
cbChildren = cb.get('children');
}
// Are we over the max number of items allowed?
if (cbChildren.size() > MAX_PAGE_COUNT) {
nodeToRemove = (isForward) ? cb.one('li:first-of-type') : cb.one('li:last-of-type');
nodeToRemove.remove();
targetOffset = (currentIndex == total ? 2 : 1);
host.set('scrollX', this._pageOffsets[targetOffset]); // Center
}
},
/**
* index attr change handler
*
* @method _afterIndexChange
* @param {Event.Facade}
* @protected
*/
_afterIndexChange: function(e) {
if(e.src !== UI) {
this._uiIndex(e.newVal);
}
},
/**
* Update the UI based on the current page index
*
* @method _uiIndex
* @param index {Number}
* @protected
*/
_uiIndex: function(index) {
this.scrollTo(index, 350, 'ease-out');
},
/**
* Scroll to the next page in the scrollview, with animation
*
* @method next
*/
next: function() {
var index = this.get(INDEX);
if(index < this.get(TOTAL)-1) {
this.set(INDEX, index+1);
}
},
/**
* Scroll to the previous page in the scrollview, with animation
*
* @method prev
*/
prev: function() {
var index = this.get(INDEX);
if(index > 0) {
this.set(INDEX, index-1);
}
},
/**
* Scroll to a given page in the scrollview, with animation.
*
* @method scrollTo
* @param index {Number} The index of the page to scroll to
* @param duration {Number} The number of ms the animation should last
* @param easing {String} The timing function to use in the animation
*/
scrollTo: function(index, duration, easing) {
var host = this._host,
vert = host._scrollsVertical,
scrollAxis = (vert) ? SCROLL_Y : SCROLL_X,
scrollVal = this._getTargetOffset(index);
host.set(scrollAxis, scrollVal, {
duration: duration,
easing: easing
});
},
/**
* Snaps the scrollview to the currently selected page
*
* @method snapToCurrent
* @param duration {Number} The number of ms the animation should last
* @param easing {String} The timing function to use in the animation
*/
snapToCurrent: function(duration, easing) {
var host = this._host,
vert = host._scrollsVertical;
host._killTimer();
host.set((vert) ? SCROLL_Y : SCROLL_X, this._getTargetOffset(this.get(INDEX)), {
duration: duration,
easing: easing
});
},
_prevent: new Y.Do.Prevent()
});
/**
* The default snap to current duration and easing values used on scroll end.
*
* @property SNAP_TO_CURRENT
* @static
*/
PaginatorPlugin.SNAP_TO_CURRENT = {
duration : 300,
easing : 'ease-out'
};
Y.namespace('Plugin').ScrollViewPaginator = PaginatorPlugin;
}, '3.5.1' ,{requires:['plugin']});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("scrollview-paginator",function(a){var b=(a.ScrollView)?a.ScrollView.UI_SRC:"ui",c="index",j="prevIndex",g="scrollX",f="scrollY",d="total",h="boundingBox",i="contentBox",e=3;function k(){k.superclass.constructor.apply(this,arguments);}k.NAME="pluginScrollViewPaginator";k.NS="pages";k.ATTRS={selector:{value:null},index:{value:0},prevIndex:{value:0},total:{value:0}};a.extend(k,a.Plugin.Base,{optimizeMemory:false,_pageOffsets:null,_pageNodes:null,initializer:function(m){var n=this,l=m.optimizeMemory||l;n._host=n.get("host");n.beforeHostMethod("_flickFrame",n._flickFrame);n.afterHostMethod("_uiDimensionsChange",n._calcOffsets);n.afterHostEvent("scrollEnd",n._scrollEnded);n.afterHostEvent("render",n._afterRender);n.after("indexChange",n._afterIndexChange);n.optimizeMemory=l;n._pageNodes=new a.NodeList();},_calcOffsets:function(){var v=this._host,o=v.get(i),t=v.get(h),q=v._scrollsVertical,w=(q)?v._scrollHeight:v._scrollWidth,u=this.get("selector"),r=this.optimizeMemory,s=this.get(c),l,n,m;l=u?o.all(u):o.get("children");this._pageNodes=l;this.set(d,l.size());this._pageOffsets=l.get((q)?"offsetTop":"offsetLeft");if(r){this.set(j,s);v._maxScrollX=this._pageOffsets[e-1];o.empty(true);for(var p=0;p<e;p++){m=l.item(s+p);o.append(m);}}},_getTargetOffset:function(o){var n=this.get(j),p=this.get(c),r=this.get(d),m=(n<p)?true:false,s=this._pageOffsets,q=this.optimizeMemory,l,t;if(q){if(m){if(o>1){t=2;}else{t=1;}}else{if(p==(r-2)){t=1;}else{t=0;}}}else{t=o;}l=s[t];return l;},_flickFrame:function(){var o=this._host,n=o._currentVelocity,p=n<0,l=this.get(c),m=this.get(d);if(n){if(p&&l<m-1){this.next();}else{if(!p&&l>0){this.prev();}}}return this._prevent;},_afterRender:function(m){var l=this._host;l.get("boundingBox").addClass(l.getClassName("paged"));},_scrollEnded:function(q){var p=this._host,l=this.get(c),n=this.get(d),o=k.SNAP_TO_CURRENT,m=this.optimizeMemory;if(q.onGestureMoveEnd&&!p._flicking){if(p._scrolledHalfway){if(p._scrolledForward&&l<n-1){this.next();}else{if(l>0){this.prev();}else{this.snapToCurrent(o.duration,o.easing);}}}else{this.snapToCurrent(o.duration,o.easing);}}if(!q.onGestureMoveEnd){if(m){this._manageDOM();}this.set(j,l);}},_manageDOM:function(){var t,s,r,v=this._host,n=v.get(i),o=this.get(c),l=this.get(j),p=this.get(d),u=(l<o)?true:false,m=n.get("children"),q=this._pageNodes,w;if(q&&q.size()>0){if(u){t=q.item(o+1);s=n.append;}else{t=q.item(o-1);s=n.prepend;}if(m.indexOf(t)===-1){s.call(n,t);}m=n.get("children");}if(m.size()>e){r=(u)?n.one("li:first-of-type"):n.one("li:last-of-type");r.remove();w=(o==p?2:1);v.set("scrollX",this._pageOffsets[w]);}},_afterIndexChange:function(l){if(l.src!==b){this._uiIndex(l.newVal);}},_uiIndex:function(l){this.scrollTo(l,350,"ease-out");},next:function(){var l=this.get(c);if(l<this.get(d)-1){this.set(c,l+1);}},prev:function(){var l=this.get(c);if(l>0){this.set(c,l-1);}},scrollTo:function(m,p,r){var o=this._host,l=o._scrollsVertical,n=(l)?f:g,q=this._getTargetOffset(m);o.set(n,q,{duration:p,easing:r});},snapToCurrent:function(n,o){var m=this._host,l=m._scrollsVertical;m._killTimer();m.set((l)?f:g,this._getTargetOffset(this.get(c)),{duration:n,easing:o});},_prevent:new a.Do.Prevent()});k.SNAP_TO_CURRENT={duration:300,easing:"ease-out"};a.namespace("Plugin").ScrollViewPaginator=k;},"3.5.1",{requires:["plugin"]});

View File

@ -1,454 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('scrollview-paginator', function(Y) {
/**
* Provides a plugin, which adds pagination support to ScrollView instances
*
* @module scrollview-paginator
*/
var UI = (Y.ScrollView) ? Y.ScrollView.UI_SRC : "ui",
INDEX = "index",
PREVINDEX = "prevIndex",
SCROLL_X = "scrollX",
SCROLL_Y = "scrollY",
TOTAL = "total",
BOUNDING_BOX = "boundingBox",
CONTENT_BOX = "contentBox",
MAX_PAGE_COUNT = 3; // @TODO: Make configurable?
/**
* Scrollview plugin that adds support for paging
*
* @class ScrollViewPaginator
* @namespace Plugin
* @extends Plugin.Base
* @constructor
*/
function PaginatorPlugin() {
PaginatorPlugin.superclass.constructor.apply(this, arguments);
}
/**
* The identity of the plugin
*
* @property NAME
* @type String
* @default 'paginatorPlugin'
* @static
*/
PaginatorPlugin.NAME = 'pluginScrollViewPaginator';
/**
* The namespace on which the plugin will reside
*
* @property NS
* @type String
* @default 'pages'
* @static
*/
PaginatorPlugin.NS = 'pages';
/**
* The default attribute configuration for the plugin
*
* @property ATTRS
* @type Object
* @static
*/
PaginatorPlugin.ATTRS = {
/**
* CSS selector for a page inside the scrollview. The scrollview
* will snap to the closest page.
*
* @attribute selector
* @type {String}
*/
selector: {
value: null
},
/**
* The active page number for a paged scrollview
*
* @attribute index
* @type {Number}
* @default 0
*/
index: {
value: 0
},
/**
* The active page number for a paged scrollview
*
* @attribute index
* @type {Number}
* @default 0
*/
prevIndex: {
value: 0
},
/**
* The total number of pages
*
* @attribute total
* @type {Number}
* @default 0
*/
total: {
value: 0
}
};
Y.extend(PaginatorPlugin, Y.Plugin.Base, {
optimizeMemory: false,
_pageOffsets: null,
_pageNodes: null,
/**
* Designated initializer
*
* @method initializer
*/
initializer: function(config) {
var paginator = this,
optimizeMemory = config.optimizeMemory || optimizeMemory;
paginator._host = paginator.get('host');
paginator.beforeHostMethod('_flickFrame', paginator._flickFrame);
paginator.afterHostMethod('_uiDimensionsChange', paginator._calcOffsets);
paginator.afterHostEvent('scrollEnd', paginator._scrollEnded);
paginator.afterHostEvent('render', paginator._afterRender);
paginator.after('indexChange', paginator._afterIndexChange);
paginator.optimizeMemory = optimizeMemory;
paginator._pageNodes = new Y.NodeList();
},
/**
* Calculate the page boundary offsets
*
* @method _calcOffsets
* @protected
*/
_calcOffsets : function() {
var host = this._host,
cb = host.get(CONTENT_BOX),
bb = host.get(BOUNDING_BOX),
vert = host._scrollsVertical,
size = (vert) ? host._scrollHeight : host._scrollWidth,
pageSelector = this.get("selector"),
optimizeMemory = this.optimizeMemory,
currentIndex = this.get(INDEX),
pages,
offsets,
node;
pages = pageSelector ? cb.all(pageSelector) : cb.get("children");
this._pageNodes = pages;
//Set the total # of pages
this.set(TOTAL, pages.size());
// Determine the offsets
this._pageOffsets = pages.get((vert) ? "offsetTop" : "offsetLeft");
if (optimizeMemory) {
this.set(PREVINDEX, currentIndex);
// Reduce the scroll width to the size of (3) pages (or whatever MAX_PAGE_COUNT is)
host._maxScrollX = this._pageOffsets[MAX_PAGE_COUNT-1];
// Empty the content-box. @TODO: leave {MAX_PAGE_COUNT} items in?
cb.empty(true);
// Now, fill it with the first set of items
for (var i=0; i < MAX_PAGE_COUNT; i++) {
node = pages.item(currentIndex + i);
cb.append(node);
}
}
},
/**
* Return the offset value where scrollview should scroll to.
* Neccesary because index # doesn't nessecarily map up to location in the DOM because of this._manageDOM()
*
* @method _getTargetOffset
* @param index {Number}
* @returns {Number}
* @protected
*/
_getTargetOffset: function(index) {
var previous = this.get(PREVINDEX),
current = this.get(INDEX),
total = this.get(TOTAL),
forward = (previous < current) ? true : false,
pageOffsets = this._pageOffsets,
optimizeMemory = this.optimizeMemory,
offset, currentPageLocation;
// @todo: Clean this up. Probably do current (currentOffset - previousoffset) instead of assuming they're all the same width
if (optimizeMemory) {
if (forward) {
if (index > 1) {
currentPageLocation = 2;
}
else {
currentPageLocation = 1;
}
}
else {
if (current == (total-2)) {
currentPageLocation = 1;
}
else {
currentPageLocation = 0;
}
}
}
else {
currentPageLocation = index;
}
offset = pageOffsets[currentPageLocation]
return offset;
},
/**
* Executed to respond to the flick event, by over-riding the default flickFrame animation.
* This is needed to determine if the next or prev page should be activated.
*
* @method _flickFrame
* @protected
*/
_flickFrame: function() {
var host = this._host,
velocity = host._currentVelocity,
inc = velocity < 0,
pageIndex = this.get(INDEX),
pageCount = this.get(TOTAL);
if (velocity) {
if (inc && pageIndex < pageCount-1) {
this.next();
} else if (!inc && pageIndex > 0) {
this.prev();
}
}
return this._prevent;
},
/**
* After host render handler
*
* @method _afterRender
* @param {Event.Facade}
* @protected
*/
_afterRender: function(e) {
var host = this._host;
host.get("boundingBox").addClass(host.getClassName("paged"));
},
/**
* scrollEnd handler detects if a page needs to change
*
* @method _scrollEnded
* @param {Event.Facade}
* @protected
*/
_scrollEnded: function(e) {
var host = this._host,
pageIndex = this.get(INDEX),
pageCount = this.get(TOTAL),
trans = PaginatorPlugin.SNAP_TO_CURRENT,
optimizeMemory = this.optimizeMemory;
if(e.onGestureMoveEnd && !host._flicking) {
if(host._scrolledHalfway) {
if(host._scrolledForward && pageIndex < pageCount-1) {
this.next();
} else if (pageIndex > 0) {
this.prev();
} else {
this.snapToCurrent(trans.duration, trans.easing);
}
} else {
this.snapToCurrent(trans.duration, trans.easing);
}
}
if (!e.onGestureMoveEnd){
if (optimizeMemory) {
this._manageDOM();
}
this.set(PREVINDEX, pageIndex);
}
},
/**
* Manages adding & removing slides from the DOM, to improve performance & memory usage
*
* @since 3.5.0
* @method _manageDOM
* @protected
*/
_manageDOM: function(){
var newSlide, addSlideMethod, nodeToRemove,
host = this._host,
cb = host.get(CONTENT_BOX),
currentIndex = this.get(INDEX),
previousIndex = this.get(PREVINDEX),
total = this.get(TOTAL),
isForward = (previousIndex < currentIndex) ? true : false,
cbChildren = cb.get('children'),
pageNodes = this._pageNodes,
targetOffset;
if (pageNodes && pageNodes.size() > 0) {
if (isForward) {
newSlide = pageNodes.item(currentIndex+1);
addSlideMethod = cb.append;
}
else {
newSlide = pageNodes.item(currentIndex-1);
addSlideMethod = cb.prepend;
}
// Append/Prepend the new item to the DOM
if (cbChildren.indexOf(newSlide) === -1) {
addSlideMethod.call(cb, newSlide);
}
// Since we modified the DOM, get an updated reference
cbChildren = cb.get('children');
}
// Are we over the max number of items allowed?
if (cbChildren.size() > MAX_PAGE_COUNT) {
nodeToRemove = (isForward) ? cb.one('li:first-of-type') : cb.one('li:last-of-type');
nodeToRemove.remove();
targetOffset = (currentIndex == total ? 2 : 1);
host.set('scrollX', this._pageOffsets[targetOffset]); // Center
}
},
/**
* index attr change handler
*
* @method _afterIndexChange
* @param {Event.Facade}
* @protected
*/
_afterIndexChange: function(e) {
if(e.src !== UI) {
this._uiIndex(e.newVal);
}
},
/**
* Update the UI based on the current page index
*
* @method _uiIndex
* @param index {Number}
* @protected
*/
_uiIndex: function(index) {
this.scrollTo(index, 350, 'ease-out');
},
/**
* Scroll to the next page in the scrollview, with animation
*
* @method next
*/
next: function() {
var index = this.get(INDEX);
if(index < this.get(TOTAL)-1) {
this.set(INDEX, index+1);
}
},
/**
* Scroll to the previous page in the scrollview, with animation
*
* @method prev
*/
prev: function() {
var index = this.get(INDEX);
if(index > 0) {
this.set(INDEX, index-1);
}
},
/**
* Scroll to a given page in the scrollview, with animation.
*
* @method scrollTo
* @param index {Number} The index of the page to scroll to
* @param duration {Number} The number of ms the animation should last
* @param easing {String} The timing function to use in the animation
*/
scrollTo: function(index, duration, easing) {
var host = this._host,
vert = host._scrollsVertical,
scrollAxis = (vert) ? SCROLL_Y : SCROLL_X,
scrollVal = this._getTargetOffset(index);
host.set(scrollAxis, scrollVal, {
duration: duration,
easing: easing
});
},
/**
* Snaps the scrollview to the currently selected page
*
* @method snapToCurrent
* @param duration {Number} The number of ms the animation should last
* @param easing {String} The timing function to use in the animation
*/
snapToCurrent: function(duration, easing) {
var host = this._host,
vert = host._scrollsVertical;
host._killTimer();
host.set((vert) ? SCROLL_Y : SCROLL_X, this._getTargetOffset(this.get(INDEX)), {
duration: duration,
easing: easing
});
},
_prevent: new Y.Do.Prevent()
});
/**
* The default snap to current duration and easing values used on scroll end.
*
* @property SNAP_TO_CURRENT
* @static
*/
PaginatorPlugin.SNAP_TO_CURRENT = {
duration : 300,
easing : 'ease-out'
};
Y.namespace('Plugin').ScrollViewPaginator = PaginatorPlugin;
}, '3.5.1' ,{requires:['plugin']});

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("sortable",function(a){var c=function(l){c.superclass.constructor.apply(this,arguments);},f="currentNode",d="opacityNode",i="container",e="id",j="zIndex",k="opacity",h="parentNode",g="nodes",b="node";a.extend(c,a.Base,{delegate:null,initializer:function(){var o="sortable-"+a.guid(),n,m={container:this.get(i),nodes:this.get(g),target:true,invalid:this.get("invalid"),dragConfig:{groups:[o]}},l;if(this.get("handles")){m.handles=this.get("handles");}l=new a.DD.Delegate(m);this.set(e,o);l.dd.plug(a.Plugin.DDProxy,{moveOnEnd:false,cloneNode:true});n=new a.DD.Drop({node:this.get(i),bubbleTarget:l,groups:l.dd.get("groups")}).on("drop:over",a.bind(this._onDropOver,this));l.on({"drag:start":a.bind(this._onDragStart,this),"drag:end":a.bind(this._onDragEnd,this),"drag:over":a.bind(this._onDragOver,this),"drag:drag":a.bind(this._onDrag,this)});this.delegate=l;c.reg(this);},_up:null,_y:null,_onDrag:function(l){if(l.pageY<this._y){this._up=true;}else{if(l.pageY>this._y){this._up=false;}}this._y=l.pageY;},_onDropOver:function(m){if(!m.drop.get(b).test(this.get(g))){var l=m.drop.get(b).all(this.get(g));if(l.size()===0){m.drop.get(b).append(m.drag.get(b));}}},_onDragOver:function(r){if(!r.drop.get(b).test(this.get(g))){return;}if(r.drag.get(b)==r.drop.get(b)){return;}if(r.drag.get(b).contains(r.drop.get(b))){return;}var s=false,m,q,o,n,l,p=this.get("moveType").toLowerCase();if(r.drag.get(b).get(h).contains(r.drop.get(b))){s=true;}if(s&&p=="move"){p="insert";}switch(p){case"insert":m=((this._up)?"before":"after");l=r.drop.get(b);if(a.Sortable._test(l,this.get(i))){l.append(r.drag.get(b));}else{l.insert(r.drag.get(b),m);}break;case"swap":a.DD.DDM.swapNode(r.drag,r.drop);break;case"move":case"copy":n=a.Sortable.getSortable(r.drop.get(b).get(h));if(!n){return;}a.DD.DDM.getDrop(r.drag.get(b)).addToGroup(n.get(e));if(s){a.DD.DDM.swapNode(r.drag,r.drop);}else{if(this.get("moveType")=="copy"){q=r.drag.get(b);o=q.cloneNode(true);o.set(e,"");r.drag.set(b,o);n.delegate.createDrop(o,[n.get(e)]);q.setStyles({top:"",left:""});}r.drop.get(b).insert(r.drag.get(b),"before");}break;}this.fire(p,{same:s,drag:r.drag,drop:r.drop});this.fire("moved",{same:s,drag:r.drag,drop:r.drop});},_onDragStart:function(l){this.delegate.get("lastNode").setStyle(j,"");this.delegate.get(this.get(d)).setStyle(k,this.get(k));this.delegate.get(f).setStyle(j,"999");},_onDragEnd:function(l){this.delegate.get(this.get(d)).setStyle(k,1);this.delegate.get(f).setStyles({top:"",left:""});this.sync();},plug:function(l,m){if(l&&l.NAME.substring(0,4).toLowerCase()==="sort"){this.constructor.superclass.plug.call(this,l,m);}else{this.delegate.dd.plug(l,m);}return this;},sync:function(){this.delegate.syncTargets();return this;},destructor:function(){this.delegate.destroy();c.unreg(this);},join:function(m,l){if(!(m instanceof a.Sortable)){a.error("Sortable: join needs a Sortable Instance");return this;}if(!l){l="full";}l=l.toLowerCase();var n="_join_"+l;if(this[n]){this[n](m);}return this;},_join_none:function(l){this.delegate.dd.removeFromGroup(l.get(e));l.delegate.dd.removeFromGroup(this.get(e));},_join_full:function(l){this.delegate.dd.addToGroup(l.get(e));l.delegate.dd.addToGroup(this.get(e));},_join_outer:function(l){this.delegate.dd.addToGroup(l.get(e));},_join_inner:function(l){l.delegate.dd.addToGroup(this.get(e));},getOrdering:function(m){var l=[];if(!a.Lang.isFunction(m)){m=function(n){return n;};}a.one(this.get(i)).all(this.get(g)).each(function(n){l.push(m(n));});return l;}},{NAME:"sortable",ATTRS:{handles:{value:false},container:{value:"body"},nodes:{value:".dd-draggable"},opacity:{value:".75"},opacityNode:{value:"currentNode"},id:{value:null},moveType:{value:"insert"},invalid:{value:""}},_sortables:[],_test:function(l,m){if(m instanceof a.Node){return(m===l);}else{return l.test(m);}},getSortable:function(m){var l=null;m=a.one(m);a.each(a.Sortable._sortables,function(n){if(a.Sortable._test(m,n.get(i))){l=n;}});return l;},reg:function(l){a.Sortable._sortables.push(l);},unreg:function(l){a.each(a.Sortable._sortables,function(n,m){if(n===l){a.Sortable._sortables[m]=null;delete c._sortables[m];}});}});a.Sortable=c;},"3.5.1",{requires:["dd-delegate","dd-drop-plugin","dd-proxy"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("swf",function(b){var m=b.Event,g=b.SWFDetect,i=b.Lang,h=b.UA,j=b.Node,n=b.Escape,f="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",e="application/x-shockwave-flash",d="10.0.22",a="http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+Math.random(),c="SWF.eventHandler",k={align:"",allowFullScreen:"",allowNetworking:"",allowScriptAccess:"",base:"",bgcolor:"",menu:"",name:"",quality:"",salign:"",scale:"",tabindex:"",wmode:""};function l(s,p,E){this._id=b.guid("yuiswf");var t=this._id;var y=j.one(s);var E=E||{};var H=E.version||d;var B=(H+"").split(".");var u=g.isFlashVersionAtLeast(parseInt(B[0],10),parseInt(B[1],10),parseInt(B[2],10));var A=(g.isFlashVersionAtLeast(8,0,0));var r=A&&!u&&E.useExpressInstall;var q=(r)?a:p;var G="<object ";var v,D;var F="yId="+b.id+"&YUISwfId="+t+"&YUIBridgeCallback="+c+"&allowedDomain="+document.location.hostname;b.SWF._instances[t]=this;if(y&&(u||r)&&q){G+='id="'+t+'" ';if(h.ie){G+='classid="'+f+'" ';}else{G+='type="'+e+'" data="'+n.html(q)+'" ';}v="100%";D="100%";G+='width="'+v+'" height="'+D+'">';if(h.ie){G+='<param name="movie" value="'+n.html(q)+'"/>';}for(var x in E.fixedAttributes){if(k.hasOwnProperty(x)){G+='<param name="'+n.html(x)+'" value="'+n.html(E.fixedAttributes[x])+'"/>';}}for(var z in E.flashVars){var o=E.flashVars[z];if(i.isString(o)){F+="&"+n.html(z)+"="+n.html(encodeURIComponent(o));}}if(F){G+='<param name="flashVars" value="'+F+'"/>';}G+="</object>";y.setContent(G);this._swf=j.one("#"+t);}else{var C={};C.type="wrongflashversion";this.publish("wrongflashversion",{fireOnce:true});this.fire("wrongflashversion",C);}}l._instances=l._instances||{};l.eventHandler=function(o,p){l._instances[o]._eventHandler(p);};l.prototype={_eventHandler:function(o){if(o.type==="swfReady"){this.publish("swfReady",{fireOnce:true});this.fire("swfReady",o);}else{if(o.type==="log"){}else{this.fire(o.type,o);}}},callSWF:function(p,o){if(!o){o=[];}if(this._swf._node[p]){return(this._swf._node[p].apply(this._swf._node,o));}else{return null;}},toString:function(){return"SWF "+this._id;}};b.augment(l,b.EventTarget);b.SWF=l;},"3.5.1",{requires:["event-custom","node","swfdetect","escape"]});

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

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("uploader-queue",function(a){var g=a.Lang,k=a.bind,h=a.config.win,f,d,j,b,i,e;var c=function(l){this.queuedFiles=[];this.numberOfUploads=0;this.currentUploadedByteValues={};this.currentFiles={};this.totalBytesUploaded=0;this.totalBytes=0;c.superclass.constructor.apply(this,arguments);};a.extend(c,a.Base,{_currentState:c.STOPPED,initializer:function(l){},_uploadStartHandler:function(m){var l=m;l.file=m.target;l.originEvent=m;this.fire("uploadstart",l);},_uploadErrorHandler:function(m){var n=this.get("errorAction");var l=m;l.file=m.target;l.originEvent=m;this.numberOfUploads-=1;delete this.currentFiles[m.target.get("id")];m.target.cancelUpload();if(n===c.STOP){this.pauseUpload();}else{if(n===c.RESTART_ASAP){this.queuedFiles.unshift(m.target);this._startNextFile();}else{if(n===c.RESTART_AFTER){this.queuedFiles.push(m.target);this._startNextFile();}}}this.fire("uploaderror",l);},_startNextFile:function(){if(this.queuedFiles.length>0){var m=this.queuedFiles.shift(),l=m.get("id"),n=this.get("perFileParameters"),o=n.hasOwnProperty(l)?n[l]:n;this.currentUploadedByteValues[l]=0;m.on("uploadstart",this._uploadStartHandler,this);m.on("uploadprogress",this._uploadProgressHandler,this);m.on("uploadcomplete",this._uploadCompleteHandler,this);m.on("uploaderror",this._uploadErrorHandler,this);m.startUpload(this.get("uploadURL"),o,this.get("fileFieldName"));this._registerUpload(m);}},_registerUpload:function(l){this.numberOfUploads+=1;this.currentFiles[l.get("id")]=l;},_unregisterUpload:function(l){if(this.numberOfUploads>0){this.numberOfUploads-=1;}delete this.currentFiles[l.get("id")];},_uploadCompleteHandler:function(o){this._unregisterUpload(o.target);this.totalBytesUploaded+=o.target.get("size");delete this.currentUploadedByteValues[o.target.get("id")];if(this.queuedFiles.length>0&&this._currentState===c.UPLOADING){this._startNextFile();}var n=o;n.file=o.target;n.originEvent=o;var m=this.totalBytesUploaded;a.each(this.currentUploadedByteValues,function(p){m+=p;});var l=Math.min(100,Math.round(10000*m/this.totalBytes)/100);this.fire("totaluploadprogress",{bytesLoaded:m,bytesTotal:this.totalBytes,percentLoaded:l});this.fire("uploadcomplete",n);if(this.queuedFiles.length===0&&this.numberOfUploads<=0){this.fire("alluploadscomplete");this._currentState=c.STOPPED;}},_uploadProgressHandler:function(o){this.currentUploadedByteValues[o.target.get("id")]=o.bytesLoaded;var n=o;n.originEvent=o;n.file=o.target;this.fire("uploadprogress",n);var m=this.totalBytesUploaded;a.each(this.currentUploadedByteValues,function(p){m+=p;});var l=Math.min(100,Math.round(10000*m/this.totalBytes)/100);this.fire("totaluploadprogress",{bytesLoaded:m,bytesTotal:this.totalBytes,percentLoaded:l});},startUpload:function(){this.queuedFiles=this.get("fileList").slice(0);this.numberOfUploads=0;this.currentUploadedByteValues={};this.currentFiles={};this.totalBytesUploaded=0;this._currentState=c.UPLOADING;while(this.numberOfUploads<this.get("simUploads")&&this.queuedFiles.length>0){this._startNextFile();}},pauseUpload:function(){this._currentState=c.STOPPED;},restartUpload:function(){this._currentState=c.UPLOADING;while(this.numberOfUploads<this.get("simUploads")){this._startNextFile();}},forceReupload:function(l){var m=l.get("id");if(this.currentFiles.hasOwnProperty(m)){l.cancelUpload();this._unregisterUpload(l);this.queuedFiles.unshift(l);this._startNextFile();}},addToQueueTop:function(l){this.queuedFiles.unshift(l);},addToQueueBottom:function(l){this.queuedFiles.push(l);},cancelUpload:function(n){if(n){var p=n.get("id");if(this.currentFiles[p]){this.currentFiles[p].cancelUpload();this._unregisterUpload(this.currentFiles[p]);}else{for(var m=0,l=this.queuedFiles.length;m<l;m++){if(this.queuedFiles[m].get("id")===p){this.queuedFiles.splice(m,1);break;}}}}else{for(var o in this.currentFiles){this.currentFiles[o].cancelUpload();this._unregisterUpload(this.currentFiles[o]);}this.currentUploadedByteValues={};this.currentFiles={};this.totalBytesUploaded=0;this.fire("alluploadscancelled");this._currentState=c.STOPPED;}}},{CONTINUE:"continue",STOP:"stop",RESTART_ASAP:"restartasap",RESTART_AFTER:"restartafter",STOPPED:"stopped",UPLOADING:"uploading",NAME:"uploaderqueue",ATTRS:{simUploads:{value:2,validator:function(m,l){return(m>=1&&m<=5);}},errorAction:{value:"continue",validator:function(m,l){return(m===c.CONTINUE||m===c.STOP||m===c.RESTART_ASAP||m===c.RESTART_AFTER);}},bytesUploaded:{readOnly:true,value:0},bytesTotal:{readOnly:true,value:0},fileList:{value:[],lazyAdd:false,setter:function(m){var l=m;a.Array.each(l,function(n){this.totalBytes+=n.get("size");},this);return m;}},fileFieldName:{value:"Filedata"},uploadURL:{value:""},perFileParameters:{value:{}}}});a.namespace("Uploader");a.Uploader.Queue=c;},"3.5.1",{requires:["base"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-htmlparser",function(f){var e=f.Widget,c=f.Node,d=f.Lang,a="srcNode",b="contentBox";e.HTML_PARSER={};e._buildCfg={aggregates:["HTML_PARSER"]};e.ATTRS[a]={value:null,setter:c.one,getter:"_getSrcNode",writeOnce:true};f.mix(e.prototype,{_getSrcNode:function(g){return g||this.get(b);},_applyParsedConfig:function(i,g,h){return(h)?f.mix(g,h,false):g;},_applyParser:function(g){var i=this,j=i.get(a),h=i._getHtmlParser(),l,k;if(h&&j){f.Object.each(h,function(n,m,p){k=null;if(d.isFunction(n)){k=n.call(i,j);}else{if(d.isArray(n)){k=j.all(n[0]);if(k.isEmpty()){k=null;}}else{k=j.one(n);}}if(k!==null&&k!==undefined){l=l||{};l[m]=k;}});}g=i._applyParsedConfig(j,g,l);},_getHtmlParser:function(){var h=this._getClasses(),k={},g,j;for(g=h.length-1;g>=0;g--){j=h[g].HTML_PARSER;if(j){f.mix(k,j,true);}}return k;}});},"3.5.1",{requires:["widget-base"]});

View File

@ -1,9 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-modality",function(c){var p="widget",q="renderUI",f="bindUI",k="syncUI",u="boundingBox",m="contentBox",r="visible",e="zIndex",l="Change",i=c.Lang.isBoolean,s=c.ClassNameManager.getClassName,j="maskShow",a="maskHide",t="clickoutside",n="focusoutside",d=(function(){
/*! IS_POSITION_FIXED_SUPPORTED - Juriy Zaytsev (kangax) - http://yura.thinkweb2.com/cft/ */
var y=c.config.doc,w=null,x,v;if(y.createElement){x=y.createElement("div");if(x&&x.style){x.style.position="fixed";x.style.top="10px";v=y.body;if(v&&v.appendChild&&v.removeChild){v.appendChild(x);w=(x.offsetTop===10);v.removeChild(x);}}}return w;}());function o(v){}var h="modal",b="mask",g={modal:s(p,h),mask:s(p,b)};o.ATTRS={maskNode:{getter:"_getMaskNode",readOnly:true},modal:{value:false,validator:i},focusOn:{valueFn:function(){return[{eventName:t},{eventName:n}];},validator:c.Lang.isArray}};o.CLASSES=g;o._GET_MASK=function(){var v=c.one(".yui3-widget-mask")||null,w=c.one("window");if(v){return v;}else{v=c.Node.create("<div></div>");v.addClass(g.mask);if(d){v.setStyles({position:"fixed",width:"100%",height:"100%",top:"0",left:"0",display:"block"});}else{v.setStyles({position:"absolute",width:w.get("winWidth")+"px",height:w.get("winHeight")+"px",top:"0",left:"0",display:"block"});}return v;}};o.STACK=[];o.prototype={initializer:function(){c.after(this._renderUIModal,this,q);c.after(this._syncUIModal,this,k);c.after(this._bindUIModal,this,f);},destructor:function(){this._uiSetHostVisibleModal(false);},_uiHandlesModal:null,_renderUIModal:function(){var v=this.get(u);this._repositionMask(this);v.addClass(g.modal);},_bindUIModal:function(){this.after(r+l,this._afterHostVisibleChangeModal);this.after(e+l,this._afterHostZIndexChangeModal);this.after("focusOnChange",this._afterFocusOnChange);if(!d||(c.UA.ios&&c.UA.ios<5)||(c.UA.android&&c.UA.android<3)){c.one("win").on("scroll",this._resyncMask,this);}},_syncUIModal:function(){this._uiSetHostVisibleModal(this.get(r));this._uiSetHostZIndexModal(this.get(e));},_focus:function(w){var x=this.get(u),v=x.get("tabIndex");x.set("tabIndex",v>=0?v:0);this.focus();},_blur:function(){this.blur();},_getMaskNode:function(){return o._GET_MASK();},_uiSetHostVisibleModal:function(A){var v=o.STACK,y=this.get("maskNode"),z=this.get("modal"),x,w;if(A){c.Array.each(v,function(B){B._detachUIHandlesModal();B._blur();});v.unshift(this);this._repositionMask(this);this._uiSetHostZIndexModal(this.get(e));if(z){y.show();c.later(1,this,"_attachUIHandlesModal");this._focus();}}else{w=c.Array.indexOf(v,this);if(w>=0){v.splice(w,1);}this._detachUIHandlesModal();this._blur();if(v.length){x=v[0];this._repositionMask(x);x._uiSetHostZIndexModal(x.get(e));if(x.get("modal")){c.later(1,x,"_attachUIHandlesModal");x._focus();}}else{if(y.getStyle("display")==="block"){y.hide();}}}},_uiSetHostZIndexModal:function(v){if(this.get("modal")){this.get("maskNode").setStyle(e,v||0);}},_attachUIHandlesModal:function(){if(this._uiHandlesModal||o.STACK[0]!==this){return;}var C=this.get(u),z=this.get("maskNode"),B=this.get("focusOn"),w=c.bind(this._focus,this),x=[],y,v,A;for(y=0,v=B.length;y<v;y++){A={};A.node=B[y].node;A.ev=B[y].eventName;A.keyCode=B[y].keyCode;if(!A.node&&!A.keyCode&&A.ev){x.push(C.on(A.ev,w));}else{if(A.node&&!A.keyCode&&A.ev){x.push(A.node.on(A.ev,w));}else{if(A.node&&A.keyCode&&A.ev){x.push(A.node.on(A.ev,w,A.keyCode));}else{c.Log('focusOn ATTR Error: The event with name "'+A.ev+'" could not be attached.');}}}}if(!d){x.push(c.one("win").on("scroll",c.bind(function(D){z.setStyle("top",z.get("docScrollY"));},this)));}this._uiHandlesModal=x;},_detachUIHandlesModal:function(){c.each(this._uiHandlesModal,function(v){v.detach();});this._uiHandlesModal=null;},_afterHostVisibleChangeModal:function(v){this._uiSetHostVisibleModal(v.newVal);},_afterHostZIndexChangeModal:function(v){this._uiSetHostZIndexModal(v.newVal);},isNested:function(){var w=o.STACK.length,v=(w>1)?true:false;return v;},_repositionMask:function(v){var y=this.get("modal"),x=v.get("modal"),z=this.get("maskNode"),A,w;if(y&&!x){z.remove();this.fire(a);}else{if((!y&&x)||(y&&x)){z.remove();this.fire(a);A=v.get(u);w=A.get("parentNode")||c.one("body");w.insert(z,w.get("firstChild"));this.fire(j);}}},_resyncMask:function(A){var B=A.currentTarget,v=B.get("docScrollX"),C=B.get("docScrollY"),y=B.get("innerWidth")||B.get("winWidth"),z=B.get("innerHeight")||B.get("winHeight"),x=this.get("maskNode");x.setStyles({"top":C+"px","left":v+"px","width":y+"px","height":z+"px"});},_afterFocusOnChange:function(v){this._detachUIHandlesModal();if(this.get(r)){this._attachUIHandlesModal();}}};c.WidgetModality=o;},"3.5.1",{requires:["base-build","event-outside","widget"],skinnable:true});

View File

@ -1,26 +0,0 @@
/*
YUI 3.5.1 (build 22)
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;
}

View File

@ -1,26 +0,0 @@
/*
YUI 3.5.1 (build 22)
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;
}

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("yql",function(b){var a=function(e,f,d,c){if(!d){d={};}d.q=e;if(!d.format){d.format=b.YQLRequest.FORMAT;}if(!d.env){d.env=b.YQLRequest.ENV;}this._params=d;this._opts=c;this._callback=f;};a.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,send:function(){var c=[],d=((this._opts&&this._opts.proto)?this._opts.proto:b.YQLRequest.PROTO);b.each(this._params,function(g,f){c.push(f+"="+encodeURIComponent(g));});c=c.join("&");d+=((this._opts&&this._opts.base)?this._opts.base:b.YQLRequest.BASE_URL)+c;var e=(!b.Lang.isFunction(this._callback))?this._callback:{on:{success:this._callback}};if(e.allowCache!==false){e.allowCache=true;}if(!this._jsonp){this._jsonp=b.jsonp(d,e);}else{this._jsonp.url=d;if(e.on&&e.on.success){this._jsonp._config.on.success=e.on.success;}this._jsonp.send();}return this;}};a.FORMAT="json";a.PROTO="http";a.BASE_URL=":/"+"/query.yahooapis.com/v1/public/yql?";a.ENV="http:/"+"/datatables.org/alltables.env";b.YQLRequest=a;b.YQL=function(e,f,d,c){return new b.YQLRequest(e,f,d,c).send();};},"3.5.1",{requires:["jsonp","jsonp-url"]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("yui-log-nodejs",function(e){var c=require(process.binding("natives").util?"util":"sys"),f=false;try{var b=require("stdio");f=b.isStderrATTY();}catch(a){f=true;}e.config.useColor=f;e.consoleColor=function(h,g){if(!this.config.useColor){return h;}if(!g){g="32";}return"\033["+g+"m"+h+"\033[0m";};var d=function(l,j,g){var n="";if(this.id){n="["+this.id+"]:";}j=j||"info";g=(g)?this.consoleColor(" ("+g.toLowerCase()+"):",35):"";if(l===null){l="null";}if((typeof l==="object")||l instanceof Array){try{if(l.tagName||l._yuid||l._query){l=l.toString();}else{l=c.inspect(l);}}catch(k){}}var i="37;40",h=((l)?"":31);j=j+"";switch(j.toLowerCase()){case"error":i=h=31;break;case"warn":i=33;break;case"debug":i=34;break;}if(typeof l==="string"){if(l&&l.indexOf("\n")!==-1){l="\n"+l;}}c.error(this.consoleColor(j.toLowerCase()+":",i)+g+" "+this.consoleColor(l,h));};if(!e.config.logFn){e.config.logFn=d;}},"3.5.1",{requires:["yui-log"]});

View File

@ -1,7 +0,0 @@
/*
YUI 3.5.1 (build 22)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("yui-log",function(d){var c=d,e="yui:log",a="undefined",b={debug:1,info:1,warn:1,error:1};c.log=function(j,s,g,q){var l,p,n,k,o,i=c,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g in n)){l=1;}else{if(n&&(g in n)){l=!n[g];}else{if(p&&(g in p)){l=p[g];}}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": "+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof console!=a&&console.log){o=(s&&console[s]&&(s in b))?s:"log";console[o](k);}else{if(typeof opera!=a){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return i;};c.message=function(){return c.log.apply(c,arguments);};},"3.5.1",{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

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
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) {
}, '3.5.1' ,{requires:['node-pluginhost', 'node-screen']});
}, '3.6.0' ,{requires:['node-pluginhost', 'node-screen']});

View File

@ -1,7 +1,7 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("align-plugin",function(c){var e="offsetWidth",d="offsetHeight",b=b;function a(f){if(f.host){this._host=f.host;}}a.prototype={to:function(j,t,l,o){this._syncArgs=c.Array(arguments);if(j.top===b){j=c.one(j).get("region");}if(j){var s=[j.left,j.top],q=[j.width,j.height],n=a.points,f=this._host,h=null,r=f.getAttrs([d,e]),k=[0-r[e],0-r[d]],p=t?n[t.charAt(0)]:h,m=(t&&t!=="cc")?n[t.charAt(1)]:h,i=l?n[l.charAt(0)]:h,g=(l&&l!=="cc")?n[l.charAt(1)]:h;if(p){s=p(s,q,t);}if(m){s=m(s,q,t);}if(i){s=i(s,k,l);}if(g){s=g(s,k,l);}if(s&&f){f.setXY(s);}this._resize(o);}return this;},sync:function(){this.to.apply(this,this._syncArgs);return this;},_resize:function(g){var f=this._handle;if(g&&!f){this._handle=c.on("resize",this._onresize,window,this);}else{if(!g&&f){f.detach();}}},_onresize:function(){var f=this;setTimeout(function(){f.sync();});},center:function(g,f){this.to(g,"cc","cc",f);return this;},destroy:function(){var f=this._handle;if(f){f.detach();}}};a.points={"t":function(f,g){return f;},"r":function(f,g){return[f[0]+g[0],f[1]];},"b":function(f,g){return[f[0],f[1]+g[1]];},"l":function(f,g){return f;},"c":function(i,k,f){var h=(f[0]==="t"||f[0]==="b")?0:1,g,j;if(f==="cc"){g=[i[0]+k[0]/2,i[1]+k[1]/2];}else{j=i[h]+k[h]/2;g=(h)?[i[0],j]:[j,i[1]];}return g;}};a.NAME="Align";a.NS="align";a.prototype.constructor=a;c.namespace("Plugin");c.Plugin.Align=a;},"3.5.1",{requires:["node-pluginhost","node-screen"]});
YUI.add("align-plugin",function(c){var e="offsetWidth",d="offsetHeight",b=b;function a(f){if(f.host){this._host=f.host;}}a.prototype={to:function(j,t,l,o){this._syncArgs=c.Array(arguments);if(j.top===b){j=c.one(j).get("region");}if(j){var s=[j.left,j.top],q=[j.width,j.height],n=a.points,f=this._host,h=null,r=f.getAttrs([d,e]),k=[0-r[e],0-r[d]],p=t?n[t.charAt(0)]:h,m=(t&&t!=="cc")?n[t.charAt(1)]:h,i=l?n[l.charAt(0)]:h,g=(l&&l!=="cc")?n[l.charAt(1)]:h;if(p){s=p(s,q,t);}if(m){s=m(s,q,t);}if(i){s=i(s,k,l);}if(g){s=g(s,k,l);}if(s&&f){f.setXY(s);}this._resize(o);}return this;},sync:function(){this.to.apply(this,this._syncArgs);return this;},_resize:function(g){var f=this._handle;if(g&&!f){this._handle=c.on("resize",this._onresize,window,this);}else{if(!g&&f){f.detach();}}},_onresize:function(){var f=this;setTimeout(function(){f.sync();});},center:function(g,f){this.to(g,"cc","cc",f);return this;},destroy:function(){var f=this._handle;if(f){f.detach();}}};a.points={"t":function(f,g){return f;},"r":function(f,g){return[f[0]+g[0],f[1]];},"b":function(f,g){return[f[0],f[1]+g[1]];},"l":function(f,g){return f;},"c":function(i,k,f){var h=(f[0]==="t"||f[0]==="b")?0:1,g,j;if(f==="cc"){g=[i[0]+k[0]/2,i[1]+k[1]/2];}else{j=i[h]+k[h]/2;g=(h)?[i[0],j]:[j,i[1]];}return g;}};a.NAME="Align";a.NS="align";a.prototype.constructor=a;c.namespace("Plugin");c.Plugin.Align=a;},"3.6.0",{requires:["node-pluginhost","node-screen"]});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
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) {
}, '3.5.1' ,{requires:['node-pluginhost', 'node-screen']});
}, '3.6.0' ,{requires:['node-pluginhost', 'node-screen']});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
@ -127,16 +127,20 @@ YUI.add('anim-base', function(Y) {
var node = anim._node,
domNode = node._node,
val = fn(elapsed, NUM(from), NUM(to) - NUM(from), duration);
//make sure node instance
if (domNode && (domNode.style || domNode.attributes)) {
if (att in domNode.style || att in Y.DOM.CUSTOM_STYLES) {
if (domNode) {
if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {
unit = unit || '';
node.setStyle(att, val + unit);
} else if (domNode.attributes[att]) {
} else if ('attributes' in domNode && att in domNode.attributes) {
node.setAttribute(att, val);
} else if (att in domNode) {
domNode[att] = val;
}
} else if (node.set) {
node.set(att, val);
} else if (att in node) {
node[att] = val;
}
};
@ -150,15 +154,19 @@ YUI.add('anim-base', function(Y) {
var node = anim._node,
domNode = node._node,
val = '';
//make sure node instance
if (domNode && (domNode.style || domNode.attributes)) {
if (att in domNode.style || att in Y.DOM.CUSTOM_STYLES) {
if (domNode) {
if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {
val = node.getComputedStyle(att);
} else if (domNode.attributes[att]) {
} else if ('attributes' in domNode && att in domNode.attributes) {
val = node.getAttribute(att);
} else if (att in domNode) {
val = domNode[att];
}
} else if (node.get) {
val = node.get(att);
} else if (att in node) {
val = node[att];
}
return val;
@ -218,7 +226,7 @@ YUI.add('anim-base', function(Y) {
* If a function is used, the return value becomes the from value.
* If no from value is specified, the DEFAULT_GETTER will be used.
* Supports any unit, provided it matches the "to" (or default)
* unit (e.g. `{width: '10em', color: 'rgb(0, 0 0)', borderColor: '#ccc'}`).
* unit (e.g. `{width: '10em', color: 'rgb(0, 0, 0)', borderColor: '#ccc'}`).
*
* If using the default ('px' for length-based units), the unit may be omitted
* (e.g. `{width: 100}, borderColor: 'ccc'}`, which defaults to pixels
@ -679,4 +687,4 @@ YUI.add('anim-base', function(Y) {
Y.extend(Y.Anim, Y.Base, proto);
}, '3.5.1' ,{requires:['base-base', 'node-style']});
}, '3.6.0' ,{requires:['base-base', 'node-style']});

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
@ -127,16 +127,20 @@ YUI.add('anim-base', function(Y) {
var node = anim._node,
domNode = node._node,
val = fn(elapsed, NUM(from), NUM(to) - NUM(from), duration);
//make sure node instance
if (domNode && (domNode.style || domNode.attributes)) {
if (att in domNode.style || att in Y.DOM.CUSTOM_STYLES) {
if (domNode) {
if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {
unit = unit || '';
node.setStyle(att, val + unit);
} else if (domNode.attributes[att]) {
} else if ('attributes' in domNode && att in domNode.attributes) {
node.setAttribute(att, val);
} else if (att in domNode) {
domNode[att] = val;
}
} else if (node.set) {
node.set(att, val);
} else if (att in node) {
node[att] = val;
}
};
@ -150,15 +154,19 @@ YUI.add('anim-base', function(Y) {
var node = anim._node,
domNode = node._node,
val = '';
//make sure node instance
if (domNode && (domNode.style || domNode.attributes)) {
if (att in domNode.style || att in Y.DOM.CUSTOM_STYLES) {
if (domNode) {
if ('style' in domNode && (att in domNode.style || att in Y.DOM.CUSTOM_STYLES)) {
val = node.getComputedStyle(att);
} else if (domNode.attributes[att]) {
} else if ('attributes' in domNode && att in domNode.attributes) {
val = node.getAttribute(att);
} else if (att in domNode) {
val = domNode[att];
}
} else if (node.get) {
val = node.get(att);
} else if (att in node) {
val = node[att];
}
return val;
@ -217,7 +225,7 @@ YUI.add('anim-base', function(Y) {
* If a function is used, the return value becomes the from value.
* If no from value is specified, the DEFAULT_GETTER will be used.
* Supports any unit, provided it matches the "to" (or default)
* unit (e.g. `{width: '10em', color: 'rgb(0, 0 0)', borderColor: '#ccc'}`).
* unit (e.g. `{width: '10em', color: 'rgb(0, 0, 0)', borderColor: '#ccc'}`).
*
* If using the default ('px' for length-based units), the unit may be omitted
* (e.g. `{width: 100}, borderColor: 'ccc'}`, which defaults to pixels
@ -678,4 +686,4 @@ YUI.add('anim-base', function(Y) {
Y.extend(Y.Anim, Y.Base, proto);
}, '3.5.1' ,{requires:['base-base', 'node-style']});
}, '3.6.0' ,{requires:['base-base', 'node-style']});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
@ -51,4 +51,4 @@ Y.each(['backgroundColor',
);
}, '3.5.1' ,{requires:['anim-base']});
}, '3.6.0' ,{requires:['anim-base']});

View File

@ -1,7 +1,7 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("anim-color",function(b){var a=Number;b.Anim.behaviors.color={set:function(f,d,i,h,c,g,e){i=b.Color.re_RGB.exec(b.Color.toRGB(i));h=b.Color.re_RGB.exec(b.Color.toRGB(h));if(!i||i.length<3||!h||h.length<3){b.error("invalid from or to passed to color behavior");}f._node.setStyle(d,"rgb("+[Math.floor(e(c,a(i[1]),a(h[1])-a(i[1]),g)),Math.floor(e(c,a(i[2]),a(h[2])-a(i[2]),g)),Math.floor(e(c,a(i[3]),a(h[3])-a(i[3]),g))].join(", ")+")");},get:function(d,c){var e=d._node.getComputedStyle(c);e=(e==="transparent")?"rgb(255, 255, 255)":e;return e;}};b.each(["backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],function(c,d){b.Anim.behaviors[c]=b.Anim.behaviors.color;});},"3.5.1",{requires:["anim-base"]});
YUI.add("anim-color",function(b){var a=Number;b.Anim.behaviors.color={set:function(f,d,i,h,c,g,e){i=b.Color.re_RGB.exec(b.Color.toRGB(i));h=b.Color.re_RGB.exec(b.Color.toRGB(h));if(!i||i.length<3||!h||h.length<3){b.error("invalid from or to passed to color behavior");}f._node.setStyle(d,"rgb("+[Math.floor(e(c,a(i[1]),a(h[1])-a(i[1]),g)),Math.floor(e(c,a(i[2]),a(h[2])-a(i[2]),g)),Math.floor(e(c,a(i[3]),a(h[3])-a(i[3]),g))].join(", ")+")");},get:function(d,c){var e=d._node.getComputedStyle(c);e=(e==="transparent")?"rgb(255, 255, 255)":e;return e;}};b.each(["backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],function(c,d){b.Anim.behaviors[c]=b.Anim.behaviors.color;});},"3.6.0",{requires:["anim-base"]});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
@ -51,4 +51,4 @@ Y.each(['backgroundColor',
);
}, '3.5.1' ,{requires:['anim-base']});
}, '3.6.0' ,{requires:['anim-base']});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
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.5.1' ,{requires:['anim-xy']});
}, '3.6.0' ,{requires:['anim-xy']});

View File

@ -1,7 +1,7 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("anim-curve",function(a){a.Anim.behaviors.curve={set:function(f,c,i,h,b,g,e){i=i.slice.call(i);h=h.slice.call(h);var d=e(b,0,100,g)/100;h.unshift(i);f._node.setXY(a.Anim.getBezier(h,d));},get:function(c,b){return c._node.getXY();}};a.Anim.getBezier=function(f,e){var g=f.length;var d=[];for(var c=0;c<g;++c){d[c]=[f[c][0],f[c][1]];}for(var b=1;b<g;++b){for(c=0;c<g-b;++c){d[c][0]=(1-e)*d[c][0]+e*d[parseInt(c+1,10)][0];d[c][1]=(1-e)*d[c][1]+e*d[parseInt(c+1,10)][1];}}return[d[0][0],d[0][1]];};},"3.5.1",{requires:["anim-xy"]});
YUI.add("anim-curve",function(a){a.Anim.behaviors.curve={set:function(f,c,i,h,b,g,e){i=i.slice.call(i);h=h.slice.call(h);var d=e(b,0,100,g)/100;h.unshift(i);f._node.setXY(a.Anim.getBezier(h,d));},get:function(c,b){return c._node.getXY();}};a.Anim.getBezier=function(f,e){var g=f.length;var d=[];for(var c=0;c<g;++c){d[c]=[f[c][0],f[c][1]];}for(var b=1;b<g;++b){for(c=0;c<g-b;++c){d[c][0]=(1-e)*d[c][0]+e*d[parseInt(c+1,10)][0];d[c][1]=(1-e)*d[c][1]+e*d[parseInt(c+1,10)][1];}}return[d[0][0],d[0][1]];};},"3.6.0",{requires:["anim-xy"]});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
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.5.1' ,{requires:['anim-xy']});
}, '3.6.0' ,{requires:['anim-xy']});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
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.5.1' ,{requires:['anim-base']});
}, '3.6.0' ,{requires:['anim-base']});

View File

@ -1,7 +1,7 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("anim-easing",function(b){var a={easeNone:function(f,e,h,g){return h*f/g+e;},easeIn:function(f,e,h,g){return h*(f/=g)*f+e;},easeOut:function(f,e,h,g){return -h*(f/=g)*(f-2)+e;},easeBoth:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f+e;}return -h/2*((--f)*(f-2)-1)+e;},easeInStrong:function(f,e,h,g){return h*(f/=g)*f*f*f+e;},easeOutStrong:function(f,e,h,g){return -h*((f=f/g-1)*f*f*f-1)+e;},easeBothStrong:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+e;}return -h/2*((f-=2)*f*f*f-2)+e;},elasticIn:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return -(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;},elasticOut:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return f*Math.pow(2,-10*g)*Math.sin((g*j-h)*(2*Math.PI)/i)+k+e;},elasticBoth:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j/2)===2){return e+k;}if(!i){i=j*(0.3*1.5);}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}if(g<1){return -0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i)*0.5+k+e;},backIn:function(f,e,i,h,g){if(g===undefined){g=1.70158;}if(f===h){f-=0.001;}return i*(f/=h)*f*((g+1)*f-g)+e;},backOut:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+e;},backBoth:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+e;}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+e;},bounceIn:function(f,e,h,g){return h-b.Easing.bounceOut(g-f,0,h,g)+e;},bounceOut:function(f,e,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+e;}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+e;}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+e;}}}return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+e;},bounceBoth:function(f,e,h,g){if(f<g/2){return b.Easing.bounceIn(f*2,0,h,g)*0.5+e;}return b.Easing.bounceOut(f*2-g,0,h,g)*0.5+h*0.5+e;}};b.Easing=a;},"3.5.1",{requires:["anim-base"]});
YUI.add("anim-easing",function(b){var a={easeNone:function(f,e,h,g){return h*f/g+e;},easeIn:function(f,e,h,g){return h*(f/=g)*f+e;},easeOut:function(f,e,h,g){return -h*(f/=g)*(f-2)+e;},easeBoth:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f+e;}return -h/2*((--f)*(f-2)-1)+e;},easeInStrong:function(f,e,h,g){return h*(f/=g)*f*f*f+e;},easeOutStrong:function(f,e,h,g){return -h*((f=f/g-1)*f*f*f-1)+e;},easeBothStrong:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+e;}return -h/2*((f-=2)*f*f*f-2)+e;},elasticIn:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return -(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;},elasticOut:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return f*Math.pow(2,-10*g)*Math.sin((g*j-h)*(2*Math.PI)/i)+k+e;},elasticBoth:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j/2)===2){return e+k;}if(!i){i=j*(0.3*1.5);}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}if(g<1){return -0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i)*0.5+k+e;},backIn:function(f,e,i,h,g){if(g===undefined){g=1.70158;}if(f===h){f-=0.001;}return i*(f/=h)*f*((g+1)*f-g)+e;},backOut:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+e;},backBoth:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+e;}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+e;},bounceIn:function(f,e,h,g){return h-b.Easing.bounceOut(g-f,0,h,g)+e;},bounceOut:function(f,e,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+e;}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+e;}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+e;}}}return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+e;},bounceBoth:function(f,e,h,g){if(f<g/2){return b.Easing.bounceIn(f*2,0,h,g)*0.5+e;}return b.Easing.bounceOut(f*2-g,0,h,g)*0.5+h*0.5+e;}};b.Easing=a;},"3.6.0",{requires:["anim-base"]});

View File

@ -1,5 +1,5 @@
/*
YUI 3.5.1 (build 22)
YUI 3.6.0 (build 5521)
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.5.1' ,{requires:['anim-base']});
}, '3.6.0' ,{requires:['anim-base']});

Some files were not shown because too many files have changed in this diff Show More