diff --git a/lib/setup.php b/lib/setup.php
index c8b5626c923..cd652f669b0 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -222,7 +222,7 @@ umask(0000);
// exact version of currently used yui2 and 3 library
$CFG->yui2version = '2.9.0';
-$CFG->yui3version = '3.4.1';
+$CFG->yui3version = '3.5.0';
// special support for highly optimised scripts that do not need libraries and DB connection
diff --git a/lib/thirdpartylibs.xml b/lib/thirdpartylibs.xml
index dfcdf8f7eb7..21241ebe043 100644
--- a/lib/thirdpartylibs.xml
+++ b/lib/thirdpartylibs.xml
@@ -207,7 +207,7 @@
yuiYUIBSD
- 3.4.1
+ 3.5.0
diff --git a/lib/yui/3.4.1/build/anim-base/anim-base-min.js b/lib/yui/3.4.1/build/anim-base/anim-base-min.js
deleted file mode 100644
index 3f14007a298..00000000000
--- a/lib/yui/3.4.1/build/anim-base/anim-base-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-base",function(b){var c="running",n="startTime",l="elapsedTime",j="start",i="tween",m="end",d="node",k="paused",o="reverse",h="iterationCount",a=Number;var f={},e;b.Anim=function(){b.Anim.superclass.constructor.apply(this,arguments);b.Anim._instances[b.stamp(this)]=this;};b.Anim.NAME="anim";b.Anim._instances={};b.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;b.Anim.DEFAULT_UNIT="px";b.Anim.DEFAULT_EASING=function(q,p,s,r){return s*q/r+p;};b.Anim._intervalTime=20;b.Anim.behaviors={left:{get:function(q,p){return q._getOffset(p);}}};b.Anim.behaviors.top=b.Anim.behaviors.left;b.Anim.DEFAULT_SETTER=function(s,t,v,w,y,r,u,x){var q=s._node,p=u(y,a(v),a(w)-a(v),r);if(t in q._node.style||t in b.DOM.CUSTOM_STYLES){x=x||"";q.setStyle(t,p+x);}else{if(q._node.attributes[t]){q.setAttribute(t,p);}else{q.set(t,p);}}};b.Anim.DEFAULT_GETTER=function(r,p){var q=r._node,s="";if(p in q._node.style||p in b.DOM.CUSTOM_STYLES){s=q.getComputedStyle(p);}else{if(q._node.attributes[p]){s=q.getAttribute(p);}else{s=q.get(p);}}return s;};b.Anim.ATTRS={node:{setter:function(p){if(p){if(typeof p=="string"||p.nodeType){p=b.one(p);}}this._node=p;if(!p){}return p;}},duration:{value:1},easing:{value:b.Anim.DEFAULT_EASING,setter:function(p){if(typeof p==="string"&&b.Easing){return b.Easing[p];}}},from:{},to:{},startTime:{value:0,readOnly:true},elapsedTime:{value:0,readOnly:true},running:{getter:function(){return !!f[b.stamp(this)];},value:false,readOnly:true},iterations:{value:1},iterationCount:{value:0,readOnly:true},direction:{value:"normal"},paused:{readOnly:true,value:false},reverse:{value:false}};b.Anim.run=function(){var q=b.Anim._instances;for(var p in q){if(q[p].run){q[p].run();}}};b.Anim.pause=function(){for(var p in f){if(f[p].pause){f[p].pause();}}b.Anim._stopTimer();};b.Anim.stop=function(){for(var p in f){if(f[p].stop){f[p].stop();}}b.Anim._stopTimer();};b.Anim._startTimer=function(){if(!e){e=setInterval(b.Anim._runFrame,b.Anim._intervalTime);}};b.Anim._stopTimer=function(){clearInterval(e);e=0;};b.Anim._runFrame=function(){var p=true;for(var q in f){if(f[q]._runFrame){p=false;f[q]._runFrame();}}if(p){b.Anim._stopTimer();}};b.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var g={run:function(){if(this.get(k)){this._resume();}else{if(!this.get(c)){this._start();}}return this;},pause:function(){if(this.get(c)){this._pause();}return this;},stop:function(p){if(this.get(c)||this.get(k)){this._end(p);}return this;},_added:false,_start:function(){this._set(n,new Date()-this.get(l));this._actualFrames=0;if(!this.get(k)){this._initAnimAttr();}f[b.stamp(this)]=this;b.Anim._startTimer();this.fire(j);},_pause:function(){this._set(n,null);this._set(k,true);delete f[b.stamp(this)];this.fire("pause");},_resume:function(){this._set(k,false);f[b.stamp(this)]=this;this._set(n,new Date()-this.get(l));b.Anim._startTimer();this.fire("resume");},_end:function(p){var q=this.get("duration")*1000;if(p){this._runAttrs(q,q,this.get(o));}this._set(n,null);this._set(l,0);this._set(k,false);delete f[b.stamp(this)];this.fire(m,{elapsed:this.get(l)});},_runFrame:function(){var u=this._runtimeAttr.duration,r=new Date()-this.get(n),q=this.get(o),p=(r>=u),s,v;this._runAttrs(r,u,q);this._actualFrames+=1;this._set(l,r);this.fire(i);if(p){this._lastFrame();}},_runAttrs:function(A,z,w){var x=this._runtimeAttr,r=b.Anim.behaviors,y=x.easing,p=z,u=false,q,s,v;if(A>=z){u=true;}if(w){A=z-A;p=0;}for(v in x){if(x[v].to){q=x[v];s=(v in r&&"set" in r[v])?r[v].set:b.Anim.DEFAULT_SETTER;if(!u){s(this,v,q.from,q.to,A,z,y,q.unit);}else{s(this,v,q.from,q.to,p,z,y,q.unit);}}}},_lastFrame:function(){var p=this.get("iterations"),q=this.get(h);q+=1;if(p==="infinite"||q
-1&&e>0){for(;g>-1;--g){if(g in f&&f[g]===j){return g;}}}return -1;};a.unique=function(f,l){var k=0,e=f.length,h=[],m,g;for(;k-1;--g){if(m===h[g]){break;}}if(g===-1){h.push(m);}}if(l){if(b.isNumber(h[0])){h.sort(a.numericSort);}else{h.sort();}}return h;};a.filter=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.yui3-menu-content>ul:after{content:"";display:block;clear:both;line-height:0;font-size:0;visibility:hidden}.yui3-menu-content{*zoom:1}.yui3-menu-hidden .yui3-menu-content{*zoom:normal}.yui3-menuitem-content,.yui3-menu-label{_zoom:1}.yui3-menu-hidden .yui3-menuitem-content,.yui3-menu-hidden .yui3-menu-label{_zoom:normal}.yui3-skin-sam .yui3-menu-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-content{font-size:93%;line-height:1.5;*line-height:1.45;border:solid 1px #808080;background:#fff;padding:3px 0}.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-content{font-size:100%}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-content{line-height:2;*line-height:1.9;background:url(sprite.png) repeat-x 0 0;padding:0}.yui3-skin-sam .yui3-menu ul,.yui3-skin-sam .yui3-menu ul ul{margin-top:3px;padding-top:3px;border-top:solid 1px #ccc}.yui3-skin-sam .yui3-menu ul.first-of-type{border:0;margin:0;padding:0}.yui3-skin-sam .yui3-menu-horizontal ul{padding:0;margin:0;border:0}.yui3-skin-sam .yui3-menu li,.yui3-skin-sam .yui3-menu .yui3-menu li{_border-bottom:solid 1px #fff}.yui3-skin-sam .yui3-menu-horizontal li{_border-bottom:0}.yui3-skin-sam .yui3-menubuttonnav li{border-right:solid 1px #ccc}.yui3-skin-sam .yui3-splitbuttonnav li{border-right:solid 1px #808080}.yui3-skin-sam .yui3-menubuttonnav li li,.yui3-skin-sam .yui3-splitbuttonnav li li{border-right:0}.yui3-skin-sam .yui3-menu-label,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label,.yui3-skin-sam .yui3-menuitem-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-content{padding:0 20px;color:#000;text-decoration:none;cursor:default;float:none;border:0;margin:0}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content{padding:0 10px;border-style:solid;border-color:#808080;border-width:1px 0;margin:-1px 0;float:left;width:auto}.yui3-skin-sam .yui3-menu-label,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label{background:url(vertical-menu-submenu-indicator.png) right center no-repeat}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label{background:url(sprite.png) repeat-x 0 0}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label{background-image:none}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label{padding-right:0}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label em{font-style:normal;padding-right:20px;display:block;background:url(horizontal-menu-submenu-indicator.png) right center no-repeat}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label{padding:0}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label a{float:left;width:auto;color:#000;text-decoration:none;cursor:default;padding:0 5px 0 10px}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle{padding:0;border-left:solid 1px #ccc;width:15px;overflow:hidden;text-indent:-1000px;background:url(horizontal-menu-submenu-indicator.png) 3px center no-repeat}.yui3-skin-sam .yui3-menu-label-active,.yui3-skin-sam .yui3-menu-label-menuvisible,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-active,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-menuvisible{background-color:#b3d4ff}.yui3-skin-sam .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content{background-image:none;background-color:#b3d4ff;border-left-width:0;margin-left:0}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-active,.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-menuvisible{border-color:#7d98b8;background:url(sprite.png) repeat-x 0 -1700px}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label-active,.yui3-skin-sam .yui3-menubuttonnav .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label-menuvisible,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-active,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible{border-left-width:1px;margin-left:-1px}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible{border-color:#808080;background:transparent}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle{border-color:#7d98b8;background:url(horizontal-menu-submenu-toggle.png) left center no-repeat}
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/panel.css b/lib/yui/3.4.1/build/assets/skins/sam/panel.css
deleted file mode 100644
index 3c8b32bbbe1..00000000000
--- a/lib/yui/3.4.1/build/assets/skins/sam/panel.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-panel{position:absolute}.yui3-panel-hidden{visibility:hidden}.yui3-widget-tmp-forcesize .yui3-panel-content{overflow:hidden!important}.yui3-panel .yui3-widget-hd{position:relative}.yui3-panel .yui3-widget-hd .yui3-widget-button-wrapper{position:absolute;top:0;right:0}.yui3-panel .yui3-widget-ft .yui3-widget-button-wrapper{display:inline-block;*display:inline;zoom:1}.yui3-skin-sam .yui3-widget-mask{background-color:black;zoom:1;-ms-filter:"alpha(opacity=70)";filter:alpha(opacity=70);opacity:.7}.yui3-skin-sam .yui3-panel-content{-webkit-box-shadow:0 0 5px #333;-moz-box-shadow:0 0 5px #333;box-shadow:0 0 5px #333;border:1px solid black;background:white}.yui3-skin-sam .yui3-panel-content .yui3-widget-hd{padding:8px 28px 8px 8px;min-height:13px;_height:13px;color:white;background-color:#3961c5;background:-moz-linear-gradient(0% 100% 90deg,#2647a0 7%,#3d67ce 50%,#426fd9 100%);background:-webkit-gradient(linear,left bottom,left top,from(#2647a0),color-stop(0.07,#2647a0),color-stop(0.5,#3d67ce),to(#426fd9))}.yui3-skin-sam .yui3-panel-content .yui3-widget-hd .yui3-widget-button-wrapper{padding:8px}.yui3-skin-sam .yui3-panel-content .yui3-widget-bd{padding:10px}.yui3-skin-sam .yui3-panel-content .yui3-widget-ft{background:#edf5ff;padding:8px;text-align:right}.yui3-skin-sam .yui3-panel-content .yui3-widget-ft .yui3-button{padding:2px 8px;margin:0 3px;border:1px solid gray;-moz-border-radius:.435em;-webkit-border-radius:.435em;border-radius:.435em;color:black;background:#d8d8da;background:-moz-linear-gradient(0% 100% 90deg,#d8d8da 18%,#f1f2f2 50%,white 100%);background:-webkit-gradient(linear,left bottom,left top,from(#d8d8da),color-stop(0.18,#d8d8da),color-stop(0.5,#f1f2f2),to(white))}
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/rail-x-lines.png b/lib/yui/3.4.1/build/assets/skins/sam/rail-x-lines.png
deleted file mode 100644
index c1e9465df1b..00000000000
Binary files a/lib/yui/3.4.1/build/assets/skins/sam/rail-x-lines.png and /dev/null differ
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/rail-x.png b/lib/yui/3.4.1/build/assets/skins/sam/rail-x.png
deleted file mode 100644
index 2077d968dca..00000000000
Binary files a/lib/yui/3.4.1/build/assets/skins/sam/rail-x.png and /dev/null differ
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/rail-y-lines.png b/lib/yui/3.4.1/build/assets/skins/sam/rail-y-lines.png
deleted file mode 100644
index 3749aafc36c..00000000000
Binary files a/lib/yui/3.4.1/build/assets/skins/sam/rail-y-lines.png and /dev/null differ
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/rail-y.png b/lib/yui/3.4.1/build/assets/skins/sam/rail-y.png
deleted file mode 100644
index bf613e662ef..00000000000
Binary files a/lib/yui/3.4.1/build/assets/skins/sam/rail-y.png and /dev/null differ
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/tabview.css b/lib/yui/3.4.1/build/assets/skins/sam/tabview.css
deleted file mode 100644
index 07a1c6115e7..00000000000
--- a/lib/yui/3.4.1/build/assets/skins/sam/tabview.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-tab-panel{display:none}.yui3-tab-panel-selected{display:block}.yui3-tabview-list,.yui3-tab{margin:0;padding:0;list-style:none}.yui3-tabview{position:relative}.yui3-tabview,.yui3-tabview-list,.yui3-tabview-panel,.yui3-tab,.yui3-tab-panel{zoom:1}.yui3-tab{display:inline-block;*display:inline;vertical-align:bottom;cursor:pointer}.yui3-tab-label{display:block;display:inline-block;padding:6px 10px;position:relative;text-decoration:none;vertical-align:bottom}.yui3-skin-sam .yui3-tabview-list{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui3-skin-sam .yui3-tab{margin:0 .2em 0 0;padding:1px 0 0;zoom:1}.yui3-skin-sam .yui3-tab-selected{margin-bottom:-1px}.yui3-skin-sam .yui3-tab-label{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:1px 1px 0 1px;color:#000;cursor:hand;font-size:85%;padding:.3em .75em;text-decoration:none}.yui3-skin-sam .yui3-tab-label:hover,.yui3-skin-sam .yui3-tab-label:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:focus,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{padding:.4em .75em}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{border-color:#243356}.yui3-skin-sam .yui3-tabview-panel{background:#edf5ff}.yui3-skin-sam .yui3-tabview-panel{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/thumb-x.png b/lib/yui/3.4.1/build/assets/skins/sam/thumb-x.png
deleted file mode 100644
index aa2a2294950..00000000000
Binary files a/lib/yui/3.4.1/build/assets/skins/sam/thumb-x.png and /dev/null differ
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/thumb-y.png b/lib/yui/3.4.1/build/assets/skins/sam/thumb-y.png
deleted file mode 100644
index 314c8d144f4..00000000000
Binary files a/lib/yui/3.4.1/build/assets/skins/sam/thumb-y.png and /dev/null differ
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/vertical-menu-submenu-indicator.png b/lib/yui/3.4.1/build/assets/skins/sam/vertical-menu-submenu-indicator.png
deleted file mode 100644
index 8a8a1aff748..00000000000
Binary files a/lib/yui/3.4.1/build/assets/skins/sam/vertical-menu-submenu-indicator.png and /dev/null differ
diff --git a/lib/yui/3.4.1/build/assets/skins/sam/widget-buttons.css b/lib/yui/3.4.1/build/assets/skins/sam/widget-buttons.css
deleted file mode 100644
index f0a3654c4e5..00000000000
--- a/lib/yui/3.4.1/build/assets/skins/sam/widget-buttons.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-widget-buttons .yui3-button{display:inline-block;*display:inline;zoom:1;cursor:pointer;text-decoration:none}.yui3-widget-buttons .yui3-button-close,.yui3-widget-buttons .yui3-button-close .yui3-button-content,.yui3-widget-buttons .yui3-button-close .yui3-button-icon{display:inline-block;*display:inline;zoom:1;width:13px;height:13px;line-height:13px;vertical-align:top}.yui3-widget-buttons .yui3-button-close .yui3-button-icon{background-repeat:no-repeat;background-position:1px 1px}.yui3-skin-sam .yui3-widget-buttons .yui3-button-icon{background-image:url(sprite_icons.gif)}
diff --git a/lib/yui/3.4.1/build/attribute-base/attribute-base-min.js b/lib/yui/3.4.1/build/attribute-base/attribute-base-min.js
deleted file mode 100644
index 35f81a81f8d..00000000000
--- a/lib/yui/3.4.1/build/attribute-base/attribute-base-min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("attribute-base",function(c){c.State=function(){this.data={};};c.State.prototype={add:function(B,C,E){var D=this.data;D[C]=D[C]||{};D[C][B]=E;},addAll:function(B,D){var C;for(C in D){if(D.hasOwnProperty(C)){this.add(B,C,D[C]);}}},remove:function(B,C){var D=this.data;if(D[C]&&(B in D[C])){delete D[C][B];}},removeAll:function(B,D){var C=this.data;c.each(D||C,function(F,E){if(c.Lang.isString(E)){this.remove(B,E);}else{this.remove(B,F);}},this);},get:function(B,C){var D=this.data;return(D[C]&&B in D[C])?D[C][B]:undefined;},getAll:function(B){var D=this.data,C;c.each(D,function(F,E){if(B in D[E]){C=C||{};C[E]=F[B];}},this);return C;}};var k=c.Object,f=c.Lang,l=c.EventTarget,w=".",t="Change",n="getter",m="setter",o="readOnly",x="writeOnce",u="initOnly",A="validator",h="value",p="valueFn",e="broadcast",r="lazyAdd",j="_bypassProxy",z="added",b="initializing",i="initValue",v="published",s="defaultValue",a="lazy",q="isLazyAdd",g,y={};y[o]=1;y[x]=1;y[n]=1;y[e]=1;function d(C,B,D){var E=this;E._ATTR_E_FACADE={};l.call(E,{emitFacade:true});E._conf=E._state=new c.State();E._stateProxy=E._stateProxy||null;E._requireAddAttr=E._requireAddAttr||false;this._initAttrs(C,B,D);}d.INVALID_VALUE={};g=d.INVALID_VALUE;d._ATTR_CFG=[m,n,A,h,p,x,o,r,e,j];d.prototype={addAttr:function(C,B,E){var F=this,H=F._state,G,D;E=(r in B)?B[r]:E;if(E&&!F.attrAdded(C)){H.add(C,a,B||{});H.add(C,z,true);}else{if(!F.attrAdded(C)||H.get(C,q)){B=B||{};D=(h in B);if(D){G=B.value;delete B.value;}B.added=true;B.initializing=true;H.addAll(C,B);if(D){F.set(C,G);}H.remove(C,b);}}return F;},attrAdded:function(B){return !!this._state.get(B,z);},modifyAttr:function(C,B){var D=this,F,E;if(D.attrAdded(C)){if(D._isLazyAttr(C)){D._addLazyAttr(C);}E=D._state;for(F in B){if(y[F]&&B.hasOwnProperty(F)){E.add(C,F,B[F]);if(F===e){E.remove(C,v);}}}}},removeAttr:function(B){this._state.removeAll(B);},get:function(B){return this._getAttr(B);},_isLazyAttr:function(B){return this._state.get(B,a);},_addLazyAttr:function(C){var D=this._state,B=D.get(C,a);D.add(C,q,true);D.remove(C,a);this.addAttr(C,B);},set:function(B,D,C){return this._setAttr(B,D,C);},reset:function(B){var D=this,C;if(B){if(D._isLazyAttr(B)){D._addLazyAttr(B);}D.set(B,D._state.get(B,i));}else{C=D._state.data.added;c.each(C,function(E,F){D.reset(F);},D);}return D;},_set:function(B,D,C){return this._setAttr(B,D,C,true);},_getAttr:function(D){var E=this,I=D,F=E._state,G,B,H,C;if(D.indexOf(w)!==-1){G=D.split(w);D=G.shift();}if(E._tCfgs&&E._tCfgs[D]){C={};C[D]=E._tCfgs[D];delete E._tCfgs[D];E._addAttrs(C,E._tVals);}if(E._isLazyAttr(D)){E._addLazyAttr(D);}H=E._getStateVal(D);B=F.get(D,n);if(B&&!B.call){B=this[B];}H=(B)?B.call(E,H,I):H;H=(G)?k.getValue(H,G):H;return H;},_setAttr:function(D,G,B,E){var K=true,C=this._state,H=this._stateProxy,M=C.data,J,N,O,F,I,L;if(D.indexOf(w)!==-1){N=D;O=D.split(w);D=O.shift();}if(this._isLazyAttr(D)){this._addLazyAttr(D);}J=(!M.value||!(D in M.value));if(H&&D in H&&!this._state.get(D,j)){J=false;}if(this._requireAddAttr&&!this.attrAdded(D)){}else{I=C.get(D,x);L=C.get(D,b);if(!J&&!E){if(I){K=false;}if(C.get(D,o)){K=false;}}if(!L&&!E&&I===u){K=false;}if(K){if(!J){F=this.get(D);}if(O){G=k.setValue(c.clone(F),O,G);if(G===undefined){K=false;}}if(K){if(L){this._setAttrVal(D,N,F,G);}else{this._fireAttrChange(D,N,F,G,B);}}}}return this;},_fireAttrChange:function(H,G,E,D,B){var J=this,F=H+t,C=J._state,I;if(!C.get(H,v)){J.publish(F,{queuable:false,defaultTargetOnly:true,defaultFn:J._defAttrChangeFn,silent:true,broadcast:C.get(H,e)});C.add(H,v,true);}I=(B)?c.merge(B):J._ATTR_E_FACADE;I.attrName=H;I.subAttrName=G;I.prevVal=E;I.newVal=D;J.fire(F,I);},_defAttrChangeFn:function(B){if(!this._setAttrVal(B.attrName,B.subAttrName,B.prevVal,B.newVal)){B.stopImmediatePropagation();}else{B.newVal=this.get(B.attrName);}},_getStateVal:function(B){var C=this._stateProxy;return C&&(B in C)&&!this._state.get(B,j)?C[B]:this._state.get(B,h);},_setStateVal:function(B,D){var C=this._stateProxy;if(C&&(B in C)&&!this._state.get(B,j)){C[B]=D;}else{this._state.add(B,h,D);}},_setAttrVal:function(M,L,I,G){var O=this,J=true,D=O._state,E=D.get(M,A),H=D.get(M,m),K=D.get(M,b),N=this._getStateVal(M),C=L||M,F,B;if(E){if(!E.call){E=this[E];}if(E){B=E.call(O,G,C);if(!B&&K){G=D.get(M,s);B=true;}}}if(!E||B){if(H){if(!H.call){H=this[H];}if(H){F=H.call(O,G,C);if(F===g){J=false;}else{if(F!==undefined){G=F;}}}}if(J){if(!L&&(G===N)&&!f.isObject(G)){J=false;}else{if(D.get(M,i)===undefined){D.add(M,i,G);}O._setStateVal(M,G);}}}else{J=false;}return J;},setAttrs:function(B,C){return this._setAttrs(B,C);},_setAttrs:function(C,D){for(var B in C){if(C.hasOwnProperty(B)){this.set(B,C[B]);}}return this;},getAttrs:function(B){return this._getAttrs(B);},_getAttrs:function(E){var G=this,I={},F,C,B,H,D=(E===true);E=(E&&!D)?E:k.keys(G._state.data.added);for(F=0,C=E.length;FY.Base extension that provides core autocomplete logic (but no
- * UI implementation) for a text input field or textarea. Must be mixed into a
- * Y.Base-derived class to be useful.
- *
- * @submodule autocomplete-base
- */
-
-/**
- *
- * Extension that provides core autocomplete logic (but no UI implementation)
- * for a text input field or textarea.
- *
- *
- *
- * The AutoCompleteBase class provides events and attributes that
- * abstract away core autocomplete logic and configuration, but does not provide
- * a widget implementation or suggestion UI. For a prepackaged autocomplete
- * widget, see AutoCompleteList.
- *
- *
- *
- * This extension cannot be instantiated directly, since it doesn't provide an
- * actual implementation. It's intended to be mixed into a
- * Y.Base-based class or widget.
- *
- *
- * @preventable _defClearFn
- */
- this.publish(EVT_CLEAR, {
- defaultFn: this._defClearFn
- });
-
- /**
- * Fires when the contents of the input field have changed and the input
- * value meets the criteria necessary to generate an autocomplete query.
- *
- * @event query
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- *
- *
inputValue (String)
- *
- * Full contents of the text input field or textarea that generated
- * the query.
- *
- *
- *
query (String)
- *
- * Autocomplete query. This is the string that will be used to
- * request completion results. It may or may not be the same as
- * inputValue.
- *
- *
- *
- * @preventable _defQueryFn
- */
- this.publish(EVT_QUERY, {
- defaultFn: this._defQueryFn
- });
-
- /**
- * Fires after query results are received from the source. If
- * no source has been set, this event will not fire.
- *
- * @event results
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- *
- *
data (Array|Object)
- *
- * Raw, unfiltered result data (if available).
- *
- *
- *
query (String)
- *
- * Query that generated these results.
- *
- *
- *
results (Array)
- *
- * Array of filtered, formatted, and highlighted results. Each item in
- * the array is an object with the following properties:
- *
- *
- *
display (Node|HTMLElement|String)
- *
- * Formatted result HTML suitable for display to the user. If no
- * custom formatter is set, this will be an HTML-escaped version of
- * the string in the text property.
- *
- *
- *
highlighted (String)
- *
- * Highlighted (but not formatted) result text. This property will
- * only be set if a highlighter is in use.
- *
- *
- *
raw (mixed)
- *
- * Raw, unformatted result in whatever form it was provided by the
- * source.
- *
- *
- *
text (String)
- *
- * Plain text version of the result, suitable for being inserted
- * into the value of a text input field or textarea when the result
- * is selected by a user. This value is not HTML-escaped and should
- * not be inserted into the page using innerHTML.
- *
- *
- *
- *
- *
- * @preventable _defResultsFn
- */
- this.publish(EVT_RESULTS, {
- defaultFn: this._defResultsFn
- });
-}
-
-// -- Public Static Properties -------------------------------------------------
-AutoCompleteBase.ATTRS = {
- /**
- * Whether or not to enable the browser's built-in autocomplete
- * functionality for input fields.
- *
- * @attribute allowBrowserAutocomplete
- * @type Boolean
- * @default false
- */
- allowBrowserAutocomplete: {
- value: false
- },
-
- /**
- * When a queryDelimiter is set, trailing delimiters will
- * automatically be stripped from the input value by default when the
- * input node loses focus. Set this to true to allow trailing
- * delimiters.
- *
- * @attribute allowTrailingDelimiter
- * @type Boolean
- * @default false
- */
- allowTrailingDelimiter: {
- value: false
- },
-
- /**
- * Node to monitor for changes, which will generate query
- * events when appropriate. May be either an input field or a textarea.
- *
- * @attribute inputNode
- * @type Node|HTMLElement|String
- * @writeonce
- */
- inputNode: {
- setter: Y.one,
- writeOnce: 'initOnly'
- },
-
- /**
- * Maximum number of results to return. A value of 0 or less
- * will allow an unlimited number of results.
- *
- * @attribute maxResults
- * @type Number
- * @default 0
- */
- maxResults: {
- value: 0
- },
-
- /**
- * Minimum number of characters that must be entered before a
- * query event will be fired. A value of 0
- * allows empty queries; a negative value will effectively disable all
- * query events.
- *
- * @attribute minQueryLength
- * @type Number
- * @default 1
- */
- minQueryLength: {
- value: 1
- },
-
- /**
- *
- * Current query, or null if there is no current query.
- *
- *
- *
- * The query might not be the same as the current value of the input
- * node, both for timing reasons (due to queryDelay) and
- * because when one or more queryDelimiter separators are
- * in use, only the last portion of the delimited input string will be
- * used as the query value.
- *
- * Number of milliseconds to delay after input before triggering a
- * query event. If new input occurs before this delay is
- * over, the previous input event will be ignored and a new delay will
- * begin.
- *
- *
- *
- * This can be useful both to throttle queries to a remote data source
- * and to avoid distracting the user by showing them less relevant
- * results before they've paused their typing.
- *
- *
- * @attribute queryDelay
- * @type Number
- * @default 100
- */
- queryDelay: {
- value: 100
- },
-
- /**
- * Query delimiter string. When a delimiter is configured, the input value
- * will be split on the delimiter, and only the last portion will be used in
- * autocomplete queries and updated when the query attribute is
- * modified.
- *
- * @attribute queryDelimiter
- * @type String|null
- * @default null
- */
- queryDelimiter: {
- value: null
- },
-
- /**
- *
- * Source request template. This can be a function that accepts a query as a
- * parameter and returns a request string, or it can be a string containing
- * the placeholder "{query}", which will be replaced with the actual
- * URI-encoded query. In either case, the resulting string will be appended
- * to the request URL when the source attribute is set to a
- * remote DataSource, JSONP URL, or XHR URL (it will not be appended to YQL
- * URLs).
- *
- *
- *
- * While requestTemplate may be set to either a function or
- * a string, it will always be returned as a function that accepts a
- * query argument and returns a string.
- *
- * Array of local result filter functions. If provided, each filter
- * will be called with two arguments when results are received: the query
- * and an array of result objects. See the documentation for the
- * results event for a list of the properties available on each
- * result object.
- *
- *
- *
- * Each filter is expected to return a filtered or modified version of the
- * results array, which will then be passed on to subsequent filters, then
- * the resultHighlighter function (if set), then the
- * resultFormatter function (if set), and finally to
- * subscribers to the results event.
- *
- *
- *
- * If no source is set, result filters will not be called.
- *
- *
- *
- * Prepackaged result filters provided by the autocomplete-filters and
- * autocomplete-filters-accentfold modules can be used by specifying the
- * filter name as a string, such as 'phraseMatch' (assuming
- * the necessary filters module is loaded).
- *
- * Function which will be used to format results. If provided, this function
- * will be called with two arguments after results have been received and
- * filtered: the query and an array of result objects. The formatter is
- * expected to return an array of HTML strings or Node instances containing
- * the desired HTML for each result.
- *
- *
- *
- * See the documentation for the results event for a list of
- * the properties available on each result object.
- *
- *
- *
- * If no source is set, the formatter will not be called.
- *
- * Function which will be used to highlight results. If provided, this
- * function will be called with two arguments after results have been
- * received and filtered: the query and an array of filtered result objects.
- * The highlighter is expected to return an array of highlighted result
- * text in the form of HTML strings.
- *
- *
- *
- * See the documentation for the results event for a list of
- * the properties available on each result object.
- *
- *
- *
- * If no source is set, the highlighter will not be called.
- *
- * Locator that should be used to extract an array of results from a
- * non-array response.
- *
- *
- *
- * By default, no locator is applied, and all responses are assumed to be
- * arrays by default. If all responses are already arrays, you don't need to
- * define a locator.
- *
- *
- *
- * The locator may be either a function (which will receive the raw response
- * as an argument and must return an array) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * result.foo.bar.baz if the response is an object).
- *
- *
- *
- * While resultListLocator may be set to either a function or a
- * string, it will always be returned as a function that accepts a response
- * argument and returns an array.
- *
- * Locator that should be used to extract a plain text string from a
- * non-string result item. The resulting text value will typically be the
- * value that ends up being inserted into an input field or textarea when
- * the user of an autocomplete implementation selects a result.
- *
- *
- *
- * By default, no locator is applied, and all results are assumed to be
- * plain text strings. If all results are already plain text strings, you
- * don't need to define a locator.
- *
- *
- *
- * The locator may be either a function (which will receive the raw result
- * as an argument and must return a string) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * result.foo.bar.baz if the result is an object).
- *
- *
- *
- * While resultTextLocator may be set to either a function or a
- * string, it will always be returned as a function that accepts a result
- * argument and returns a string.
- *
- * The full array will be provided to any configured filters for each
- * query. This is an easy way to create a fully client-side autocomplete
- * implementation.
- *
- *
- *
- *
DataSource
- *
- *
- * A DataSource instance or other object that provides a
- * DataSource-like sendRequest method. See the
- * DataSource documentation for details.
- *
- * A function source will be called with the current query and a
- * callback function as parameters, and should either return an array of
- * results (for synchronous operation) or return nothing and pass an
- * array of results to the provided callback (for asynchronous
- * operation).
- *
- *
- *
- *
Object
- *
- *
- * Example:{foo: ['foo result 1', 'foo result 2'], bar: ['bar result']}
- *
- *
- *
- * An object will be treated as a query hashmap. If a property on the
- * object matches the current query, the value of that property will be
- * used as the response.
- *
- *
- *
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a resultListLocator to
- * process the response and return an array.
- *
- *
- *
- *
- *
- * If the optional autocomplete-sources module is loaded, then
- * the following additional source types will be supported as well:
- *
- *
- *
- *
<select> Node
- *
- *
- * You may provide a YUI Node instance wrapping a <select>
- * element, and the options in the list will be used as results. You
- * will also need to specify a resultTextLocator of 'text'
- * or 'value', depending on what you want to use as the text of the
- * result.
- *
- *
- *
- * Each result will be an object with the following properties:
- *
- *
- *
- *
html (String)
- *
- *
HTML content of the <option> element.
- *
- *
- *
index (Number)
- *
- *
Index of the <option> element in the list.
- *
- *
- *
node (Y.Node)
- *
- *
Node instance referring to the original <option> element.
- *
- *
- *
selected (Boolean)
- *
- *
Whether or not this item is currently selected in the
- * <select> list.
- * If a URL with a {callback} placeholder is provided, it
- * will be used to make a JSONP request. The {query}
- * placeholder will be replaced with the current query, and the
- * {callback} placeholder will be replaced with an
- * internally-generated JSONP callback name. Both placeholders must
- * appear in the URL, or the request will fail. An optional
- * {maxResults} placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- *
- *
- *
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a resultListLocator to
- * process the response and return an array.
- *
- *
- *
- * The jsonp module must be loaded in order for
- * JSONP URL sources to work. If the jsonp module
- * is not already loaded, it will be loaded on demand if possible.
- *
- * If a URL without a {callback} placeholder is provided,
- * it will be used to make a same-origin XHR request. The
- * {query} placeholder will be replaced with the current
- * query. An optional {maxResults} placeholder may also be
- * provided, and will be replaced with the value of the maxResults
- * attribute (or 1000 if the maxResults attribute is 0 or less).
- *
- *
- *
- * The response is assumed to be a JSON array of results by default. If
- * the response is a JSON object and not an array, provide a
- * resultListLocator to process the response and return an
- * array. If the response is in some form other than JSON, you will
- * need to use a custom DataSource instance as the source.
- *
- *
- *
- * The io-base and json-parse modules
- * must be loaded in order for XHR URL sources to work. If
- * these modules are not already loaded, they will be loaded on demand
- * if possible.
- *
- *
- *
- *
String (YQL query)
- *
- *
- * Example:'select * from search.suggest where query="{query}"'
- *
- *
- *
- * If a YQL query is provided, it will be used to make a YQL request.
- * The {query} placeholder will be replaced with the
- * current autocomplete query. This placeholder must appear in the YQL
- * query, or the request will fail. An optional
- * {maxResults} placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- *
- *
- *
- * The yql module must be loaded in order for YQL
- * sources to work. If the yql module is not
- * already loaded, it will be loaded on demand if possible.
- *
- *
- *
- *
- *
- * As an alternative to providing a source, you could simply listen for
- * query events and handle them any way you see fit. Providing
- * a source is optional, but will usually be simpler.
- *
- * May be used to force a specific source type, overriding the automatic
- * source type detection. It should almost never be necessary to do this,
- * but as they taught us in the Boy Scouts, one should always be prepared,
- * so it's here if you need it. Be warned that if you set this attribute and
- * something breaks, it's your own fault.
- *
- * If the autocomplete-sources module is loaded, the following
- * additional source types are supported: 'io', 'jsonp', 'select',
- * 'string', 'yql'
- *
- *
- * @attribute sourceType
- * @type String
- */
- sourceType: {
- value: null
- },
-
- /**
- * If the inputNode specified at instantiation time has a
- * node-tokeninput plugin attached to it, this attribute will
- * be a reference to the Y.Plugin.TokenInput instance.
- *
- * @attribute tokenInput
- * @type Plugin.TokenInput
- * @readonly
- */
- tokenInput: {
- readOnly: true
- },
-
- /**
- * Current value of the input node.
- *
- * @attribute value
- * @type String
- * @default ''
- */
- value: {
- // Why duplicate this._inputNode.get('value')? Because we need a
- // reliable way to track the source of value changes. We want to perform
- // completion when the user changes the value, but not when we change
- // the value.
- value: ''
- }
-};
-
-AutoCompleteBase.CSS_PREFIX = 'ac';
-AutoCompleteBase.UI_SRC = (Y.Widget && Y.Widget.UI_SRC) || 'ui';
-
-/**
- * Mapping of built-in source types to their setter functions. DataSource
- * instances and DataSource-like objects are handled natively, so are not
- * mapped here.
- *
- * @property SOURCE_TYPES
- * @type {Object}
- * @static
- */
-AutoCompleteBase.SOURCE_TYPES = {
- array : '_createArraySource',
- 'function': '_createFunctionSource',
- object : '_createObjectSource'
-};
-
-AutoCompleteBase.prototype = {
- // -- Public Prototype Methods ---------------------------------------------
-
- /**
- *
- * Sends a request to the configured source. If no source is configured,
- * this method won't do anything.
- *
- *
- *
- * Usually there's no reason to call this method manually; it will be
- * called automatically when user input causes a query event to
- * be fired. The only time you'll need to call this method manually is if
- * you want to force a request to be sent when no user input has occurred.
- *
- *
- * @method sendRequest
- * @param {String} query (optional) Query to send. If specified, the
- * query attribute will be set to this query. If not
- * specified, the current value of the query attribute will
- * be used.
- * @param {Function} requestTemplate (optional) Request template function.
- * If not specified, the current value of the requestTemplate
- * attribute will be used.
- * @chainable
- */
- sendRequest: function (query, requestTemplate) {
- var request,
- source = this.get('source');
-
- if (query || query === '') {
- this._set(QUERY, query);
- } else {
- query = this.get(QUERY) || '';
- }
-
- if (source) {
- if (!requestTemplate) {
- requestTemplate = this.get(REQUEST_TEMPLATE);
- }
-
- request = requestTemplate ?
- requestTemplate.call(this, query) : query;
-
- Y.log('sendRequest: ' + request, 'info', 'autocomplete-base');
-
- source.sendRequest({
- query : query,
- request: request,
-
- callback: {
- success: Y.bind(this._onResponse, this, query)
- }
- });
- }
-
- return this;
- },
-
- // -- Protected Lifecycle Methods ------------------------------------------
-
- /**
- * Attaches event listeners and behaviors.
- *
- * @method _bindUIACBase
- * @protected
- */
- _bindUIACBase: function () {
- var inputNode = this.get(INPUT_NODE),
- tokenInput = inputNode && inputNode.tokenInput;
-
- // If the inputNode has a node-tokeninput plugin attached, bind to the
- // plugin's inputNode instead.
- if (tokenInput) {
- inputNode = tokenInput.get(INPUT_NODE);
- this._set('tokenInput', tokenInput);
- }
-
- if (!inputNode) {
- Y.error('No inputNode specified.');
- return;
- }
-
- this._inputNode = inputNode;
-
- this._acBaseEvents = new Y.EventHandle([
- // This is the valueChange event on the inputNode, provided by the
- // event-valuechange module, not our own valueChange.
- inputNode.on(VALUE_CHANGE, this._onInputValueChange, this),
- inputNode.on('blur', this._onInputBlur, this),
-
- this.after(ALLOW_BROWSER_AC + 'Change', this._syncBrowserAutocomplete),
- this.after('sourceTypeChange', this._afterSourceTypeChange),
- this.after(VALUE_CHANGE, this._afterValueChange)
- ]);
- },
-
- /**
- * Detaches AutoCompleteBase event listeners.
- *
- * @method _destructorACBase
- * @protected
- */
- _destructorACBase: function () {
- this._acBaseEvents.detach();
- },
-
- /**
- * Synchronizes the UI state of the inputNode.
- *
- * @method _syncUIACBase
- * @protected
- */
- _syncUIACBase: function () {
- this._syncBrowserAutocomplete();
- this.set(VALUE, this.get(INPUT_NODE).get(VALUE));
- },
-
- // -- Protected Prototype Methods ------------------------------------------
-
- /**
- * Creates a DataSource-like object that simply returns the specified array
- * as a response. See the source attribute for more details.
- *
- * @method _createArraySource
- * @param {Array} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createArraySource: function (source) {
- var that = this;
-
- return {
- type: 'array',
- sendRequest: function (request) {
- that[_SOURCE_SUCCESS](source.concat(), request);
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that passes the query to a
- * custom-defined function, which is expected to call the provided callback
- * with an array of results. See the source attribute for more
- * details.
- *
- * @method _createFunctionSource
- * @param {Function} source Function that accepts a query and a callback as
- * parameters, and calls the callback with an array of results.
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createFunctionSource: function (source) {
- var that = this;
-
- return {
- type: 'function',
- sendRequest: function (request) {
- var value;
-
- function afterResults(results) {
- that[_SOURCE_SUCCESS](results || [], request);
- }
-
- // Allow both synchronous and asynchronous functions. If we get
- // a truthy return value, assume the function is synchronous.
- if ((value = source(request.query, afterResults))) {
- afterResults(value);
- }
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that looks up queries as properties on
- * the specified object, and returns the found value (if any) as a response.
- * See the source attribute for more details.
- *
- * @method _createObjectSource
- * @param {Object} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createObjectSource: function (source) {
- var that = this;
-
- return {
- type: 'object',
- sendRequest: function (request) {
- var query = request.query;
-
- that[_SOURCE_SUCCESS](
- YObject.owns(source, query) ? source[query] : [],
- request
- );
- }
- };
- },
-
- /**
- * Returns true if value is either a function or
- * null.
- *
- * @method _functionValidator
- * @param {Function|null} value Value to validate.
- * @protected
- */
- _functionValidator: function (value) {
- return value === null || isFunction(value);
- },
-
- /**
- * Faster and safer alternative to Y.Object.getValue(). Doesn't bother
- * casting the path to an array (since we already know it's an array) and
- * doesn't throw an error if a value in the middle of the object hierarchy
- * is neither undefined nor an object.
- *
- * @method _getObjectValue
- * @param {Object} obj
- * @param {Array} path
- * @return {mixed} Located value, or undefined if the value was
- * not found at the specified path.
- * @protected
- */
- _getObjectValue: function (obj, path) {
- if (!obj) {
- return;
- }
-
- for (var i = 0, len = path.length; obj && i < len; i++) {
- obj = obj[path[i]];
- }
-
- return obj;
- },
-
- /**
- * Parses result responses, performs filtering and highlighting, and fires
- * the results event.
- *
- * @method _parseResponse
- * @param {String} query Query that generated these results.
- * @param {Object} response Response containing results.
- * @param {Object} data Raw response data.
- * @protected
- */
- _parseResponse: function (query, response, data) {
- var facade = {
- data : data,
- query : query,
- results: []
- },
-
- listLocator = this.get(RESULT_LIST_LOCATOR),
- results = [],
- unfiltered = response && response.results,
-
- filters,
- formatted,
- formatter,
- highlighted,
- highlighter,
- i,
- len,
- maxResults,
- result,
- text,
- textLocator;
-
- if (unfiltered && listLocator) {
- unfiltered = listLocator.call(this, unfiltered);
- }
-
- if (unfiltered && unfiltered.length) {
- filters = this.get('resultFilters');
- textLocator = this.get('resultTextLocator');
-
- // Create a lightweight result object for each result to make them
- // easier to work with. The various properties on the object
- // represent different formats of the result, and will be populated
- // as we go.
- for (i = 0, len = unfiltered.length; i < len; ++i) {
- result = unfiltered[i];
-
- text = textLocator ?
- textLocator.call(this, result) :
- result.toString();
-
- results.push({
- display: Escape.html(text),
- raw : result,
- text : text
- });
- }
-
- // Run the results through all configured result filters. Each
- // filter returns an array of (potentially fewer) result objects,
- // which is then passed to the next filter, and so on.
- for (i = 0, len = filters.length; i < len; ++i) {
- results = filters[i].call(this, query, results.concat());
-
- if (!results) {
- Y.log("Filter didn't return anything.", 'warn', 'autocomplete-base');
- return;
- }
-
- if (!results.length) {
- break;
- }
- }
-
- if (results.length) {
- formatter = this.get('resultFormatter');
- highlighter = this.get('resultHighlighter');
- maxResults = this.get('maxResults');
-
- // If maxResults is set and greater than 0, limit the number of
- // results.
- if (maxResults && maxResults > 0 &&
- results.length > maxResults) {
- results.length = maxResults;
- }
-
- // Run the results through the configured highlighter (if any).
- // The highlighter returns an array of highlighted strings (not
- // an array of result objects), and these strings are then added
- // to each result object.
- if (highlighter) {
- highlighted = highlighter.call(this, query,
- results.concat());
-
- if (!highlighted) {
- Y.log("Highlighter didn't return anything.", 'warn', 'autocomplete-base');
- return;
- }
-
- for (i = 0, len = highlighted.length; i < len; ++i) {
- result = results[i];
- result.highlighted = highlighted[i];
- result.display = result.highlighted;
- }
- }
-
- // Run the results through the configured formatter (if any) to
- // produce the final formatted results. The formatter returns an
- // array of strings or Node instances (not an array of result
- // objects), and these strings/Nodes are then added to each
- // result object.
- if (formatter) {
- formatted = formatter.call(this, query, results.concat());
-
- if (!formatted) {
- Y.log("Formatter didn't return anything.", 'warn', 'autocomplete-base');
- return;
- }
-
- for (i = 0, len = formatted.length; i < len; ++i) {
- results[i].display = formatted[i];
- }
- }
- }
- }
-
- facade.results = results;
- this.fire(EVT_RESULTS, facade);
- },
-
- /**
- *
- * Returns the query portion of the specified input value, or
- * null if there is no suitable query within the input value.
- *
- *
- *
- * If a query delimiter is defined, the query will be the last delimited
- * part of of the string.
- *
- *
- * @method _parseValue
- * @param {String} value Input value from which to extract the query.
- * @return {String|null} query
- * @protected
- */
- _parseValue: function (value) {
- var delim = this.get(QUERY_DELIMITER);
-
- if (delim) {
- value = value.split(delim);
- value = value[value.length - 1];
- }
-
- return Lang.trimLeft(value);
- },
-
- /**
- * Setter for locator attributes.
- *
- * @method _setLocator
- * @param {Function|String|null} locator
- * @return {Function|null}
- * @protected
- */
- _setLocator: function (locator) {
- if (this[_FUNCTION_VALIDATOR](locator)) {
- return locator;
- }
-
- var that = this;
-
- locator = locator.toString().split('.');
-
- return function (result) {
- return result && that._getObjectValue(result, locator);
- };
- },
-
- /**
- * Setter for the requestTemplate attribute.
- *
- * @method _setRequestTemplate
- * @param {Function|String|null} template
- * @return {Function|null}
- * @protected
- */
- _setRequestTemplate: function (template) {
- if (this[_FUNCTION_VALIDATOR](template)) {
- return template;
- }
-
- template = template.toString();
-
- return function (query) {
- return Lang.sub(template, {query: encodeURIComponent(query)});
- };
- },
-
- /**
- * Setter for the resultFilters attribute.
- *
- * @method _setResultFilters
- * @param {Array|Function|String|null} filters null, a filter
- * function, an array of filter functions, or a string or array of strings
- * representing the names of methods on
- * Y.AutoCompleteFilters.
- * @return {Array} Array of filter functions (empty if filters is
- * null).
- * @protected
- */
- _setResultFilters: function (filters) {
- var acFilters, getFilterFunction;
-
- if (filters === null) {
- return [];
- }
-
- acFilters = Y.AutoCompleteFilters;
-
- getFilterFunction = function (filter) {
- if (isFunction(filter)) {
- return filter;
- }
-
- if (isString(filter) && acFilters &&
- isFunction(acFilters[filter])) {
- return acFilters[filter];
- }
-
- return false;
- };
-
- if (Lang.isArray(filters)) {
- filters = YArray.map(filters, getFilterFunction);
- return YArray.every(filters, function (f) { return !!f; }) ?
- filters : INVALID_VALUE;
- } else {
- filters = getFilterFunction(filters);
- return filters ? [filters] : INVALID_VALUE;
- }
- },
-
- /**
- * Setter for the resultHighlighter attribute.
- *
- * @method _setResultHighlighter
- * @param {Function|String|null} highlighter null, a
- * highlighter function, or a string representing the name of a method on
- * Y.AutoCompleteHighlighters.
- * @return {Function|null}
- * @protected
- */
- _setResultHighlighter: function (highlighter) {
- var acHighlighters;
-
- if (this._functionValidator(highlighter)) {
- return highlighter;
- }
-
- acHighlighters = Y.AutoCompleteHighlighters;
-
- if (isString(highlighter) && acHighlighters &&
- isFunction(acHighlighters[highlighter])) {
- return acHighlighters[highlighter];
- }
-
- return INVALID_VALUE;
- },
-
- /**
- * Setter for the source attribute. Returns a DataSource or
- * a DataSource-like object depending on the type of source and/or
- * the value of the sourceType attribute.
- *
- * @method _setSource
- * @param {mixed} source AutoComplete source. See the source
- * attribute for details.
- * @return {DataSource|Object}
- * @protected
- */
- _setSource: function (source) {
- var sourceType = this.get('sourceType') || Lang.type(source),
- sourceSetter;
-
- if ((source && isFunction(source.sendRequest))
- || source === null
- || sourceType === 'datasource') {
-
- // Quacks like a DataSource instance (or null). Make it so!
- this._rawSource = source;
- return source;
- }
-
- // See if there's a registered setter for this source type.
- if ((sourceSetter = AutoCompleteBase.SOURCE_TYPES[sourceType])) {
- this._rawSource = source;
- return Lang.isString(sourceSetter) ?
- this[sourceSetter](source) : sourceSetter(source);
- }
-
- Y.error("Unsupported source type '" + sourceType + "'. Maybe autocomplete-sources isn't loaded?");
- return INVALID_VALUE;
- },
-
- /**
- * Shared success callback for non-DataSource sources.
- *
- * @method _sourceSuccess
- * @param {mixed} data Response data.
- * @param {Object} request Request object.
- * @protected
- */
- _sourceSuccess: function (data, request) {
- request.callback.success({
- data: data,
- response: {results: data}
- });
- },
-
- /**
- * Synchronizes the UI state of the allowBrowserAutocomplete
- * attribute.
- *
- * @method _syncBrowserAutocomplete
- * @protected
- */
- _syncBrowserAutocomplete: function () {
- var inputNode = this.get(INPUT_NODE);
-
- if (inputNode.get('nodeName').toLowerCase() === 'input') {
- inputNode.setAttribute('autocomplete',
- this.get(ALLOW_BROWSER_AC) ? 'on' : 'off');
- }
- },
-
- /**
- *
- * Updates the query portion of the value attribute.
- *
- *
- *
- * If a query delimiter is defined, the last delimited portion of the input
- * value will be replaced with the specified value.
- *
- *
- * @method _updateValue
- * @param {String} newVal New value.
- * @protected
- */
- _updateValue: function (newVal) {
- var delim = this.get(QUERY_DELIMITER),
- insertDelim,
- len,
- prevVal;
-
- newVal = Lang.trimLeft(newVal);
-
- if (delim) {
- insertDelim = trim(delim); // so we don't double up on spaces
- prevVal = YArray.map(trim(this.get(VALUE)).split(delim), trim);
- len = prevVal.length;
-
- if (len > 1) {
- prevVal[len - 1] = newVal;
- newVal = prevVal.join(insertDelim + ' ');
- }
-
- newVal = newVal + insertDelim + ' ';
- }
-
- this.set(VALUE, newVal);
- },
-
- // -- Protected Event Handlers ---------------------------------------------
-
- /**
- * Updates the current source based on the new
- * sourceType to ensure that the two attributes don't get out
- * of sync when they're changed separately.
- *
- * @method _afterSourceTypeChange
- * @param {EventFacade} e
- * @protected
- */
- _afterSourceTypeChange: function (e) {
- if (this._rawSource) {
- this.set('source', this._rawSource);
- }
- },
-
- /**
- * Handles change events for the value attribute.
- *
- * @method _afterValueChange
- * @param {EventFacade} e
- * @protected
- */
- _afterValueChange: function (e) {
- var delay,
- fire,
- minQueryLength,
- newVal = e.newVal,
- query,
- that;
-
- // Don't query on value changes that didn't come from the user.
- if (e.src !== AutoCompleteBase.UI_SRC) {
- this._inputNode.set(VALUE, newVal);
- return;
- }
-
- Y.log('valueChange: new: "' + newVal + '"; old: "' + e.prevVal + '"', 'info', 'autocomplete-base');
-
- minQueryLength = this.get('minQueryLength');
- query = this._parseValue(newVal) || '';
-
- if (minQueryLength >= 0 && query.length >= minQueryLength) {
- delay = this.get('queryDelay');
- that = this;
-
- fire = function () {
- that.fire(EVT_QUERY, {
- inputValue: newVal,
- query : query
- });
- };
-
- if (delay) {
- clearTimeout(this._delay);
- this._delay = setTimeout(fire, delay);
- } else {
- fire();
- }
- } else {
- clearTimeout(this._delay);
-
- this.fire(EVT_CLEAR, {
- prevVal: e.prevVal ? this._parseValue(e.prevVal) : null
- });
- }
- },
-
- /**
- * Handles blur events on the input node.
- *
- * @method _onInputBlur
- * @param {EventFacade} e
- * @protected
- */
- _onInputBlur: function (e) {
- var delim = this.get(QUERY_DELIMITER),
- delimPos,
- newVal,
- value;
-
- // If a query delimiter is set and the input's value contains one or
- // more trailing delimiters, strip them.
- if (delim && !this.get('allowTrailingDelimiter')) {
- delim = Lang.trimRight(delim);
- value = newVal = this._inputNode.get(VALUE);
-
- if (delim) {
- while ((newVal = Lang.trimRight(newVal)) &&
- (delimPos = newVal.length - delim.length) &&
- newVal.lastIndexOf(delim) === delimPos) {
-
- newVal = newVal.substring(0, delimPos);
- }
- } else {
- // Delimiter is one or more space characters, so just trim the
- // value.
- newVal = Lang.trimRight(newVal);
- }
-
- if (newVal !== value) {
- this.set(VALUE, newVal);
- }
- }
- },
-
- /**
- * Handles valueChange events on the input node and fires a
- * query event when the input value meets the configured
- * criteria.
- *
- * @method _onInputValueChange
- * @param {EventFacade} e
- * @protected
- */
- _onInputValueChange: function (e) {
- var newVal = e.newVal;
-
- // Don't query if the internal value is the same as the new value
- // reported by valueChange.
- if (newVal === this.get(VALUE)) {
- return;
- }
-
- this.set(VALUE, newVal, {src: AutoCompleteBase.UI_SRC});
- },
-
- /**
- * Handles source responses and fires the results event.
- *
- * @method _onResponse
- * @param {EventFacade} e
- * @protected
- */
- _onResponse: function (query, e) {
- // Ignore stale responses that aren't for the current query.
- if (query === (this.get(QUERY) || '')) {
- this._parseResponse(query || '', e.response, e.data);
- }
- },
-
- // -- Protected Default Event Handlers -------------------------------------
-
- /**
- * Default clear event handler. Sets the results
- * property to an empty array and query to null.
- *
- * @method _defClearFn
- * @protected
- */
- _defClearFn: function () {
- this._set(QUERY, null);
- this._set(RESULTS, []);
- },
-
- /**
- * Default query event handler. Sets the query
- * property and sends a request to the source if one is configured.
- *
- * @method _defQueryFn
- * @param {EventFacade} e
- * @protected
- */
- _defQueryFn: function (e) {
- var query = e.query;
-
- Y.log('query: "' + query + '"; inputValue: "' + e.inputValue + '"', 'info', 'autocomplete-base');
- this.sendRequest(query); // sendRequest will set the 'query' attribute
- },
-
- /**
- * Default results event handler. Sets the results
- * property to the latest results.
- *
- * @method _defResultsFn
- * @param {EventFacade} e
- * @protected
- */
- _defResultsFn: function (e) {
- Y.log('results: ' + Y.dump(e.results), 'info', 'autocomplete-base');
- this._set(RESULTS, e[RESULTS]);
- }
-};
-
-Y.AutoCompleteBase = AutoCompleteBase;
-
-
-}, '3.4.1' ,{optional:['autocomplete-sources'], requires:['array-extras', 'base-build', 'escape', 'event-valuechange', 'node-base']});
diff --git a/lib/yui/3.4.1/build/autocomplete-base/autocomplete-base-min.js b/lib/yui/3.4.1/build/autocomplete-base/autocomplete-base-min.js
deleted file mode 100644
index 56fe53f6cae..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-base/autocomplete-base-min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("autocomplete-base",function(f){var g=f.Escape,j=f.Lang,q=f.Array,i=f.Object,d=j.isFunction,r=j.isString,u=j.trim,l=f.Attribute.INVALID_VALUE,o="_functionValidator",x="_sourceSuccess",c="allowBrowserAutocomplete",h="inputNode",w="query",e="queryDelimiter",b="requestTemplate",m="results",n="resultListLocator",k="value",s="valueChange",a="clear",t=w,p=m;function v(){f.before(this._bindUIACBase,this,"bindUI");f.before(this._destructorACBase,this,"destructor");f.before(this._syncUIACBase,this,"syncUI");this.publish(a,{defaultFn:this._defClearFn});this.publish(t,{defaultFn:this._defQueryFn});this.publish(p,{defaultFn:this._defResultsFn});}v.ATTRS={allowBrowserAutocomplete:{value:false},allowTrailingDelimiter:{value:false},inputNode:{setter:f.one,writeOnce:"initOnly"},maxResults:{value:0},minQueryLength:{value:1},query:{readOnly:true,value:null},queryDelay:{value:100},queryDelimiter:{value:null},requestTemplate:{setter:"_setRequestTemplate",value:null},resultFilters:{setter:"_setResultFilters",value:[]},resultFormatter:{validator:o},resultHighlighter:{setter:"_setResultHighlighter"},resultListLocator:{setter:"_setLocator"},results:{readOnly:true,value:[]},resultTextLocator:{setter:"_setLocator"},source:{setter:"_setSource"},sourceType:{value:null},tokenInput:{readOnly:true},value:{value:""}};v.CSS_PREFIX="ac";v.UI_SRC=(f.Widget&&f.Widget.UI_SRC)||"ui";v.SOURCE_TYPES={array:"_createArraySource","function":"_createFunctionSource",object:"_createObjectSource"};v.prototype={sendRequest:function(A,B){var y,z=this.get("source");if(A||A===""){this._set(w,A);}else{A=this.get(w)||"";}if(z){if(!B){B=this.get(b);}y=B?B.call(this,A):A;z.sendRequest({query:A,request:y,callback:{success:f.bind(this._onResponse,this,A)}});}return this;},_bindUIACBase:function(){var z=this.get(h),y=z&&z.tokenInput;if(y){z=y.get(h);this._set("tokenInput",y);}if(!z){f.error("No inputNode specified.");return;}this._inputNode=z;this._acBaseEvents=new f.EventHandle([z.on(s,this._onInputValueChange,this),z.on("blur",this._onInputBlur,this),this.after(c+"Change",this._syncBrowserAutocomplete),this.after("sourceTypeChange",this._afterSourceTypeChange),this.after(s,this._afterValueChange)]);},_destructorACBase:function(){this._acBaseEvents.detach();},_syncUIACBase:function(){this._syncBrowserAutocomplete();this.set(k,this.get(h).get(k));},_createArraySource:function(z){var y=this;return{type:"array",sendRequest:function(A){y[x](z.concat(),A);}};},_createFunctionSource:function(z){var y=this;return{type:"function",sendRequest:function(A){var B;function C(D){y[x](D||[],A);}if((B=z(A.query,C))){C(B);}}};},_createObjectSource:function(z){var y=this;return{type:"object",sendRequest:function(A){var B=A.query;y[x](i.owns(z,B)?z[B]:[],A);}};},_functionValidator:function(y){return y===null||d(y);},_getObjectValue:function(B,A){if(!B){return;}for(var z=0,y=A.length;B&&z0&&H.length>M){H.length=M;}if(O){B=O.call(this,A,H.concat());if(!B){return;}for(K=0,L=B.length;K1){C[y-1]=z;z=C.join(A+" ");}z=z+A+" ";}this.set(k,z);},_afterSourceTypeChange:function(y){if(this._rawSource){this.set("source",this._rawSource);}},_afterValueChange:function(E){var A,B,y,z=E.newVal,D,C;if(E.src!==v.UI_SRC){this._inputNode.set(k,z);return;}y=this.get("minQueryLength");D=this._parseValue(z)||"";if(y>=0&&D.length>=y){A=this.get("queryDelay");C=this;B=function(){C.fire(t,{inputValue:z,query:D});};if(A){clearTimeout(this._delay);this._delay=setTimeout(B,A);}else{B();}}else{clearTimeout(this._delay);this.fire(a,{prevVal:E.prevVal?this._parseValue(E.prevVal):null});}},_onInputBlur:function(B){var C=this.get(e),y,z,A;if(C&&!this.get("allowTrailingDelimiter")){C=j.trimRight(C);A=z=this._inputNode.get(k);if(C){while((z=j.trimRight(z))&&(y=z.length-C.length)&&z.lastIndexOf(C)===y){z=z.substring(0,y);
-}}else{z=j.trimRight(z);}if(z!==A){this.set(k,z);}}},_onInputValueChange:function(z){var y=z.newVal;if(y===this.get(k)){return;}this.set(k,y,{src:v.UI_SRC});},_onResponse:function(y,z){if(y===(this.get(w)||"")){this._parseResponse(y||"",z.response,z.data);}},_defClearFn:function(){this._set(w,null);this._set(m,[]);},_defQueryFn:function(z){var y=z.query;this.sendRequest(y);},_defResultsFn:function(y){this._set(m,y[m]);}};f.AutoCompleteBase=v;},"3.4.1",{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/autocomplete-base/autocomplete-base.js b/lib/yui/3.4.1/build/autocomplete-base/autocomplete-base.js
deleted file mode 100644
index a66c4161583..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-base/autocomplete-base.js
+++ /dev/null
@@ -1,1635 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-base', function(Y) {
-
-/**
- * Provides automatic input completion or suggestions for text input fields and
- * textareas.
- *
- * @module autocomplete
- * @main autocomplete
- * @since 3.3.0
- */
-
-/**
- * Y.Base extension that provides core autocomplete logic (but no
- * UI implementation) for a text input field or textarea. Must be mixed into a
- * Y.Base-derived class to be useful.
- *
- * @submodule autocomplete-base
- */
-
-/**
- *
- * Extension that provides core autocomplete logic (but no UI implementation)
- * for a text input field or textarea.
- *
- *
- *
- * The AutoCompleteBase class provides events and attributes that
- * abstract away core autocomplete logic and configuration, but does not provide
- * a widget implementation or suggestion UI. For a prepackaged autocomplete
- * widget, see AutoCompleteList.
- *
- *
- *
- * This extension cannot be instantiated directly, since it doesn't provide an
- * actual implementation. It's intended to be mixed into a
- * Y.Base-based class or widget.
- *
- *
- * @preventable _defClearFn
- */
- this.publish(EVT_CLEAR, {
- defaultFn: this._defClearFn
- });
-
- /**
- * Fires when the contents of the input field have changed and the input
- * value meets the criteria necessary to generate an autocomplete query.
- *
- * @event query
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- *
- *
inputValue (String)
- *
- * Full contents of the text input field or textarea that generated
- * the query.
- *
- *
- *
query (String)
- *
- * Autocomplete query. This is the string that will be used to
- * request completion results. It may or may not be the same as
- * inputValue.
- *
- *
- *
- * @preventable _defQueryFn
- */
- this.publish(EVT_QUERY, {
- defaultFn: this._defQueryFn
- });
-
- /**
- * Fires after query results are received from the source. If
- * no source has been set, this event will not fire.
- *
- * @event results
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- *
- *
data (Array|Object)
- *
- * Raw, unfiltered result data (if available).
- *
- *
- *
query (String)
- *
- * Query that generated these results.
- *
- *
- *
results (Array)
- *
- * Array of filtered, formatted, and highlighted results. Each item in
- * the array is an object with the following properties:
- *
- *
- *
display (Node|HTMLElement|String)
- *
- * Formatted result HTML suitable for display to the user. If no
- * custom formatter is set, this will be an HTML-escaped version of
- * the string in the text property.
- *
- *
- *
highlighted (String)
- *
- * Highlighted (but not formatted) result text. This property will
- * only be set if a highlighter is in use.
- *
- *
- *
raw (mixed)
- *
- * Raw, unformatted result in whatever form it was provided by the
- * source.
- *
- *
- *
text (String)
- *
- * Plain text version of the result, suitable for being inserted
- * into the value of a text input field or textarea when the result
- * is selected by a user. This value is not HTML-escaped and should
- * not be inserted into the page using innerHTML.
- *
- *
- *
- *
- *
- * @preventable _defResultsFn
- */
- this.publish(EVT_RESULTS, {
- defaultFn: this._defResultsFn
- });
-}
-
-// -- Public Static Properties -------------------------------------------------
-AutoCompleteBase.ATTRS = {
- /**
- * Whether or not to enable the browser's built-in autocomplete
- * functionality for input fields.
- *
- * @attribute allowBrowserAutocomplete
- * @type Boolean
- * @default false
- */
- allowBrowserAutocomplete: {
- value: false
- },
-
- /**
- * When a queryDelimiter is set, trailing delimiters will
- * automatically be stripped from the input value by default when the
- * input node loses focus. Set this to true to allow trailing
- * delimiters.
- *
- * @attribute allowTrailingDelimiter
- * @type Boolean
- * @default false
- */
- allowTrailingDelimiter: {
- value: false
- },
-
- /**
- * Node to monitor for changes, which will generate query
- * events when appropriate. May be either an input field or a textarea.
- *
- * @attribute inputNode
- * @type Node|HTMLElement|String
- * @writeonce
- */
- inputNode: {
- setter: Y.one,
- writeOnce: 'initOnly'
- },
-
- /**
- * Maximum number of results to return. A value of 0 or less
- * will allow an unlimited number of results.
- *
- * @attribute maxResults
- * @type Number
- * @default 0
- */
- maxResults: {
- value: 0
- },
-
- /**
- * Minimum number of characters that must be entered before a
- * query event will be fired. A value of 0
- * allows empty queries; a negative value will effectively disable all
- * query events.
- *
- * @attribute minQueryLength
- * @type Number
- * @default 1
- */
- minQueryLength: {
- value: 1
- },
-
- /**
- *
- * Current query, or null if there is no current query.
- *
- *
- *
- * The query might not be the same as the current value of the input
- * node, both for timing reasons (due to queryDelay) and
- * because when one or more queryDelimiter separators are
- * in use, only the last portion of the delimited input string will be
- * used as the query value.
- *
- * Number of milliseconds to delay after input before triggering a
- * query event. If new input occurs before this delay is
- * over, the previous input event will be ignored and a new delay will
- * begin.
- *
- *
- *
- * This can be useful both to throttle queries to a remote data source
- * and to avoid distracting the user by showing them less relevant
- * results before they've paused their typing.
- *
- *
- * @attribute queryDelay
- * @type Number
- * @default 100
- */
- queryDelay: {
- value: 100
- },
-
- /**
- * Query delimiter string. When a delimiter is configured, the input value
- * will be split on the delimiter, and only the last portion will be used in
- * autocomplete queries and updated when the query attribute is
- * modified.
- *
- * @attribute queryDelimiter
- * @type String|null
- * @default null
- */
- queryDelimiter: {
- value: null
- },
-
- /**
- *
- * Source request template. This can be a function that accepts a query as a
- * parameter and returns a request string, or it can be a string containing
- * the placeholder "{query}", which will be replaced with the actual
- * URI-encoded query. In either case, the resulting string will be appended
- * to the request URL when the source attribute is set to a
- * remote DataSource, JSONP URL, or XHR URL (it will not be appended to YQL
- * URLs).
- *
- *
- *
- * While requestTemplate may be set to either a function or
- * a string, it will always be returned as a function that accepts a
- * query argument and returns a string.
- *
- * Array of local result filter functions. If provided, each filter
- * will be called with two arguments when results are received: the query
- * and an array of result objects. See the documentation for the
- * results event for a list of the properties available on each
- * result object.
- *
- *
- *
- * Each filter is expected to return a filtered or modified version of the
- * results array, which will then be passed on to subsequent filters, then
- * the resultHighlighter function (if set), then the
- * resultFormatter function (if set), and finally to
- * subscribers to the results event.
- *
- *
- *
- * If no source is set, result filters will not be called.
- *
- *
- *
- * Prepackaged result filters provided by the autocomplete-filters and
- * autocomplete-filters-accentfold modules can be used by specifying the
- * filter name as a string, such as 'phraseMatch' (assuming
- * the necessary filters module is loaded).
- *
- * Function which will be used to format results. If provided, this function
- * will be called with two arguments after results have been received and
- * filtered: the query and an array of result objects. The formatter is
- * expected to return an array of HTML strings or Node instances containing
- * the desired HTML for each result.
- *
- *
- *
- * See the documentation for the results event for a list of
- * the properties available on each result object.
- *
- *
- *
- * If no source is set, the formatter will not be called.
- *
- * Function which will be used to highlight results. If provided, this
- * function will be called with two arguments after results have been
- * received and filtered: the query and an array of filtered result objects.
- * The highlighter is expected to return an array of highlighted result
- * text in the form of HTML strings.
- *
- *
- *
- * See the documentation for the results event for a list of
- * the properties available on each result object.
- *
- *
- *
- * If no source is set, the highlighter will not be called.
- *
- * Locator that should be used to extract an array of results from a
- * non-array response.
- *
- *
- *
- * By default, no locator is applied, and all responses are assumed to be
- * arrays by default. If all responses are already arrays, you don't need to
- * define a locator.
- *
- *
- *
- * The locator may be either a function (which will receive the raw response
- * as an argument and must return an array) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * result.foo.bar.baz if the response is an object).
- *
- *
- *
- * While resultListLocator may be set to either a function or a
- * string, it will always be returned as a function that accepts a response
- * argument and returns an array.
- *
- * Locator that should be used to extract a plain text string from a
- * non-string result item. The resulting text value will typically be the
- * value that ends up being inserted into an input field or textarea when
- * the user of an autocomplete implementation selects a result.
- *
- *
- *
- * By default, no locator is applied, and all results are assumed to be
- * plain text strings. If all results are already plain text strings, you
- * don't need to define a locator.
- *
- *
- *
- * The locator may be either a function (which will receive the raw result
- * as an argument and must return a string) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * result.foo.bar.baz if the result is an object).
- *
- *
- *
- * While resultTextLocator may be set to either a function or a
- * string, it will always be returned as a function that accepts a result
- * argument and returns a string.
- *
- * The full array will be provided to any configured filters for each
- * query. This is an easy way to create a fully client-side autocomplete
- * implementation.
- *
- *
- *
- *
DataSource
- *
- *
- * A DataSource instance or other object that provides a
- * DataSource-like sendRequest method. See the
- * DataSource documentation for details.
- *
- * A function source will be called with the current query and a
- * callback function as parameters, and should either return an array of
- * results (for synchronous operation) or return nothing and pass an
- * array of results to the provided callback (for asynchronous
- * operation).
- *
- *
- *
- *
Object
- *
- *
- * Example:{foo: ['foo result 1', 'foo result 2'], bar: ['bar result']}
- *
- *
- *
- * An object will be treated as a query hashmap. If a property on the
- * object matches the current query, the value of that property will be
- * used as the response.
- *
- *
- *
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a resultListLocator to
- * process the response and return an array.
- *
- *
- *
- *
- *
- * If the optional autocomplete-sources module is loaded, then
- * the following additional source types will be supported as well:
- *
- *
- *
- *
<select> Node
- *
- *
- * You may provide a YUI Node instance wrapping a <select>
- * element, and the options in the list will be used as results. You
- * will also need to specify a resultTextLocator of 'text'
- * or 'value', depending on what you want to use as the text of the
- * result.
- *
- *
- *
- * Each result will be an object with the following properties:
- *
- *
- *
- *
html (String)
- *
- *
HTML content of the <option> element.
- *
- *
- *
index (Number)
- *
- *
Index of the <option> element in the list.
- *
- *
- *
node (Y.Node)
- *
- *
Node instance referring to the original <option> element.
- *
- *
- *
selected (Boolean)
- *
- *
Whether or not this item is currently selected in the
- * <select> list.
- * If a URL with a {callback} placeholder is provided, it
- * will be used to make a JSONP request. The {query}
- * placeholder will be replaced with the current query, and the
- * {callback} placeholder will be replaced with an
- * internally-generated JSONP callback name. Both placeholders must
- * appear in the URL, or the request will fail. An optional
- * {maxResults} placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- *
- *
- *
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a resultListLocator to
- * process the response and return an array.
- *
- *
- *
- * The jsonp module must be loaded in order for
- * JSONP URL sources to work. If the jsonp module
- * is not already loaded, it will be loaded on demand if possible.
- *
- * If a URL without a {callback} placeholder is provided,
- * it will be used to make a same-origin XHR request. The
- * {query} placeholder will be replaced with the current
- * query. An optional {maxResults} placeholder may also be
- * provided, and will be replaced with the value of the maxResults
- * attribute (or 1000 if the maxResults attribute is 0 or less).
- *
- *
- *
- * The response is assumed to be a JSON array of results by default. If
- * the response is a JSON object and not an array, provide a
- * resultListLocator to process the response and return an
- * array. If the response is in some form other than JSON, you will
- * need to use a custom DataSource instance as the source.
- *
- *
- *
- * The io-base and json-parse modules
- * must be loaded in order for XHR URL sources to work. If
- * these modules are not already loaded, they will be loaded on demand
- * if possible.
- *
- *
- *
- *
String (YQL query)
- *
- *
- * Example:'select * from search.suggest where query="{query}"'
- *
- *
- *
- * If a YQL query is provided, it will be used to make a YQL request.
- * The {query} placeholder will be replaced with the
- * current autocomplete query. This placeholder must appear in the YQL
- * query, or the request will fail. An optional
- * {maxResults} placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- *
- *
- *
- * The yql module must be loaded in order for YQL
- * sources to work. If the yql module is not
- * already loaded, it will be loaded on demand if possible.
- *
- *
- *
- *
- *
- * As an alternative to providing a source, you could simply listen for
- * query events and handle them any way you see fit. Providing
- * a source is optional, but will usually be simpler.
- *
- * May be used to force a specific source type, overriding the automatic
- * source type detection. It should almost never be necessary to do this,
- * but as they taught us in the Boy Scouts, one should always be prepared,
- * so it's here if you need it. Be warned that if you set this attribute and
- * something breaks, it's your own fault.
- *
- * If the autocomplete-sources module is loaded, the following
- * additional source types are supported: 'io', 'jsonp', 'select',
- * 'string', 'yql'
- *
- *
- * @attribute sourceType
- * @type String
- */
- sourceType: {
- value: null
- },
-
- /**
- * If the inputNode specified at instantiation time has a
- * node-tokeninput plugin attached to it, this attribute will
- * be a reference to the Y.Plugin.TokenInput instance.
- *
- * @attribute tokenInput
- * @type Plugin.TokenInput
- * @readonly
- */
- tokenInput: {
- readOnly: true
- },
-
- /**
- * Current value of the input node.
- *
- * @attribute value
- * @type String
- * @default ''
- */
- value: {
- // Why duplicate this._inputNode.get('value')? Because we need a
- // reliable way to track the source of value changes. We want to perform
- // completion when the user changes the value, but not when we change
- // the value.
- value: ''
- }
-};
-
-AutoCompleteBase.CSS_PREFIX = 'ac';
-AutoCompleteBase.UI_SRC = (Y.Widget && Y.Widget.UI_SRC) || 'ui';
-
-/**
- * Mapping of built-in source types to their setter functions. DataSource
- * instances and DataSource-like objects are handled natively, so are not
- * mapped here.
- *
- * @property SOURCE_TYPES
- * @type {Object}
- * @static
- */
-AutoCompleteBase.SOURCE_TYPES = {
- array : '_createArraySource',
- 'function': '_createFunctionSource',
- object : '_createObjectSource'
-};
-
-AutoCompleteBase.prototype = {
- // -- Public Prototype Methods ---------------------------------------------
-
- /**
- *
- * Sends a request to the configured source. If no source is configured,
- * this method won't do anything.
- *
- *
- *
- * Usually there's no reason to call this method manually; it will be
- * called automatically when user input causes a query event to
- * be fired. The only time you'll need to call this method manually is if
- * you want to force a request to be sent when no user input has occurred.
- *
- *
- * @method sendRequest
- * @param {String} query (optional) Query to send. If specified, the
- * query attribute will be set to this query. If not
- * specified, the current value of the query attribute will
- * be used.
- * @param {Function} requestTemplate (optional) Request template function.
- * If not specified, the current value of the requestTemplate
- * attribute will be used.
- * @chainable
- */
- sendRequest: function (query, requestTemplate) {
- var request,
- source = this.get('source');
-
- if (query || query === '') {
- this._set(QUERY, query);
- } else {
- query = this.get(QUERY) || '';
- }
-
- if (source) {
- if (!requestTemplate) {
- requestTemplate = this.get(REQUEST_TEMPLATE);
- }
-
- request = requestTemplate ?
- requestTemplate.call(this, query) : query;
-
-
- source.sendRequest({
- query : query,
- request: request,
-
- callback: {
- success: Y.bind(this._onResponse, this, query)
- }
- });
- }
-
- return this;
- },
-
- // -- Protected Lifecycle Methods ------------------------------------------
-
- /**
- * Attaches event listeners and behaviors.
- *
- * @method _bindUIACBase
- * @protected
- */
- _bindUIACBase: function () {
- var inputNode = this.get(INPUT_NODE),
- tokenInput = inputNode && inputNode.tokenInput;
-
- // If the inputNode has a node-tokeninput plugin attached, bind to the
- // plugin's inputNode instead.
- if (tokenInput) {
- inputNode = tokenInput.get(INPUT_NODE);
- this._set('tokenInput', tokenInput);
- }
-
- if (!inputNode) {
- Y.error('No inputNode specified.');
- return;
- }
-
- this._inputNode = inputNode;
-
- this._acBaseEvents = new Y.EventHandle([
- // This is the valueChange event on the inputNode, provided by the
- // event-valuechange module, not our own valueChange.
- inputNode.on(VALUE_CHANGE, this._onInputValueChange, this),
- inputNode.on('blur', this._onInputBlur, this),
-
- this.after(ALLOW_BROWSER_AC + 'Change', this._syncBrowserAutocomplete),
- this.after('sourceTypeChange', this._afterSourceTypeChange),
- this.after(VALUE_CHANGE, this._afterValueChange)
- ]);
- },
-
- /**
- * Detaches AutoCompleteBase event listeners.
- *
- * @method _destructorACBase
- * @protected
- */
- _destructorACBase: function () {
- this._acBaseEvents.detach();
- },
-
- /**
- * Synchronizes the UI state of the inputNode.
- *
- * @method _syncUIACBase
- * @protected
- */
- _syncUIACBase: function () {
- this._syncBrowserAutocomplete();
- this.set(VALUE, this.get(INPUT_NODE).get(VALUE));
- },
-
- // -- Protected Prototype Methods ------------------------------------------
-
- /**
- * Creates a DataSource-like object that simply returns the specified array
- * as a response. See the source attribute for more details.
- *
- * @method _createArraySource
- * @param {Array} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createArraySource: function (source) {
- var that = this;
-
- return {
- type: 'array',
- sendRequest: function (request) {
- that[_SOURCE_SUCCESS](source.concat(), request);
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that passes the query to a
- * custom-defined function, which is expected to call the provided callback
- * with an array of results. See the source attribute for more
- * details.
- *
- * @method _createFunctionSource
- * @param {Function} source Function that accepts a query and a callback as
- * parameters, and calls the callback with an array of results.
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createFunctionSource: function (source) {
- var that = this;
-
- return {
- type: 'function',
- sendRequest: function (request) {
- var value;
-
- function afterResults(results) {
- that[_SOURCE_SUCCESS](results || [], request);
- }
-
- // Allow both synchronous and asynchronous functions. If we get
- // a truthy return value, assume the function is synchronous.
- if ((value = source(request.query, afterResults))) {
- afterResults(value);
- }
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that looks up queries as properties on
- * the specified object, and returns the found value (if any) as a response.
- * See the source attribute for more details.
- *
- * @method _createObjectSource
- * @param {Object} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createObjectSource: function (source) {
- var that = this;
-
- return {
- type: 'object',
- sendRequest: function (request) {
- var query = request.query;
-
- that[_SOURCE_SUCCESS](
- YObject.owns(source, query) ? source[query] : [],
- request
- );
- }
- };
- },
-
- /**
- * Returns true if value is either a function or
- * null.
- *
- * @method _functionValidator
- * @param {Function|null} value Value to validate.
- * @protected
- */
- _functionValidator: function (value) {
- return value === null || isFunction(value);
- },
-
- /**
- * Faster and safer alternative to Y.Object.getValue(). Doesn't bother
- * casting the path to an array (since we already know it's an array) and
- * doesn't throw an error if a value in the middle of the object hierarchy
- * is neither undefined nor an object.
- *
- * @method _getObjectValue
- * @param {Object} obj
- * @param {Array} path
- * @return {mixed} Located value, or undefined if the value was
- * not found at the specified path.
- * @protected
- */
- _getObjectValue: function (obj, path) {
- if (!obj) {
- return;
- }
-
- for (var i = 0, len = path.length; obj && i < len; i++) {
- obj = obj[path[i]];
- }
-
- return obj;
- },
-
- /**
- * Parses result responses, performs filtering and highlighting, and fires
- * the results event.
- *
- * @method _parseResponse
- * @param {String} query Query that generated these results.
- * @param {Object} response Response containing results.
- * @param {Object} data Raw response data.
- * @protected
- */
- _parseResponse: function (query, response, data) {
- var facade = {
- data : data,
- query : query,
- results: []
- },
-
- listLocator = this.get(RESULT_LIST_LOCATOR),
- results = [],
- unfiltered = response && response.results,
-
- filters,
- formatted,
- formatter,
- highlighted,
- highlighter,
- i,
- len,
- maxResults,
- result,
- text,
- textLocator;
-
- if (unfiltered && listLocator) {
- unfiltered = listLocator.call(this, unfiltered);
- }
-
- if (unfiltered && unfiltered.length) {
- filters = this.get('resultFilters');
- textLocator = this.get('resultTextLocator');
-
- // Create a lightweight result object for each result to make them
- // easier to work with. The various properties on the object
- // represent different formats of the result, and will be populated
- // as we go.
- for (i = 0, len = unfiltered.length; i < len; ++i) {
- result = unfiltered[i];
-
- text = textLocator ?
- textLocator.call(this, result) :
- result.toString();
-
- results.push({
- display: Escape.html(text),
- raw : result,
- text : text
- });
- }
-
- // Run the results through all configured result filters. Each
- // filter returns an array of (potentially fewer) result objects,
- // which is then passed to the next filter, and so on.
- for (i = 0, len = filters.length; i < len; ++i) {
- results = filters[i].call(this, query, results.concat());
-
- if (!results) {
- return;
- }
-
- if (!results.length) {
- break;
- }
- }
-
- if (results.length) {
- formatter = this.get('resultFormatter');
- highlighter = this.get('resultHighlighter');
- maxResults = this.get('maxResults');
-
- // If maxResults is set and greater than 0, limit the number of
- // results.
- if (maxResults && maxResults > 0 &&
- results.length > maxResults) {
- results.length = maxResults;
- }
-
- // Run the results through the configured highlighter (if any).
- // The highlighter returns an array of highlighted strings (not
- // an array of result objects), and these strings are then added
- // to each result object.
- if (highlighter) {
- highlighted = highlighter.call(this, query,
- results.concat());
-
- if (!highlighted) {
- return;
- }
-
- for (i = 0, len = highlighted.length; i < len; ++i) {
- result = results[i];
- result.highlighted = highlighted[i];
- result.display = result.highlighted;
- }
- }
-
- // Run the results through the configured formatter (if any) to
- // produce the final formatted results. The formatter returns an
- // array of strings or Node instances (not an array of result
- // objects), and these strings/Nodes are then added to each
- // result object.
- if (formatter) {
- formatted = formatter.call(this, query, results.concat());
-
- if (!formatted) {
- return;
- }
-
- for (i = 0, len = formatted.length; i < len; ++i) {
- results[i].display = formatted[i];
- }
- }
- }
- }
-
- facade.results = results;
- this.fire(EVT_RESULTS, facade);
- },
-
- /**
- *
- * Returns the query portion of the specified input value, or
- * null if there is no suitable query within the input value.
- *
- *
- *
- * If a query delimiter is defined, the query will be the last delimited
- * part of of the string.
- *
- *
- * @method _parseValue
- * @param {String} value Input value from which to extract the query.
- * @return {String|null} query
- * @protected
- */
- _parseValue: function (value) {
- var delim = this.get(QUERY_DELIMITER);
-
- if (delim) {
- value = value.split(delim);
- value = value[value.length - 1];
- }
-
- return Lang.trimLeft(value);
- },
-
- /**
- * Setter for locator attributes.
- *
- * @method _setLocator
- * @param {Function|String|null} locator
- * @return {Function|null}
- * @protected
- */
- _setLocator: function (locator) {
- if (this[_FUNCTION_VALIDATOR](locator)) {
- return locator;
- }
-
- var that = this;
-
- locator = locator.toString().split('.');
-
- return function (result) {
- return result && that._getObjectValue(result, locator);
- };
- },
-
- /**
- * Setter for the requestTemplate attribute.
- *
- * @method _setRequestTemplate
- * @param {Function|String|null} template
- * @return {Function|null}
- * @protected
- */
- _setRequestTemplate: function (template) {
- if (this[_FUNCTION_VALIDATOR](template)) {
- return template;
- }
-
- template = template.toString();
-
- return function (query) {
- return Lang.sub(template, {query: encodeURIComponent(query)});
- };
- },
-
- /**
- * Setter for the resultFilters attribute.
- *
- * @method _setResultFilters
- * @param {Array|Function|String|null} filters null, a filter
- * function, an array of filter functions, or a string or array of strings
- * representing the names of methods on
- * Y.AutoCompleteFilters.
- * @return {Array} Array of filter functions (empty if filters is
- * null).
- * @protected
- */
- _setResultFilters: function (filters) {
- var acFilters, getFilterFunction;
-
- if (filters === null) {
- return [];
- }
-
- acFilters = Y.AutoCompleteFilters;
-
- getFilterFunction = function (filter) {
- if (isFunction(filter)) {
- return filter;
- }
-
- if (isString(filter) && acFilters &&
- isFunction(acFilters[filter])) {
- return acFilters[filter];
- }
-
- return false;
- };
-
- if (Lang.isArray(filters)) {
- filters = YArray.map(filters, getFilterFunction);
- return YArray.every(filters, function (f) { return !!f; }) ?
- filters : INVALID_VALUE;
- } else {
- filters = getFilterFunction(filters);
- return filters ? [filters] : INVALID_VALUE;
- }
- },
-
- /**
- * Setter for the resultHighlighter attribute.
- *
- * @method _setResultHighlighter
- * @param {Function|String|null} highlighter null, a
- * highlighter function, or a string representing the name of a method on
- * Y.AutoCompleteHighlighters.
- * @return {Function|null}
- * @protected
- */
- _setResultHighlighter: function (highlighter) {
- var acHighlighters;
-
- if (this._functionValidator(highlighter)) {
- return highlighter;
- }
-
- acHighlighters = Y.AutoCompleteHighlighters;
-
- if (isString(highlighter) && acHighlighters &&
- isFunction(acHighlighters[highlighter])) {
- return acHighlighters[highlighter];
- }
-
- return INVALID_VALUE;
- },
-
- /**
- * Setter for the source attribute. Returns a DataSource or
- * a DataSource-like object depending on the type of source and/or
- * the value of the sourceType attribute.
- *
- * @method _setSource
- * @param {mixed} source AutoComplete source. See the source
- * attribute for details.
- * @return {DataSource|Object}
- * @protected
- */
- _setSource: function (source) {
- var sourceType = this.get('sourceType') || Lang.type(source),
- sourceSetter;
-
- if ((source && isFunction(source.sendRequest))
- || source === null
- || sourceType === 'datasource') {
-
- // Quacks like a DataSource instance (or null). Make it so!
- this._rawSource = source;
- return source;
- }
-
- // See if there's a registered setter for this source type.
- if ((sourceSetter = AutoCompleteBase.SOURCE_TYPES[sourceType])) {
- this._rawSource = source;
- return Lang.isString(sourceSetter) ?
- this[sourceSetter](source) : sourceSetter(source);
- }
-
- Y.error("Unsupported source type '" + sourceType + "'. Maybe autocomplete-sources isn't loaded?");
- return INVALID_VALUE;
- },
-
- /**
- * Shared success callback for non-DataSource sources.
- *
- * @method _sourceSuccess
- * @param {mixed} data Response data.
- * @param {Object} request Request object.
- * @protected
- */
- _sourceSuccess: function (data, request) {
- request.callback.success({
- data: data,
- response: {results: data}
- });
- },
-
- /**
- * Synchronizes the UI state of the allowBrowserAutocomplete
- * attribute.
- *
- * @method _syncBrowserAutocomplete
- * @protected
- */
- _syncBrowserAutocomplete: function () {
- var inputNode = this.get(INPUT_NODE);
-
- if (inputNode.get('nodeName').toLowerCase() === 'input') {
- inputNode.setAttribute('autocomplete',
- this.get(ALLOW_BROWSER_AC) ? 'on' : 'off');
- }
- },
-
- /**
- *
- * Updates the query portion of the value attribute.
- *
- *
- *
- * If a query delimiter is defined, the last delimited portion of the input
- * value will be replaced with the specified value.
- *
- *
- * @method _updateValue
- * @param {String} newVal New value.
- * @protected
- */
- _updateValue: function (newVal) {
- var delim = this.get(QUERY_DELIMITER),
- insertDelim,
- len,
- prevVal;
-
- newVal = Lang.trimLeft(newVal);
-
- if (delim) {
- insertDelim = trim(delim); // so we don't double up on spaces
- prevVal = YArray.map(trim(this.get(VALUE)).split(delim), trim);
- len = prevVal.length;
-
- if (len > 1) {
- prevVal[len - 1] = newVal;
- newVal = prevVal.join(insertDelim + ' ');
- }
-
- newVal = newVal + insertDelim + ' ';
- }
-
- this.set(VALUE, newVal);
- },
-
- // -- Protected Event Handlers ---------------------------------------------
-
- /**
- * Updates the current source based on the new
- * sourceType to ensure that the two attributes don't get out
- * of sync when they're changed separately.
- *
- * @method _afterSourceTypeChange
- * @param {EventFacade} e
- * @protected
- */
- _afterSourceTypeChange: function (e) {
- if (this._rawSource) {
- this.set('source', this._rawSource);
- }
- },
-
- /**
- * Handles change events for the value attribute.
- *
- * @method _afterValueChange
- * @param {EventFacade} e
- * @protected
- */
- _afterValueChange: function (e) {
- var delay,
- fire,
- minQueryLength,
- newVal = e.newVal,
- query,
- that;
-
- // Don't query on value changes that didn't come from the user.
- if (e.src !== AutoCompleteBase.UI_SRC) {
- this._inputNode.set(VALUE, newVal);
- return;
- }
-
-
- minQueryLength = this.get('minQueryLength');
- query = this._parseValue(newVal) || '';
-
- if (minQueryLength >= 0 && query.length >= minQueryLength) {
- delay = this.get('queryDelay');
- that = this;
-
- fire = function () {
- that.fire(EVT_QUERY, {
- inputValue: newVal,
- query : query
- });
- };
-
- if (delay) {
- clearTimeout(this._delay);
- this._delay = setTimeout(fire, delay);
- } else {
- fire();
- }
- } else {
- clearTimeout(this._delay);
-
- this.fire(EVT_CLEAR, {
- prevVal: e.prevVal ? this._parseValue(e.prevVal) : null
- });
- }
- },
-
- /**
- * Handles blur events on the input node.
- *
- * @method _onInputBlur
- * @param {EventFacade} e
- * @protected
- */
- _onInputBlur: function (e) {
- var delim = this.get(QUERY_DELIMITER),
- delimPos,
- newVal,
- value;
-
- // If a query delimiter is set and the input's value contains one or
- // more trailing delimiters, strip them.
- if (delim && !this.get('allowTrailingDelimiter')) {
- delim = Lang.trimRight(delim);
- value = newVal = this._inputNode.get(VALUE);
-
- if (delim) {
- while ((newVal = Lang.trimRight(newVal)) &&
- (delimPos = newVal.length - delim.length) &&
- newVal.lastIndexOf(delim) === delimPos) {
-
- newVal = newVal.substring(0, delimPos);
- }
- } else {
- // Delimiter is one or more space characters, so just trim the
- // value.
- newVal = Lang.trimRight(newVal);
- }
-
- if (newVal !== value) {
- this.set(VALUE, newVal);
- }
- }
- },
-
- /**
- * Handles valueChange events on the input node and fires a
- * query event when the input value meets the configured
- * criteria.
- *
- * @method _onInputValueChange
- * @param {EventFacade} e
- * @protected
- */
- _onInputValueChange: function (e) {
- var newVal = e.newVal;
-
- // Don't query if the internal value is the same as the new value
- // reported by valueChange.
- if (newVal === this.get(VALUE)) {
- return;
- }
-
- this.set(VALUE, newVal, {src: AutoCompleteBase.UI_SRC});
- },
-
- /**
- * Handles source responses and fires the results event.
- *
- * @method _onResponse
- * @param {EventFacade} e
- * @protected
- */
- _onResponse: function (query, e) {
- // Ignore stale responses that aren't for the current query.
- if (query === (this.get(QUERY) || '')) {
- this._parseResponse(query || '', e.response, e.data);
- }
- },
-
- // -- Protected Default Event Handlers -------------------------------------
-
- /**
- * Default clear event handler. Sets the results
- * property to an empty array and query to null.
- *
- * @method _defClearFn
- * @protected
- */
- _defClearFn: function () {
- this._set(QUERY, null);
- this._set(RESULTS, []);
- },
-
- /**
- * Default query event handler. Sets the query
- * property and sends a request to the source if one is configured.
- *
- * @method _defQueryFn
- * @param {EventFacade} e
- * @protected
- */
- _defQueryFn: function (e) {
- var query = e.query;
-
- this.sendRequest(query); // sendRequest will set the 'query' attribute
- },
-
- /**
- * Default results event handler. Sets the results
- * property to the latest results.
- *
- * @method _defResultsFn
- * @param {EventFacade} e
- * @protected
- */
- _defResultsFn: function (e) {
- this._set(RESULTS, e[RESULTS]);
- }
-};
-
-Y.AutoCompleteBase = AutoCompleteBase;
-
-
-}, '3.4.1' ,{optional:['autocomplete-sources'], requires:['array-extras', 'base-build', 'escape', 'event-valuechange', 'node-base']});
diff --git a/lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold-debug.js b/lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold-debug.js
deleted file mode 100644
index 242263f1216..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold-debug.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-highlighters-accentfold', function(Y) {
-
-/**
- *
- * Provides pre-built accent-folding result highlighters for AutoComplete.
- *
- *
- *
- * These highlighters are similar to the ones provided by the
- * autocomplete-highlighters module, but use accent-aware
- * comparisons. For example, "resume" and "résumé" will be considered equal when
- * using the accent-folding highlighters.
- *
- *
- * @module autocomplete
- * @submodule autocomplete-highlighters-accentfold
- */
-
-/**
- * @class AutoCompleteHighlighters
- * @static
- */
-
-var Highlight = Y.Highlight,
- YArray = Y.Array;
-
-Y.mix(Y.namespace('AutoCompleteHighlighters'), {
- /**
- * Accent-folding version of charMatch().
- *
- * @method charMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- charMatchFold: function (query, results) {
- var queryChars = YArray.unique(query.split(''));
-
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, queryChars);
- });
- },
-
- /**
- * Accent-folding version of phraseMatch().
- *
- * @method phraseMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- phraseMatchFold: function (query, results) {
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, [query]);
- });
- },
-
- /**
- * Accent-folding version of startsWith().
- *
- * @method startsWithFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- startsWithFold: function (query, results) {
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, [query], {
- startsWith: true
- });
- });
- },
-
- /**
- * Accent-folding version of subWordMatch().
- *
- * @method subWordMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- subWordMatchFold: function (query, results) {
- var queryWords = Y.Text.WordBreak.getUniqueWords(query);
-
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, queryWords);
- });
- },
-
- /**
- * Accent-folding version of wordMatch().
- *
- * @method wordMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- wordMatchFold: function (query, results) {
- return YArray.map(results, function (result) {
- return Highlight.wordsFold(result.text, query);
- });
- }
-});
-
-
-}, '3.4.1' ,{requires:['array-extras', 'highlight-accentfold']});
diff --git a/lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold.js b/lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold.js
deleted file mode 100644
index 242263f1216..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-highlighters-accentfold', function(Y) {
-
-/**
- *
- * Provides pre-built accent-folding result highlighters for AutoComplete.
- *
- *
- *
- * These highlighters are similar to the ones provided by the
- * autocomplete-highlighters module, but use accent-aware
- * comparisons. For example, "resume" and "résumé" will be considered equal when
- * using the accent-folding highlighters.
- *
- *
- * @module autocomplete
- * @submodule autocomplete-highlighters-accentfold
- */
-
-/**
- * @class AutoCompleteHighlighters
- * @static
- */
-
-var Highlight = Y.Highlight,
- YArray = Y.Array;
-
-Y.mix(Y.namespace('AutoCompleteHighlighters'), {
- /**
- * Accent-folding version of charMatch().
- *
- * @method charMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- charMatchFold: function (query, results) {
- var queryChars = YArray.unique(query.split(''));
-
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, queryChars);
- });
- },
-
- /**
- * Accent-folding version of phraseMatch().
- *
- * @method phraseMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- phraseMatchFold: function (query, results) {
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, [query]);
- });
- },
-
- /**
- * Accent-folding version of startsWith().
- *
- * @method startsWithFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- startsWithFold: function (query, results) {
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, [query], {
- startsWith: true
- });
- });
- },
-
- /**
- * Accent-folding version of subWordMatch().
- *
- * @method subWordMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- subWordMatchFold: function (query, results) {
- var queryWords = Y.Text.WordBreak.getUniqueWords(query);
-
- return YArray.map(results, function (result) {
- return Highlight.allFold(result.text, queryWords);
- });
- },
-
- /**
- * Accent-folding version of wordMatch().
- *
- * @method wordMatchFold
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- wordMatchFold: function (query, results) {
- return YArray.map(results, function (result) {
- return Highlight.wordsFold(result.text, query);
- });
- }
-});
-
-
-}, '3.4.1' ,{requires:['array-extras', 'highlight-accentfold']});
diff --git a/lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters-debug.js b/lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters-debug.js
deleted file mode 100644
index 518c853c6c7..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters-debug.js
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-highlighters', function(Y) {
-
-/**
- * Provides pre-built result highlighters for AutoComplete.
- *
- * @module autocomplete
- * @submodule autocomplete-highlighters
- * @class AutoCompleteHighlighters
- * @static
- */
-
-var YArray = Y.Array,
- Highlight = Y.Highlight,
-
-Highlighters = Y.mix(Y.namespace('AutoCompleteHighlighters'), {
- // -- Public Methods -------------------------------------------------------
-
- /**
- * Highlights any individual query character that occurs anywhere in a
- * result. Case-insensitive.
- *
- * @method charMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- charMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // charMatchCase(). It's intentionally undocumented.
-
- var queryChars = YArray.unique((caseSensitive ? query :
- query.toLowerCase()).split(''));
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, queryChars, {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of charMatch().
- *
- * @method charMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- charMatchCase: function (query, results) {
- return Highlighters.charMatch(query, results, true);
- },
-
- /**
- * Highlights the complete query as a phrase anywhere within a result.
- * Case-insensitive.
- *
- * @method phraseMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- phraseMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // phraseMatchCase(). It's intentionally undocumented.
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, [query], {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of phraseMatch().
- *
- * @method phraseMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- phraseMatchCase: function (query, results) {
- return Highlighters.phraseMatch(query, results, true);
- },
-
- /**
- * Highlights the complete query as a phrase at the beginning of a result.
- * Case-insensitive.
- *
- * @method startsWith
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- startsWith: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // startsWithCase(). It's intentionally undocumented.
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, [query], {
- caseSensitive: caseSensitive,
- startsWith : true
- });
- });
- },
-
- /**
- * Case-sensitive version of startsWith().
- *
- * @method startsWithCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- startsWithCase: function (query, results) {
- return Highlighters.startsWith(query, results, true);
- },
-
- /**
- * Highlights portions of results in which words from the query match either
- * whole words or parts of words in the result. Non-word characters like
- * whitespace and certain punctuation are ignored. Case-insensitive.
- *
- * @method subWordMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- subWordMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // subWordMatchCase(). It's intentionally undocumented.
-
- var queryWords = Y.Text.WordBreak.getUniqueWords(query, {
- ignoreCase: !caseSensitive
- });
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, queryWords, {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of subWordMatch().
- *
- * @method subWordMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- subWordMatchCase: function (query, results) {
- return Highlighters.subWordMatch(query, results, true);
- },
-
- /**
- * Highlights individual words in results that are also in the query.
- * Non-word characters like punctuation are ignored. Case-insensitive.
- *
- * @method wordMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- wordMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // wordMatchCase(). It's intentionally undocumented.
-
- return YArray.map(results, function (result) {
- return Highlight.words(result.text, query, {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of wordMatch().
- *
- * @method wordMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- wordMatchCase: function (query, results) {
- return Highlighters.wordMatch(query, results, true);
- }
-});
-
-
-}, '3.4.1' ,{requires:['array-extras', 'highlight-base']});
diff --git a/lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters.js b/lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters.js
deleted file mode 100644
index 518c853c6c7..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters.js
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-highlighters', function(Y) {
-
-/**
- * Provides pre-built result highlighters for AutoComplete.
- *
- * @module autocomplete
- * @submodule autocomplete-highlighters
- * @class AutoCompleteHighlighters
- * @static
- */
-
-var YArray = Y.Array,
- Highlight = Y.Highlight,
-
-Highlighters = Y.mix(Y.namespace('AutoCompleteHighlighters'), {
- // -- Public Methods -------------------------------------------------------
-
- /**
- * Highlights any individual query character that occurs anywhere in a
- * result. Case-insensitive.
- *
- * @method charMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- charMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // charMatchCase(). It's intentionally undocumented.
-
- var queryChars = YArray.unique((caseSensitive ? query :
- query.toLowerCase()).split(''));
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, queryChars, {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of charMatch().
- *
- * @method charMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- charMatchCase: function (query, results) {
- return Highlighters.charMatch(query, results, true);
- },
-
- /**
- * Highlights the complete query as a phrase anywhere within a result.
- * Case-insensitive.
- *
- * @method phraseMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- phraseMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // phraseMatchCase(). It's intentionally undocumented.
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, [query], {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of phraseMatch().
- *
- * @method phraseMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- phraseMatchCase: function (query, results) {
- return Highlighters.phraseMatch(query, results, true);
- },
-
- /**
- * Highlights the complete query as a phrase at the beginning of a result.
- * Case-insensitive.
- *
- * @method startsWith
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- startsWith: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // startsWithCase(). It's intentionally undocumented.
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, [query], {
- caseSensitive: caseSensitive,
- startsWith : true
- });
- });
- },
-
- /**
- * Case-sensitive version of startsWith().
- *
- * @method startsWithCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- startsWithCase: function (query, results) {
- return Highlighters.startsWith(query, results, true);
- },
-
- /**
- * Highlights portions of results in which words from the query match either
- * whole words or parts of words in the result. Non-word characters like
- * whitespace and certain punctuation are ignored. Case-insensitive.
- *
- * @method subWordMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- subWordMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // subWordMatchCase(). It's intentionally undocumented.
-
- var queryWords = Y.Text.WordBreak.getUniqueWords(query, {
- ignoreCase: !caseSensitive
- });
-
- return YArray.map(results, function (result) {
- return Highlight.all(result.text, queryWords, {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of subWordMatch().
- *
- * @method subWordMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- subWordMatchCase: function (query, results) {
- return Highlighters.subWordMatch(query, results, true);
- },
-
- /**
- * Highlights individual words in results that are also in the query.
- * Non-word characters like punctuation are ignored. Case-insensitive.
- *
- * @method wordMatch
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- wordMatch: function (query, results, caseSensitive) {
- // The caseSensitive parameter is only intended for use by
- // wordMatchCase(). It's intentionally undocumented.
-
- return YArray.map(results, function (result) {
- return Highlight.words(result.text, query, {
- caseSensitive: caseSensitive
- });
- });
- },
-
- /**
- * Case-sensitive version of wordMatch().
- *
- * @method wordMatchCase
- * @param {String} query Query to match
- * @param {Array} results Results to highlight
- * @return {Array} Highlighted results
- * @static
- */
- wordMatchCase: function (query, results) {
- return Highlighters.wordMatch(query, results, true);
- }
-});
-
-
-}, '3.4.1' ,{requires:['array-extras', 'highlight-base']});
diff --git a/lib/yui/3.4.1/build/autocomplete-list-keys/autocomplete-list-keys-min.js b/lib/yui/3.4.1/build/autocomplete-list-keys/autocomplete-list-keys-min.js
deleted file mode 100644
index 50b3451eedd..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-list-keys/autocomplete-list-keys-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("autocomplete-list-keys",function(g){var c=40,a=13,d=27,f=9,b=38;function e(){g.before(this._unbindKeys,this,"destructor");g.before(this._bindKeys,this,"bindUI");this._initKeys();}e.prototype={_initKeys:function(){var h={},i={};this._keyEvents=[];h[c]=this._keyDown;i[a]=this._keyEnter;i[d]=this._keyEsc;i[f]=this._keyTab;i[b]=this._keyUp;this._keys=h;this._keysVisible=i;},_bindKeys:function(){this._keyEvents.push(this._inputNode.on("keydown",this._onInputKey,this));},_unbindKeys:function(){while(this._keyEvents.length){this._keyEvents.pop().detach();}},_keyDown:function(){if(this.get("visible")){this._activateNextItem();}else{this.show();}},_keyEnter:function(i){var h=this.get("activeItem");if(h){this.selectItem(h,i);}else{return false;}},_keyEsc:function(){this.hide();},_keyTab:function(i){var h;if(this.get("tabSelect")){h=this.get("activeItem");if(h){this.selectItem(h,i);return true;}}return false;},_keyUp:function(){this._activatePrevItem();},_onInputKey:function(j){var h,i=j.keyCode;this._lastInputKey=i;if(this.get("results").length){h=this._keys[i];if(!h&&this.get("visible")){h=this._keysVisible[i];}if(h){if(h.call(this,j)!==false){j.preventDefault();}}}}};g.Base.mix(g.AutoCompleteList,[e]);},"3.4.1",{requires:["autocomplete-list","base-build"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list-skin.css b/lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list-skin.css
deleted file mode 100644
index 9b1de4a8ef9..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list-skin.css
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-skin-night{
- background-color:#000;
- font-family: HelveticaNeue,arial,helvetica,clean,sans-serif;
- color:#fff;
-}
-
-.yui3-skin-night .yui3-aclist-content {
- font-size:100%;
- background: #0E0E0E;
- color: #ccc;
- border: 1px solid #303030;
- -moz-box-shadow: 0 0 17px rgba(0,0,0,0.58);
- -webkit-box-shadow: 0 0 17px rgba(0,0,0,0.58);
- box-shadow: 0 0 17px rgba(0,0,0,0.58);
- margin: 5px 0 0 8px;
-}
-
-.yui3-skin-night .yui3-aclist-input {
- background: #fff;
- font-size:100%;
- -moz-border-radius: 13px;
- -webkit-border-radius: 13px;
- border-radius: 13px;
- -moz-box-shadow: inset 1px 1px 4px rgba(0,0,0,0.9);
- -webkit-box-shadow: inset 1px 1px 4px rgba(0,0,0,0.9);
- box-shadow: 1px 1px 4px rgba(0,0,0,0.6) inset;
-
- border: none;
- padding-left:0.6em;
-}
-
-.yui3-skin-night .yui3-aclist-item-active,
-.yui3-skin-night .yui3-aclist-item-hover {
- background: -moz-linear-gradient(
- 0% 100% 90deg,
- #252626 0%,
- #333434 100%
- );
- background: -webkit-gradient(
- linear,
- left top,
- left bottom,
- from(#333434),
- to(#252626)
- );
-}
-
-.yui3-skin-night .yui3-aclist-item { padding: 0.4em 1em 0.6em; }
-.yui3-skin-night .yui3-aclist-item-active { outline: none; }
-.yui3-skin-night .yui3-highlight { color:#EFEFEF; }
diff --git a/lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list.css b/lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list.css
deleted file mode 100644
index c7967998354..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-aclist{position:absolute;z-index:1}.yui3-aclist-hidden{visibility:hidden}.yui3-aclist-aria{left:-9999px;position:absolute}.yui3-aclist-list{list-style:none;margin:0;overflow:hidden;padding:0}.yui3-aclist-item{cursor:pointer;list-style:none;padding:2px 5px}.yui3-aclist-item-active{outline:#afafaf dotted thin}.yui3-skin-night{background-color:#000;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;color:#fff}.yui3-skin-night .yui3-aclist-content{font-size:100%;background:#0e0e0e;color:#ccc;border:1px solid #303030;-moz-box-shadow:0 0 17px rgba(0,0,0,0.58);-webkit-box-shadow:0 0 17px rgba(0,0,0,0.58);box-shadow:0 0 17px rgba(0,0,0,0.58);margin:5px 0 0 8px}.yui3-skin-night .yui3-aclist-input{background:#fff;font-size:100%;-moz-border-radius:13px;-webkit-border-radius:13px;border-radius:13px;-moz-box-shadow:inset 1px 1px 4px rgba(0,0,0,0.9);-webkit-box-shadow:inset 1px 1px 4px rgba(0,0,0,0.9);box-shadow:1px 1px 4px rgba(0,0,0,0.6) inset;border:0;padding-left:.6em}.yui3-skin-night .yui3-aclist-item-active,.yui3-skin-night .yui3-aclist-item-hover{background:-moz-linear-gradient(0% 100% 90deg,#252626 0,#333434 100%);background:-webkit-gradient(linear,left top,left bottom,from(#333434),to(#252626))}.yui3-skin-night .yui3-aclist-item{padding:.4em 1em .6em}.yui3-skin-night .yui3-aclist-item-active{outline:0}.yui3-skin-night .yui3-highlight{color:#efefef}
diff --git a/lib/yui/3.4.1/build/autocomplete-list/autocomplete-list-min.js b/lib/yui/3.4.1/build/autocomplete-list/autocomplete-list-min.js
deleted file mode 100644
index e6f3f6ebb94..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-list/autocomplete-list-min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("autocomplete-list",function(b){var i=b.Lang,v=b.Node,l=b.Array,h=b.UA.ie&&b.UA.ie<7,p=9,s="_CLASS_ITEM",t="_CLASS_ITEM_ACTIVE",d="_CLASS_ITEM_HOVER",u="_SELECTOR_ITEM",f="activeItem",k="alwaysShowList",o="circular",r="hoveredItem",m="id",e="item",c="list",w="result",j="results",q="visible",g="width",n="select",a=b.Base.create("autocompleteList",b.Widget,[b.AutoCompleteBase,b.WidgetPosition,b.WidgetPositionAlign],{ARIA_TEMPLATE:"",ITEM_TEMPLATE:"",LIST_TEMPLATE:"
",initializer:function(){var x=this.get("inputNode");if(!x){b.error("No inputNode specified.");return;}this._inputNode=x;this._listEvents=[];this.DEF_PARENT_NODE=x.get("parentNode");this[s]=this.getClassName(e);this[t]=this.getClassName(e,"active");this[d]=this.getClassName(e,"hover");this[u]="."+this[s];this.publish(n,{defaultFn:this._defSelectFn});},destructor:function(){while(this._listEvents.length){this._listEvents.pop().detach();}if(this._ariaNode){this._ariaNode.remove().destroy(true);}},bindUI:function(){this._bindInput();this._bindList();},renderUI:function(){var C=this._createAriaNode(),z=this.get("boundingBox"),y=this.get("contentBox"),B=this._inputNode,A=this._createListNode(),x=B.get("parentNode");B.addClass(this.getClassName("input")).setAttrs({"aria-autocomplete":c,"aria-expanded":false,"aria-owns":A.get("id")});x.append(C);if(h){z.plug(b.Plugin.Shim);}z.setStyle("position","absolute");this._ariaNode=C;this._boundingBox=z;this._contentBox=y;this._listNode=A;this._parentNode=x;},syncUI:function(){this._syncResults();this._syncVisibility();},hide:function(){return this.get(k)?this:this.set(q,false);},selectItem:function(y,x){if(y){if(!y.hasClass(this[s])){return this;}}else{y=this.get(f);if(!y){return this;}}this.fire(n,{itemNode:y,originEvent:x||null,result:y.getData(w)});return this;},_activateNextItem:function(){var y=this.get(f),x;if(y){x=y.next(this[u])||(this.get(o)?null:y);}else{x=this._getFirstItemNode();}this.set(f,x);return this;},_activatePrevItem:function(){var y=this.get(f),x=y?y.previous(this[u]):this.get(o)&&this._getLastItemNode();this.set(f,x||null);return this;},_add:function(x){var y=[];l.each(i.isArray(x)?x:[x],function(z){y.push(this._createItemNode(z).setData(w,z));},this);y=b.all(y);this._listNode.append(y.toFrag());return y;},_ariaSay:function(z,x){var y=this.get("strings."+z);this._ariaNode.setContent(x?i.sub(y,x):y);},_bindInput:function(){var A=this._inputNode,y,z,x;if(this.get("align")===null){x=this.get("tokenInput");y=(x&&x.get("boundingBox"))||A;this.set("align",{node:y,points:["tl","bl"]});if(!this.get(g)&&(z=y.get("offsetWidth"))){this.set(g,z);}}this._listEvents.concat([A.after("blur",this._afterListInputBlur,this),A.after("focus",this._afterListInputFocus,this)]);},_bindList:function(){this._listEvents.concat([b.on("windowresize",this._syncPosition,this),this.after({blur:this._afterListBlur,focus:this._afterListFocus,mouseover:this._afterMouseOver,mouseout:this._afterMouseOut,activeItemChange:this._afterActiveItemChange,alwaysShowListChange:this._afterAlwaysShowListChange,hoveredItemChange:this._afterHoveredItemChange,resultsChange:this._afterResultsChange,visibleChange:this._afterVisibleChange}),this._listNode.delegate("click",this._onItemClick,this[u],this)]);},_clear:function(){this.set(f,null);this._set(r,null);this._listNode.get("children").remove(true);},_createAriaNode:function(){var x=v.create(this.ARIA_TEMPLATE);return x.addClass(this.getClassName("aria")).setAttrs({"aria-live":"polite",role:"status"});},_createItemNode:function(x){var y=v.create(this.ITEM_TEMPLATE);return y.addClass(this[s]).setAttrs({id:b.stamp(y),role:"option"}).setAttribute("data-text",x.text).append(x.display);},_createListNode:function(){var x=this.get("listNode")||v.create(this.LIST_TEMPLATE);x.addClass(this.getClassName(c)).setAttrs({id:b.stamp(x),role:"listbox"});this._set("listNode",x);this.get("contentBox").append(x);return x;},_getFirstItemNode:function(){return this._listNode.one(this[u]);},_getLastItemNode:function(){return this._listNode.one(this[u]+":last-child");},_syncPosition:function(){this._syncUIPosAlign();this._syncShim();},_syncResults:function(x){if(!x){x=this.get(j);}this._clear();if(x.length){this._add(x);this._ariaSay("items_available");}this._syncPosition();if(this.get("activateFirstItem")&&!this.get(f)){this.set(f,this._getFirstItemNode());}},_syncShim:h?function(){this._boundingBox.shim.sync();}:function(){},_syncVisibility:function(x){if(this.get(k)){x=true;this.set(q,x);}if(typeof x==="undefined"){x=this.get(q);}this._inputNode.set("aria-expanded",x);this._boundingBox.set("aria-hidden",!x);if(x){this._syncPosition();}else{this.set(f,null);this._set(r,null);this._boundingBox.get("offsetWidth");}},_afterActiveItemChange:function(A){var z=this._inputNode,x=A.newVal,B=A.prevVal,y;if(B&&B._node){B.removeClass(this[t]);}if(x){x.addClass(this[t]);z.set("aria-activedescendant",x.get(m));}else{z.removeAttribute("aria-activedescendant");}if(this.get("scrollIntoView")){y=x||z;if(!y.inRegion(b.DOM.viewportRegion(),true)||!y.inRegion(this._contentBox,true)){y.scrollIntoView();}}},_afterAlwaysShowListChange:function(x){this.set(q,x.newVal||this.get(j).length>0);},_afterHoveredItemChange:function(y){var x=y.newVal,z=y.prevVal;if(z){z.removeClass(this[d]);}if(x){x.addClass(this[d]);}},_afterListBlur:function(){this._listFocused=false;if(!this._listInputFocused){this.hide();}},_afterListFocus:function(){this._listFocused=true;},_afterListInputBlur:function(){this._listInputFocused=false;if((!this._mouseOverList&&!this._listFocused)||this._lastInputKey===p){this.hide();}},_afterListInputFocus:function(){this._listInputFocused=true;},_afterMouseOver:function(x){var y=x.domEvent.target.ancestor(this[u],true);this._mouseOverList=true;if(y){this._set(r,y);}},_afterMouseOut:function(){this._mouseOverList=false;this._set(r,null);if(!this._listFocused&&!this._listInputFocused){this.hide();}},_afterResultsChange:function(x){this._syncResults(x.newVal);if(!this.get(k)){this.set(q,!!x.newVal.length);
-}},_afterVisibleChange:function(x){this._syncVisibility(!!x.newVal);},_onItemClick:function(x){var y=x.currentTarget;this.set(f,y);this.selectItem(y,x);},_defSelectFn:function(x){var y=x.result.text;this._inputNode.focus();this._updateValue(y);this._ariaSay("item_selected",{item:y});this.hide();}},{ATTRS:{activateFirstItem:{value:false},activeItem:{setter:b.one,value:null},alwaysShowList:{value:false},circular:{value:true},hoveredItem:{readOnly:true,value:null},listNode:{writeOnce:"initOnly",value:null},scrollIntoView:{value:false},strings:{valueFn:function(){return b.Intl.get("autocomplete-list");}},tabSelect:{value:true},visible:{value:false}},CSS_PREFIX:b.ClassNameManager.getClassName("aclist")});b.AutoCompleteList=a;b.AutoComplete=a;},"3.4.1",{lang:["en"],after:["autocomplete-sources"],requires:["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],skinnable:true});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/autocomplete-plugin/autocomplete-plugin-debug.js b/lib/yui/3.4.1/build/autocomplete-plugin/autocomplete-plugin-debug.js
deleted file mode 100644
index be60ecc2c8f..00000000000
--- a/lib/yui/3.4.1/build/autocomplete-plugin/autocomplete-plugin-debug.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-plugin', function(Y) {
-
-/**
- * Binds an AutoCompleteList instance to a Node instance.
- *
- * @module autocomplete
- * @submodule autocomplete-plugin
- */
-
-/**
- *
- * Binds an AutoCompleteList instance to a Node instance.
- *
- *
- *
- * Example:
- *
- *
- *
- * Y.one('#my-input').plug(Y.Plugin.AutoComplete, {
- * source: 'select * from search.suggest where query="{query}"'
- * });
- *
- * // You can now access the AutoCompleteList instance at Y.one('#my-input').ac
- *
- * Binds an AutoCompleteList instance to a Node instance.
- *
- *
- *
- * Example:
- *
- *
- *
- * Y.one('#my-input').plug(Y.Plugin.AutoComplete, {
- * source: 'select * from search.suggest where query="{query}"'
- * });
- *
- * // You can now access the AutoCompleteList instance at Y.one('#my-input').ac
- *
'),r=q.get("offsetWidth")-q.get("clientWidth");q.remove(true);return r;});function p(){p.superclass.constructor.apply(this,arguments);}b.mix(p,{NS:"scroll",NAME:"dataTableScroll",ATTRS:{width:{value:undefined,writeOnce:"initOnly"},height:{value:undefined,writeOnce:"initOnly"},_scroll:{valueFn:function(){var q=this.get("width"),r=this.get("height");if(q&&r){return"xy";}else{if(q){return"x";}else{if(r){return"y";}else{return null;}}}}},COLOR_COLUMNFILLER:{value:"#f2f2f2",validator:k.isString,setter:function(q){if(this._headerContainerNode){this._headerContainerNode.setStyle("backgroundColor",q);}}}}});b.extend(p,b.Plugin.Base,{_parentTableNode:null,_parentTheadNode:null,_parentTbodyNode:null,_parentMsgNode:null,_parentContainer:null,_bodyContainerNode:null,_headerContainerNode:null,initializer:function(q){var r=this.get("host");this._parentContainer=r.get("contentBox");this._parentContainer.addClass(j);this._setUpNodes();},_setUpNodes:function(){this.afterHostMethod("_addTableNode",this._setUpParentTableNode);this.afterHostMethod("_addTheadNode",this._setUpParentTheadNode);this.afterHostMethod("_addTbodyNode",this._setUpParentTbodyNode);this.afterHostMethod("_addMessageNode",this._setUpParentMessageNode);this.afterHostMethod("renderUI",this.renderUI);this.afterHostMethod("bindUI",this.bindUI);this.afterHostMethod("syncUI",this.syncUI);if(this.get("_scroll")!=="x"){this.afterHostMethod("_attachTheadThNode",this._attachTheadThNode);this.afterHostMethod("_attachTbodyTdNode",this._attachTbodyTdNode);}},_setUpParentTableNode:function(){this._parentTableNode=this.get("host")._tableNode;},_setUpParentTheadNode:function(){this._parentTheadNode=this.get("host")._theadNode;},_setUpParentTbodyNode:function(){this._parentTbodyNode=this.get("host")._tbodyNode;},_setUpParentMessageNode:function(){this._parentMsgNode=this.get("host")._msgNode;},renderUI:function(){this._createBodyContainer();this._createHeaderContainer();this._setContentBoxDimensions();},bindUI:function(){this._bodyContainerNode.on("scroll",b.bind("_onScroll",this));this.afterHostEvent("recordsetChange",this.syncUI);this.afterHostEvent("recordset:recordsChange",this.syncUI);},syncUI:function(){this._removeCaptionNode();this._syncWidths();this._syncScroll();},_removeCaptionNode:function(){this.get("host")._captionNode.remove();},_syncWidths:function(){var t=this._parentContainer.one("."+a),q=this._parentContainer.one("."+e),v=t.all("thead ."+l),u=q.one("."+d+" tr"),s=u&&u.all("."+l),r=(o.ie)?"offsetWidth":"clientWidth";if(s&&s.size()){v.each(function(B,y){var w=s.item(y),x=B.get(r),A=w.get(r),z=Math.max(x,A);z-=(parseInt(B.getComputedStyle("paddingLeft"),10)|0)+(parseInt(B.getComputedStyle("paddingRight"),10)|0);B.setStyle("width",z+"px");w.setStyle("width",z+"px");});}},_attachTheadThNode:function(r){var q=r.column.get("width");if(q){r.th.one("."+l).setStyles({width:q,overflow:"hidden"});}},_attachTbodyTdNode:function(r){var q=r.column.get("width");if(q){r.td.one("."+l).setStyles({width:q,overflow:"hidden"});}},_createBodyContainer:function(){var q=m.create(c);this._bodyContainerNode=q;this._setStylesForTbody();q.appendChild(this._parentTableNode);this._parentContainer.appendChild(q);},_createHeaderContainer:function(){var r=m.create(i),q=m.create(h);this._headerContainerNode=r;this._setStylesForThead();q.appendChild(this._parentTheadNode);r.appendChild(q);this._parentContainer.prepend(r);},_setStylesForTbody:function(){var r=this.get("_scroll"),q=this.get("width")||"",t=this.get("height")||"",s=this._bodyContainerNode,u={width:"",height:t};if(r==="x"){u.overflowY="hidden";u.width=q;}else{if(r==="y"){u.overflowX="hidden";}else{if(r==="xy"){u.width=q;}else{u.overflowX="hidden";u.overflowY="hidden";u.width=q;}}}s.setStyles(u);return s;},_setStylesForThead:function(){var q=this.get("width")||"",r=this._headerContainerNode;r.setStyles({"width":q,"overflow":"hidden"});},_setContentBoxDimensions:function(){if(this.get("_scroll")==="y"||(!this.get("width"))){this._parentContainer.setStyle("width","auto");}},_onScroll:function(){this._headerContainerNode.set("scrollLeft",this._bodyContainerNode.get("scrollLeft"));},_syncScroll:function(){this._syncScrollX();this._syncScrollY();this._syncScrollOverhang();if(o.opera){this._headerContainerNode.set("scrollLeft",this._bodyContainerNode.get("scrollLeft"));if(!this.get("width")){document.body.style+="";}}},_syncScrollY:function(){var q=this._parentTbodyNode,s=this._bodyContainerNode,r;if(!this.get("width")){r=(s.get("scrollHeight")>s.get("clientHeight"))?(q.get("parentNode").get("clientWidth")+f())+"px":(q.get("parentNode").get("clientWidth")+2)+"px";this._parentContainer.setStyle("width",r);}},_syncScrollX:function(){var q=this._parentTbodyNode,s=this._bodyContainerNode,r;this._headerContainerNode.set("scrollLeft",this._bodyContainerNode.get("scrollLeft"));if(!this.get("height")&&(o.ie)){r=(s.get("scrollWidth")>s.get("offsetWidth"))?(q.get("parentNode").get("offsetHeight")+f())+"px":q.get("parentNode").get("offsetHeight")+"px";s.setStyle("height",r);}if(q.get("rows").size()){this._parentMsgNode.get("parentNode").setStyle("width","");}else{this._parentMsgNode.get("parentNode").setStyle("width",this._parentTheadNode.get("parentNode").get("offsetWidth")+"px");}},_syncScrollOverhang:function(){var q=this._bodyContainerNode,r=1;if((q.get("scrollHeight")>q.get("clientHeight"))||(q.get("scrollWidth")>q.get("clientWidth"))){r=18;}this._setOverhangValue(r);if(o.ie!==0&&this.get("_scroll")==="y"&&this._bodyContainerNode.get("scrollHeight")>this._bodyContainerNode.get("offsetHeight")){this._headerContainerNode.setStyle("width",this._parentContainer.get("width"));
-}},_setOverhangValue:function(r){var t=this.get("host"),v=t.get("columnset").get("definitions"),q=v.length,u=r+"px solid "+this.get("COLOR_COLUMNFILLER"),s=m.all("#"+this._parentContainer.get("id")+" ."+a+" table thead th");s.item(q-1).setStyle("borderRight",u);}});b.namespace("Plugin").DataTableScroll=p;},"3.4.1",{requires:["datatable-base","plugin"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/datatable-sort/assets/datatable-base-core.css b/lib/yui/3.4.1/build/datatable-sort/assets/datatable-base-core.css
deleted file mode 100644
index 410683e186b..00000000000
--- a/lib/yui/3.4.1/build/datatable-sort/assets/datatable-base-core.css
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-/* foundational CSS */
-
-/* mask */
-.yui3-skin-sam .yui3-datatable-mask {
- position:absolute;
- z-index:9500;
-}
-
-/* scrollable */
-.yui3-datatable-tmp {
- position:absolute;
- left:-9000px;
-}
-
-.yui3-datatable-scrollable .yui3-datatable-bd {
- overflow:auto;
-}
-.yui3-datatable-scrollable .yui3-datatable-hd {
- overflow:hidden;
- position:relative; /* for ie overflow bug http://rowanw.com/bugs/overflow_relative.htm */
-}
-
-.yui3-datatable-scrollable .yui3-datatable-bd thead tr,
-.yui3-datatable-scrollable .yui3-datatable-bd thead th {
- position:absolute;
- left:-1500px;
-}
-
-.yui3-datatable-scrollable tbody {
- -moz-outline:none;
-}
-
-/* sortable columns */
-
-.yui3-skin-sam thead .yui3-datatable-sortable {
- cursor:pointer;
-}
-
-/* draggable columns */
-.yui3-skin-sam thead .yui3-datatable-draggable {
- cursor: move;
-}
-.yui3-datatable-coltarget {
- position: absolute;
- z-index: 999;
-}
-
-/* resizeable columns */
-.yui3-datatable-hd {
- zoom:1;
-}
-th.yui3-datatable-resizeable .yui3-datatable-resizerliner {
- position:relative;
-}
-.yui3-datatable-resizer {
- position:absolute;
- right:0;
- bottom:0;
- height:100%;
- cursor:e-resize;
- cursor:col-resize;
- background-color:#CCC;opacity:0;filter: alpha(opacity=0); /* Bug 1952811: IE transparency z-index */
-}
-.yui3-datatable-resizerproxy {
- visibility:hidden;
- position:absolute;
- z-index:9000;
- background-color:#CCC;opacity:0;filter: alpha(opacity=0); /* Bug 1952811: IE transparency z-index */
-}
-
-/* hidden columns */
-th.yui3-datatable-hidden .yui3-datatable-liner,
-td.yui3-datatable-hidden .yui3-datatable-liner,
-th.yui3-datatable-hidden .yui3-datatable-resizer {
- /*TODO: document change from 2.5.2 to 2.6
- margin:0;
- padding:0;
- white-space:nowrap;
- width:1px;
- overflow:hidden;*/
- display:none;
-}
-
-/* editing */
-.yui3-datatable-editor, .yui3-datatable-editor-shim {
- position:absolute;z-index:9000;
-}
diff --git a/lib/yui/3.4.1/build/datatable-sort/datatable-sort-min.js b/lib/yui/3.4.1/build/datatable-sort/datatable-sort-min.js
deleted file mode 100644
index fed72f42b46..00000000000
--- a/lib/yui/3.4.1/build/datatable-sort/datatable-sort-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("datatable-sort",function(g){var f=g.ClassNameManager.getClassName,h="datatable",b="column",d="asc",c="desc",a='{value}';function e(){e.superclass.constructor.apply(this,arguments);}g.mix(e,{NS:"sort",NAME:"dataTableSort",ATTRS:{trigger:{value:{event:"click",selector:"th"},writeOnce:"initOnly"},lastSortedBy:{setter:"_setLastSortedBy",lazyAdd:false},template:{value:a},strings:{valueFn:function(){return g.Intl.get("datatable-sort");}}}});g.extend(e,g.Plugin.Base,{initializer:function(j){var k=this.get("host"),i=this.get("trigger");k.get("recordset").plug(g.Plugin.RecordsetSort,{dt:k});k.get("recordset").sort.addTarget(k);this.doBefore("_createTheadThNode",this._beforeCreateTheadThNode);this.doBefore("_attachTheadThNode",this._beforeAttachTheadThNode);this.doBefore("_attachTbodyTdNode",this._beforeAttachTbodyTdNode);k.delegate(i.event,g.bind(this._onEventSortColumn,this),i.selector);k.after("recordsetSort:sort",function(){this._uiSetRecordset(this.get("recordset"));});this.on("lastSortedByChange",function(l){this._uiSetLastSortedBy(l.prevVal,l.newVal,k);});if(k.get("rendered")){k._uiSetColumnset(k.get("columnset"));this._uiSetLastSortedBy(null,this.get("lastSortedBy"),k);}},_setLastSortedBy:function(i){if(g.Lang.isString(i)){i={key:i,dir:"desc"};}if(i){return(i.dir==="desc")?{key:i.key,dir:"desc",notdir:"asc"}:{key:i.key,dir:"asc",notdir:"desc"};}else{return null;}},_uiSetLastSortedBy:function(n,m,l){var w=this.get("strings"),k=l.get("columnset"),x=n&&n.key,u=m&&m.key,i=n&&l.getClassName(n.dir),p=m&&l.getClassName(m.dir),r=k.keyHash[x],o=k.keyHash[u],q=l._tbodyNode,v=g.Lang.sub,j,t,s;if(r&&i){j=r.thNode;t=j.one("a");if(t){t.set("title",v(w.sortBy,{column:r.get("label")}));}j.removeClass(i);q.all("."+f(b,r.get("id"))).removeClass(i);}if(o&&p){j=o.thNode;t=j.one("a");if(t){s=(m.dir===d)?"reverseSortBy":"sortBy";t.set("title",v(w[s],{column:o.get("label")}));}j.addClass(p);q.all("."+f(b,o.get("id"))).addClass(p);}},_beforeCreateTheadThNode:function(k){var i,j;if(k.column.get("sortable")){i=this.get("lastSortedBy");j=(i&&i.dir===d&&i.key===k.column.get("key"))?"reverseSortBy":"sortBy";k.value=g.Lang.sub(this.get("template"),{link_class:k.link_class||"",link_title:g.Lang.sub(this.get("strings."+j),{column:k.column.get("label")}),link_href:"#",value:k.value});}},_beforeAttachTheadThNode:function(m){var l=this.get("lastSortedBy"),k=l&&l.key,i=l&&l.dir,j=l&&l.notdir;if(m.column.get("sortable")){m.th.addClass(f(h,"sortable"));}if(k&&(k===m.column.get("key"))){m.th.replaceClass(f(h,j),f(h,i));}},_beforeAttachTbodyTdNode:function(m){var l=this.get("lastSortedBy"),k=l&&l.key,i=l&&l.dir,j=l&&l.notdir;if(m.column.get("sortable")){m.td.addClass(f(h,"sortable"));}if(k&&(k===m.column.get("key"))){m.td.replaceClass(f(h,j),f(h,i));}},_onEventSortColumn:function(n){n.halt();var l=this.get("host"),k=l.get("columnset").idHash[n.currentTarget.get("id")],j,m,i,o,p;if(k.get("sortable")){j=k.get("key");m=k.get("field");i=this.get("lastSortedBy")||{};o=(i.key===j&&i.dir===d);p=k.get("sortFn");l.get("recordset").sort.sort(m,o,p);this.set("lastSortedBy",{key:j,dir:(o)?c:d});}}});g.namespace("Plugin").DataTableSort=e;},"3.4.1",{requires:["datatable-base","plugin","recordset-sort"],lang:["en"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/datatype-date-format/lang/datatype-date-format_ja-JP.js b/lib/yui/3.4.1/build/datatype-date-format/lang/datatype-date-format_ja-JP.js
deleted file mode 100644
index a123bfa0cde..00000000000
--- a/lib/yui/3.4.1/build/datatype-date-format/lang/datatype-date-format_ja-JP.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("lang/datatype-date-format_ja-JP",function(a){a.Intl.add("datatype-date-format","ja-JP",{"a":["日","月","火","水","木","金","土"],"A":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"b":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"B":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"c":"%Y年%m月%d日(%a)%k時%M分%S秒 %Z","p":["午前","午後"],"P":["午前","午後"],"x":"%y/%m/%d","X":"%k時%M分%S秒"});},"3.4.1");
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/datatype-date-format/lang/datatype-date-format_ja.js b/lib/yui/3.4.1/build/datatype-date-format/lang/datatype-date-format_ja.js
deleted file mode 100644
index 7ba11aa7a1c..00000000000
--- a/lib/yui/3.4.1/build/datatype-date-format/lang/datatype-date-format_ja.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("lang/datatype-date-format_ja",function(a){a.Intl.add("datatype-date-format","ja",{"a":["日","月","火","水","木","金","土"],"A":["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"b":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"B":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"c":"%Y年%m月%d日(%a)%k時%M分%S秒 %Z","p":["午前","午後"],"P":["午前","午後"],"x":"%y/%m/%d","X":"%k時%M分%S秒"});},"3.4.1");
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math-debug.js b/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math-debug.js
deleted file mode 100644
index ce74771099d..00000000000
--- a/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math-debug.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('datatype-date-math', function(Y) {
-
-/**
- * Parse number submodule.
- *
- * @module datatype
- * @submodule datatype-date-parse
- * @for DataType.Date
- */
-var LANG = Y.Lang;
-
-Y.mix(Y.namespace("DataType.Date"), {
-
- /**
- * Checks whether a native JavaScript Date contains a valid value.
- * @for DataType.Date
- * @method isValidDate
- * @param oDate {Date} Date in the month for which the number of days is desired.
- * @return {Boolean} True if the date argument contains a valid value.
- */
- isValidDate : function (oDate) {
- if(LANG.isDate(oDate) && (isFinite(oDate)) && (oDate != "Invalid Date") && !isNaN(oDate) && (oDate != null)) {
- return true;
- }
- else {
- Y.log("Could not validate data " + LANG.dump(oDate) + " as type Date", "warn", "date");
- return false;
- }
- },
-
- areEqual : function (aDate, bDate) {
- return (this.isValidDate(aDate) && this.isValidDate(bDate) && (aDate.getTime() == bDate.getTime()));
- },
-
- isGreater : function (aDate, bDate) {
- return (this.isValidDate(aDate) && this.isValidDate(bDate) && (aDate.getTime() > bDate.getTime()));
- },
-
- isGreaterOrEqual : function (aDate, bDate) {
- return (this.isValidDate(aDate) && this.isValidDate(bDate) && (aDate.getTime() >= bDate.getTime()));
- },
-
- addMonths : function (oDate, numMonths) {
- var newYear = oDate.getFullYear();
- var newMonth = oDate.getMonth() + numMonths;
-
- newYear = Math.floor(newYear + newMonth / 12);
- newMonth = (newMonth % 12 + 12) % 12;
-
- var newDate = new Date (oDate.getTime());
- newDate.setYear(newYear);
- newDate.setMonth(newMonth);
-
- return newDate;
- },
-
- addYears : function (oDate, numYears) {
- var newYear = oDate.getFullYear() + numYears;
- var newDate = new Date(oDate.getTime());
-
- newDate.setYear(newYear);
- return newDate;
- },
-
- listOfDatesInMonth : function (oDate) {
- if (!this.isValidDate(oDate)) {
- return [];
- }
-
- var daysInMonth = this.daysInMonth(oDate),
- year = oDate.getFullYear(),
- month = oDate.getMonth(),
- output = [];
-
- for (var day = 1; day <= daysInMonth; day++) {
- output.push(new Date(year, month, day, 12, 0, 0));
- }
-
- return output;
- },
-
- /**
- * Takes a native JavaScript Date and returns the number of days in the month that the given date belongs to.
- * @for DataType.Date
- * @method daysInMonth
- * @param oDate {Date} Date in the month for which the number of days is desired.
- * @return {Number} A number (either 28, 29, 30 or 31) of days in the given month.
- */
- daysInMonth : function (oDate) {
- if (!this.isValidDate(oDate)) {
- return 0;
- }
-
- var mon = oDate.getMonth();
- var lengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
- if (mon != 1) {
- return lengths[mon];
- }
- else {
-
- var year = oDate.getFullYear();
- if (year%400 === 0) {
- return 29;
- }
- else if (year%100 === 0) {
- return 28;
- }
- else if (year%4 === 0) {
- return 29;
- }
- else {
- return 28;
- }
- }
- }
-
-});
-
-
-}, '3.4.1' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math-min.js b/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math-min.js
deleted file mode 100644
index 98d943ca232..00000000000
--- a/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("datatype-date-math",function(b){var a=b.Lang;b.mix(b.namespace("DataType.Date"),{isValidDate:function(c){if(a.isDate(c)&&(isFinite(c))&&(c!="Invalid Date")&&!isNaN(c)&&(c!=null)){return true;}else{return false;}},areEqual:function(d,c){return(this.isValidDate(d)&&this.isValidDate(c)&&(d.getTime()==c.getTime()));},isGreater:function(d,c){return(this.isValidDate(d)&&this.isValidDate(c)&&(d.getTime()>c.getTime()));},isGreaterOrEqual:function(d,c){return(this.isValidDate(d)&&this.isValidDate(c)&&(d.getTime()>=c.getTime()));},addMonths:function(f,c){var e=f.getFullYear();var g=f.getMonth()+c;e=Math.floor(e+g/12);g=(g%12+12)%12;var d=new Date(f.getTime());d.setYear(e);d.setMonth(g);return d;},addYears:function(f,e){var d=f.getFullYear()+e;var c=new Date(f.getTime());c.setYear(d);return c;},listOfDatesInMonth:function(g){if(!this.isValidDate(g)){return[];}var e=this.daysInMonth(g),f=g.getFullYear(),h=g.getMonth(),d=[];for(var c=1;c<=e;c++){d.push(new Date(f,h,c,12,0,0));}return d;},daysInMonth:function(e){if(!this.isValidDate(e)){return 0;}var d=e.getMonth();var f=[31,28,31,30,31,30,31,31,30,31,30,31];if(d!=1){return f[d];}else{var c=e.getFullYear();if(c%400===0){return 29;}else{if(c%100===0){return 28;}else{if(c%4===0){return 29;}else{return 28;}}}}}});},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math.js b/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math.js
deleted file mode 100644
index d644196763a..00000000000
--- a/lib/yui/3.4.1/build/datatype-date-math/datatype-date-math.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('datatype-date-math', function(Y) {
-
-/**
- * Parse number submodule.
- *
- * @module datatype
- * @submodule datatype-date-parse
- * @for DataType.Date
- */
-var LANG = Y.Lang;
-
-Y.mix(Y.namespace("DataType.Date"), {
-
- /**
- * Checks whether a native JavaScript Date contains a valid value.
- * @for DataType.Date
- * @method isValidDate
- * @param oDate {Date} Date in the month for which the number of days is desired.
- * @return {Boolean} True if the date argument contains a valid value.
- */
- isValidDate : function (oDate) {
- if(LANG.isDate(oDate) && (isFinite(oDate)) && (oDate != "Invalid Date") && !isNaN(oDate) && (oDate != null)) {
- return true;
- }
- else {
- return false;
- }
- },
-
- areEqual : function (aDate, bDate) {
- return (this.isValidDate(aDate) && this.isValidDate(bDate) && (aDate.getTime() == bDate.getTime()));
- },
-
- isGreater : function (aDate, bDate) {
- return (this.isValidDate(aDate) && this.isValidDate(bDate) && (aDate.getTime() > bDate.getTime()));
- },
-
- isGreaterOrEqual : function (aDate, bDate) {
- return (this.isValidDate(aDate) && this.isValidDate(bDate) && (aDate.getTime() >= bDate.getTime()));
- },
-
- addMonths : function (oDate, numMonths) {
- var newYear = oDate.getFullYear();
- var newMonth = oDate.getMonth() + numMonths;
-
- newYear = Math.floor(newYear + newMonth / 12);
- newMonth = (newMonth % 12 + 12) % 12;
-
- var newDate = new Date (oDate.getTime());
- newDate.setYear(newYear);
- newDate.setMonth(newMonth);
-
- return newDate;
- },
-
- addYears : function (oDate, numYears) {
- var newYear = oDate.getFullYear() + numYears;
- var newDate = new Date(oDate.getTime());
-
- newDate.setYear(newYear);
- return newDate;
- },
-
- listOfDatesInMonth : function (oDate) {
- if (!this.isValidDate(oDate)) {
- return [];
- }
-
- var daysInMonth = this.daysInMonth(oDate),
- year = oDate.getFullYear(),
- month = oDate.getMonth(),
- output = [];
-
- for (var day = 1; day <= daysInMonth; day++) {
- output.push(new Date(year, month, day, 12, 0, 0));
- }
-
- return output;
- },
-
- /**
- * Takes a native JavaScript Date and returns the number of days in the month that the given date belongs to.
- * @for DataType.Date
- * @method daysInMonth
- * @param oDate {Date} Date in the month for which the number of days is desired.
- * @return {Number} A number (either 28, 29, 30 or 31) of days in the given month.
- */
- daysInMonth : function (oDate) {
- if (!this.isValidDate(oDate)) {
- return 0;
- }
-
- var mon = oDate.getMonth();
- var lengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
- if (mon != 1) {
- return lengths[mon];
- }
- else {
-
- var year = oDate.getFullYear();
- if (year%400 === 0) {
- return 29;
- }
- else if (year%100 === 0) {
- return 28;
- }
- else if (year%4 === 0) {
- return 29;
- }
- else {
- return 28;
- }
- }
- }
-
-});
-
-
-}, '3.4.1' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/dd-constrain/dd-constrain-min.js b/lib/yui/3.4.1/build/dd-constrain/dd-constrain-min.js
deleted file mode 100644
index 5700e8af8f9..00000000000
--- a/lib/yui/3.4.1/build/dd-constrain/dd-constrain-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 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));},_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,_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){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(yv){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=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.4.1",{skinnable:false,requires:["dd-drag"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/dd-ddm/dd-ddm-min.js b/lib/yui/3.4.1/build/dd-ddm/dd-ddm-min.js
deleted file mode 100644
index f8cdce6ce78..00000000000
--- a/lib/yui/3.4.1/build/dd-ddm/dd-ddm-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("dd-ddm",function(a){a.mix(a.DD.DDM,{_pg:null,_debugShim:false,_activateTargets:function(){},_deactivateTargets:function(){},_startDrag:function(){if(this.activeDrag&&this.activeDrag.get("useShim")){this._pg_activate();this._activateTargets();}},_endDrag:function(){this._pg_deactivate();this._deactivateTargets();},_pg_deactivate:function(){this._pg.setStyle("display","none");},_pg_activate:function(){var b=this.activeDrag.get("activeHandle"),c="auto";if(b){c=b.getStyle("cursor");}if(c=="auto"){c=this.get("dragCursor");}this._pg_size();this._pg.setStyles({top:0,left:0,display:"block",opacity:((this._debugShim)?".5":"0"),cursor:c});},_pg_size:function(){if(this.activeDrag){var c=a.one("body"),e=c.get("docHeight"),d=c.get("docWidth");this._pg.setStyles({height:e+"px",width:d+"px"});}},_createPG:function(){var d=a.Node.create(""),b=a.one("body"),c;d.setStyles({top:"0",left:"0",position:"absolute",zIndex:"9999",overflow:"hidden",backgroundColor:"red",display:"none",height:"5px",width:"5px"});d.set("id",a.stamp(d));d.addClass(a.DD.DDM.CSS_PREFIX+"-shim");b.prepend(d);this._pg=d;this._pg.on("mousemove",a.throttle(a.bind(this._move,this),this.get("throttleTime")));this._pg.on("mouseup",a.bind(this._end,this));c=a.one("win");a.on("window:resize",a.bind(this._pg_size,this));c.on("scroll",a.bind(this._pg_size,this));}},true);},"3.4.1",{skinnable:false,requires:["dd-ddm-base","event-resize"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/dd-drop/dd-drop-min.js b/lib/yui/3.4.1/build/dd-drop/dd-drop-min.js
deleted file mode 100644
index 056c05ce302..00000000000
--- a/lib/yui/3.4.1/build/dd-drop/dd-drop-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("dd-drop",function(a){var b="node",g=a.DD.DDM,f="offsetHeight",c="offsetWidth",i="drop:over",h="drop:enter",d="drop:exit",e=function(){this._lazyAddAttrs=false;e.superclass.constructor.apply(this,arguments);a.on("domready",a.bind(function(){a.later(100,this,this._createShim);},this));g._regTarget(this);};e.NAME="drop";e.ATTRS={node:{setter:function(j){var k=a.one(j);if(!k){a.error("DD.Drop: Invalid Node Given: "+j);}return k;}},groups:{value:["default"],setter:function(j){this._groups={};a.each(j,function(m,l){this._groups[m]=true;},this);return j;}},padding:{value:"0",setter:function(j){return g.cssSizestoObject(j);}},lock:{value:false,setter:function(j){if(j){this.get(b).addClass(g.CSS_PREFIX+"-drop-locked");}else{this.get(b).removeClass(g.CSS_PREFIX+"-drop-locked");}return j;}},bubbles:{setter:function(j){this.addTarget(j);return j;}},useShim:{value:true,setter:function(j){a.DD.DDM._noShim=!j;return j;}}};a.extend(e,a.Base,{_bubbleTargets:a.DD.DDM,addToGroup:function(j){this._groups[j]=true;return this;},removeFromGroup:function(j){delete this._groups[j];return this;},_createEvents:function(){var j=[i,h,d,"drop:hit"];a.each(j,function(m,l){this.publish(m,{type:m,emitFacade:true,preventable:false,bubbles:true,queuable:false,prefix:"drop"});},this);},_valid:null,_groups:null,shim:null,region:null,overTarget:null,inGroup:function(j){this._valid=false;var k=false;a.each(j,function(m,l){if(this._groups[m]){k=true;this._valid=true;}},this);return k;},initializer:function(j){a.later(100,this,this._createEvents);var k=this.get(b),l;if(!k.get("id")){l=a.stamp(k);k.set("id",l);}k.addClass(g.CSS_PREFIX+"-drop");this.set("groups",this.get("groups"));},destructor:function(){g._unregTarget(this);if(this.shim&&(this.shim!==this.get(b))){this.shim.detachAll();this.shim.remove();this.shim=null;}this.get(b).removeClass(g.CSS_PREFIX+"-drop");this.detachAll();},_deactivateShim:function(){if(!this.shim){return false;}this.get(b).removeClass(g.CSS_PREFIX+"-drop-active-valid");this.get(b).removeClass(g.CSS_PREFIX+"-drop-active-invalid");this.get(b).removeClass(g.CSS_PREFIX+"-drop-over");if(this.get("useShim")){this.shim.setStyles({top:"-999px",left:"-999px",zIndex:"1"});}this.overTarget=false;},_activateShim:function(){if(!g.activeDrag){return false;}if(this.get(b)===g.activeDrag.get(b)){return false;}if(this.get("lock")){return false;}var j=this.get(b);if(this.inGroup(g.activeDrag.get("groups"))){j.removeClass(g.CSS_PREFIX+"-drop-active-invalid");j.addClass(g.CSS_PREFIX+"-drop-active-valid");g._addValid(this);this.overTarget=false;if(!this.get("useShim")){this.shim=this.get(b);}this.sizeShim();}else{g._removeValid(this);j.removeClass(g.CSS_PREFIX+"-drop-active-valid");j.addClass(g.CSS_PREFIX+"-drop-active-invalid");}},sizeShim:function(){if(!g.activeDrag){return false;}if(this.get(b)===g.activeDrag.get(b)){return false;}if(this.get("lock")){return false;}if(!this.shim){a.later(100,this,this.sizeShim);return false;}var o=this.get(b),m=o.get(f),k=o.get(c),r=o.getXY(),q=this.get("padding"),j,n,l;k=k+q.left+q.right;m=m+q.top+q.bottom;r[0]=r[0]-q.left;r[1]=r[1]-q.top;if(g.activeDrag.get("dragMode")===g.INTERSECT){j=g.activeDrag;n=j.get(b).get(f);l=j.get(b).get(c);m=(m+n);k=(k+l);r[0]=r[0]-(l-j.deltaXY[0]);r[1]=r[1]-(n-j.deltaXY[1]);}if(this.get("useShim")){this.shim.setStyles({height:m+"px",width:k+"px",top:r[1]+"px",left:r[0]+"px"});}this.region={"0":r[0],"1":r[1],area:0,top:r[1],right:r[0]+k,bottom:r[1]+m,left:r[0]};},_createShim:function(){if(!g._pg){a.later(10,this,this._createShim);return;}if(this.shim){return;}var j=this.get("node");if(this.get("useShim")){j=a.Node.create('');j.setStyles({height:this.get(b).get(f)+"px",width:this.get(b).get(c)+"px",backgroundColor:"yellow",opacity:".5",zIndex:"1",overflow:"hidden",top:"-900px",left:"-900px",position:"absolute"});g._pg.appendChild(j);j.on("mouseover",a.bind(this._handleOverEvent,this));j.on("mouseout",a.bind(this._handleOutEvent,this));}this.shim=j;},_handleTargetOver:function(){if(g.isOverTarget(this)){this.get(b).addClass(g.CSS_PREFIX+"-drop-over");g.activeDrop=this;g.otherDrops[this]=this;if(this.overTarget){g.activeDrag.fire("drag:over",{drop:this,drag:g.activeDrag});this.fire(i,{drop:this,drag:g.activeDrag});}else{if(g.activeDrag.get("dragging")){this.overTarget=true;this.fire(h,{drop:this,drag:g.activeDrag});g.activeDrag.fire("drag:enter",{drop:this,drag:g.activeDrag});g.activeDrag.get(b).addClass(g.CSS_PREFIX+"-drag-over");}}}else{this._handleOut();}},_handleOverEvent:function(){this.shim.setStyle("zIndex","999");g._addActiveShim(this);},_handleOutEvent:function(){this.shim.setStyle("zIndex","1");g._removeActiveShim(this);},_handleOut:function(j){if(!g.isOverTarget(this)||j){if(this.overTarget){this.overTarget=false;if(!j){g._removeActiveShim(this);}if(g.activeDrag){this.get(b).removeClass(g.CSS_PREFIX+"-drop-over");g.activeDrag.get(b).removeClass(g.CSS_PREFIX+"-drag-over");this.fire(d);g.activeDrag.fire("drag:exit",{drop:this});delete g.otherDrops[this];}}}}});a.DD.Drop=e;},"3.4.1",{skinnable:false,requires:["dd-ddm-drop","dd-drag"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/dd-plugin/dd-plugin-debug.js b/lib/yui/3.4.1/build/dd-plugin/dd-plugin-debug.js
deleted file mode 100644
index a9750e3ebb0..00000000000
--- a/lib/yui/3.4.1/build/dd-plugin/dd-plugin-debug.js
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('dd-plugin', function(Y) {
-
-
-
- /**
- * Simple Drag plugin that can be attached to a Node or Widget via the plug method.
- * @module dd
- * @submodule dd-plugin
- */
- /**
- * Simple Drag plugin that can be attached to a Node or Widget via the plug method.
- * @class Drag
- * @extends DD.Drag
- * @constructor
- * @namespace Plugin
- */
- var Drag = function(config) {
- if (Y.Widget && config.host instanceof Y.Widget) {
- config.node = config.host.get('boundingBox');
- config.widget = config.host;
- }
- else {
- config.node = config.host;
- config.widget = false;
- }
- Drag.superclass.constructor.call(this, config);
- },
-
- EV_DRAG = 'drag:drag',
- EV_DRAG_END = 'drag:end';
-
- /**
- * @property NAME
- * @description dd-plugin
- * @type {String}
- */
- Drag.NAME = "dd-plugin";
-
- /**
- * @property NS
- * @description The Drag instance will be placed on the Node instance under the dd namespace. It can be accessed via Node.dd;
- * @type {String}
- */
- Drag.NS = "dd";
-
- Y.extend(Drag, Y.DD.Drag, {
-
-
- /**
- * refers to a Y.Widget if its the host, otherwise = false.
- *
- * @attribute _widget
- * @private
- */
- _widget: undefined,
-
-
- /**
- * refers to the [x,y] coordinate where the drag was stopped last
- *
- * @attribute _stoppedPosition
- * @private
- */
- _stoppedPosition: undefined,
-
-
- /**
- * Returns true if widget uses widgetPosition, otherwise returns false
- *
- * @method _usesWidgetPosition
- * @private
- */
- _usesWidgetPosition: function(widget) {
- var r = false;
- if (widget) {
- r = (widget.hasImpl && widget.hasImpl(Y.WidgetPosition)) ? true : false;
- }
- return r;
- },
-
-
- /**
- * Sets up event listeners on drag events if interacting with a widget
- *
- * @method initializer
- * @protected
- */
- initializer: function(config) {
-
-
- this._widget = config.widget;
-
- //if this thing is a widget, and it uses widgetposition...
- if (this._usesWidgetPosition(this._widget)) {
-
- //set the x,y on the widget's ATTRS
- this.on(EV_DRAG, this._setWidgetCoords);
-
- //store the new position that the widget ends up on
- this.on(EV_DRAG_END, this._updateStopPosition);
- }
-
-
- },
-
- /**
- * Updates x,y or xy attributes on widget based on where the widget is dragged
- *
- * @method initializer
- * @param {EventFacade} e Event Facade
- * @private
- */
- _setWidgetCoords: function(e) {
-
- //get the last position where the widget was, or get the starting point
- var nodeXY = this._stoppedPosition || e.target.nodeXY,
- realXY = e.target.realXY,
-
- //amount moved = [(x2 - x1) , (y2 - y1)]
- movedXY = [realXY[0] - nodeXY[0], realXY[1] - nodeXY[0]];
-
- //if both have changed..
- if (movedXY[0] !== 0 && movedXY[1] !== 0) {
- this._widget.set('xy', realXY);
- }
-
- //if only x is 0, set the Y
- else if (movedXY[0] === 0) {
- this._widget.set('y',realXY[1]);
- }
-
- //otherwise, y is 0, so set X
- else if (movedXY[1] === 0){
- this._widget.set('x', realXY[0]);
- }
- },
-
- /**
- * Updates the last position where the widget was stopped.
- *
- * @method updateStopPosition
- * @param {EventFacade} e Event Facade
- * @private
- */
- updateStopPosition: function(e) {
- this._stoppedPosition = e.target.realXY;
- }
- });
-
- Y.namespace('Plugin');
- Y.Plugin.Drag = Drag;
-
-
-
-
-
-}, '3.4.1' ,{optional:['dd-constrain', 'dd-proxy'], requires:['dd-drag'], skinnable:false});
diff --git a/lib/yui/3.4.1/build/dd-plugin/dd-plugin-min.js b/lib/yui/3.4.1/build/dd-plugin/dd-plugin-min.js
deleted file mode 100644
index b05c6536865..00000000000
--- a/lib/yui/3.4.1/build/dd-plugin/dd-plugin-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("dd-plugin",function(c){var a=function(e){if(c.Widget&&e.host instanceof c.Widget){e.node=e.host.get("boundingBox");e.widget=e.host;}else{e.node=e.host;e.widget=false;}a.superclass.constructor.call(this,e);},b="drag:drag",d="drag:end";a.NAME="dd-plugin";a.NS="dd";c.extend(a,c.DD.Drag,{_widget:undefined,_stoppedPosition:undefined,_usesWidgetPosition:function(f){var e=false;if(f){e=(f.hasImpl&&f.hasImpl(c.WidgetPosition))?true:false;}return e;},initializer:function(e){this._widget=e.widget;if(this._usesWidgetPosition(this._widget)){this.on(b,this._setWidgetCoords);this.on(d,this._updateStopPosition);}},_setWidgetCoords:function(i){var h=this._stoppedPosition||i.target.nodeXY,f=i.target.realXY,g=[f[0]-h[0],f[1]-h[0]];if(g[0]!==0&&g[1]!==0){this._widget.set("xy",f);}else{if(g[0]===0){this._widget.set("y",f[1]);}else{if(g[1]===0){this._widget.set("x",f[0]);}}}},updateStopPosition:function(f){this._stoppedPosition=f.target.realXY;}});c.namespace("Plugin");c.Plugin.Drag=a;},"3.4.1",{optional:["dd-constrain","dd-proxy"],requires:["dd-drag"],skinnable:false});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/dial/dial-min.js b/lib/yui/3.4.1/build/dial/dial-min.js
deleted file mode 100644
index 9702a2546f7..00000000000
--- a/lib/yui/3.4.1/build/dial/dial-min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("dial",function(h){var g=false;if(h.UA.ie&&h.UA.ie<9){g=true;}var e=h.Lang,d=h.Widget,b=h.Node;function a(i){a.superclass.constructor.apply(this,arguments);}a.NAME="dial";a.ATTRS={min:{value:-220},max:{value:220},diameter:{value:100},handleDiameter:{value:0.2},markerDiameter:{value:0.1},centerButtonDiameter:{value:0.5},value:{value:0,validator:function(i){return this._validateValue(i);}},minorStep:{value:1},majorStep:{value:10},stepsPerRevolution:{value:100},decimalPlaces:{value:0},strings:{valueFn:function(){return h.Intl.get("dial");}},handleDistance:{value:0.75}};function c(i){return h.ClassNameManager.getClassName(a.NAME,i);}a.CSS_CLASSES={label:c("label"),labelString:c("label-string"),valueString:c("value-string"),northMark:c("north-mark"),ring:c("ring"),ringVml:c("ring-vml"),marker:c("marker"),markerVml:c("marker-vml"),markerMaxMin:c("marker-max-min"),centerButton:c("center-button"),centerButtonVml:c("center-button-vml"),resetString:c("reset-string"),handle:c("handle"),handleVml:c("handle-vml"),hidden:c("hidden"),dragging:h.ClassNameManager.getClassName("dd-dragging")};var f=a.CSS_CLASSES.label+h.guid();a.LABEL_TEMPLATE='
{label}
';if(g===false){a.RING_TEMPLATE='
';a.MARKER_TEMPLATE='';a.CENTER_BUTTON_TEMPLATE='
{resetStr}
';a.HANDLE_TEMPLATE='
';}else{a.RING_TEMPLATE='
'+''+''+"
"+"";a.MARKER_TEMPLATE='
'+''+''+""+"
"+"";a.CENTER_BUTTON_TEMPLATE='
'+''+''+''+""+'
{resetStr}
'+"
"+"";a.HANDLE_TEMPLATE='
'+''+''+""+"
"+"";}h.extend(a,d,{renderUI:function(){this._renderLabel();this._renderRing();this._renderMarker();this._renderCenterButton();this._renderHandle();this.contentBox=this.get("contentBox");this._originalValue=this.get("value");this._minValue=this.get("min");this._maxValue=this.get("max");this._stepsPerRevolution=this.get("stepsPerRevolution");this._minTimesWrapped=(Math.floor(this._minValue/this._stepsPerRevolution-1));this._maxTimesWrapped=(Math.floor(this._maxValue/this._stepsPerRevolution+1));this._timesWrapped=0;this._angle=this._getAngleFromValue(this.get("value"));this._prevAng=this._angle;this._setTimesWrappedFromValue(this._originalValue);this._handleNode.set("aria-valuemin",this._minValue);this._handleNode.set("aria-valuemax",this._maxValue);},_setBorderRadius:function(){this._ringNode.setStyles({"WebkitBorderRadius":this._ringNodeRadius+"px","MozBorderRadius":this._ringNodeRadius+"px","borderRadius":this._ringNodeRadius+"px"});this._handleNode.setStyles({"WebkitBorderRadius":this._handleNodeRadius+"px","MozBorderRadius":this._handleNodeRadius+"px","borderRadius":this._handleNodeRadius+"px"});this._markerNode.setStyles({"WebkitBorderRadius":this._markerNodeRadius+"px","MozBorderRadius":this._markerNodeRadius+"px","borderRadius":this._markerNodeRadius+"px"});this._centerButtonNode.setStyles({"WebkitBorderRadius":this._centerButtonNodeRadius+"px","MozBorderRadius":this._centerButtonNodeRadius+"px","borderRadius":this._centerButtonNodeRadius+"px"});},bindUI:function(){this.after("valueChange",this._afterValueChange);var i=this.get("boundingBox"),j=(!h.UA.opera)?"down:":"press:",k=(!h.UA.opera)?"down:":"press:";j+="38,40,33,34,35,36";k+="37,39";h.on("key",h.bind(this._onDirectionKey,this),i,j);h.on("key",h.bind(this._onLeftRightKey,this),i,k);h.on("mouseenter",function(){this.one("."+a.CSS_CLASSES.resetString).removeClass(a.CSS_CLASSES.hidden);},this._centerButtonNode);h.on("mouseleave",function(){this.one("."+a.CSS_CLASSES.resetString).addClass(a.CSS_CLASSES.hidden);},this._centerButtonNode);h.on("gesturemovestart",h.bind(this._resetDial,this),this._centerButtonNode);h.on("gesturemoveend",h.bind(function(){this._handleNode.focus();},this),this._centerButtonNode);h.on("gesturemovestart",h.bind(function(){this._handleNode.focus();},this),this._handleNode);h.on("gesturemovestart",h.bind(this._handleMousedown,this),this._ringNode);h.on("gesturemoveend",h.bind(function(){this._handleNode.focus();},this),this._ringNode);this._dd1=new h.DD.Drag({node:this._handleNode,on:{"drag:drag":h.bind(this._handleDrag,this),"drag:start":h.bind(this._handleDragStart,this),"drag:end":h.bind(this._handleDragEnd,this)}});h.bind(this._dd1.addHandle(this._ringNode),this);},_setTimesWrappedFromValue:function(i){if(i%this._stepsPerRevolution===0){this._timesWrapped=(i/this._stepsPerRevolution);}else{this._timesWrapped=Math.floor(i/this._stepsPerRevolution);}},_getAngleFromHandleCenter:function(k,j){var i=Math.atan((this._centerYOnPage-j)/(this._centerXOnPage-k))*(180/Math.PI);
-i=((this._centerXOnPage-k)<0)?i+90:i+90+180;return i;},_recalculateDialCenter:function(){this._centerYOnPage=(this._ringNode.getY()+this._ringNodeRadius);this._centerXOnPage=(this._ringNode.getX()+this._ringNodeRadius);},_handleDrag:function(k){var m,l,i,j;m=k.pageX+this._handleNodeRadius;l=k.pageY+this._handleNodeRadius;i=this._getAngleFromHandleCenter(m,l);if((this._prevAng>270)&&(i<90)){if(this._timesWrapped270)){if(this._timesWrapped>this._minTimesWrapped){this._timesWrapped=(this._timesWrapped-1);}}}j=this._getValueFromAngle(i);if(j>(this._maxValue+this._stepsPerRevolution)){this._timesWrapped--;}else{if(j<(this._minValue-this._stepsPerRevolution)){this._timesWrapped++;}}this._prevAng=i;this._handleValuesBeyondMinMax(k,j);},_handleMousedown:function(n){var l=this._getAngleFromValue(this._minValue),k=this._getAngleFromValue(this._maxValue),m,j,i;this._recalculateDialCenter();var p=n.pageX,o=n.pageY;i=this._getAngleFromHandleCenter(p,o);if(this._maxValue-this._minValue>this._stepsPerRevolution){if(Math.abs(this._prevAng-i)>180){if((this._timesWrapped>this._minTimesWrapped)&&(this._timesWrapped0)?(this._timesWrapped+1):(this._timesWrapped-1);}}else{if((this._timesWrapped===this._minTimesWrapped)&&(i-this._prevAng<180)){this._timesWrapped++;}}}else{if(this._maxValue-this._minValue===this._stepsPerRevolution){if(ik){if((this._prevAng>=l)&&(i<=(l+k)/2)){this._timesWrapped++;}else{if((this._prevAng<=k)&&(i>(l+k)/2)){this._timesWrapped--;}}}else{if((ik)){j=(((l+k)/2)+180)%360;if(j>180){m=((ki)&&(i>j))?this.get("min"):this.get("max");}this._prevAng=this._getAngleFromValue(m);this.set("value",m);this._setTimesWrappedFromValue(m);return;}}}}m=this._getValueFromAngle(i);this._prevAng=i;this._handleValuesBeyondMinMax(n,m);},_handleValuesBeyondMinMax:function(j,i){if((i>=this._minValue)&&(i<=this._maxValue)){this.set("value",i);if(j.currentTarget===this._ringNode){this._dd1._handleMouseDownEvent(j);}}else{if(i>this._maxValue){this.set("value",this._maxValue);if(j.type==="gesturemovestart"){this._prevAng=this._getAngleFromValue(this._maxValue);}}else{if(ithis._minValue)&&(j=j&&k<=i);}});h.Dial=a;},"3.4.1",{requires:["widget","dd-drag","substitute","event-mouseenter","event-move","event-key","transition","intl"],lang:["en","es"],skinnable:true});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/dom-base/dom-base-min.js b/lib/yui/3.4.1/build/dom-base/dom-base-min.js
deleted file mode 100644
index 64664e1038b..00000000000
--- a/lib/yui/3.4.1/build/dom-base/dom-base-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("dom-base",function(b){var o=b.config.doc.documentElement,g=b.DOM,m="tagName",a="ownerDocument",c="",n=b.Features.add,k=b.Features.test;b.mix(g,{getText:(o.textContent!==undefined)?function(s){var r="";if(s){r=s.textContent;}return r||"";}:function(s){var r="";if(s){r=s.innerText||s.nodeValue;}return r||"";},setText:(o.textContent!==undefined)?function(r,s){if(r){r.textContent=s;}}:function(r,s){if("innerText" in r){r.innerText=s;}else{if("nodeValue" in r){r.nodeValue=s;}}},CUSTOM_ATTRIBUTES:(!o.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(t,r,u,s){if(t&&r&&t.setAttribute){r=g.CUSTOM_ATTRIBUTES[r]||r;t.setAttribute(r,u,s);}},getAttribute:function(u,r,t){t=(t!==undefined)?t:2;var s="";if(u&&r&&u.getAttribute){r=g.CUSTOM_ATTRIBUTES[r]||r;s=u.getAttribute(r,t);if(s===null){s="";}}return s;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(t){var s="",r;if(t&&t[m]){r=g.VALUE_GETTERS[t[m].toLowerCase()];if(r){s=r(t);}else{s=t.value;}}if(s===c){s=c;}return(typeof s==="string")?s:"";},setValue:function(r,s){var t;if(r&&r[m]){t=g.VALUE_SETTERS[r[m].toLowerCase()];if(t){t(r,s);}else{r.value=s;}}},creators:{}});n("value-set","select",{test:function(){var r=b.config.doc.createElement("select");r.innerHTML="";r.value="2";return(r.value&&r.value==="2");}});if(!k("value-set","select")){g.VALUE_SETTERS.select=function(u,v){for(var s=0,r=u.getElementsByTagName("option"),t;t=r[s++];){if(g.getValue(t)===v){t.selected=true;break;}}};}b.mix(g.VALUE_GETTERS,{button:function(r){return(r.attributes&&r.attributes.value)?r.attributes.value.value:"";}});b.mix(g.VALUE_SETTERS,{button:function(s,t){var r=s.attributes.value;if(!r){r=s[a].createAttribute("value");s.setAttributeNode(r);}r.value=t;}});b.mix(g.VALUE_GETTERS,{option:function(s){var r=s.attributes;return(r.value&&r.value.specified)?s.value:s.text;},select:function(s){var t=s.value,r=s.options;if(r&&r.length){if(s.multiple){}else{t=g.getValue(r[s.selectedIndex]);}}return t;}});var h,f,q;b.mix(b.DOM,{hasClass:function(t,s){var r=b.DOM._getRegExp("(?:^|\\s+)"+s+"(?:\\s+|$)");return r.test(t.className);},addClass:function(s,r){if(!b.DOM.hasClass(s,r)){s.className=b.Lang.trim([s.className,r].join(" "));}},removeClass:function(s,r){if(r&&f(s,r)){s.className=b.Lang.trim(s.className.replace(b.DOM._getRegExp("(?:^|\\s+)"+r+"(?:\\s+|$)")," "));if(f(s,r)){q(s,r);}}},replaceClass:function(s,r,t){q(s,r);h(s,t);},toggleClass:function(s,r,t){var u=(t!==undefined)?t:!(f(s,r));if(u){h(s,r);}else{q(s,r);}}});f=b.DOM.hasClass;q=b.DOM.removeClass;h=b.DOM.addClass;var e=/<([a-z]+)/i,g=b.DOM,n=b.Features.add,k=b.Features.test,j={},i=function(t,r){var u=b.config.doc.createElement("div"),s=true;u.innerHTML=t;if(!u.firstChild||u.firstChild.tagName!==r.toUpperCase()){s=false;}return s;},p=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*",l="";b.mix(b.DOM,{_fragClones:{},_create:function(s,t,r){r=r||"div";var u=g._fragClones[r];if(u){u=u.cloneNode(false);}else{u=g._fragClones[r]=t.createElement(r);}u.innerHTML=s;return u;},create:function(v,y){if(typeof v==="string"){v=b.Lang.trim(v);}y=y||b.config.doc;var u=e.exec(v),w=g._create,s=j,x=null,t,z,r;if(v!=undefined){if(u&&u[1]){t=s[u[1].toLowerCase()];if(typeof t==="function"){w=t;}else{z=t;}}r=w(v,y,z).childNodes;if(r.length===1){x=r[0].parentNode.removeChild(r[0]);}else{if(r[0]&&r[0].className==="yui3-big-dummy"){if(r.length===2){x=r[0].nextSibling;}else{r[0].parentNode.removeChild(r[0]);x=g._nl2frag(r,y);}}else{x=g._nl2frag(r,y);}}}return x;},_nl2frag:function(s,v){var t=null,u,r;if(s&&(s.push||s.item)&&s[0]){v=v||s[0].ownerDocument;t=v.createDocumentFragment();if(s.item){s=b.Array(s,0,true);}for(u=0,r=s.length;u";}catch(s){return false;}return(r.firstChild&&r.firstChild.nodeName==="TBODY");}});n("innerhtml-div","tr",{test:function(){return i("
","tr");}});n("innerhtml-div","script",{test:function(){return i("
+
+
+@method template
+@param {Function} template Precompiled Handlebars template function.
+@return {Function} Compiled template function.
+*/
+
+
+}, '3.5.0' ,{requires:['escape']});
diff --git a/lib/yui/3.5.0/build/handlebars-base/handlebars-base-min.js b/lib/yui/3.5.0/build/handlebars-base/handlebars-base-min.js
new file mode 100644
index 00000000000..f4253f5ac83
--- /dev/null
+++ b/lib/yui/3.5.0/build/handlebars-base/handlebars-base-min.js
@@ -0,0 +1,12 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("handlebars-base",function(e){
+/*!
+Handlebars.js - Copyright (C) 2011 Yehuda Katz
+https://raw.github.com/wycats/handlebars.js/master/LICENSE
+*/
+var d={};d.VERSION="1.0.beta.5";d.helpers={};d.partials={};d.registerHelper=function(g,h,f){if(f){h.not=f;}this.helpers[g]=h;};d.registerPartial=function(f,g){this.partials[f]=g;};d.registerHelper("helperMissing",function(f){if(arguments.length===2){return undefined;}else{throw new Error("Could not find property '"+f+"'");}});var b=Object.prototype.toString,c="[object Function]";d.registerHelper("blockHelperMissing",function(m,k){var f=k.inverse||function(){},o=k.fn;var h="";var n=b.call(m);if(n===c){m=m.call(this);}if(m===true){return o(this);}else{if(m===false||m==null){return f(this);}else{if(n==="[object Array]"){if(m.length>0){for(var l=0,g=m.length;l0){for(var l=0,g=m.length;l 0) {
+ for(var i=0, j=context.length; i 0) {
+ for(var i=0, j=context.length; i.
+
+@module handlebars
+@main handlebars
+*/
+
+/**
+Provides basic Handlebars template rendering functionality. Use this module when
+you only need to render pre-compiled templates.
+
+@module handlebars
+@submodule handlebars-base
+*/
+
+/**
+Handlebars is a simple template language inspired by Mustache.
+
+This is a YUI port of the original Handlebars project, which can be found at
+.
+
+@class Handlebars
+*/
+Y.Handlebars = Handlebars;
+
+Handlebars.VERSION += '-yui';
+
+// The rest of this file is just API docs for methods defined in Handlebars
+// itself.
+
+/**
+Registers a helper function that will be made available to all templates.
+
+Helper functions receive the current template context as the `this` object, and
+can also receive arguments passed by the template.
+
+@example
+
+ Y.Handlebars.registerHelper('linkify', function () {
+ return '' +
+ Y.Escape.html(this.text) + '';
+ });
+
+ var source = '
{{#each links}}
{{linkify}}
{{/each}}
';
+
+ Y.Handlebars.render(source, {
+ links: [
+ {url: '/foo', text: 'Foo'},
+ {url: '/bar', text: 'Bar'},
+ {url: '/baz', text: 'Baz'}
+ ]
+ });
+
+@method registerHelper
+@param {String} name Name of this helper.
+@param {Function} fn Helper function.
+@param {Boolean} [inverse=false] If `true`, this helper will be considered an
+ "inverse" helper, like "unless". This means it will only be called if the
+ expression given in the template evaluates to a false or empty value.
+*/
+
+/**
+Registers a partial that will be made available to all templates.
+
+A partial is another template that can be used to render part of a larger
+template. For example, a website with a common header and footer across all its
+pages might use a template for each page, which would call shared partials to
+render the headers and footers.
+
+Partials may be specified as uncompiled template strings or as compiled template
+functions.
+
+@example
+
+ Y.Handlebars.registerPartial('header', '
{{title}}
');
+ Y.Handlebars.registerPartial('footer', 'Copyright (c) 2011 by Me.');
+
+ var source = '{{> header}}
Mustaches are awesome!
{{> footer}}';
+
+ Y.Handlebars.render(source, {title: 'My Page About Mustaches'});
+
+@method registerPartial
+@param {String} name Name of this partial.
+@param {Function|String} partial Template string or compiled template function.
+*/
+
+/**
+Converts a precompiled template into a renderable template function.
+
+@example
+
+
+
+
+@method template
+@param {Function} template Precompiled Handlebars template function.
+@return {Function} Compiled template function.
+*/
+
+
+}, '3.5.0' ,{requires:['escape']});
diff --git a/lib/yui/3.5.0/build/handlebars-compiler/handlebars-compiler-debug.js b/lib/yui/3.5.0/build/handlebars-compiler/handlebars-compiler-debug.js
new file mode 100644
index 00000000000..04da9d510a4
--- /dev/null
+++ b/lib/yui/3.5.0/build/handlebars-compiler/handlebars-compiler-debug.js
@@ -0,0 +1,1531 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add('handlebars-compiler', function(Y) {
+
+/*!
+Handlebars.js - Copyright (C) 2011 Yehuda Katz
+https://raw.github.com/wycats/handlebars.js/master/LICENSE
+*/
+// This file contains code that will be inserted at the beginning of the
+// handlebars-compiler module.
+
+// This is necessary because the Y.Handlebars object is created in the
+// handlebars-base module, but the native Handlebars code expects to use a local
+// Handlebars reference.
+var Handlebars = Y.Handlebars;
+/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */
+
+/* Jison generated parser */
+var handlebars = (function(){
+
+var parser = {trace: function trace() { },
+yy: {},
+symbols_: {"error":2,"root":3,"program":4,"EOF":5,"statements":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"OPEN_PARTIAL":24,"params":25,"hash":26,"param":27,"STRING":28,"INTEGER":29,"BOOLEAN":30,"hashSegments":31,"hashSegment":32,"ID":33,"EQUALS":34,"pathSegments":35,"SEP":36,"$accept":0,"$end":1},
+terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},
+productions_: [0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],
+performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
+
+var $0 = $$.length - 1;
+switch (yystate) {
+case 1: return $$[$0-1];
+break;
+case 2: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]);
+break;
+case 3: this.$ = new yy.ProgramNode($$[$0]);
+break;
+case 4: this.$ = new yy.ProgramNode([]);
+break;
+case 5: this.$ = [$$[$0]];
+break;
+case 6: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
+break;
+case 7: this.$ = new yy.InverseNode($$[$0-2], $$[$0-1], $$[$0]);
+break;
+case 8: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0]);
+break;
+case 9: this.$ = $$[$0];
+break;
+case 10: this.$ = $$[$0];
+break;
+case 11: this.$ = new yy.ContentNode($$[$0]);
+break;
+case 12: this.$ = new yy.CommentNode($$[$0]);
+break;
+case 13: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
+break;
+case 14: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
+break;
+case 15: this.$ = $$[$0-1];
+break;
+case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
+break;
+case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true);
+break;
+case 18: this.$ = new yy.PartialNode($$[$0-1]);
+break;
+case 19: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]);
+break;
+case 20:
+break;
+case 21: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]];
+break;
+case 22: this.$ = [[$$[$0-1]].concat($$[$0]), null];
+break;
+case 23: this.$ = [[$$[$0-1]], $$[$0]];
+break;
+case 24: this.$ = [[$$[$0]], null];
+break;
+case 25: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
+break;
+case 26: this.$ = [$$[$0]];
+break;
+case 27: this.$ = $$[$0];
+break;
+case 28: this.$ = new yy.StringNode($$[$0]);
+break;
+case 29: this.$ = new yy.IntegerNode($$[$0]);
+break;
+case 30: this.$ = new yy.BooleanNode($$[$0]);
+break;
+case 31: this.$ = new yy.HashNode($$[$0]);
+break;
+case 32: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
+break;
+case 33: this.$ = [$$[$0]];
+break;
+case 34: this.$ = [$$[$0-2], $$[$0]];
+break;
+case 35: this.$ = [$$[$0-2], new yy.StringNode($$[$0])];
+break;
+case 36: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])];
+break;
+case 37: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])];
+break;
+case 38: this.$ = new yy.IdNode($$[$0]);
+break;
+case 39: $$[$0-2].push($$[$0]); this.$ = $$[$0-2];
+break;
+case 40: this.$ = [$$[$0]];
+break;
+}
+},
+table: [{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],
+defaultActions: {16:[2,1],37:[2,23],53:[2,21]},
+parseError: function parseError(str, hash) {
+ throw new Error(str);
+},
+parse: function parse(input) {
+ var self = this,
+ stack = [0],
+ vstack = [null], // semantic value stack
+ lstack = [], // location stack
+ table = this.table,
+ yytext = '',
+ yylineno = 0,
+ yyleng = 0,
+ recovering = 0,
+ TERROR = 2,
+ EOF = 1;
+
+ //this.reductionCount = this.shiftCount = 0;
+
+ this.lexer.setInput(input);
+ this.lexer.yy = this.yy;
+ this.yy.lexer = this.lexer;
+ if (typeof this.lexer.yylloc == 'undefined')
+ this.lexer.yylloc = {};
+ var yyloc = this.lexer.yylloc;
+ lstack.push(yyloc);
+
+ if (typeof this.yy.parseError === 'function')
+ this.parseError = this.yy.parseError;
+
+ function popStack (n) {
+ stack.length = stack.length - 2*n;
+ vstack.length = vstack.length - n;
+ lstack.length = lstack.length - n;
+ }
+
+ function lex() {
+ var token;
+ token = self.lexer.lex() || 1; // $end = 1
+ // if token isn't its numeric value, convert
+ if (typeof token !== 'number') {
+ token = self.symbols_[token] || token;
+ }
+ return token;
+ }
+
+ var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
+ while (true) {
+ // retreive state number from top of stack
+ state = stack[stack.length-1];
+
+ // use default actions if available
+ if (this.defaultActions[state]) {
+ action = this.defaultActions[state];
+ } else {
+ if (symbol == null)
+ symbol = lex();
+ // read action for current state and first input
+ action = table[state] && table[state][symbol];
+ }
+
+ // handle parse error
+ _handle_error:
+ if (typeof action === 'undefined' || !action.length || !action[0]) {
+
+ if (!recovering) {
+ // Report error
+ expected = [];
+ for (p in table[state]) if (this.terminals_[p] && p > 2) {
+ expected.push("'"+this.terminals_[p]+"'");
+ }
+ var errStr = '';
+ if (this.lexer.showPosition) {
+ errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
+ } else {
+ errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
+ (symbol == 1 /*EOF*/ ? "end of input" :
+ ("'"+(this.terminals_[symbol] || symbol)+"'"));
+ }
+ this.parseError(errStr,
+ {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
+ }
+
+ // just recovered from another error
+ if (recovering == 3) {
+ if (symbol == EOF) {
+ throw new Error(errStr || 'Parsing halted.');
+ }
+
+ // discard current lookahead and grab another
+ yyleng = this.lexer.yyleng;
+ yytext = this.lexer.yytext;
+ yylineno = this.lexer.yylineno;
+ yyloc = this.lexer.yylloc;
+ symbol = lex();
+ }
+
+ // try to recover from error
+ while (1) {
+ // check for error recovery rule in this state
+ if ((TERROR.toString()) in table[state]) {
+ break;
+ }
+ if (state == 0) {
+ throw new Error(errStr || 'Parsing halted.');
+ }
+ popStack(1);
+ state = stack[stack.length-1];
+ }
+
+ preErrorSymbol = symbol; // save the lookahead token
+ symbol = TERROR; // insert generic error symbol as new lookahead
+ state = stack[stack.length-1];
+ action = table[state] && table[state][TERROR];
+ recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
+ }
+
+ // this shouldn't happen, unless resolve defaults are off
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
+ }
+
+ switch (action[0]) {
+
+ case 1: // shift
+ //this.shiftCount++;
+
+ stack.push(symbol);
+ vstack.push(this.lexer.yytext);
+ lstack.push(this.lexer.yylloc);
+ stack.push(action[1]); // push state
+ symbol = null;
+ if (!preErrorSymbol) { // normal execution/no error
+ yyleng = this.lexer.yyleng;
+ yytext = this.lexer.yytext;
+ yylineno = this.lexer.yylineno;
+ yyloc = this.lexer.yylloc;
+ if (recovering > 0)
+ recovering--;
+ } else { // error just occurred, resume old lookahead f/ before error
+ symbol = preErrorSymbol;
+ preErrorSymbol = null;
+ }
+ break;
+
+ case 2: // reduce
+ //this.reductionCount++;
+
+ len = this.productions_[action[1]][1];
+
+ // perform semantic action
+ yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
+ // default location, uses first token for firsts, last for lasts
+ yyval._$ = {
+ first_line: lstack[lstack.length-(len||1)].first_line,
+ last_line: lstack[lstack.length-1].last_line,
+ first_column: lstack[lstack.length-(len||1)].first_column,
+ last_column: lstack[lstack.length-1].last_column
+ };
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
+
+ if (typeof r !== 'undefined') {
+ return r;
+ }
+
+ // pop off stack
+ if (len) {
+ stack = stack.slice(0,-1*len*2);
+ vstack = vstack.slice(0, -1*len);
+ lstack = lstack.slice(0, -1*len);
+ }
+
+ stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ // goto new state = table[STATE][NONTERMINAL]
+ newState = table[stack[stack.length-2]][stack[stack.length-1]];
+ stack.push(newState);
+ break;
+
+ case 3: // accept
+ return true;
+ }
+
+ }
+
+ return true;
+}};/* Jison generated lexer */
+var lexer = (function(){
+
+var lexer = ({EOF:1,
+parseError:function parseError(str, hash) {
+ if (this.yy.parseError) {
+ this.yy.parseError(str, hash);
+ } else {
+ throw new Error(str);
+ }
+ },
+setInput:function (input) {
+ this._input = input;
+ this._more = this._less = this.done = false;
+ this.yylineno = this.yyleng = 0;
+ this.yytext = this.matched = this.match = '';
+ this.conditionStack = ['INITIAL'];
+ this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
+ return this;
+ },
+input:function () {
+ var ch = this._input[0];
+ this.yytext+=ch;
+ this.yyleng++;
+ this.match+=ch;
+ this.matched+=ch;
+ var lines = ch.match(/\n/);
+ if (lines) this.yylineno++;
+ this._input = this._input.slice(1);
+ return ch;
+ },
+unput:function (ch) {
+ this._input = ch + this._input;
+ return this;
+ },
+more:function () {
+ this._more = true;
+ return this;
+ },
+pastInput:function () {
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
+ return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
+ },
+upcomingInput:function () {
+ var next = this.match;
+ if (next.length < 20) {
+ next += this._input.substr(0, 20-next.length);
+ }
+ return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
+ },
+showPosition:function () {
+ var pre = this.pastInput();
+ var c = new Array(pre.length + 1).join("-");
+ return pre + this.upcomingInput() + "\n" + c+"^";
+ },
+next:function () {
+ if (this.done) {
+ return this.EOF;
+ }
+ if (!this._input) this.done = true;
+
+ var token,
+ match,
+ col,
+ lines;
+ if (!this._more) {
+ this.yytext = '';
+ this.match = '';
+ }
+ var rules = this._currentRules();
+ for (var i=0;i < rules.length; i++) {
+ match = this._input.match(this.rules[rules[i]]);
+ if (match) {
+ lines = match[0].match(/\n.*/g);
+ if (lines) this.yylineno += lines.length;
+ this.yylloc = {first_line: this.yylloc.last_line,
+ last_line: this.yylineno+1,
+ first_column: this.yylloc.last_column,
+ last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
+ this.yytext += match[0];
+ this.match += match[0];
+ this.matches = match;
+ this.yyleng = this.yytext.length;
+ this._more = false;
+ this._input = this._input.slice(match[0].length);
+ this.matched += match[0];
+ token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
+ if (token) return token;
+ else return;
+ }
+ }
+ if (this._input === "") {
+ return this.EOF;
+ } else {
+ this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
+ {text: "", token: null, line: this.yylineno});
+ }
+ },
+lex:function lex() {
+ var r = this.next();
+ if (typeof r !== 'undefined') {
+ return r;
+ } else {
+ return this.lex();
+ }
+ },
+begin:function begin(condition) {
+ this.conditionStack.push(condition);
+ },
+popState:function popState() {
+ return this.conditionStack.pop();
+ },
+_currentRules:function _currentRules() {
+ return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
+ },
+topState:function () {
+ return this.conditionStack[this.conditionStack.length-2];
+ },
+pushState:function begin(condition) {
+ this.begin(condition);
+ }});
+lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
+
+var YYSTATE=YY_START
+switch($avoiding_name_collisions) {
+case 0:
+ if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
+ if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
+ if(yy_.yytext) return 14;
+
+break;
+case 1: return 14;
+break;
+case 2: this.popState(); return 14;
+break;
+case 3: return 24;
+break;
+case 4: return 16;
+break;
+case 5: return 20;
+break;
+case 6: return 19;
+break;
+case 7: return 19;
+break;
+case 8: return 23;
+break;
+case 9: return 23;
+break;
+case 10: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
+break;
+case 11: return 22;
+break;
+case 12: return 34;
+break;
+case 13: return 33;
+break;
+case 14: return 33;
+break;
+case 15: return 36;
+break;
+case 16: /*ignore whitespace*/
+break;
+case 17: this.popState(); return 18;
+break;
+case 18: this.popState(); return 18;
+break;
+case 19: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 28;
+break;
+case 20: return 30;
+break;
+case 21: return 30;
+break;
+case 22: return 29;
+break;
+case 23: return 33;
+break;
+case 24: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 33;
+break;
+case 25: return 'INVALID';
+break;
+case 26: return 5;
+break;
+}
+};
+lexer.rules = [/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/];
+lexer.conditions = {"mu":{"rules":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"INITIAL":{"rules":[0,1,26],"inclusive":true}};return lexer;})()
+parser.lexer = lexer;
+return parser;
+})();
+if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
+exports.parser = handlebars;
+exports.parse = function () { return handlebars.parse.apply(handlebars, arguments); }
+exports.main = function commonjsMain(args) {
+ if (!args[1])
+ throw new Error('Usage: '+args[0]+' FILE');
+ if (typeof process !== 'undefined') {
+ var source = require('fs').readFileSync(require('path').join(process.cwd(), args[1]), "utf8");
+ } else {
+ var cwd = require("file").path(require("file").cwd());
+ var source = cwd.join(args[1]).read({charset: "utf-8"});
+ }
+ return exports.parser.parse(source);
+}
+if (typeof module !== 'undefined' && require.main === module) {
+ exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args);
+}
+};
+/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */
+
+// BEGIN(BROWSER)
+Handlebars.Parser = handlebars;
+
+Handlebars.parse = function(string) {
+ Handlebars.Parser.yy = Handlebars.AST;
+ return Handlebars.Parser.parse(string);
+};
+
+Handlebars.print = function(ast) {
+ return new Handlebars.PrintVisitor().accept(ast);
+};
+
+Handlebars.logger = {
+ DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
+
+ // override in the host environment
+ log: function(level, str) {}
+};
+
+Handlebars.log = function(level, str) { Handlebars.logger.log(level, str); };
+
+// END(BROWSER)
+/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */
+
+// BEGIN(BROWSER)
+(function() {
+
+ Handlebars.AST = {};
+
+ Handlebars.AST.ProgramNode = function(statements, inverse) {
+ this.type = "program";
+ this.statements = statements;
+ if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
+ };
+
+ Handlebars.AST.MustacheNode = function(params, hash, unescaped) {
+ this.type = "mustache";
+ this.id = params[0];
+ this.params = params.slice(1);
+ this.hash = hash;
+ this.escaped = !unescaped;
+ };
+
+ Handlebars.AST.PartialNode = function(id, context) {
+ this.type = "partial";
+
+ // TODO: disallow complex IDs
+
+ this.id = id;
+ this.context = context;
+ };
+
+ var verifyMatch = function(open, close) {
+ if(open.original !== close.original) {
+ throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
+ }
+ };
+
+ Handlebars.AST.BlockNode = function(mustache, program, close) {
+ verifyMatch(mustache.id, close);
+ this.type = "block";
+ this.mustache = mustache;
+ this.program = program;
+ };
+
+ Handlebars.AST.InverseNode = function(mustache, program, close) {
+ verifyMatch(mustache.id, close);
+ this.type = "inverse";
+ this.mustache = mustache;
+ this.program = program;
+ };
+
+ Handlebars.AST.ContentNode = function(string) {
+ this.type = "content";
+ this.string = string;
+ };
+
+ Handlebars.AST.HashNode = function(pairs) {
+ this.type = "hash";
+ this.pairs = pairs;
+ };
+
+ Handlebars.AST.IdNode = function(parts) {
+ this.type = "ID";
+ this.original = parts.join(".");
+
+ var dig = [], depth = 0;
+
+ for(var i=0,l=parts.length; i 0) {
+ this.source[1] = this.source[1] + ", " + locals.join(", ");
+ }
+
+ // Generate minimizer alias mappings
+ if (!this.isChild) {
+ var aliases = [];
+ for (var alias in this.context.aliases) {
+ this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
+ }
+ }
+
+ if (this.source[1]) {
+ this.source[1] = "var " + this.source[1].substring(2) + ";";
+ }
+
+ // Merge children
+ if (!this.isChild) {
+ this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
+ }
+
+ if (!this.environment.isSimple) {
+ this.source.push("return buffer;");
+ }
+
+ var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];
+
+ for(var i=0, l=this.environment.depths.list.length; i this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
+ return "stack" + this.stackSlot;
+ },
+
+ popStack: function() {
+ return "stack" + this.stackSlot--;
+ },
+
+ topStack: function() {
+ return "stack" + this.stackSlot;
+ },
+
+ quotedString: function(str) {
+ return '"' + str
+ .replace(/\\/g, '\\\\')
+ .replace(/"/g, '\\"')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r') + '"';
+ }
+ };
+
+ var reservedWords = (
+ "break else new var" +
+ " case finally return void" +
+ " catch for switch while" +
+ " continue function this with" +
+ " default if throw" +
+ " delete in try" +
+ " do instanceof typeof" +
+ " abstract enum int short" +
+ " boolean export interface static" +
+ " byte extends long super" +
+ " char final native synchronized" +
+ " class float package throws" +
+ " const goto private transient" +
+ " debugger implements protected volatile" +
+ " double import public let yield"
+ ).split(" ");
+
+ var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
+
+ for(var i=0, l=reservedWords.length; i "The pie of the day is Maple Custard!"
+
+@method render
+@param {String} string Handlebars template string to render.
+@param {Object} context Context object to pass to the template.
+@param {Object} [options] Compile/render options.
+ @param {Object} [options.helpers] Helper functions.
+ @param {Object} [options.partials] Partials.
+ @param {Object} [options.data] Data.
+@return {String} Rendered template string.
+*/
+Handlebars.render = function (string, context, options) {
+ return Handlebars.compile(string)(context, options);
+};
+
+// The rest of this file is just API docs for methods defined in Handlebars
+// itself.
+
+/**
+Compiles a Handlebars template string into a function. To render the template,
+call the function and pass in a context object.
+
+@example
+
+ var template = Y.Handlebars.compile('The pie of the day is {{pie}}!.');
+ template({pie: 'Pecan'});
+ // => "The pie of the day is Pecan!"
+
+@method compile
+@param {String} string Handlebars template string to compile.
+@param {Object} [options] Compiler options.
+@return {Function} Compiled template function.
+*/
+
+/**
+Precompiles a Handlebars template string into a string of JavaScript code. This
+can be used to precompile a template at build time or on the server, and the
+resulting template can then be rendered at runtime or on the client without
+needing to go through a compile step.
+
+To render a precompiled template, evaluate the code and then pass the resulting
+function to `Y.Handlebars.template()` to get back an executable template
+function.
+
+@method precompile
+@param {String} string Handlebars template string to compile.
+@param {Object} [options] Compiler options.
+@return {String} Precompiled template code.
+*/
+
+
+}, '3.5.0' ,{requires:['handlebars-base']});
diff --git a/lib/yui/3.5.0/build/handlebars-compiler/handlebars-compiler-min.js b/lib/yui/3.5.0/build/handlebars-compiler/handlebars-compiler-min.js
new file mode 100644
index 00000000000..3fb44181731
--- /dev/null
+++ b/lib/yui/3.5.0/build/handlebars-compiler/handlebars-compiler-min.js
@@ -0,0 +1,16 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("handlebars-compiler",function(e){
+/*!
+Handlebars.js - Copyright (C) 2011 Yehuda Katz
+https://raw.github.com/wycats/handlebars.js/master/LICENSE
+*/
+var d=e.Handlebars;var a=(function(){var k={trace:function h(){},yy:{},symbols_:{"error":2,"root":3,"program":4,"EOF":5,"statements":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"OPEN_PARTIAL":24,"params":25,"hash":26,"param":27,"STRING":28,"INTEGER":29,"BOOLEAN":30,"hashSegments":31,"hashSegment":32,"ID":33,"EQUALS":34,"pathSegments":35,"SEP":36,"$accept":0,"$end":1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function g(l,o,p,s,r,n,q){var m=n.length-1;switch(r){case 1:return n[m-1];break;case 2:this.$=new s.ProgramNode(n[m-2],n[m]);break;case 3:this.$=new s.ProgramNode(n[m]);break;case 4:this.$=new s.ProgramNode([]);break;case 5:this.$=[n[m]];break;case 6:n[m-1].push(n[m]);this.$=n[m-1];break;case 7:this.$=new s.InverseNode(n[m-2],n[m-1],n[m]);break;case 8:this.$=new s.BlockNode(n[m-2],n[m-1],n[m]);break;case 9:this.$=n[m];break;case 10:this.$=n[m];break;case 11:this.$=new s.ContentNode(n[m]);break;case 12:this.$=new s.CommentNode(n[m]);break;case 13:this.$=new s.MustacheNode(n[m-1][0],n[m-1][1]);break;case 14:this.$=new s.MustacheNode(n[m-1][0],n[m-1][1]);break;case 15:this.$=n[m-1];break;case 16:this.$=new s.MustacheNode(n[m-1][0],n[m-1][1]);break;case 17:this.$=new s.MustacheNode(n[m-1][0],n[m-1][1],true);break;case 18:this.$=new s.PartialNode(n[m-1]);break;case 19:this.$=new s.PartialNode(n[m-2],n[m-1]);break;case 20:break;case 21:this.$=[[n[m-2]].concat(n[m-1]),n[m]];break;case 22:this.$=[[n[m-1]].concat(n[m]),null];break;case 23:this.$=[[n[m-1]],n[m]];break;case 24:this.$=[[n[m]],null];break;case 25:n[m-1].push(n[m]);this.$=n[m-1];break;case 26:this.$=[n[m]];break;case 27:this.$=n[m];break;case 28:this.$=new s.StringNode(n[m]);break;case 29:this.$=new s.IntegerNode(n[m]);break;case 30:this.$=new s.BooleanNode(n[m]);break;case 31:this.$=new s.HashNode(n[m]);break;case 32:n[m-1].push(n[m]);this.$=n[m-1];break;case 33:this.$=[n[m]];break;case 34:this.$=[n[m-2],n[m]];break;case 35:this.$=[n[m-2],new s.StringNode(n[m])];break;case 36:this.$=[n[m-2],new s.IntegerNode(n[m])];break;case 37:this.$=[n[m-2],new s.BooleanNode(n[m])];break;case 38:this.$=new s.IdNode(n[m]);break;case 39:n[m-2].push(n[m]);this.$=n[m-2];break;case 40:this.$=[n[m]];break;}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function i(m,l){throw new Error(m);
+},parse:function j(v){var C=this,s=[0],L=[null],x=[],M=this.table,m="",w=0,J=0,o=0,u=2,z=1;this.lexer.setInput(v);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;if(typeof this.lexer.yylloc=="undefined"){this.lexer.yylloc={};}var n=this.lexer.yylloc;x.push(n);if(typeof this.yy.parseError==="function"){this.parseError=this.yy.parseError;}function B(p){s.length=s.length-2*p;L.length=L.length-p;x.length=x.length-p;}function A(){var p;p=C.lexer.lex()||1;if(typeof p!=="number"){p=C.symbols_[p]||p;}return p;}var I,E,q,H,N,y,G={},D,K,l,t;while(true){q=s[s.length-1];if(this.defaultActions[q]){H=this.defaultActions[q];}else{if(I==null){I=A();}H=M[q]&&M[q][I];}_handle_error:if(typeof H==="undefined"||!H.length||!H[0]){if(!o){t=[];for(D in M[q]){if(this.terminals_[D]&&D>2){t.push("'"+this.terminals_[D]+"'");}}var F="";if(this.lexer.showPosition){F="Parse error on line "+(w+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+t.join(", ")+", got '"+this.terminals_[I]+"'";}else{F="Parse error on line "+(w+1)+": Unexpected "+(I==1?"end of input":("'"+(this.terminals_[I]||I)+"'"));}this.parseError(F,{text:this.lexer.match,token:this.terminals_[I]||I,line:this.lexer.yylineno,loc:n,expected:t});}if(o==3){if(I==z){throw new Error(F||"Parsing halted.");}J=this.lexer.yyleng;m=this.lexer.yytext;w=this.lexer.yylineno;n=this.lexer.yylloc;I=A();}while(1){if((u.toString()) in M[q]){break;}if(q==0){throw new Error(F||"Parsing halted.");}B(1);q=s[s.length-1];}E=I;I=u;q=s[s.length-1];H=M[q]&&M[q][u];o=3;}if(H[0] instanceof Array&&H.length>1){throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+I);}switch(H[0]){case 1:s.push(I);L.push(this.lexer.yytext);x.push(this.lexer.yylloc);s.push(H[1]);I=null;if(!E){J=this.lexer.yyleng;m=this.lexer.yytext;w=this.lexer.yylineno;n=this.lexer.yylloc;if(o>0){o--;}}else{I=E;E=null;}break;case 2:K=this.productions_[H[1]][1];G.$=L[L.length-K];G._$={first_line:x[x.length-(K||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(K||1)].first_column,last_column:x[x.length-1].last_column};y=this.performAction.call(G,m,J,w,this.yy,H[1],L,x);if(typeof y!=="undefined"){return y;}if(K){s=s.slice(0,-1*K*2);L=L.slice(0,-1*K);x=x.slice(0,-1*K);}s.push(this.productions_[H[1]][0]);L.push(G.$);x.push(G._$);l=M[s[s.length-2]][s[s.length-1]];s.push(l);break;case 3:return true;}}return true;}};var f=(function(){var o=({EOF:1,parseError:function q(t,s){if(this.yy.parseError){this.yy.parseError(t,s);}else{throw new Error(t);}},setInput:function(s){this._input=s;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};return this;},input:function(){var t=this._input[0];this.yytext+=t;this.yyleng++;this.match+=t;this.matched+=t;var s=t.match(/\n/);if(s){this.yylineno++;}this._input=this._input.slice(1);return t;},unput:function(s){this._input=s+this._input;return this;},more:function(){this._more=true;return this;},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"");},upcomingInput:function(){var s=this.match;if(s.length<20){s+=this._input.substr(0,20-s.length);}return(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"");},showPosition:function(){var s=this.pastInput();var t=new Array(s.length+1).join("-");return s+this.upcomingInput()+"\n"+t+"^";},next:function(){if(this.done){return this.EOF;}if(!this._input){this.done=true;}var w,u,t,s;if(!this._more){this.yytext="";this.match="";}var x=this._currentRules();for(var v=0;v/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/];
+o.conditions={"mu":{"rules":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"INITIAL":{"rules":[0,1,26],"inclusive":true}};return o;})();k.lexer=f;return k;})();if(typeof require!=="undefined"&&typeof exports!=="undefined"){exports.parser=a;exports.parse=function(){return a.parse.apply(a,arguments);};exports.main=function b(f){if(!f[1]){throw new Error("Usage: "+f[0]+" FILE");}if(typeof process!=="undefined"){var h=require("fs").readFileSync(require("path").join(process.cwd(),f[1]),"utf8");}else{var g=require("file").path(require("file").cwd());var h=g.join(f[1]).read({charset:"utf-8"});}return exports.parser.parse(h);};if(typeof module!=="undefined"&&require.main===module){exports.main(typeof process!=="undefined"?process.argv.slice(1):require("system").args);}}d.Parser=a;d.parse=function(f){d.Parser.yy=d.AST;return d.Parser.parse(f);};d.print=function(f){return new d.PrintVisitor().accept(f);};d.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(g,f){}};d.log=function(g,f){d.logger.log(g,f);};(function(){d.AST={};d.AST.ProgramNode=function(h,g){this.type="program";this.statements=h;if(g){this.inverse=new d.AST.ProgramNode(g);}};d.AST.MustacheNode=function(i,h,g){this.type="mustache";this.id=i[0];this.params=i.slice(1);this.hash=h;this.escaped=!g;};d.AST.PartialNode=function(h,g){this.type="partial";this.id=h;this.context=g;};var f=function(g,h){if(g.original!==h.original){throw new d.Exception(g.original+" doesn't match "+h.original);}};d.AST.BlockNode=function(h,g,i){f(h.id,i);this.type="block";this.mustache=h;this.program=g;};d.AST.InverseNode=function(h,g,i){f(h.id,i);this.type="inverse";this.mustache=h;this.program=g;};d.AST.ContentNode=function(g){this.type="content";this.string=g;};d.AST.HashNode=function(g){this.type="hash";this.pairs=g;};d.AST.IdNode=function(m){this.type="ID";this.original=m.join(".");var j=[],n=0;for(var k=0,g=m.length;k0){this.source[1]=this.source[1]+", "+v.join(", ");}if(!this.isChild){var q=[];for(var t in this.context.aliases){this.source[1]=this.source[1]+", "+t+"="+this.context.aliases[t];}}if(this.source[1]){this.source[1]="var "+this.source[1].substring(2)+";";}if(!this.isChild){this.source[1]+="\n"+this.context.programs.join("\n")+"\n";}if(!this.environment.isSimple){this.source.push("return buffer;");}var w=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var s=0,p=this.environment.depths.list.length;s
this.stackVars.length){this.stackVars.push("stack"+this.stackSlot);}return"stack"+this.stackSlot;},popStack:function(){return"stack"+this.stackSlot--;},topStack:function(){return"stack"+this.stackSlot;},quotedString:function(i){return'"'+i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"';}};var f=("break else new var"+" case finally return void"+" catch for switch while"+" continue function this with"+" default if throw"+" delete in try"+" do instanceof typeof"+" abstract enum int short"+" boolean export interface static"+" byte extends long super"+" char final native synchronized"+" class float package throws"+" const goto private transient"+" debugger implements protected volatile"+" double import public let yield").split(" ");var j=k.RESERVED_WORDS={};for(var h=0,g=f.length;h 2) {
+ expected.push("'"+this.terminals_[p]+"'");
+ }
+ var errStr = '';
+ if (this.lexer.showPosition) {
+ errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
+ } else {
+ errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
+ (symbol == 1 /*EOF*/ ? "end of input" :
+ ("'"+(this.terminals_[symbol] || symbol)+"'"));
+ }
+ this.parseError(errStr,
+ {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
+ }
+
+ // just recovered from another error
+ if (recovering == 3) {
+ if (symbol == EOF) {
+ throw new Error(errStr || 'Parsing halted.');
+ }
+
+ // discard current lookahead and grab another
+ yyleng = this.lexer.yyleng;
+ yytext = this.lexer.yytext;
+ yylineno = this.lexer.yylineno;
+ yyloc = this.lexer.yylloc;
+ symbol = lex();
+ }
+
+ // try to recover from error
+ while (1) {
+ // check for error recovery rule in this state
+ if ((TERROR.toString()) in table[state]) {
+ break;
+ }
+ if (state == 0) {
+ throw new Error(errStr || 'Parsing halted.');
+ }
+ popStack(1);
+ state = stack[stack.length-1];
+ }
+
+ preErrorSymbol = symbol; // save the lookahead token
+ symbol = TERROR; // insert generic error symbol as new lookahead
+ state = stack[stack.length-1];
+ action = table[state] && table[state][TERROR];
+ recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
+ }
+
+ // this shouldn't happen, unless resolve defaults are off
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
+ }
+
+ switch (action[0]) {
+
+ case 1: // shift
+ //this.shiftCount++;
+
+ stack.push(symbol);
+ vstack.push(this.lexer.yytext);
+ lstack.push(this.lexer.yylloc);
+ stack.push(action[1]); // push state
+ symbol = null;
+ if (!preErrorSymbol) { // normal execution/no error
+ yyleng = this.lexer.yyleng;
+ yytext = this.lexer.yytext;
+ yylineno = this.lexer.yylineno;
+ yyloc = this.lexer.yylloc;
+ if (recovering > 0)
+ recovering--;
+ } else { // error just occurred, resume old lookahead f/ before error
+ symbol = preErrorSymbol;
+ preErrorSymbol = null;
+ }
+ break;
+
+ case 2: // reduce
+ //this.reductionCount++;
+
+ len = this.productions_[action[1]][1];
+
+ // perform semantic action
+ yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
+ // default location, uses first token for firsts, last for lasts
+ yyval._$ = {
+ first_line: lstack[lstack.length-(len||1)].first_line,
+ last_line: lstack[lstack.length-1].last_line,
+ first_column: lstack[lstack.length-(len||1)].first_column,
+ last_column: lstack[lstack.length-1].last_column
+ };
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
+
+ if (typeof r !== 'undefined') {
+ return r;
+ }
+
+ // pop off stack
+ if (len) {
+ stack = stack.slice(0,-1*len*2);
+ vstack = vstack.slice(0, -1*len);
+ lstack = lstack.slice(0, -1*len);
+ }
+
+ stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ // goto new state = table[STATE][NONTERMINAL]
+ newState = table[stack[stack.length-2]][stack[stack.length-1]];
+ stack.push(newState);
+ break;
+
+ case 3: // accept
+ return true;
+ }
+
+ }
+
+ return true;
+}};/* Jison generated lexer */
+var lexer = (function(){
+
+var lexer = ({EOF:1,
+parseError:function parseError(str, hash) {
+ if (this.yy.parseError) {
+ this.yy.parseError(str, hash);
+ } else {
+ throw new Error(str);
+ }
+ },
+setInput:function (input) {
+ this._input = input;
+ this._more = this._less = this.done = false;
+ this.yylineno = this.yyleng = 0;
+ this.yytext = this.matched = this.match = '';
+ this.conditionStack = ['INITIAL'];
+ this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
+ return this;
+ },
+input:function () {
+ var ch = this._input[0];
+ this.yytext+=ch;
+ this.yyleng++;
+ this.match+=ch;
+ this.matched+=ch;
+ var lines = ch.match(/\n/);
+ if (lines) this.yylineno++;
+ this._input = this._input.slice(1);
+ return ch;
+ },
+unput:function (ch) {
+ this._input = ch + this._input;
+ return this;
+ },
+more:function () {
+ this._more = true;
+ return this;
+ },
+pastInput:function () {
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
+ return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
+ },
+upcomingInput:function () {
+ var next = this.match;
+ if (next.length < 20) {
+ next += this._input.substr(0, 20-next.length);
+ }
+ return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
+ },
+showPosition:function () {
+ var pre = this.pastInput();
+ var c = new Array(pre.length + 1).join("-");
+ return pre + this.upcomingInput() + "\n" + c+"^";
+ },
+next:function () {
+ if (this.done) {
+ return this.EOF;
+ }
+ if (!this._input) this.done = true;
+
+ var token,
+ match,
+ col,
+ lines;
+ if (!this._more) {
+ this.yytext = '';
+ this.match = '';
+ }
+ var rules = this._currentRules();
+ for (var i=0;i < rules.length; i++) {
+ match = this._input.match(this.rules[rules[i]]);
+ if (match) {
+ lines = match[0].match(/\n.*/g);
+ if (lines) this.yylineno += lines.length;
+ this.yylloc = {first_line: this.yylloc.last_line,
+ last_line: this.yylineno+1,
+ first_column: this.yylloc.last_column,
+ last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
+ this.yytext += match[0];
+ this.match += match[0];
+ this.matches = match;
+ this.yyleng = this.yytext.length;
+ this._more = false;
+ this._input = this._input.slice(match[0].length);
+ this.matched += match[0];
+ token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
+ if (token) return token;
+ else return;
+ }
+ }
+ if (this._input === "") {
+ return this.EOF;
+ } else {
+ this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
+ {text: "", token: null, line: this.yylineno});
+ }
+ },
+lex:function lex() {
+ var r = this.next();
+ if (typeof r !== 'undefined') {
+ return r;
+ } else {
+ return this.lex();
+ }
+ },
+begin:function begin(condition) {
+ this.conditionStack.push(condition);
+ },
+popState:function popState() {
+ return this.conditionStack.pop();
+ },
+_currentRules:function _currentRules() {
+ return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
+ },
+topState:function () {
+ return this.conditionStack[this.conditionStack.length-2];
+ },
+pushState:function begin(condition) {
+ this.begin(condition);
+ }});
+lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
+
+var YYSTATE=YY_START
+switch($avoiding_name_collisions) {
+case 0:
+ if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
+ if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
+ if(yy_.yytext) return 14;
+
+break;
+case 1: return 14;
+break;
+case 2: this.popState(); return 14;
+break;
+case 3: return 24;
+break;
+case 4: return 16;
+break;
+case 5: return 20;
+break;
+case 6: return 19;
+break;
+case 7: return 19;
+break;
+case 8: return 23;
+break;
+case 9: return 23;
+break;
+case 10: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
+break;
+case 11: return 22;
+break;
+case 12: return 34;
+break;
+case 13: return 33;
+break;
+case 14: return 33;
+break;
+case 15: return 36;
+break;
+case 16: /*ignore whitespace*/
+break;
+case 17: this.popState(); return 18;
+break;
+case 18: this.popState(); return 18;
+break;
+case 19: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 28;
+break;
+case 20: return 30;
+break;
+case 21: return 30;
+break;
+case 22: return 29;
+break;
+case 23: return 33;
+break;
+case 24: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 33;
+break;
+case 25: return 'INVALID';
+break;
+case 26: return 5;
+break;
+}
+};
+lexer.rules = [/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/];
+lexer.conditions = {"mu":{"rules":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"INITIAL":{"rules":[0,1,26],"inclusive":true}};return lexer;})()
+parser.lexer = lexer;
+return parser;
+})();
+if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
+exports.parser = handlebars;
+exports.parse = function () { return handlebars.parse.apply(handlebars, arguments); }
+exports.main = function commonjsMain(args) {
+ if (!args[1])
+ throw new Error('Usage: '+args[0]+' FILE');
+ if (typeof process !== 'undefined') {
+ var source = require('fs').readFileSync(require('path').join(process.cwd(), args[1]), "utf8");
+ } else {
+ var cwd = require("file").path(require("file").cwd());
+ var source = cwd.join(args[1]).read({charset: "utf-8"});
+ }
+ return exports.parser.parse(source);
+}
+if (typeof module !== 'undefined' && require.main === module) {
+ exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args);
+}
+};
+/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */
+
+// BEGIN(BROWSER)
+Handlebars.Parser = handlebars;
+
+Handlebars.parse = function(string) {
+ Handlebars.Parser.yy = Handlebars.AST;
+ return Handlebars.Parser.parse(string);
+};
+
+Handlebars.print = function(ast) {
+ return new Handlebars.PrintVisitor().accept(ast);
+};
+
+Handlebars.logger = {
+ DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
+
+ // override in the host environment
+ log: function(level, str) {}
+};
+
+Handlebars.log = function(level, str) { Handlebars.logger.log(level, str); };
+
+// END(BROWSER)
+/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */
+
+// BEGIN(BROWSER)
+(function() {
+
+ Handlebars.AST = {};
+
+ Handlebars.AST.ProgramNode = function(statements, inverse) {
+ this.type = "program";
+ this.statements = statements;
+ if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
+ };
+
+ Handlebars.AST.MustacheNode = function(params, hash, unescaped) {
+ this.type = "mustache";
+ this.id = params[0];
+ this.params = params.slice(1);
+ this.hash = hash;
+ this.escaped = !unescaped;
+ };
+
+ Handlebars.AST.PartialNode = function(id, context) {
+ this.type = "partial";
+
+ // TODO: disallow complex IDs
+
+ this.id = id;
+ this.context = context;
+ };
+
+ var verifyMatch = function(open, close) {
+ if(open.original !== close.original) {
+ throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
+ }
+ };
+
+ Handlebars.AST.BlockNode = function(mustache, program, close) {
+ verifyMatch(mustache.id, close);
+ this.type = "block";
+ this.mustache = mustache;
+ this.program = program;
+ };
+
+ Handlebars.AST.InverseNode = function(mustache, program, close) {
+ verifyMatch(mustache.id, close);
+ this.type = "inverse";
+ this.mustache = mustache;
+ this.program = program;
+ };
+
+ Handlebars.AST.ContentNode = function(string) {
+ this.type = "content";
+ this.string = string;
+ };
+
+ Handlebars.AST.HashNode = function(pairs) {
+ this.type = "hash";
+ this.pairs = pairs;
+ };
+
+ Handlebars.AST.IdNode = function(parts) {
+ this.type = "ID";
+ this.original = parts.join(".");
+
+ var dig = [], depth = 0;
+
+ for(var i=0,l=parts.length; i 0) {
+ this.source[1] = this.source[1] + ", " + locals.join(", ");
+ }
+
+ // Generate minimizer alias mappings
+ if (!this.isChild) {
+ var aliases = [];
+ for (var alias in this.context.aliases) {
+ this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
+ }
+ }
+
+ if (this.source[1]) {
+ this.source[1] = "var " + this.source[1].substring(2) + ";";
+ }
+
+ // Merge children
+ if (!this.isChild) {
+ this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
+ }
+
+ if (!this.environment.isSimple) {
+ this.source.push("return buffer;");
+ }
+
+ var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];
+
+ for(var i=0, l=this.environment.depths.list.length; i this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
+ return "stack" + this.stackSlot;
+ },
+
+ popStack: function() {
+ return "stack" + this.stackSlot--;
+ },
+
+ topStack: function() {
+ return "stack" + this.stackSlot;
+ },
+
+ quotedString: function(str) {
+ return '"' + str
+ .replace(/\\/g, '\\\\')
+ .replace(/"/g, '\\"')
+ .replace(/\n/g, '\\n')
+ .replace(/\r/g, '\\r') + '"';
+ }
+ };
+
+ var reservedWords = (
+ "break else new var" +
+ " case finally return void" +
+ " catch for switch while" +
+ " continue function this with" +
+ " default if throw" +
+ " delete in try" +
+ " do instanceof typeof" +
+ " abstract enum int short" +
+ " boolean export interface static" +
+ " byte extends long super" +
+ " char final native synchronized" +
+ " class float package throws" +
+ " const goto private transient" +
+ " debugger implements protected volatile" +
+ " double import public let yield"
+ ).split(" ");
+
+ var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
+
+ for(var i=0, l=reservedWords.length; i "The pie of the day is Maple Custard!"
+
+@method render
+@param {String} string Handlebars template string to render.
+@param {Object} context Context object to pass to the template.
+@param {Object} [options] Compile/render options.
+ @param {Object} [options.helpers] Helper functions.
+ @param {Object} [options.partials] Partials.
+ @param {Object} [options.data] Data.
+@return {String} Rendered template string.
+*/
+Handlebars.render = function (string, context, options) {
+ return Handlebars.compile(string)(context, options);
+};
+
+// The rest of this file is just API docs for methods defined in Handlebars
+// itself.
+
+/**
+Compiles a Handlebars template string into a function. To render the template,
+call the function and pass in a context object.
+
+@example
+
+ var template = Y.Handlebars.compile('The pie of the day is {{pie}}!.');
+ template({pie: 'Pecan'});
+ // => "The pie of the day is Pecan!"
+
+@method compile
+@param {String} string Handlebars template string to compile.
+@param {Object} [options] Compiler options.
+@return {Function} Compiled template function.
+*/
+
+/**
+Precompiles a Handlebars template string into a string of JavaScript code. This
+can be used to precompile a template at build time or on the server, and the
+resulting template can then be rendered at runtime or on the client without
+needing to go through a compile step.
+
+To render a precompiled template, evaluate the code and then pass the resulting
+function to `Y.Handlebars.template()` to get back an executable template
+function.
+
+@method precompile
+@param {String} string Handlebars template string to compile.
+@param {Object} [options] Compiler options.
+@return {String} Precompiled template code.
+*/
+
+
+}, '3.5.0' ,{requires:['handlebars-base']});
diff --git a/lib/yui/3.4.1/build/highlight-accentfold/highlight-accentfold-debug.js b/lib/yui/3.5.0/build/highlight-accentfold/highlight-accentfold-debug.js
similarity index 97%
rename from lib/yui/3.4.1/build/highlight-accentfold/highlight-accentfold-debug.js
rename to lib/yui/3.5.0/build/highlight-accentfold/highlight-accentfold-debug.js
index 6eba7cf9042..ecda76ec863 100644
--- a/lib/yui/3.4.1/build/highlight-accentfold/highlight-accentfold-debug.js
+++ b/lib/yui/3.5.0/build/highlight-accentfold/highlight-accentfold-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -147,4 +147,4 @@ Highlight = Y.mix(Y.Highlight, {
});
-}, '3.4.1' ,{requires:['highlight-base', 'text-accentfold']});
+}, '3.5.0' ,{requires:['highlight-base', 'text-accentfold']});
diff --git a/lib/yui/3.4.1/build/highlight-accentfold/highlight-accentfold-min.js b/lib/yui/3.5.0/build/highlight-accentfold/highlight-accentfold-min.js
similarity index 86%
rename from lib/yui/3.4.1/build/highlight-accentfold/highlight-accentfold-min.js
rename to lib/yui/3.5.0/build/highlight-accentfold/highlight-accentfold-min.js
index e965387ee85..7ec1f88269b 100644
--- a/lib/yui/3.4.1/build/highlight-accentfold/highlight-accentfold-min.js
+++ b/lib/yui/3.5.0/build/highlight-accentfold/highlight-accentfold-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("highlight-accentfold",function(e){var d=e.Text.AccentFold,b=e.Escape,c={},a=e.mix(e.Highlight,{allFold:function(o,f,q){var n=a._TEMPLATE,g=[],l=0,m,h,k,j,p;q=e.merge({escapeHTML:false,replacer:function(r,t,s,u){var i;if(t&&!(/\s/).test(s)){return r;}i=s.length;g.push([o.substring(l,u),o.substr(u,i)]);l=u+i;}},q||c);a.all(d.fold(o),d.fold(f),q);if(l{s}',all:function(r,j,s){var p=[],o,m,n,l,q,k;if(!s){s=f;}o=s.escapeHTML!==false;q=s.startsWith?b._START_REGEX:b._REGEX;k=s.replacer||b._REPLACER;j=a(j)?j:[j];for(m=0,n=j.length;m{s}',all:function(r,j,s){var p=[],o,m,n,l,q,k;if(!s){s=f;}o=s.escapeHTML!==false;q=s.startsWith?b._START_REGEX:b._REGEX;k=s.replacer||b._REPLACER;j=a(j)?j:[j];for(m=0,n=j.length;m= 2));
+ win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2) &&
+ (!Y.UA.android || Y.UA.android >= 2.4));
/**
* Whether or not this browser supports the window.onhashchange
@@ -641,4 +643,4 @@ Y.mix(HistoryBase.prototype, {
Y.HistoryBase = HistoryBase;
-}, '3.4.1' ,{requires:['event-custom-complex']});
+}, '3.5.0' ,{requires:['event-custom-complex']});
diff --git a/lib/yui/3.5.0/build/history-base/history-base-min.js b/lib/yui/3.5.0/build/history-base/history-base-min.js
new file mode 100644
index 00000000000..8cea62efd0b
--- /dev/null
+++ b/lib/yui/3.5.0/build/history-base/history-base-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("history-base",function(b){var i=b.Lang,e=b.Object,l=YUI.namespace("Env.History"),m=b.Array,n=b.config.doc,f=n.documentMode,j=b.config.win,c={merge:true},h="change",a="add",g="replace";function d(){this._init.apply(this,arguments);}b.augment(d,b.EventTarget,null,null,{emitFacade:true,prefix:"history",preventable:false,queueable:true});if(!l._state){l._state={};}function k(o){return i.type(o)==="object";}d.NAME="historyBase";d.SRC_ADD=a;d.SRC_REPLACE=g;d.html5=!!(j.history&&j.history.pushState&&j.history.replaceState&&("onpopstate" in j||b.UA.gecko>=2)&&(!b.UA.android||b.UA.android>=2.4));d.nativeHashChange=("onhashchange" in j||"onhashchange" in n)&&(!f||f>7);b.mix(d.prototype,{_init:function(p){var o;p=this._config=p||{};this.force=!!p.force;o=this._initialState=this._initialState||p.initialState||null;this.publish(h,{broadcast:2,defaultFn:this._defChangeFn});if(o){this.replace(o);}},add:function(){var o=m(arguments,0,true);o.unshift(a);return this._change.apply(this,o);},addValue:function(p,r,o){var q={};q[p]=r;return this._change(a,q,o);},get:function(p){var q=l._state,o=k(q);if(p){return o&&e.owns(q,p)?q[p]:undefined;}else{return o?b.mix({},q,true):q;}},replace:function(){var o=m(arguments,0,true);o.unshift(g);return this._change.apply(this,o);},replaceValue:function(p,r,o){var q={};q[p]=r;return this._change(g,q,o);},_change:function(q,p,o){o=o?b.merge(c,o):c;if(o.merge&&k(p)&&k(l._state)){p=b.merge(l._state,p);}this._resolveChanges(q,p,o);return this;},_fireEvents:function(q,p,o){this.fire(h,{_options:o,changed:p.changed,newVal:p.newState,prevVal:p.prevState,removed:p.removed,src:q});e.each(p.changed,function(s,r){this._fireChangeEvent(q,r,s);},this);e.each(p.removed,function(s,r){this._fireRemoveEvent(q,r,s);},this);},_fireChangeEvent:function(q,o,p){this.fire(o+"Change",{newVal:p.newVal,prevVal:p.prevVal,src:q});},_fireRemoveEvent:function(q,o,p){this.fire(o+"Remove",{prevVal:p,src:q});},_resolveChanges:function(u,s,p){var t={},o,r=l._state,q={};s||(s={});p||(p={});if(k(s)&&k(r)){e.each(s,function(v,w){var x=r[w];if(v!==x){t[w]={newVal:v,prevVal:x};o=true;}},this);e.each(r,function(w,v){if(!e.owns(s,v)||s[v]===null){delete s[v];q[v]=w;o=true;}},this);}else{o=s!==r;}if(o||this.force){this._fireEvents(u,{changed:t,newState:s,prevState:r,removed:q},p);}},_storeState:function(p,o){l._state=o||{};},_defChangeFn:function(o){this._storeState(o.src,o.newVal,o._options);}},true);b.HistoryBase=d;},"3.5.0",{requires:["event-custom-complex"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/history-base/history-base.js b/lib/yui/3.5.0/build/history-base/history-base.js
similarity index 99%
rename from lib/yui/3.4.1/build/history-base/history-base.js
rename to lib/yui/3.5.0/build/history-base/history-base.js
index 6134e8d572f..32a7e7af2b5 100644
--- a/lib/yui/3.4.1/build/history-base/history-base.js
+++ b/lib/yui/3.5.0/build/history-base/history-base.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -14,6 +14,7 @@ YUI.add('history-base', function(Y) {
* application that doesn't perform full-page refreshes.
*
* @module history
+ * @main history
* @since 3.2.0
*/
@@ -134,7 +135,8 @@ HistoryBase.SRC_REPLACE = SRC_REPLACE;
// true for 'onpopstate' in win. In order to support Gecko 2, we fall back to a
// UA sniff for now. (current as of Firefox 4.0b2)
HistoryBase.html5 = !!(win.history && win.history.pushState &&
- win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2));
+ win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2) &&
+ (!Y.UA.android || Y.UA.android >= 2.4));
/**
* Whether or not this browser supports the window.onhashchange
@@ -641,4 +643,4 @@ Y.mix(HistoryBase.prototype, {
Y.HistoryBase = HistoryBase;
-}, '3.4.1' ,{requires:['event-custom-complex']});
+}, '3.5.0' ,{requires:['event-custom-complex']});
diff --git a/lib/yui/3.4.1/build/history-hash-ie/history-hash-ie-debug.js b/lib/yui/3.5.0/build/history-hash-ie/history-hash-ie-debug.js
similarity index 95%
rename from lib/yui/3.4.1/build/history-hash-ie/history-hash-ie-debug.js
rename to lib/yui/3.5.0/build/history-hash-ie/history-hash-ie-debug.js
index 91ab7310eb3..bf89519efe6 100644
--- a/lib/yui/3.4.1/build/history-hash-ie/history-hash-ie-debug.js
+++ b/lib/yui/3.5.0/build/history-hash-ie/history-hash-ie-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -24,9 +24,8 @@ if (Y.UA.ie && !Y.HistoryBase.nativeHashChange) {
GlobalEnv = YUI.namespace('Env.HistoryHash'),
HistoryHash = Y.HistoryHash,
- iframe = GlobalEnv._iframe,
- win = Y.config.win,
- location = win.location;
+ iframe = GlobalEnv._iframe,
+ win = Y.config.win;
/**
* Gets the raw (not decoded) current location hash from the IE iframe,
@@ -142,4 +141,4 @@ if (Y.UA.ie && !Y.HistoryBase.nativeHashChange) {
}
-}, '3.4.1' ,{requires:['history-hash', 'node-base']});
+}, '3.5.0' ,{requires:['history-hash', 'node-base']});
diff --git a/lib/yui/3.5.0/build/history-hash-ie/history-hash-ie-min.js b/lib/yui/3.5.0/build/history-hash-ie/history-hash-ie-min.js
new file mode 100644
index 00000000000..ee974ed7198
--- /dev/null
+++ b/lib/yui/3.5.0/build/history-hash-ie/history-hash-ie-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("history-hash-ie",function(f){if(f.UA.ie&&!f.HistoryBase.nativeHashChange){var b=f.Do,c=YUI.namespace("Env.HistoryHash"),a=f.HistoryHash,d=c._iframe,e=f.config.win;a.getIframeHash=function(){if(!d||!d.contentWindow){return"";}var g=a.hashPrefix,h=d.contentWindow.location.hash.substr(1);return g&&h.indexOf(g)===0?h.replace(g,""):h;};a._updateIframe=function(h,g){var i=d&&d.contentWindow&&d.contentWindow.document,j=i&&i.location;if(!i||!j){return;}if(g){j.replace(h.charAt(0)==="#"?h:"#"+h);}else{i.open().close();j.hash=h;}};b.before(a._updateIframe,a,"replaceHash",a,true);if(!d){f.on("domready",function(){var g=a.getHash();d=c._iframe=f.Node.getDOMNode(f.Node.create(''));f.config.doc.documentElement.appendChild(d);a._updateIframe(g||"#");f.on("hashchange",function(h){g=h.newHash;if(a.getIframeHash()!==g){a._updateIframe(g);}},e);f.later(50,null,function(){var h=a.getIframeHash();if(h!==g){a.setHash(h);}},null,true);});}}},"3.5.0",{requires:["history-hash","node-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/history-hash-ie/history-hash-ie.js b/lib/yui/3.5.0/build/history-hash-ie/history-hash-ie.js
similarity index 95%
rename from lib/yui/3.4.1/build/history-hash-ie/history-hash-ie.js
rename to lib/yui/3.5.0/build/history-hash-ie/history-hash-ie.js
index 580252ef907..28f06716a87 100644
--- a/lib/yui/3.4.1/build/history-hash-ie/history-hash-ie.js
+++ b/lib/yui/3.5.0/build/history-hash-ie/history-hash-ie.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -24,9 +24,8 @@ if (Y.UA.ie && !Y.HistoryBase.nativeHashChange) {
GlobalEnv = YUI.namespace('Env.HistoryHash'),
HistoryHash = Y.HistoryHash,
- iframe = GlobalEnv._iframe,
- win = Y.config.win,
- location = win.location;
+ iframe = GlobalEnv._iframe,
+ win = Y.config.win;
/**
* Gets the raw (not decoded) current location hash from the IE iframe,
@@ -138,4 +137,4 @@ if (Y.UA.ie && !Y.HistoryBase.nativeHashChange) {
}
-}, '3.4.1' ,{requires:['history-hash', 'node-base']});
+}, '3.5.0' ,{requires:['history-hash', 'node-base']});
diff --git a/lib/yui/3.4.1/build/history-hash/history-hash-debug.js b/lib/yui/3.5.0/build/history-hash/history-hash-debug.js
similarity index 91%
rename from lib/yui/3.4.1/build/history-hash/history-hash-debug.js
rename to lib/yui/3.5.0/build/history-hash/history-hash-debug.js
index 0541bd11803..0d68c186da0 100644
--- a/lib/yui/3.4.1/build/history-hash/history-hash-debug.js
+++ b/lib/yui/3.5.0/build/history-hash/history-hash-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -34,7 +34,6 @@ var HistoryBase = Y.HistoryBase,
oldHash,
oldUrl,
win = Y.config.win,
- location = win.location,
useHistoryHTML5 = Y.config.useHistoryHTML5;
function HistoryHash() {
@@ -218,15 +217,17 @@ Y.extend(HistoryHash, HistoryBase, {
// window.location.href instead. We have to use UA sniffing rather than
// feature detection, since the only way to detect this would be to
// actually change the hash.
- var matches = /#(.*)$/.exec(location.href),
- hash = matches && matches[1] || '',
- prefix = HistoryHash.hashPrefix;
+ var location = Y.getLocation(),
+ matches = /#(.*)$/.exec(location.href),
+ hash = matches && matches[1] || '',
+ prefix = HistoryHash.hashPrefix;
return prefix && hash.indexOf(prefix) === 0 ?
hash.replace(prefix, '') : hash;
} : function () {
- var hash = location.hash.substring(1),
- prefix = HistoryHash.hashPrefix;
+ var location = Y.getLocation(),
+ hash = location.hash.substring(1),
+ prefix = HistoryHash.hashPrefix;
// Slight code duplication here, but execution speed is of the essence
// since getHash() is called every 50ms to poll for changes in browsers
@@ -298,7 +299,8 @@ Y.extend(HistoryHash, HistoryBase, {
* @static
*/
replaceHash: function (hash) {
- var base = location.href.replace(/#.*$/, '');
+ var location = Y.getLocation(),
+ base = location.href.replace(/#.*$/, '');
if (hash.charAt(0) === '#') {
hash = hash.substring(1);
@@ -316,6 +318,8 @@ Y.extend(HistoryHash, HistoryBase, {
* @static
*/
setHash: function (hash) {
+ var location = Y.getLocation();
+
if (hash.charAt(0) === '#') {
hash = hash.substring(1);
}
@@ -429,21 +433,6 @@ if (HistoryBase.nativeHashChange) {
// Begin polling for location hash changes if there's not already a global
// poll running.
if (!GlobalEnv._hashPoll) {
- if (Y.UA.webkit && !Y.UA.chrome &&
- navigator.vendor.indexOf('Apple') !== -1) {
- // Attach a noop unload handler to disable Safari's back/forward
- // cache. This works around a nasty Safari bug when the back button
- // is used to return from a page on another domain, but results in
- // slightly worse performance. This bug is not present in Chrome.
- //
- // Unfortunately a UA sniff is unavoidable here, but the
- // consequences of a false positive are minor.
- //
- // Current as of Safari 5.0 (6533.16).
- // See: https://bugs.webkit.org/show_bug.cgi?id=34679
- Y.on('unload', function () {}, win);
- }
-
GlobalEnv._hashPoll = Y.later(50, null, function () {
var newHash = HistoryHash.getHash(),
facade, newUrl;
@@ -478,4 +467,4 @@ if (useHistoryHTML5 === false || (!Y.History && useHistoryHTML5 !== true &&
}
-}, '3.4.1' ,{requires:['event-synthetic', 'history-base', 'yui-later']});
+}, '3.5.0' ,{requires:['event-synthetic', 'history-base', 'yui-later']});
diff --git a/lib/yui/3.5.0/build/history-hash/history-hash-min.js b/lib/yui/3.5.0/build/history-hash/history-hash-min.js
new file mode 100644
index 00000000000..8497573876a
--- /dev/null
+++ b/lib/yui/3.5.0/build/history-hash/history-hash-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("history-hash",function(a){var c=a.HistoryBase,f=a.Lang,l=a.Array,j=a.Object,k=YUI.namespace("Env.HistoryHash"),b="hash",e,d,i,h=a.config.win,m=a.config.useHistoryHTML5;function g(){g.superclass.constructor.apply(this,arguments);}a.extend(g,c,{_init:function(n){var o=g.parseHash();n=n||{};this._initialState=n.initialState?a.merge(n.initialState,o):o;a.after("hashchange",a.bind(this._afterHashChange,this),h);g.superclass._init.apply(this,arguments);},_change:function(p,o,n){j.each(o,function(r,q){if(f.isValue(r)){o[q]=r.toString();}});return g.superclass._change.call(this,p,o,n);},_storeState:function(q,p){var o=g.decode,n=g.createHash(p);g.superclass._storeState.apply(this,arguments);if(q!==b&&o(g.getHash())!==o(n)){g[q===c.SRC_REPLACE?"replaceHash":"setHash"](n);}},_afterHashChange:function(n){this._resolveChanges(b,g.parseHash(n.newHash),{});}},{NAME:"historyHash",SRC_HASH:b,hashPrefix:"",_REGEX_HASH:/([^\?#&]+)=([^&]+)/g,createHash:function(p){var n=g.encode,o=[];j.each(p,function(r,q){if(f.isValue(r)){o.push(n(q)+"="+n(r));}});return o.join("&");},decode:function(n){return decodeURIComponent(n.replace(/\+/g," "));},encode:function(n){return encodeURIComponent(n).replace(/%20/g,"+");},getHash:(a.UA.gecko?function(){var n=a.getLocation(),p=/#(.*)$/.exec(n.href),q=p&&p[1]||"",o=g.hashPrefix;return o&&q.indexOf(o)===0?q.replace(o,""):q;}:function(){var n=a.getLocation(),p=n.hash.substring(1),o=g.hashPrefix;return o&&p.indexOf(o)===0?p.replace(o,""):p;}),getUrl:function(){return location.href;},parseHash:function(q){var n=g.decode,r,u,s,o,p={},t=g.hashPrefix,v;q=f.isValue(q)?q:g.getHash();if(t){v=q.indexOf(t);if(v===0||(v===1&&q.charAt(0)==="#")){q=q.replace(t,"");}}s=q.match(g._REGEX_HASH)||[];for(r=0,u=s.length;r0){this._timeout=setTimeout(this._getFetchTimeout(),d*1000);}if(!b.Lang.isUndefined(this.get("foldDistance"))){this._foldCheck();}},_getFetchTimeout:function(){var d=this;return function(){d.fetch();};},registerImage:function(){var d=arguments[0].domId;if(!d){return null;}this._imgObjs[d]=new b.ImgLoadImgObj(arguments[0]);return this._imgObjs[d];},fetch:function(){this._clearTriggers();this._fetchByClass();for(var d in this._imgObjs){if(this._imgObjs.hasOwnProperty(d)){this._imgObjs[d].fetch();}}},_clearTriggers:function(){clearTimeout(this._timeout);for(var e=0,d=this._triggers.length;ef){return false;}}if(this.get("bgUrl")!==null){if(this.get("isPng")&&b.UA.ie&&b.UA.ie<=6){d.setStyle("filter",'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+this.get("bgUrl")+'", sizingMethod="'+this.get("sizingMethod")+'", enabled="'+this.get("enabled")+'")');}else{d.setStyle("backgroundImage","url('"+this.get("bgUrl")+"')");}}else{if(this.get("srcUrl")!==null){d.setAttribute("src",this.get("srcUrl"));}}if(this.get("setVisible")){d.setStyle("visibility","visible");}if(this.get("width")){d.setAttribute("width",this.get("width"));}if(this.get("height")){d.setAttribute("height",this.get("height"));}this._fetched=true;return true;},_getImgEl:function(){if(this._imgEl===null){this._imgEl=b.one("#"+this.get("domId"));}return this._imgEl;},_getYPos:function(){if(this._yPos===null){this._yPos=this._getImgEl().getY();}return this._yPos;}};b.extend(b.ImgLoadImgObj,b.Base,a);},"3.4.1",{requires:["base-base","node-style","node-screen"]});
\ No newline at end of file
+YUI.add("imageloader",function(b){b.ImgLoadGroup=function(){this._init();b.ImgLoadGroup.superclass.constructor.apply(this,arguments);};b.ImgLoadGroup.NAME="imgLoadGroup";b.ImgLoadGroup.ATTRS={name:{value:""},timeLimit:{value:null},foldDistance:{validator:b.Lang.isNumber,setter:function(d){this._setFoldTriggers();return d;},lazyAdd:false},className:{value:null,setter:function(d){this._className=d;return d;},lazyAdd:false},classNameAction:{value:"default"}};var c={_init:function(){this._triggers=[];this._imgObjs={};this._timeout=null;this._classImageEls=null;this._className=null;this._areFoldTriggersSet=false;this._maxKnownHLimit=0;b.on("domready",this._onloadTasks,this);},addTrigger:function(f,e){if(!f||!e){return this;}var d=function(){this.fetch();};this._triggers.push(b.on(e,d,f,this));return this;},addCustomTrigger:function(d,f){if(!d){return this;}var e=function(){this.fetch();};if(b.Lang.isUndefined(f)){this._triggers.push(b.on(d,e,this));}else{this._triggers.push(f.on(d,e,this));}return this;},_setFoldTriggers:function(){if(this._areFoldTriggersSet){return;}var d=function(){this._foldCheck();};this._triggers.push(b.on("scroll",d,window,this));this._triggers.push(b.on("resize",d,window,this));this._areFoldTriggersSet=true;},_onloadTasks:function(){var d=this.get("timeLimit");if(d&&d>0){this._timeout=setTimeout(this._getFetchTimeout(),d*1000);}if(!b.Lang.isUndefined(this.get("foldDistance"))){this._foldCheck();}},_getFetchTimeout:function(){var d=this;return function(){d.fetch();};},registerImage:function(){var d=arguments[0].domId;if(!d){return null;}this._imgObjs[d]=new b.ImgLoadImgObj(arguments[0]);return this._imgObjs[d];},fetch:function(){this._clearTriggers();this._fetchByClass();for(var d in this._imgObjs){if(this._imgObjs.hasOwnProperty(d)){this._imgObjs[d].fetch();}}},_clearTriggers:function(){clearTimeout(this._timeout);for(var e=0,d=this._triggers.length;ef){return false;}}if(this.get("bgUrl")!==null){if(this.get("isPng")&&b.UA.ie&&b.UA.ie<=6){d.setStyle("filter",'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+this.get("bgUrl")+'", sizingMethod="'+this.get("sizingMethod")+'", enabled="'+this.get("enabled")+'")');}else{d.setStyle("backgroundImage","url('"+this.get("bgUrl")+"')");}}else{if(this.get("srcUrl")!==null){d.setAttribute("src",this.get("srcUrl"));}}if(this.get("setVisible")){d.setStyle("visibility","visible");}if(this.get("width")){d.setAttribute("width",this.get("width"));}if(this.get("height")){d.setAttribute("height",this.get("height"));}this._fetched=true;return true;},_getImgEl:function(){if(this._imgEl===null){this._imgEl=b.one("#"+this.get("domId"));}return this._imgEl;},_getYPos:function(){if(this._yPos===null){this._yPos=this._getImgEl().getY();}return this._yPos;}};b.extend(b.ImgLoadImgObj,b.Base,a);},"3.5.0",{requires:["base-base","node-style","node-screen"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/imageloader/imageloader.js b/lib/yui/3.5.0/build/imageloader/imageloader.js
similarity index 99%
rename from lib/yui/3.4.1/build/imageloader/imageloader.js
rename to lib/yui/3.5.0/build/imageloader/imageloader.js
index fe28c10d611..066e9ce80ed 100644
--- a/lib/yui/3.4.1/build/imageloader/imageloader.js
+++ b/lib/yui/3.5.0/build/imageloader/imageloader.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -656,4 +656,4 @@ YUI.add('imageloader', function(Y) {
-}, '3.4.1' ,{requires:['base-base', 'node-style', 'node-screen']});
+}, '3.5.0' ,{requires:['base-base', 'node-style', 'node-screen']});
diff --git a/lib/yui/3.4.1/build/intl-base/intl-base-debug.js b/lib/yui/3.5.0/build/intl-base/intl-base-debug.js
similarity index 96%
rename from lib/yui/3.4.1/build/intl-base/intl-base-debug.js
rename to lib/yui/3.5.0/build/intl-base/intl-base-debug.js
index 2574d1a1c59..73e3bce2cdf 100644
--- a/lib/yui/3.4.1/build/intl-base/intl-base-debug.js
+++ b/lib/yui/3.5.0/build/intl-base/intl-base-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -91,4 +91,4 @@ Y.mix(Y.namespace('Intl'), {
});
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/intl-base/intl-base-min.js b/lib/yui/3.5.0/build/intl-base/intl-base-min.js
similarity index 79%
rename from lib/yui/3.4.1/build/intl-base/intl-base-min.js
rename to lib/yui/3.5.0/build/intl-base/intl-base-min.js
index 021bd22cdb0..eb44a732dfe 100644
--- a/lib/yui/3.4.1/build/intl-base/intl-base-min.js
+++ b/lib/yui/3.5.0/build/intl-base/intl-base-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("intl-base",function(b){var a=/[, ]/;b.mix(b.namespace("Intl"),{lookupBestLang:function(g,h){var f,j,c,e;function d(l){var k;for(k=0;k0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
+YUI.add("intl-base",function(b){var a=/[, ]/;b.mix(b.namespace("Intl"),{lookupBestLang:function(g,h){var f,j,c,e;function d(l){var k;for(k=0;k0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.5.0",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/intl-base/intl-base.js b/lib/yui/3.5.0/build/intl-base/intl-base.js
similarity index 96%
rename from lib/yui/3.4.1/build/intl-base/intl-base.js
rename to lib/yui/3.5.0/build/intl-base/intl-base.js
index 2574d1a1c59..73e3bce2cdf 100644
--- a/lib/yui/3.4.1/build/intl-base/intl-base.js
+++ b/lib/yui/3.5.0/build/intl-base/intl-base.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -91,4 +91,4 @@ Y.mix(Y.namespace('Intl'), {
});
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/intl/intl-debug.js b/lib/yui/3.5.0/build/intl/intl-debug.js
similarity index 97%
rename from lib/yui/3.4.1/build/intl/intl-debug.js
rename to lib/yui/3.5.0/build/intl/intl-debug.js
index 6aa9565adaa..c4c067d6392 100644
--- a/lib/yui/3.4.1/build/intl/intl-debug.js
+++ b/lib/yui/3.5.0/build/intl/intl-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -153,4 +153,4 @@ Y.augment(Y.Intl, Y.EventTarget);
Y.Intl.publish("intl:langChange", {emitFacade:true});
-}, '3.4.1' ,{requires:['event-custom', 'intl-base']});
+}, '3.5.0' ,{requires:['event-custom', 'intl-base']});
diff --git a/lib/yui/3.4.1/build/intl/intl-min.js b/lib/yui/3.5.0/build/intl/intl-min.js
similarity index 85%
rename from lib/yui/3.4.1/build/intl/intl-min.js
rename to lib/yui/3.5.0/build/intl/intl-min.js
index 0d962bbebe7..d208e4ac8f3 100644
--- a/lib/yui/3.4.1/build/intl/intl-min.js
+++ b/lib/yui/3.5.0/build/intl/intl-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("intl",function(d){var b={},a="yuiRootLang",e="yuiActiveLang",c=[];d.mix(d.namespace("Intl"),{_mod:function(f){if(!b[f]){b[f]={};}return b[f];},setLang:function(g,j){var i=this._mod(g),f=i[e],h=!!i[j];if(h&&j!==f){i[e]=j;this.fire("intl:langChange",{module:g,prevVal:f,newVal:(j===a)?"":j});}return h;},getLang:function(f){var g=this._mod(f)[e];return(g===a)?"":g;},add:function(g,h,f){h=h||a;this._mod(g)[h]=f;this.setLang(g,h);},get:function(h,g,j){var f=this._mod(h),i;j=j||f[e];i=f[j]||{};return(g)?i[g]:d.merge(i);},getAvailableLangs:function(h){var f=d.Env._loader,g=f&&f.moduleInfo[h],i=g&&g.lang;return(i)?i.concat():c;}});d.augment(d.Intl,d.EventTarget);d.Intl.publish("intl:langChange",{emitFacade:true});},"3.4.1",{requires:["event-custom","intl-base"]});
\ No newline at end of file
+YUI.add("intl",function(d){var b={},a="yuiRootLang",e="yuiActiveLang",c=[];d.mix(d.namespace("Intl"),{_mod:function(f){if(!b[f]){b[f]={};}return b[f];},setLang:function(g,j){var i=this._mod(g),f=i[e],h=!!i[j];if(h&&j!==f){i[e]=j;this.fire("intl:langChange",{module:g,prevVal:f,newVal:(j===a)?"":j});}return h;},getLang:function(f){var g=this._mod(f)[e];return(g===a)?"":g;},add:function(g,h,f){h=h||a;this._mod(g)[h]=f;this.setLang(g,h);},get:function(h,g,j){var f=this._mod(h),i;j=j||f[e];i=f[j]||{};return(g)?i[g]:d.merge(i);},getAvailableLangs:function(h){var f=d.Env._loader,g=f&&f.moduleInfo[h],i=g&&g.lang;return(i)?i.concat():c;}});d.augment(d.Intl,d.EventTarget);d.Intl.publish("intl:langChange",{emitFacade:true});},"3.5.0",{requires:["event-custom","intl-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/intl/intl.js b/lib/yui/3.5.0/build/intl/intl.js
similarity index 97%
rename from lib/yui/3.4.1/build/intl/intl.js
rename to lib/yui/3.5.0/build/intl/intl.js
index 6aa9565adaa..c4c067d6392 100644
--- a/lib/yui/3.4.1/build/intl/intl.js
+++ b/lib/yui/3.5.0/build/intl/intl.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -153,4 +153,4 @@ Y.augment(Y.Intl, Y.EventTarget);
Y.Intl.publish("intl:langChange", {emitFacade:true});
-}, '3.4.1' ,{requires:['event-custom', 'intl-base']});
+}, '3.5.0' ,{requires:['event-custom', 'intl-base']});
diff --git a/lib/yui/3.4.1/build/io-base/io-base-debug.js b/lib/yui/3.5.0/build/io-base/io-base-debug.js
similarity index 78%
rename from lib/yui/3.4.1/build/io-base/io-base-debug.js
rename to lib/yui/3.5.0/build/io-base/io-base-debug.js
index 71ea3143942..834c453c8be 100644
--- a/lib/yui/3.4.1/build/io-base/io-base-debug.js
+++ b/lib/yui/3.5.0/build/io-base/io-base-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -13,18 +13,13 @@ Base IO functionality. Provides basic XHR transport support.
@for IO
**/
-var isNumber = Y.Lang.isNumber,
- isObject = Y.Lang.isObject,
-
- // List of events that comprise the IO event lifecycle.
- EVENTS = ['start', 'complete', 'end', 'success', 'failure'],
+var // List of events that comprise the IO event lifecycle.
+ EVENTS = ['start', 'complete', 'end', 'success', 'failure', 'progress'],
// Whitelist of used XHR response object properties.
XHR_PROPS = ['status', 'statusText', 'responseText', 'responseXML'],
win = Y.config.win,
- NativeXHR = win.XMLHttpRequest,
- NativeXDR = win.XDomainRequest,
uid = 0;
/**
@@ -87,12 +82,12 @@ IO.prototype = {
//--------------------------------------
_init: function(config) {
- var io = this, i;
-
+ var io = this, i, len;
+
io.cfg = config || {};
Y.augment(io, Y.EventTarget);
- for (i = 0; i < 5; i++) {
+ for (i = 0, len = EVENTS.length; i < len; ++i) {
// Publish IO global events with configurations, if any.
// IO global events are set to broadcast by default.
// These events use the "io:" namespace.
@@ -108,7 +103,7 @@ IO.prototype = {
*
* @method _create
* @private
- * @param {Object} config Configuration object subset to determine if
+ * @param {Object} cfg Configuration object subset to determine if
* the transaction is an XDR or file upload,
* requiring an alternate transport.
* @param {Number} id Transaction id
@@ -117,40 +112,53 @@ IO.prototype = {
_create: function(config, id) {
var io = this,
transaction = {
- id : isNumber(id) ? id : io._id++,
+ id : Y.Lang.isNumber(id) ? id : io._id++,
uid: io._uid
},
- xdrConfig = config.xdr,
- use = xdrConfig && xdrConfig.use,
- ie = (xdrConfig && xdrConfig.use === 'native' && NativeXDR),
- transport = io._transport;
+ alt = config.xdr ? config.xdr.use : null,
+ form = config.form && config.form.upload ? 'iframe' : null,
+ use;
- if (!use) {
- use = (config.form && config.form.upload) ? 'iframe' : 'xhr';
+ if (alt === 'native') {
+ // Non-IE can use XHR level 2 and not rely on an
+ // external transport.
+ alt = Y.UA.ie ? 'xdr' : null;
}
- switch (use) {
- case 'native':
- case 'xhr':
- transaction.c = ie ?
- new NativeXDR() :
- NativeXHR ?
- new NativeXHR() :
- new ActiveXObject('Microsoft.XMLHTTP');
- transaction.t = ie ? true : false;
- break;
- default:
- transaction.c = (transport && transport[use]) || {};
- transaction.t = true;
+ use = alt || form;
+ transaction = use ? Y.merge(Y.IO.customTransport(use), transaction) :
+ Y.merge(Y.IO.defaultTransport(), transaction);
+
+ if (transaction.notify) {
+ config.notify = function (e, t, c) { io.notify(e, t, c); };
+ }
+
+ if (!use) {
+ if (win && win.FormData && config.data instanceof FormData) {
+ transaction.c.upload.onprogress = function (e) {
+ io.progress(transaction, e, config);
+ };
+ transaction.c.onload = function (e) {
+ io.load(transaction, e, config);
+ };
+ transaction.c.onerror = function (e) {
+ io.error(transaction, e, config);
+ };
+ transaction.upload = true;
+ }
}
return transaction;
},
_destroy: function(transaction) {
- if (win && !transaction.t) {
- if (NativeXHR) {
+ if (win && !transaction.notify && !transaction.xdr) {
+ if (XHR && !transaction.upload) {
transaction.c.onreadystatechange = null;
+ } else if (transaction.upload) {
+ transaction.c.upload.onprogress = null;
+ transaction.c.onload = null;
+ transaction.c.onerror = null;
} else if (Y.UA.ie && !transaction.e) {
// IE, when using XMLHttpRequest as an ActiveX Object, will throw
// a "Type Mismatch" error if the event handler is set to "null".
@@ -177,12 +185,15 @@ IO.prototype = {
globalEvent = "io:" + eventName,
trnEvent = "io-trn:" + eventName;
- if (transaction.e) {
+ // Workaround for #2532107
+ this.detach(trnEvent);
+
+ if (transaction.e) {
transaction.c = { status: 0, statusText: transaction.e };
}
// Fire event with parameters or an Event Facade.
- params = [(emitFacade) ?
+ params = [ emitFacade ?
{
id: transaction.id,
data: transaction.c,
@@ -198,13 +209,17 @@ IO.prototype = {
params.push(args);
}
} else {
- params.push(transaction.c);
+ if (transaction.evt) {
+ params.push(transaction.evt);
+ } else {
+ params.push(transaction.c);
+ }
if (args) {
params.push(args);
}
}
}
-
+
params.unshift(globalEvent);
// Fire global events.
io.fire.apply(io, params);
@@ -304,6 +319,56 @@ IO.prototype = {
this.end(transaction, config);
},
+ /**
+ * Fires event "io:progress" and creates, fires a transaction-specific
+ * "progress" event -- for XMLHttpRequest file upload -- if
+ * config.on.progress is defined.
+ *
+ * @method progress
+ * @param {Object} transaction Transaction object.
+ * @param {Object} progress event.
+ * @param {Object} config Configuration object for the transaction.
+ */
+ progress: function(transaction, e, config) {
+ /**
+ * Signals the interactive state during a file upload transaction.
+ * This event fires after io:start and before io:complete.
+ * @event io:progress
+ */
+ transaction.evt = e;
+ this._evt(EVENTS[5], transaction, config);
+ },
+
+ /**
+ * Fires event "io:complete" and creates, fires a transaction-specific
+ * "complete" event -- for XMLHttpRequest file upload -- if
+ * config.on.complete is defined.
+ *
+ * @method load
+ * @param {Object} transaction Transaction object.
+ * @param {Object} load event.
+ * @param {Object} config Configuration object for the transaction.
+ */
+ load: function (transaction, e, config) {
+ transaction.evt = e.target;
+ this._evt(EVENTS[1], transaction, config);
+ },
+
+ /**
+ * Fires event "io:failure" and creates, fires a transaction-specific
+ * "failure" event -- for XMLHttpRequest file upload -- if
+ * config.on.failure is defined.
+ *
+ * @method error
+ * @param {Object} transaction Transaction object.
+ * @param {Object} error event.
+ * @param {Object} config Configuration object for the transaction.
+ */
+ error: function (transaction, e, config) {
+ transaction.evt = e;
+ this._evt(EVENTS[4], transaction, config);
+ },
+
/**
* Retry an XDR transaction, using the Flash tranport, if the native
* transport fails.
@@ -380,7 +445,7 @@ IO.prototype = {
_startTimeout: function(transaction, timeout) {
var io = this;
- io._timeout[transaction.id] = win.setTimeout(function() {
+ io._timeout[transaction.id] = setTimeout(function() {
io._abort(transaction, 'timeout');
}, timeout);
},
@@ -393,7 +458,7 @@ IO.prototype = {
* @param {Number} id - Transaction id.
*/
_clearTimeout: function(id) {
- win.clearTimeout(this._timeout[id]);
+ clearTimeout(this._timeout[id]);
delete this._timeout[id];
},
@@ -443,7 +508,7 @@ IO.prototype = {
}
// Yield in the event of request timeout or abort.
- win.setTimeout(function() {
+ setTimeout(function() {
io.complete(transaction, config);
io._result(transaction, config);
}, 0);
@@ -572,7 +637,7 @@ IO.prototype = {
var transaction, method, i, len, sync, data,
io = this,
u = uri,
- response = {};
+ response = {};
config = config ? Y.Object(config) : {};
transaction = io._create(config, id);
@@ -580,9 +645,9 @@ IO.prototype = {
sync = config.sync;
data = config.data;
- // Serialize an object into a key-value string using
+ // Serialize an map object into a key-value string using
// querystring-stringify-simple.
- if (isObject(data)) {
+ if ((Y.Lang.isObject(data) && !data.nodeType) && !transaction.upload) {
data = Y.QueryString.stringify(data);
}
@@ -618,12 +683,16 @@ IO.prototype = {
}
}
- if (transaction.t) {
- // Cross-domain request or custom transport configured.
+ if (transaction.xdr) {
+ // Route data to io-xdr module for flash and XDomainRequest.
return io.xdr(u, transaction, config);
}
+ else if (transaction.notify) {
+ // Route data to custom transport
+ return transaction.c.send(transaction, uri, config);
+ }
- if (!sync) {
+ if (!sync && !transaction.upload) {
transaction.c.onreadystatechange = function() {
io._rS(transaction, config);
};
@@ -652,9 +721,9 @@ IO.prototype = {
// Create a response object for synchronous transactions,
// mixing id and arguments properties with the xhr
// properties whitelist.
- for (i = 0, len = XHR_PROPS.length; i < len; ++i) {
- response[XHR_PROPS[i]] = transaction.c[XHR_PROPS[i]];
- }
+ for (i = 0, len = XHR_PROPS.length; i < len; ++i) {
+ response[XHR_PROPS[i]] = transaction.c[XHR_PROPS[i]];
+ }
response.getAllResponseHeaders = function() {
return transaction.c.getAllResponseHeaders();
@@ -663,14 +732,14 @@ IO.prototype = {
response.getResponseHeader = function(name) {
return transaction.c.getResponseHeader(name);
};
-
+
io.complete(transaction, config);
io._result(transaction, config);
return response;
}
} catch(e) {
- if (transaction.t) {
+ if (transaction.xdr) {
// This exception is usually thrown by browsers
// that do not support XMLHttpRequest Level 2.
// Retry the request with the XDR transport set
@@ -837,7 +906,96 @@ Y.io.header = function(name, value) {
Y.IO = IO;
// Map of all IO instances created.
Y.io._map = {};
+var XHR = win && win.XMLHttpRequest,
+ XDR = win && win.XDomainRequest,
+ AX = win && win.ActiveXObject;
+
+
+Y.mix(Y.IO, {
+ /**
+ * The ID of the default IO transport, defaults to `xhr`
+ * @property _default
+ * @type {String}
+ * @static
+ */
+ _default: 'xhr',
+ /**
+ *
+ * @method defaultTransport
+ * @static
+ * @param {String} [id] The transport to set as the default, if empty a new transport is created.
+ * @return {Object} The transport object with a `send` method
+ */
+ defaultTransport: function(id) {
+ if (id) {
+ Y.log('Setting default IO to: ' + id, 'info', 'io');
+ Y.IO._default = id;
+ } else {
+ var o = {
+ c: Y.IO.transports[Y.IO._default](),
+ notify: Y.IO._default === 'xhr' ? false : true
+ };
+ Y.log('Creating default transport: ' + Y.IO._default, 'info', 'io');
+ return o;
+ }
+ },
+ /**
+ * An object hash of custom transports available to IO
+ * @property transports
+ * @type {Object}
+ * @static
+ */
+ transports: {
+ xhr: function () {
+ return XHR ? new XMLHttpRequest() :
+ AX ? new ActiveXObject('Microsoft.XMLHTTP') : null;
+ },
+ xdr: function () {
+ return XDR ? new XDomainRequest() : null;
+ },
+ iframe: function () { return {}; },
+ flash: null,
+ nodejs: null
+ },
+ /**
+ * Create a custom transport of type and return it's object
+ * @method customTransport
+ * @param {String} id The id of the transport to create.
+ * @static
+ */
+ customTransport: function(id) {
+ var o = { c: Y.IO.transports[id]() };
+
+ o[(id === 'xdr' || id === 'flash') ? 'xdr' : 'notify'] = true;
+ return o;
+ }
+});
+
+Y.mix(Y.IO.prototype, {
+ /**
+ * Fired from the notify method of the transport which in turn fires
+ * the event on the IO object.
+ * @method notify
+ * @param {String} event The name of the event
+ * @param {Object} transaction The transaction object
+ * @param {Object} config The configuration object for this transaction
+ */
+ notify: function(event, transaction, config) {
+ var io = this;
+
+ switch (event) {
+ case 'timeout':
+ case 'abort':
+ case 'transport error':
+ transaction.c = { status: 0, statusText: event };
+ event = 'failure';
+ default:
+ io[event].apply(io, [transaction, config]);
+ }
+ }
+});
-}, '3.4.1' ,{requires:['event-custom-base', 'querystring-stringify-simple']});
+
+}, '3.5.0' ,{requires:['event-custom-base', 'querystring-stringify-simple']});
diff --git a/lib/yui/3.5.0/build/io-base/io-base-min.js b/lib/yui/3.5.0/build/io-base/io-base-min.js
new file mode 100644
index 00000000000..4f176b78115
--- /dev/null
+++ b/lib/yui/3.5.0/build/io-base/io-base-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("io-base",function(a){var h=["start","complete","end","success","failure","progress"],b=["status","statusText","responseText","responseXML"],f=a.config.win,g=0;function c(j){var k=this;k._uid="io:"+g++;k._init(j);a.io._map[k._uid]=k;}c.prototype={_id:0,_headers:{"X-Requested-With":"XMLHttpRequest"},_timeout:{},_init:function(k){var m=this,l,j;m.cfg=k||{};a.augment(m,a.EventTarget);for(l=0,j=h.length;l=200&&j<300||j===304||j===1223){this.success(m,k);}else{this.failure(m,k);}},_rS:function(k,j){var l=this;if(k.c.readyState===4){if(j.timeout){l._clearTimeout(k.id);}setTimeout(function(){l.complete(k,j);l._result(k,j);},0);}},_abort:function(k,j){if(k&&k.c){k.e=j;k.c.abort();}},send:function(l,m,k){var n,j,q,r,v,p,t=this,w=l,o={};m=m?a.Object(m):{};n=t._create(m,k);j=m.method?m.method.toUpperCase():"GET";v=m.sync;p=m.data;if((a.Lang.isObject(p)&&!p.nodeType)&&!n.upload){p=a.QueryString.stringify(p);}if(m.form){if(m.form.upload){return t.upload(n,l,m);}else{p=t._serialize(m.form,p);}}if(p){switch(j){case"GET":case"HEAD":case"DELETE":w=t._concat(w,p);p="";break;case"POST":case"PUT":m.headers=a.merge({"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},m.headers);break;}}if(n.xdr){return t.xdr(w,n,m);}else{if(n.notify){return n.c.send(n,l,m);}}if(!v&&!n.upload){n.c.onreadystatechange=function(){t._rS(n,m);};}try{n.c.open(j,w,!v,m.username||null,m.password||null);t._setHeaders(n.c,m.headers||{});t.start(n,m);if(m.xdr&&m.xdr.credentials){if(!a.UA.ie){n.c.withCredentials=true;}}n.c.send(p);if(v){for(q=0,r=b.length;q-1){h=t.options[t.selectedIndex];q[A++]=k+a(h.attributes.value&&h.attributes.value.specified?h.value:h.text);}break;case"select-multiple":if(t.selectedIndex>-1){for(l=t.selectedIndex,m=t.options.length;l-1){h=t.options[t.selectedIndex];q[A++]=k+a(h.attributes.value&&h.attributes.value.specified?h.value:h.text);}break;case"select-multiple":if(t.selectedIndex>-1){for(l=t.selectedIndex,m=t.options.length;lrequest module.
+ * This method is return of `require('request')` so you can use it inside NodeJS without
+ * the IO abstraction.
+ * @method request
+ * @static
+ */
+ if (!Y.IO.request) {
+ Y.IO.request = require('request');
+ }
+
+ Y.log('Loading NodeJS Request Transport', 'info', 'io');
+
+ /**
+ NodeJS IO transport, uses the NodeJS request
+ module under the hood to perform all network IO.
+ @method transports.nodejs
+ @static
+ @returns {Object} This object contains only a `send` method that accepts a
+ `transaction object`, `uri` and the `config object`.
+ @example
+
+ Y.io('https://somedomain.com/url', {
+ method: 'PUT',
+ data: '?foo=bar',
+ //Extra request module config options.
+ request: {
+ maxRedirects: 100,
+ strictSSL: true,
+ multipart: [
+ {
+ 'content-type': 'application/json',
+ body: JSON.stringify({
+ foo: 'bar',
+ _attachments: {
+ 'message.txt': {
+ follows: true,
+ length: 18,
+ 'content_type': 'text/plain'
+ }
+ }
+ })
+ },
+ {
+ body: 'I am an attachment'
+ }
+ ]
+ },
+ on: {
+ success: function(id, e) {
+ Y.log(e.responseText);
+ }
+ }
+ });
+ */
+
+ var flatten = function(o) {
+ var str = [];
+ Object.keys(o).forEach(function(name) {
+ str.push(name + ': ' + o[name]);
+ });
+ return str.join('\n');
+ };
+
+ Y.IO.transports.nodejs = function() {
+ return {
+ send: function (transaction, uri, config) {
+
+ Y.log('Starting Request Transaction', 'info', 'io');
+ config.notify('start', transaction, config);
+ config.method = config.method || 'GET';
+
+ var rconf = {
+ method: config.method,
+ uri: uri
+ };
+ if (config.data) {
+ rconf.body = config.data;
+ }
+ if (config.headers) {
+ rconf.headers = config.headers;
+ }
+ if (config.timeout) {
+ rconf.timeout = config.timeout;
+ }
+ if (config.request) {
+ Y.mix(rconf, config.request);
+ }
+ Y.log('Initiating ' + rconf.method + ' request to: ' + rconf.uri, 'info', 'io');
+ Y.IO.request(rconf, function(err, data) {
+ Y.log('Request Transaction Complete', 'info', 'io');
+
+ if (err) {
+ Y.log('An IO error occurred', 'warn', 'io');
+ transaction.c = err;
+ config.notify(((err.code === 'ETIMEDOUT') ? 'timeout' : 'failure'), transaction, config);
+ return;
+ }
+ if (data) {
+ transaction.c = {
+ status: data.statusCode,
+ statusCode: data.statusCode,
+ headers: data.headers,
+ responseText: data.body,
+ responseXML: null,
+ getResponseHeader: function(name) {
+ return this.headers[name];
+ },
+ getAllResponseHeaders: function() {
+ return flatten(this.headers);
+ }
+ };
+ }
+ Y.log('Request Transaction Complete', 'info', 'io');
+
+ config.notify('complete', transaction, config);
+ config.notify(((data && (data.statusCode >= 200 && data.statusCode <= 299)) ? 'success' : 'failure'), transaction, config);
+ });
+
+ var ret = {
+ io: transaction
+ };
+ return ret;
+ }
+ };
+ };
+
+ Y.IO.defaultTransport('nodejs');
+
+
+
+}, '3.5.0' ,{requires:['io-base']});
diff --git a/lib/yui/3.5.0/build/io-nodejs/io-nodejs-min.js b/lib/yui/3.5.0/build/io-nodejs/io-nodejs-min.js
new file mode 100644
index 00000000000..804aeb72da5
--- /dev/null
+++ b/lib/yui/3.5.0/build/io-nodejs/io-nodejs-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+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.0",{requires:["io-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.5.0/build/io-nodejs/io-nodejs.js b/lib/yui/3.5.0/build/io-nodejs/io-nodejs.js
new file mode 100644
index 00000000000..92844df58d0
--- /dev/null
+++ b/lib/yui/3.5.0/build/io-nodejs/io-nodejs.js
@@ -0,0 +1,135 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add('io-nodejs', function(Y) {
+
+/*global Y: false, Buffer: false, clearInterval: false, clearTimeout: false, console: false, exports: false, global: false, module: false, process: false, querystring: false, require: false, setInterval: false, setTimeout: false, __filename: false, __dirname: false */
+
+ /**
+ * Passthru to the NodeJS request module.
+ * This method is return of `require('request')` so you can use it inside NodeJS without
+ * the IO abstraction.
+ * @method request
+ * @static
+ */
+ if (!Y.IO.request) {
+ Y.IO.request = require('request');
+ }
+
+
+ /**
+ NodeJS IO transport, uses the NodeJS request
+ module under the hood to perform all network IO.
+ @method transports.nodejs
+ @static
+ @returns {Object} This object contains only a `send` method that accepts a
+ `transaction object`, `uri` and the `config object`.
+ @example
+
+ Y.io('https://somedomain.com/url', {
+ method: 'PUT',
+ data: '?foo=bar',
+ //Extra request module config options.
+ request: {
+ maxRedirects: 100,
+ strictSSL: true,
+ multipart: [
+ {
+ 'content-type': 'application/json',
+ body: JSON.stringify({
+ foo: 'bar',
+ _attachments: {
+ 'message.txt': {
+ follows: true,
+ length: 18,
+ 'content_type': 'text/plain'
+ }
+ }
+ })
+ },
+ {
+ body: 'I am an attachment'
+ }
+ ]
+ },
+ on: {
+ success: function(id, e) {
+ }
+ }
+ });
+ */
+
+ var flatten = function(o) {
+ var str = [];
+ Object.keys(o).forEach(function(name) {
+ str.push(name + ': ' + o[name]);
+ });
+ return str.join('\n');
+ };
+
+ Y.IO.transports.nodejs = function() {
+ return {
+ send: function (transaction, uri, config) {
+
+ config.notify('start', transaction, config);
+ config.method = config.method || 'GET';
+
+ var rconf = {
+ method: config.method,
+ uri: uri
+ };
+ if (config.data) {
+ rconf.body = config.data;
+ }
+ if (config.headers) {
+ rconf.headers = config.headers;
+ }
+ if (config.timeout) {
+ rconf.timeout = config.timeout;
+ }
+ if (config.request) {
+ Y.mix(rconf, config.request);
+ }
+ Y.IO.request(rconf, function(err, data) {
+
+ if (err) {
+ transaction.c = err;
+ config.notify(((err.code === 'ETIMEDOUT') ? 'timeout' : 'failure'), transaction, config);
+ return;
+ }
+ if (data) {
+ transaction.c = {
+ status: data.statusCode,
+ statusCode: data.statusCode,
+ headers: data.headers,
+ responseText: data.body,
+ responseXML: null,
+ getResponseHeader: function(name) {
+ return this.headers[name];
+ },
+ getAllResponseHeaders: function() {
+ return flatten(this.headers);
+ }
+ };
+ }
+
+ config.notify('complete', transaction, config);
+ config.notify(((data && (data.statusCode >= 200 && data.statusCode <= 299)) ? 'success' : 'failure'), transaction, config);
+ });
+
+ var ret = {
+ io: transaction
+ };
+ return ret;
+ }
+ };
+ };
+
+ Y.IO.defaultTransport('nodejs');
+
+
+
+}, '3.5.0' ,{requires:['io-base']});
diff --git a/lib/yui/3.4.1/build/io-queue/io-queue-debug.js b/lib/yui/3.5.0/build/io-queue/io-queue-debug.js
similarity index 96%
rename from lib/yui/3.4.1/build/io-queue/io-queue-debug.js
rename to lib/yui/3.5.0/build/io-queue/io-queue-debug.js
index 79b790cb417..a48b8136a59 100644
--- a/lib/yui/3.4.1/build/io-queue/io-queue-debug.js
+++ b/lib/yui/3.5.0/build/io-queue/io-queue-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -9,7 +9,7 @@ YUI.add('io-queue', function(Y) {
/**
Extends IO to implement Queue for synchronous
transaction processing.
-@module io-base
+@module io
@submodule io-queue
@for IO
**/
@@ -162,4 +162,4 @@ _queue.size = function () { io.qSize(); };
Y.io.queue = _queue;
-}, '3.4.1' ,{requires:['io-base','queue-promote']});
+}, '3.5.0' ,{requires:['io-base','queue-promote']});
diff --git a/lib/yui/3.4.1/build/io-queue/io-queue-min.js b/lib/yui/3.5.0/build/io-queue/io-queue-min.js
similarity index 88%
rename from lib/yui/3.4.1/build/io-queue/io-queue-min.js
rename to lib/yui/3.5.0/build/io-queue/io-queue-min.js
index e367bfeb21c..6662f7f4384 100644
--- a/lib/yui/3.4.1/build/io-queue/io-queue-min.js
+++ b/lib/yui/3.5.0/build/io-queue/io-queue-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("io-queue",function(b){var c=b.io._map["io:0"]||new b.IO();b.mix(b.IO.prototype,{_q:new b.Queue(),_qActiveId:null,_qInit:false,_qState:1,_qShift:function(){var e=this,d=e._q.next();e._qActiveId=d.id;e._qState=0;e.send(d.uri,d.cfg,d.id);},queue:function(d,g){var f=this,e={uri:d,cfg:g,id:this._id++};if(!f._qInit){b.on("io:complete",function(i,h){f._qNext(i);},f);f._qInit=true;}f._q.add(e);if(f._qState===1){f._qShift();}return e;},_qNext:function(e){var d=this;d._qState=1;if(d._qActiveId===e&&d._q.size()>0){d._qShift();}},qPromote:function(d){this._q.promote(d);},qRemove:function(d){this._q.remove(d);},qStart:function(){var d=this;d._qState=1;if(d._q.size()>0){d._qShift();}},qStop:function(){this._qState=0;},qSize:function(){return this._q.size();}},true);function a(d,e){return c.queue.apply(c,[d,e]);}a.start=function(){c.qStart();};a.stop=function(){c.qStop();};a.promote=function(d){c.qPromote(d);};a.remove=function(d){c.qRemove(d);};a.size=function(){c.qSize();};b.io.queue=a;},"3.4.1",{requires:["io-base","queue-promote"]});
\ No newline at end of file
+YUI.add("io-queue",function(b){var c=b.io._map["io:0"]||new b.IO();b.mix(b.IO.prototype,{_q:new b.Queue(),_qActiveId:null,_qInit:false,_qState:1,_qShift:function(){var e=this,d=e._q.next();e._qActiveId=d.id;e._qState=0;e.send(d.uri,d.cfg,d.id);},queue:function(d,g){var f=this,e={uri:d,cfg:g,id:this._id++};if(!f._qInit){b.on("io:complete",function(i,h){f._qNext(i);},f);f._qInit=true;}f._q.add(e);if(f._qState===1){f._qShift();}return e;},_qNext:function(e){var d=this;d._qState=1;if(d._qActiveId===e&&d._q.size()>0){d._qShift();}},qPromote:function(d){this._q.promote(d);},qRemove:function(d){this._q.remove(d);},qStart:function(){var d=this;d._qState=1;if(d._q.size()>0){d._qShift();}},qStop:function(){this._qState=0;},qSize:function(){return this._q.size();}},true);function a(d,e){return c.queue.apply(c,[d,e]);}a.start=function(){c.qStart();};a.stop=function(){c.qStop();};a.promote=function(d){c.qPromote(d);};a.remove=function(d){c.qRemove(d);};a.size=function(){c.qSize();};b.io.queue=a;},"3.5.0",{requires:["io-base","queue-promote"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/io-queue/io-queue.js b/lib/yui/3.5.0/build/io-queue/io-queue.js
similarity index 95%
rename from lib/yui/3.4.1/build/io-queue/io-queue.js
rename to lib/yui/3.5.0/build/io-queue/io-queue.js
index 57065c01cbf..3d4e63acbe3 100644
--- a/lib/yui/3.4.1/build/io-queue/io-queue.js
+++ b/lib/yui/3.5.0/build/io-queue/io-queue.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -9,7 +9,7 @@ YUI.add('io-queue', function(Y) {
/**
Extends IO to implement Queue for synchronous
transaction processing.
-@module io-base
+@module io
@submodule io-queue
@for IO
**/
@@ -159,4 +159,4 @@ _queue.size = function () { io.qSize(); };
Y.io.queue = _queue;
-}, '3.4.1' ,{requires:['io-base','queue-promote']});
+}, '3.5.0' ,{requires:['io-base','queue-promote']});
diff --git a/lib/yui/3.4.1/build/io-upload-iframe/io-upload-iframe-debug.js b/lib/yui/3.5.0/build/io-upload-iframe/io-upload-iframe-debug.js
similarity index 93%
rename from lib/yui/3.4.1/build/io-upload-iframe/io-upload-iframe-debug.js
rename to lib/yui/3.5.0/build/io-upload-iframe/io-upload-iframe-debug.js
index 48d4bc9f3f5..18f5773189b 100644
--- a/lib/yui/3.4.1/build/io-upload-iframe/io-upload-iframe-debug.js
+++ b/lib/yui/3.5.0/build/io-upload-iframe/io-upload-iframe-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -9,7 +9,7 @@ YUI.add('io-upload-iframe', function(Y) {
/**
Extends the IO to enable file uploads, with HTML forms
using an iframe as the transport medium.
-@module io-base
+@module io
@submodule io-upload-iframe
@for IO
**/
@@ -30,7 +30,7 @@ var w = Y.config.win,
* @param {Object} io
*/
function _cFrame(o, c, io) {
- var i = Y.Node.create('');
+ var i = Y.Node.create('');
i._node.style.position = 'absolute';
i._node.style.top = '-1000px';
i._node.style.left = '-1000px';
@@ -62,7 +62,7 @@ Y.mix(Y.IO.prototype, {
* @static
* @param {Object} f HTML form object.
* @param {String} s The key-value POST data.
- * @return {Array} e Array of created fields.
+ * @return {Array} o Array of created fields.
*/
_addData: function(f, s) {
// Serialize an object into a key-value string using
@@ -144,13 +144,13 @@ Y.mix(Y.IO.prototype, {
* Starts timeout count if the configuration object
* has a defined timeout property.
*
- * @method _startTimeout
+ * @method _startUploadTimeout
* @private
* @static
* @param {Object} o Transaction object generated by _create().
* @param {Object} c Configuration object passed to YUI.io().
*/
- _startTimeout: function(o, c) {
+ _startUploadTimeout: function(o, c) {
var io = this;
io._timeout[o.id] = w.setTimeout(
@@ -164,13 +164,13 @@ Y.mix(Y.IO.prototype, {
},
/**
- * Clears the timeout interval started by _startTimeout().
- * @method _clearTimeout
+ * Clears the timeout interval started by _startUploadTimeout().
+ * @method _clearUploadTimeout
* @private
* @static
* @param {Number} id - Transaction ID.
*/
- _clearTimeout: function(id) {
+ _clearUploadTimeout: function(id) {
var io = this;
w.clearTimeout(io._timeout[id]);
@@ -193,7 +193,7 @@ Y.mix(Y.IO.prototype, {
p;
if (c.timeout) {
- io._clearTimeout(o.id);
+ io._clearUploadTimeout(o.id);
}
try {
@@ -251,7 +251,7 @@ Y.mix(Y.IO.prototype, {
// Start polling if a callback is present and the timeout
// property has been defined.
if (c.timeout) {
- io._startTimeout(o, c);
+ io._startUploadTimeout(o, c);
Y.log('Transaction timeout started for transaction ' + o.id + '.', 'info', 'io');
}
@@ -294,5 +294,4 @@ Y.mix(Y.IO.prototype, {
});
-
-}, '3.4.1' ,{requires:['io-base','node-base']});
+}, '3.5.0' ,{requires:['io-base','node-base']});
diff --git a/lib/yui/3.5.0/build/io-upload-iframe/io-upload-iframe-min.js b/lib/yui/3.5.0/build/io-upload-iframe/io-upload-iframe-min.js
new file mode 100644
index 00000000000..c26368e1376
--- /dev/null
+++ b/lib/yui/3.5.0/build/io-upload-iframe/io-upload-iframe-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("io-upload-iframe",function(g){var b=g.config.win,f=g.config.doc,c=(f.documentMode&&f.documentMode>=8),a=decodeURIComponent;function h(j,l,k){var d=g.Node.create('');d._node.style.position="absolute";d._node.style.top="-1000px";d._node.style.left="-1000px";g.one("body").appendChild(d);g.on("load",function(){k._uploadComplete(j,l);},"#io_iframe"+j.id);}function e(d){g.Event.purgeElement("#io_iframe"+d,false);g.one("body").removeChild(g.one("#io_iframe"+d));}g.mix(g.IO.prototype,{_addData:function(p,n){if(g.Lang.isObject(n)){n=g.QueryString.stringify(n);}var q=[],d=n.split("="),k,j;for(k=0,j=d.length-1;k');
+ var i = Y.Node.create('');
i._node.style.position = 'absolute';
i._node.style.top = '-1000px';
i._node.style.left = '-1000px';
@@ -61,7 +61,7 @@ Y.mix(Y.IO.prototype, {
* @static
* @param {Object} f HTML form object.
* @param {String} s The key-value POST data.
- * @return {Array} e Array of created fields.
+ * @return {Array} o Array of created fields.
*/
_addData: function(f, s) {
// Serialize an object into a key-value string using
@@ -142,13 +142,13 @@ Y.mix(Y.IO.prototype, {
* Starts timeout count if the configuration object
* has a defined timeout property.
*
- * @method _startTimeout
+ * @method _startUploadTimeout
* @private
* @static
* @param {Object} o Transaction object generated by _create().
* @param {Object} c Configuration object passed to YUI.io().
*/
- _startTimeout: function(o, c) {
+ _startUploadTimeout: function(o, c) {
var io = this;
io._timeout[o.id] = w.setTimeout(
@@ -161,13 +161,13 @@ Y.mix(Y.IO.prototype, {
},
/**
- * Clears the timeout interval started by _startTimeout().
- * @method _clearTimeout
+ * Clears the timeout interval started by _startUploadTimeout().
+ * @method _clearUploadTimeout
* @private
* @static
* @param {Number} id - Transaction ID.
*/
- _clearTimeout: function(id) {
+ _clearUploadTimeout: function(id) {
var io = this;
w.clearTimeout(io._timeout[id]);
@@ -190,7 +190,7 @@ Y.mix(Y.IO.prototype, {
p;
if (c.timeout) {
- io._clearTimeout(o.id);
+ io._clearUploadTimeout(o.id);
}
try {
@@ -246,7 +246,7 @@ Y.mix(Y.IO.prototype, {
// Start polling if a callback is present and the timeout
// property has been defined.
if (c.timeout) {
- io._startTimeout(o, c);
+ io._startUploadTimeout(o, c);
}
// Start file upload.
@@ -286,5 +286,4 @@ Y.mix(Y.IO.prototype, {
});
-
-}, '3.4.1' ,{requires:['io-base','node-base']});
+}, '3.5.0' ,{requires:['io-base','node-base']});
diff --git a/lib/yui/3.4.1/build/io-xdr/io-xdr-debug.js b/lib/yui/3.5.0/build/io-xdr/io-xdr-debug.js
similarity index 96%
rename from lib/yui/3.4.1/build/io-xdr/io-xdr-debug.js
rename to lib/yui/3.5.0/build/io-xdr/io-xdr-debug.js
index a517eff661c..ff887aeb36d 100644
--- a/lib/yui/3.4.1/build/io-xdr/io-xdr-debug.js
+++ b/lib/yui/3.5.0/build/io-xdr/io-xdr-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -9,7 +9,7 @@ YUI.add('io-xdr', function(Y) {
/**
Extends IO to provide an alternate, Flash transport, for making
cross-domain requests.
-@module io-base
+@module io
@submodule io-xdr
@for IO
**/
@@ -21,7 +21,7 @@ Fires when the XDR transport is ready for use.
var E_XDR_READY = Y.publish('io:xdrReady', { fireOnce: true }),
/**
-Map of stored configuration objects when using
+Map of stored configuration objects when using
Flash as the transport for cross-domain requests.
@property _cB
@@ -88,7 +88,7 @@ function _data(o, u, d) {
if (d === 'xml') {
o.c.responseXML = Y.DataType.XML.parse(o.c.responseText);
}
-
+
return o;
}
@@ -120,7 +120,7 @@ Y.mix(Y.IO.prototype, {
/**
Map of io transports.
-
+
@property _transport
@private
@type {Object}
@@ -129,7 +129,7 @@ Y.mix(Y.IO.prototype, {
/**
Sets event handlers for XDomainRequest transactions.
-
+
@method _ieEvt
@private
@static
@@ -162,7 +162,7 @@ Y.mix(Y.IO.prototype, {
/**
Method for accessing the transport's interface for making a
cross-domain transaction.
-
+
@method xdr
@param {String} uri - qualified path to transaction resource.
@param {Object} o - Transaction object generated by _create() in io-base.
@@ -213,7 +213,7 @@ Y.mix(Y.IO.prototype, {
/**
Response controller for cross-domain requests when using the
Flash transport or IE8's XDomainRequest object.
-
+
@method xdrResponse
@param {String} e Event name
@param {Object} o Transaction object generated by _create() in io-base.
@@ -252,7 +252,7 @@ Y.mix(Y.IO.prototype, {
/**
Fires event "io:xdrReady"
-
+
@method _xdrReady
@private
@param {Number} yid - YUI sandbox id.
@@ -264,16 +264,15 @@ Y.mix(Y.IO.prototype, {
/**
Initializes the desired transport.
-
+
@method transport
@param {Object} o - object of transport configurations.
**/
transport: function(c) {
if (c.id === 'flash') {
_swf(Y.UA.ie ? c.src + '?d=' + new Date().valueOf().toString() : c.src, Y.id, c.uid);
+ Y.IO.transports.flash = function() { return d.getElementById('io_swf'); };
}
-
- this._transport[c.id] = (c.id === 'flash') ? d.getElementById('io_swf') : c.src;
}
});
@@ -315,4 +314,5 @@ event is fired, this value will be set to 0.
Y.io.xdr = { delay : 100 };
-}, '3.4.1' ,{requires:['io-base','datatype-xml']});
+
+}, '3.5.0' ,{requires:['io-base','datatype-xml-parse']});
diff --git a/lib/yui/3.4.1/build/io-xdr/io-xdr-min.js b/lib/yui/3.5.0/build/io-xdr/io-xdr-min.js
similarity index 79%
rename from lib/yui/3.4.1/build/io-xdr/io-xdr-min.js
rename to lib/yui/3.5.0/build/io-xdr/io-xdr-min.js
index 9ca468a3573..09ff9e95b0f 100644
--- a/lib/yui/3.4.1/build/io-xdr/io-xdr-min.js
+++ b/lib/yui/3.5.0/build/io-xdr/io-xdr-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("io-xdr",function(a){var k=a.publish("io:xdrReady",{fireOnce:true}),e={},g={},j=a.config.doc,l=a.config.win,f=l&&l.XDomainRequest;function h(m,q,d){var n='",p=j.createElement("div");j.body.appendChild(p);p.innerHTML=n;}function b(p,m,n){if(m==="flash"){p.c.responseText=decodeURI(p.c.responseText);}if(n==="xml"){p.c.responseXML=a.DataType.XML.parse(p.c.responseText);}return p;}function i(d,m){return d.c.abort(d.id,m);}function c(d){return f?g[d.id]!==4:d.c.isInProgress(d.id);}a.mix(a.IO.prototype,{_transport:{},_ieEvt:function(n,q){var p=this,m=n.id,d="timeout";n.c.onprogress=function(){g[m]=3;};n.c.onload=function(){g[m]=4;p.xdrResponse("success",n,q);};n.c.onerror=function(){g[m]=4;p.xdrResponse("failure",n,q);};if(q[d]){n.c.ontimeout=function(){g[m]=4;p.xdrResponse(d,n,q);};n.c[d]=q[d];}},xdr:function(d,m,p){var n=this;if(p.xdr.use==="flash"){e[m.id]=p;l.setTimeout(function(){try{m.c.send(d,{id:m.id,uid:m.uid,method:p.method,data:p.data,headers:p.headers});}catch(o){n.xdrResponse("transport error",m,p);delete e[m.id];}},a.io.xdr.delay);}else{if(f){n._ieEvt(m,p);m.c.open(p.method||"GET",d);m.c.send(p.data);}else{m.c.send(d,m,p);}}return{id:m.id,abort:function(){return m.c?i(m,p):false;},isInProgress:function(){return m.c?c(m.id):false;},io:n};},xdrResponse:function(q,s,v){v=e[s.id]?e[s.id]:v;var t=this,n=f?g:e,p=v.xdr.use,r=v.xdr.dataType;switch(q){case"start":t.start(s,v);break;case"success":t.success(b(s,p,r),v);delete n[s.id];break;case"timeout":case"abort":case"transport error":s.c={status:0,statusText:q};case"failure":t.failure(b(s,p,r),v);delete n[s.id];break;}},_xdrReady:function(m,d){a.fire(k,m,d);},transport:function(d){if(d.id==="flash"){h(a.UA.ie?d.src+"?d="+new Date().valueOf().toString():d.src,a.id,d.uid);}this._transport[d.id]=(d.id==="flash")?j.getElementById("io_swf"):d.src;}});a.io.xdrReady=function(n,d){var m=a.io._map[d];a.io.xdr.delay=0;m._xdrReady.apply(m,[n,d]);};a.io.xdrResponse=function(d,m,p){var n=a.io._map[m.uid];n.xdrResponse.apply(n,[d,m,p]);};a.io.transport=function(m){var d=a.io._map["io:0"]||new a.IO();m.uid=d._uid;d.transport.apply(d,[m]);};a.io.xdr={delay:100};},"3.4.1",{requires:["io-base","datatype-xml"]});
\ No newline at end of file
+YUI.add("io-xdr",function(a){var k=a.publish("io:xdrReady",{fireOnce:true}),e={},g={},j=a.config.doc,l=a.config.win,f=l&&l.XDomainRequest;function h(m,q,d){var n='",p=j.createElement("div");j.body.appendChild(p);p.innerHTML=n;}function b(p,m,n){if(m==="flash"){p.c.responseText=decodeURI(p.c.responseText);}if(n==="xml"){p.c.responseXML=a.DataType.XML.parse(p.c.responseText);}return p;}function i(d,m){return d.c.abort(d.id,m);}function c(d){return f?g[d.id]!==4:d.c.isInProgress(d.id);}a.mix(a.IO.prototype,{_transport:{},_ieEvt:function(n,q){var p=this,m=n.id,d="timeout";n.c.onprogress=function(){g[m]=3;};n.c.onload=function(){g[m]=4;p.xdrResponse("success",n,q);};n.c.onerror=function(){g[m]=4;p.xdrResponse("failure",n,q);};if(q[d]){n.c.ontimeout=function(){g[m]=4;p.xdrResponse(d,n,q);};n.c[d]=q[d];}},xdr:function(d,m,p){var n=this;if(p.xdr.use==="flash"){e[m.id]=p;l.setTimeout(function(){try{m.c.send(d,{id:m.id,uid:m.uid,method:p.method,data:p.data,headers:p.headers});}catch(o){n.xdrResponse("transport error",m,p);delete e[m.id];}},a.io.xdr.delay);}else{if(f){n._ieEvt(m,p);m.c.open(p.method||"GET",d);m.c.send(p.data);}else{m.c.send(d,m,p);}}return{id:m.id,abort:function(){return m.c?i(m,p):false;},isInProgress:function(){return m.c?c(m.id):false;},io:n};},xdrResponse:function(q,s,v){v=e[s.id]?e[s.id]:v;var t=this,n=f?g:e,p=v.xdr.use,r=v.xdr.dataType;switch(q){case"start":t.start(s,v);break;case"success":t.success(b(s,p,r),v);delete n[s.id];break;case"timeout":case"abort":case"transport error":s.c={status:0,statusText:q};case"failure":t.failure(b(s,p,r),v);delete n[s.id];break;}},_xdrReady:function(m,d){a.fire(k,m,d);},transport:function(d){if(d.id==="flash"){h(a.UA.ie?d.src+"?d="+new Date().valueOf().toString():d.src,a.id,d.uid);a.IO.transports.flash=function(){return j.getElementById("io_swf");};}}});a.io.xdrReady=function(n,d){var m=a.io._map[d];a.io.xdr.delay=0;m._xdrReady.apply(m,[n,d]);};a.io.xdrResponse=function(d,m,p){var n=a.io._map[m.uid];n.xdrResponse.apply(n,[d,m,p]);};a.io.transport=function(m){var d=a.io._map["io:0"]||new a.IO();m.uid=d._uid;d.transport.apply(d,[m]);};a.io.xdr={delay:100};},"3.5.0",{requires:["io-base","datatype-xml-parse"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/io-xdr/io-xdr.js b/lib/yui/3.5.0/build/io-xdr/io-xdr.js
similarity index 96%
rename from lib/yui/3.4.1/build/io-xdr/io-xdr.js
rename to lib/yui/3.5.0/build/io-xdr/io-xdr.js
index a517eff661c..ff887aeb36d 100644
--- a/lib/yui/3.4.1/build/io-xdr/io-xdr.js
+++ b/lib/yui/3.5.0/build/io-xdr/io-xdr.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -9,7 +9,7 @@ YUI.add('io-xdr', function(Y) {
/**
Extends IO to provide an alternate, Flash transport, for making
cross-domain requests.
-@module io-base
+@module io
@submodule io-xdr
@for IO
**/
@@ -21,7 +21,7 @@ Fires when the XDR transport is ready for use.
var E_XDR_READY = Y.publish('io:xdrReady', { fireOnce: true }),
/**
-Map of stored configuration objects when using
+Map of stored configuration objects when using
Flash as the transport for cross-domain requests.
@property _cB
@@ -88,7 +88,7 @@ function _data(o, u, d) {
if (d === 'xml') {
o.c.responseXML = Y.DataType.XML.parse(o.c.responseText);
}
-
+
return o;
}
@@ -120,7 +120,7 @@ Y.mix(Y.IO.prototype, {
/**
Map of io transports.
-
+
@property _transport
@private
@type {Object}
@@ -129,7 +129,7 @@ Y.mix(Y.IO.prototype, {
/**
Sets event handlers for XDomainRequest transactions.
-
+
@method _ieEvt
@private
@static
@@ -162,7 +162,7 @@ Y.mix(Y.IO.prototype, {
/**
Method for accessing the transport's interface for making a
cross-domain transaction.
-
+
@method xdr
@param {String} uri - qualified path to transaction resource.
@param {Object} o - Transaction object generated by _create() in io-base.
@@ -213,7 +213,7 @@ Y.mix(Y.IO.prototype, {
/**
Response controller for cross-domain requests when using the
Flash transport or IE8's XDomainRequest object.
-
+
@method xdrResponse
@param {String} e Event name
@param {Object} o Transaction object generated by _create() in io-base.
@@ -252,7 +252,7 @@ Y.mix(Y.IO.prototype, {
/**
Fires event "io:xdrReady"
-
+
@method _xdrReady
@private
@param {Number} yid - YUI sandbox id.
@@ -264,16 +264,15 @@ Y.mix(Y.IO.prototype, {
/**
Initializes the desired transport.
-
+
@method transport
@param {Object} o - object of transport configurations.
**/
transport: function(c) {
if (c.id === 'flash') {
_swf(Y.UA.ie ? c.src + '?d=' + new Date().valueOf().toString() : c.src, Y.id, c.uid);
+ Y.IO.transports.flash = function() { return d.getElementById('io_swf'); };
}
-
- this._transport[c.id] = (c.id === 'flash') ? d.getElementById('io_swf') : c.src;
}
});
@@ -315,4 +314,5 @@ event is fired, this value will be set to 0.
Y.io.xdr = { delay : 100 };
-}, '3.4.1' ,{requires:['io-base','datatype-xml']});
+
+}, '3.5.0' ,{requires:['io-base','datatype-xml-parse']});
diff --git a/lib/yui/3.4.1/build/io-xdr/io.swf b/lib/yui/3.5.0/build/io-xdr/io.swf
similarity index 100%
rename from lib/yui/3.4.1/build/io-xdr/io.swf
rename to lib/yui/3.5.0/build/io-xdr/io.swf
diff --git a/lib/yui/3.4.1/build/json-parse/json-parse-debug.js b/lib/yui/3.5.0/build/json-parse/json-parse-debug.js
similarity index 98%
rename from lib/yui/3.4.1/build/json-parse/json-parse-debug.js
rename to lib/yui/3.5.0/build/json-parse/json-parse-debug.js
index b01375c6722..4b560b6fffc 100644
--- a/lib/yui/3.4.1/build/json-parse/json-parse-debug.js
+++ b/lib/yui/3.5.0/build/json-parse/json-parse-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -233,4 +233,4 @@ if ( Native ) {
Y.JSON.useNativeParse = useNative;
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/json-parse/json-parse-min.js b/lib/yui/3.5.0/build/json-parse/json-parse-min.js
similarity index 91%
rename from lib/yui/3.4.1/build/json-parse/json-parse-min.js
rename to lib/yui/3.5.0/build/json-parse/json-parse-min.js
index 15f0b8270f6..457b34a20c0 100644
--- a/lib/yui/3.4.1/build/json-parse/json-parse-min.js
+++ b/lib/yui/3.5.0/build/json-parse/json-parse-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("json-parse",function(b){function k(e){return(b.config.win||this||{})[e];}var j=k("JSON"),l=(Object.prototype.toString.call(j)==="[object JSON]"&&j),f=!!l,o=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,m=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g=/(?:^|:|,)(?:\s*\[)+/g,p=/[^\],:{}\s]/,n=function(e){return"\\u"+("0000"+(+(e.charCodeAt(0))).toString(16)).slice(-4);},c=function(r,e){var q=function(x,u){var t,s,w=x[u];if(w&&typeof w==="object"){for(t in w){if(w.hasOwnProperty(t)){s=q(w,t);if(s===undefined){delete w[t];}else{w[t]=s;}}}}return e.call(x,u,w);};return typeof e==="function"?q({"":r},""):r;},h=function(q,e){q=q.replace(o,n);if(!p.test(q.replace(m,"@").replace(d,"]").replace(g,""))){return c(eval("("+q+")"),e);}throw new SyntaxError("JSON.parse");};b.namespace("JSON").parse=function(q,e){if(typeof q!=="string"){q+="";}return l&&b.JSON.useNativeParse?l.parse(q,e):h(q,e);};function a(q,e){return q==="ok"?true:e;}if(l){try{f=(l.parse('{"ok":false}',a)).ok;}catch(i){f=false;}}b.JSON.useNativeParse=f;},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
+YUI.add("json-parse",function(b){function k(e){return(b.config.win||this||{})[e];}var j=k("JSON"),l=(Object.prototype.toString.call(j)==="[object JSON]"&&j),f=!!l,o=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,m=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g=/(?:^|:|,)(?:\s*\[)+/g,p=/[^\],:{}\s]/,n=function(e){return"\\u"+("0000"+(+(e.charCodeAt(0))).toString(16)).slice(-4);},c=function(r,e){var q=function(x,u){var t,s,w=x[u];if(w&&typeof w==="object"){for(t in w){if(w.hasOwnProperty(t)){s=q(w,t);if(s===undefined){delete w[t];}else{w[t]=s;}}}}return e.call(x,u,w);};return typeof e==="function"?q({"":r},""):r;},h=function(q,e){q=q.replace(o,n);if(!p.test(q.replace(m,"@").replace(d,"]").replace(g,""))){return c(eval("("+q+")"),e);}throw new SyntaxError("JSON.parse");};b.namespace("JSON").parse=function(q,e){if(typeof q!=="string"){q+="";}return l&&b.JSON.useNativeParse?l.parse(q,e):h(q,e);};function a(q,e){return q==="ok"?true:e;}if(l){try{f=(l.parse('{"ok":false}',a)).ok;}catch(i){f=false;}}b.JSON.useNativeParse=f;},"3.5.0",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/json-parse/json-parse.js b/lib/yui/3.5.0/build/json-parse/json-parse.js
similarity index 98%
rename from lib/yui/3.4.1/build/json-parse/json-parse.js
rename to lib/yui/3.5.0/build/json-parse/json-parse.js
index b01375c6722..4b560b6fffc 100644
--- a/lib/yui/3.4.1/build/json-parse/json-parse.js
+++ b/lib/yui/3.5.0/build/json-parse/json-parse.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -233,4 +233,4 @@ if ( Native ) {
Y.JSON.useNativeParse = useNative;
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/json-stringify/json-stringify-debug.js b/lib/yui/3.5.0/build/json-stringify/json-stringify-debug.js
similarity index 99%
rename from lib/yui/3.4.1/build/json-stringify/json-stringify-debug.js
rename to lib/yui/3.5.0/build/json-stringify/json-stringify-debug.js
index e04053f6b94..08975ec6c4d 100644
--- a/lib/yui/3.4.1/build/json-stringify/json-stringify-debug.js
+++ b/lib/yui/3.5.0/build/json-stringify/json-stringify-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -351,4 +351,4 @@ Y.mix(Y.namespace('JSON'),{
});
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/json-stringify/json-stringify-min.js b/lib/yui/3.5.0/build/json-stringify/json-stringify-min.js
similarity index 94%
rename from lib/yui/3.4.1/build/json-stringify/json-stringify-min.js
rename to lib/yui/3.5.0/build/json-stringify/json-stringify-min.js
index a184766541a..9b5ab07ee78 100644
--- a/lib/yui/3.4.1/build/json-stringify/json-stringify-min.js
+++ b/lib/yui/3.5.0/build/json-stringify/json-stringify-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("json-stringify",function(b){var j=(b.config.win||{}).JSON,N=b.Lang,p=N.isFunction,I=N.isObject,v=N.isArray,k=Object.prototype.toString,C=(k.call(j)==="[object JSON]"&&j),F=!!C,D="undefined",r="object",A="null",L="string",B="number",x="boolean",l="date",E={"undefined":D,"string":L,"[object String]":L,"number":B,"[object Number]":B,"boolean":x,"[object Boolean]":x,"[object Date]":l,"[object RegExp]":r},g="",q="{",a="}",y="[",i="]",s=",",c=",\n",m="\n",G=":",h=": ",u='"',d=/[\x00-\x07\x0b\x0e-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n=[[/\\/g,"\\\\"],[/\"/g,'\\"'],[/\x08/g,"\\b"],[/\x09/g,"\\t"],[/\x0a/g,"\\n"],[/\x0c/g,"\\f"],[/\x0d/g,"\\r"]],t=n.length,f={},o,H;function O(P){var e=typeof P;return E[e]||E[k.call(P)]||(e===r?(P?r:A):D);}function K(e){if(!f[e]){f[e]="\\u"+("0000"+(+(e.charCodeAt(0))).toString(16)).slice(-4);o[e]=0;}if(++o[e]===H){n.push([new RegExp(e,"g"),f[e]]);t=n.length;}return f[e];}function w(Q){var e,P;for(e=0;e=0;--aa){if(V[aa]===af){throw new Error("JSON.stringify. Cyclical reference");}}ac=v(af);V.push(af);if(ac){for(aa=af.length-1;aa>=0;--aa){ae[aa]=Q(af,aa)||A;}}else{ai=X||af;aa=0;for(Z in ai){if(ai.hasOwnProperty(Z)){ag=Q(af,Z);if(ag){ae[aa++]=w(Z)+ad+ag;}}}}V.pop();if(e&&ae.length){return ac?y+m+z(ae.join(c),e)+m+i:q+m+z(ae.join(c),e)+m+a;}else{return ac?y+ae.join(s)+i:q+ae.join(s)+a;}}return Q({"":P},"");}if(C){try{F=("0"===C.stringify(0));}catch(M){F=false;}}b.mix(b.namespace("JSON"),{useNativeStringify:F,dateToString:function(P){function e(Q){return Q<10?"0"+Q:Q;}return P.getUTCFullYear()+"-"+e(P.getUTCMonth()+1)+"-"+e(P.getUTCDate())+"T"+e(P.getUTCHours())+G+e(P.getUTCMinutes())+G+e(P.getUTCSeconds())+"Z";},stringify:function(Q,e,P){return C&&b.JSON.useNativeStringify?C.stringify(Q,e,P):J(Q,e,P);},charCacheThreshold:100});},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
+YUI.add("json-stringify",function(b){var j=(b.config.win||{}).JSON,N=b.Lang,p=N.isFunction,I=N.isObject,v=N.isArray,k=Object.prototype.toString,C=(k.call(j)==="[object JSON]"&&j),F=!!C,D="undefined",r="object",A="null",L="string",B="number",x="boolean",l="date",E={"undefined":D,"string":L,"[object String]":L,"number":B,"[object Number]":B,"boolean":x,"[object Boolean]":x,"[object Date]":l,"[object RegExp]":r},g="",q="{",a="}",y="[",i="]",s=",",c=",\n",m="\n",G=":",h=": ",u='"',d=/[\x00-\x07\x0b\x0e-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n=[[/\\/g,"\\\\"],[/\"/g,'\\"'],[/\x08/g,"\\b"],[/\x09/g,"\\t"],[/\x0a/g,"\\n"],[/\x0c/g,"\\f"],[/\x0d/g,"\\r"]],t=n.length,f={},o,H;function O(P){var e=typeof P;return E[e]||E[k.call(P)]||(e===r?(P?r:A):D);}function K(e){if(!f[e]){f[e]="\\u"+("0000"+(+(e.charCodeAt(0))).toString(16)).slice(-4);o[e]=0;}if(++o[e]===H){n.push([new RegExp(e,"g"),f[e]]);t=n.length;}return f[e];}function w(Q){var e,P;for(e=0;e=0;--aa){if(V[aa]===af){throw new Error("JSON.stringify. Cyclical reference");}}ac=v(af);V.push(af);if(ac){for(aa=af.length-1;aa>=0;--aa){ae[aa]=Q(af,aa)||A;}}else{ai=X||af;aa=0;for(Z in ai){if(ai.hasOwnProperty(Z)){ag=Q(af,Z);if(ag){ae[aa++]=w(Z)+ad+ag;}}}}V.pop();if(e&&ae.length){return ac?y+m+z(ae.join(c),e)+m+i:q+m+z(ae.join(c),e)+m+a;}else{return ac?y+ae.join(s)+i:q+ae.join(s)+a;}}return Q({"":P},"");}if(C){try{F=("0"===C.stringify(0));}catch(M){F=false;}}b.mix(b.namespace("JSON"),{useNativeStringify:F,dateToString:function(P){function e(Q){return Q<10?"0"+Q:Q;}return P.getUTCFullYear()+"-"+e(P.getUTCMonth()+1)+"-"+e(P.getUTCDate())+"T"+e(P.getUTCHours())+G+e(P.getUTCMinutes())+G+e(P.getUTCSeconds())+"Z";},stringify:function(Q,e,P){return C&&b.JSON.useNativeStringify?C.stringify(Q,e,P):J(Q,e,P);},charCacheThreshold:100});},"3.5.0",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/json-stringify/json-stringify.js b/lib/yui/3.5.0/build/json-stringify/json-stringify.js
similarity index 99%
rename from lib/yui/3.4.1/build/json-stringify/json-stringify.js
rename to lib/yui/3.5.0/build/json-stringify/json-stringify.js
index e04053f6b94..08975ec6c4d 100644
--- a/lib/yui/3.4.1/build/json-stringify/json-stringify.js
+++ b/lib/yui/3.5.0/build/json-stringify/json-stringify.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -351,4 +351,4 @@ Y.mix(Y.namespace('JSON'),{
});
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/jsonp-url/jsonp-url-debug.js b/lib/yui/3.5.0/build/jsonp-url/jsonp-url-debug.js
similarity index 97%
rename from lib/yui/3.4.1/build/jsonp-url/jsonp-url-debug.js
rename to lib/yui/3.5.0/build/jsonp-url/jsonp-url-debug.js
index f6f748864c9..cb8f681300c 100644
--- a/lib/yui/3.4.1/build/jsonp-url/jsonp-url-debug.js
+++ b/lib/yui/3.5.0/build/jsonp-url/jsonp-url-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -129,4 +129,4 @@ Y.mix(JSONPRequest.prototype, {
}, true);
-}, '3.4.1' ,{requires:['jsonp']});
+}, '3.5.0' ,{requires:['jsonp']});
diff --git a/lib/yui/3.4.1/build/jsonp-url/jsonp-url-min.js b/lib/yui/3.5.0/build/jsonp-url/jsonp-url-min.js
similarity index 88%
rename from lib/yui/3.4.1/build/jsonp-url/jsonp-url-min.js
rename to lib/yui/3.5.0/build/jsonp-url/jsonp-url-min.js
index 618083e418d..443aef7796f 100644
--- a/lib/yui/3.4.1/build/jsonp-url/jsonp-url-min.js
+++ b/lib/yui/3.5.0/build/jsonp-url/jsonp-url-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("jsonp-url",function(d){var a=d.JSONPRequest,c=d.Object.getValue,b=function(){};d.mix(a.prototype,{_pattern:/\bcallback=(.*?)(?=&|$)/i,_template:"callback={callback}",_defaultCallback:function(g){var f=g.match(this._pattern),j=[],h=0,e,k,l;if(f){e=f[1].replace(/\[(['"])(.*?)\1\]/g,function(m,i,n){j[h]=n;return".@"+(h++);}).replace(/\[(\d+)\]/g,function(m,i){j[h]=parseInt(i,10)|0;return".@"+(h++);}).replace(/^\./,"");if(!/[^\w\.\$@]/.test(e)){k=e.split(".");for(h=k.length-1;h>=0;--h){if(k[h].charAt(0)==="@"){k[h]=j[parseInt(k[h].substr(1),10)];}}l=c(d.config.win,k)||c(d,k)||c(d,k.slice(1));}}return l||b;},_format:function(e,g){var h=this._template.replace(/\{callback\}/,g),f;if(this._pattern.test(e)){return e.replace(this._pattern,h);}else{f=e.slice(-1);if(f!=="&"&&f!=="?"){e+=(e.indexOf("?")>-1)?"&":"?";}return e+h;}}},true);},"3.4.1",{requires:["jsonp"]});
\ No newline at end of file
+YUI.add("jsonp-url",function(d){var a=d.JSONPRequest,c=d.Object.getValue,b=function(){};d.mix(a.prototype,{_pattern:/\bcallback=(.*?)(?=&|$)/i,_template:"callback={callback}",_defaultCallback:function(g){var f=g.match(this._pattern),j=[],h=0,e,k,l;if(f){e=f[1].replace(/\[(['"])(.*?)\1\]/g,function(m,i,n){j[h]=n;return".@"+(h++);}).replace(/\[(\d+)\]/g,function(m,i){j[h]=parseInt(i,10)|0;return".@"+(h++);}).replace(/^\./,"");if(!/[^\w\.\$@]/.test(e)){k=e.split(".");for(h=k.length-1;h>=0;--h){if(k[h].charAt(0)==="@"){k[h]=j[parseInt(k[h].substr(1),10)];}}l=c(d.config.win,k)||c(d,k)||c(d,k.slice(1));}}return l||b;},_format:function(e,g){var h=this._template.replace(/\{callback\}/,g),f;if(this._pattern.test(e)){return e.replace(this._pattern,h);}else{f=e.slice(-1);if(f!=="&"&&f!=="?"){e+=(e.indexOf("?")>-1)?"&":"?";}return e+h;}}},true);},"3.5.0",{requires:["jsonp"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/jsonp-url/jsonp-url.js b/lib/yui/3.5.0/build/jsonp-url/jsonp-url.js
similarity index 97%
rename from lib/yui/3.4.1/build/jsonp-url/jsonp-url.js
rename to lib/yui/3.5.0/build/jsonp-url/jsonp-url.js
index f6f748864c9..cb8f681300c 100644
--- a/lib/yui/3.4.1/build/jsonp-url/jsonp-url.js
+++ b/lib/yui/3.5.0/build/jsonp-url/jsonp-url.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -129,4 +129,4 @@ Y.mix(JSONPRequest.prototype, {
}, true);
-}, '3.4.1' ,{requires:['jsonp']});
+}, '3.5.0' ,{requires:['jsonp']});
diff --git a/lib/yui/3.4.1/build/jsonp/jsonp-debug.js b/lib/yui/3.5.0/build/jsonp/jsonp-debug.js
similarity index 98%
rename from lib/yui/3.4.1/build/jsonp/jsonp-debug.js
rename to lib/yui/3.5.0/build/jsonp/jsonp-debug.js
index 285b9b696f1..9d98abecd08 100644
--- a/lib/yui/3.4.1/build/jsonp/jsonp-debug.js
+++ b/lib/yui/3.5.0/build/jsonp/jsonp-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -255,4 +255,4 @@ if (!YUI.Env.JSONP) {
}
-}, '3.4.1' ,{requires:['get','oop']});
+}, '3.5.0' ,{requires:['get','oop']});
diff --git a/lib/yui/3.4.1/build/jsonp/jsonp-min.js b/lib/yui/3.5.0/build/jsonp/jsonp-min.js
similarity index 91%
rename from lib/yui/3.4.1/build/jsonp/jsonp-min.js
rename to lib/yui/3.5.0/build/jsonp/jsonp-min.js
index b2b9e808979..e6697faf5d7 100644
--- a/lib/yui/3.4.1/build/jsonp/jsonp-min.js
+++ b/lib/yui/3.5.0/build/jsonp/jsonp-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("jsonp",function(c){var b=c.Lang.isFunction;function a(){this._init.apply(this,arguments);}a.prototype={_init:function(d,f){this.url=d;this._requests={};this._timeouts={};f=(b(f))?{on:{success:f}}:f||{};var e=f.on||{};if(!e.success){e.success=this._defaultCallback(d,f);}this._config=c.merge({context:this,args:[],format:this._format,allowCache:false},f,{on:e});},_defaultCallback:function(){},send:function(){var d=this,g=c.Array(arguments,0,true),f=d._config,h=d._proxy||c.guid(),e;if(f.allowCache){d._proxy=h;}if(d._requests[h]===undefined){d._requests[h]=0;}if(d._timeouts[h]===undefined){d._timeouts[h]=0;}d._requests[h]++;g.unshift(d.url,"YUI.Env.JSONP."+h);e=f.format.apply(d,g);if(!f.on.success){return d;}function i(k,j){return(b(k))?function(n){var m=true,l="_requests";if(j){++d._timeouts[h];--d._requests[h];}else{if(!d._requests[h]){m=false;l="_timeouts";}--d[l][h];}if(!d._requests[h]&&!d._timeouts[h]){delete YUI.Env.JSONP[h];}if(m){k.apply(f.context,[n].concat(f.args));}}:null;}YUI.Env.JSONP[h]=i(f.on.success);c.Get.script(e,{onFailure:i(f.on.failure),onTimeout:i(f.on.timeout,true),timeout:f.timeout,charset:f.charset,attributes:f.attributes});return d;},_format:function(d,e){return d.replace(/\{callback\}/,e);}};c.JSONPRequest=a;c.jsonp=function(d,f){var e=new c.JSONPRequest(d,f);return e.send.apply(e,c.Array(arguments,2,true));};if(!YUI.Env.JSONP){YUI.Env.JSONP={};}},"3.4.1",{requires:["get","oop"]});
\ No newline at end of file
+YUI.add("jsonp",function(c){var b=c.Lang.isFunction;function a(){this._init.apply(this,arguments);}a.prototype={_init:function(d,f){this.url=d;this._requests={};this._timeouts={};f=(b(f))?{on:{success:f}}:f||{};var e=f.on||{};if(!e.success){e.success=this._defaultCallback(d,f);}this._config=c.merge({context:this,args:[],format:this._format,allowCache:false},f,{on:e});},_defaultCallback:function(){},send:function(){var d=this,g=c.Array(arguments,0,true),f=d._config,h=d._proxy||c.guid(),e;if(f.allowCache){d._proxy=h;}if(d._requests[h]===undefined){d._requests[h]=0;}if(d._timeouts[h]===undefined){d._timeouts[h]=0;}d._requests[h]++;g.unshift(d.url,"YUI.Env.JSONP."+h);e=f.format.apply(d,g);if(!f.on.success){return d;}function i(k,j){return(b(k))?function(n){var m=true,l="_requests";if(j){++d._timeouts[h];--d._requests[h];}else{if(!d._requests[h]){m=false;l="_timeouts";}--d[l][h];}if(!d._requests[h]&&!d._timeouts[h]){delete YUI.Env.JSONP[h];}if(m){k.apply(f.context,[n].concat(f.args));}}:null;}YUI.Env.JSONP[h]=i(f.on.success);c.Get.script(e,{onFailure:i(f.on.failure),onTimeout:i(f.on.timeout,true),timeout:f.timeout,charset:f.charset,attributes:f.attributes});return d;},_format:function(d,e){return d.replace(/\{callback\}/,e);}};c.JSONPRequest=a;c.jsonp=function(d,f){var e=new c.JSONPRequest(d,f);return e.send.apply(e,c.Array(arguments,2,true));};if(!YUI.Env.JSONP){YUI.Env.JSONP={};}},"3.5.0",{requires:["get","oop"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/jsonp/jsonp.js b/lib/yui/3.5.0/build/jsonp/jsonp.js
similarity index 98%
rename from lib/yui/3.4.1/build/jsonp/jsonp.js
rename to lib/yui/3.5.0/build/jsonp/jsonp.js
index 19075e3086c..b80eab55217 100644
--- a/lib/yui/3.4.1/build/jsonp/jsonp.js
+++ b/lib/yui/3.5.0/build/jsonp/jsonp.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -250,4 +250,4 @@ if (!YUI.Env.JSONP) {
}
-}, '3.4.1' ,{requires:['get','oop']});
+}, '3.5.0' ,{requires:['get','oop']});
diff --git a/lib/yui/3.4.1/build/loader-base/loader-base.js b/lib/yui/3.5.0/build/loader-base/loader-base-debug.js
similarity index 66%
rename from lib/yui/3.4.1/build/loader-base/loader-base.js
rename to lib/yui/3.5.0/build/loader-base/loader-base-debug.js
index 88a8ae6b78a..33b337c871f 100644
--- a/lib/yui/3.4.1/build/loader-base/loader-base.js
+++ b/lib/yui/3.5.0/build/loader-base/loader-base-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -19,7 +19,7 @@ if (!YUI.Env[Y.version]) {
BUILD = '/build/',
ROOT = VERSION + BUILD,
CDN_BASE = Y.Env.base,
- GALLERY_VERSION = 'gallery-2011.09.14-20-40',
+ GALLERY_VERSION = 'gallery-2012.04.10-14-57',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
@@ -40,18 +40,28 @@ if (!YUI.Env[Y.version]) {
groups: {},
patterns: {} },
groups = META.groups,
- yui2Update = function(tnt, yui2) {
- var root = TNT + '.' +
- (tnt || TNT_VERSION) + '/' +
- (yui2 || YUI2_VERSION) + BUILD;
- groups.yui2.base = CDN_BASE + root;
- groups.yui2.root = root;
- },
- galleryUpdate = function(tag) {
- var root = (tag || GALLERY_VERSION) + BUILD;
- groups.gallery.base = CDN_BASE + root;
- groups.gallery.root = root;
- };
+ yui2Update = function(tnt, yui2, config) {
+
+ var root = TNT + '.' +
+ (tnt || TNT_VERSION) + '/' +
+ (yui2 || YUI2_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.yui2.base = base + root;
+ groups.yui2.root = root;
+ groups.yui2.comboBase = combo;
+ },
+ galleryUpdate = function(tag, config) {
+ var root = (tag || GALLERY_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.gallery.base = base + root;
+ groups.gallery.root = root;
+ groups.gallery.comboBase = combo;
+ };
+
groups[VERSION] = {};
@@ -96,10 +106,8 @@ if (!YUI.Env[Y.version]) {
/**
* Loader dynamically loads script and css files. It includes the dependency
- * info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * information for the version of the library in use, and will automatically pull in
+ * dependencies for the modules requested. It can also load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
* YUI files.
@@ -111,7 +119,7 @@ if (!YUI.Env[Y.version]) {
var NOT_FOUND = {},
NO_REQUIREMENTS = [],
- MAX_URL_LENGTH = 2048,
+ MAX_URL_LENGTH = 1024,
GLOBAL_ENV = YUI.Env,
GLOBAL_LOADED = GLOBAL_ENV._loaded,
CSS = 'css',
@@ -139,10 +147,6 @@ var NOT_FOUND = {},
return path;
};
-if (YUI.Env.aliases) {
- YUI.Env.aliases = {}; //Don't need aliases if Loader is present
-}
-
/**
* The component metadata is stored in Y.Env.meta.
* Part of the loader module.
@@ -154,111 +158,55 @@ Y.Env.meta = META;
/**
* Loader dynamically loads script and css files. It includes the dependency
* info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * dependencies for the modules requested. It can load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
- * YUI files.
- *
- * While the loader can be instantiated by the end user, it normally is not.
- * @see YUI.use for the normal use case. The use function automatically will
- * pull in missing dependencies.
- *
+ * YUI files. You can also specify an external, custom combo service to host
+ * your modules as well.
+
+ var Y = YUI();
+ var loader = new Y.Loader({
+ filter: 'debug',
+ base: '../../',
+ root: 'build/',
+ combine: true,
+ require: ['node', 'dd', 'console']
+ });
+ var out = loader.resolve(true);
+
* @constructor
* @class Loader
- * @param {object} o an optional set of configuration options. Valid options:
- *
- *
base:
- * The base dir
- *
comboBase:
- * The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?
- *
root:
- * The root path to prepend to module names for the combo service.
- * Ex: 2.5.2/build/
- *
filter:.
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- *
- *
DEBUG
- *
Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget
- *
RAW
- *
Selects the non-minified version of the library (e.g., event.js).
- *
- *
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- *
filters: per-component filter specification. If specified
- * for a given component, this overrides the filter config. _Note:_ This does not work on combo urls, use the filter property instead.
- *
combine:
- * Use the YUI combo service to reduce the number of http connections
- * required to load your dependencies
- *
ignore:
- * A list of modules that should never be dynamically loaded
- *
force:
- * A list of modules that should always be loaded when required, even if
- * already present on the page
- *
insertBefore:
- * Node or id for a node that should be used as the insertion point for
- * new nodes
- *
charset:
- * charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes)
- *
- *
jsAttributes: object literal containing attributes to add to script
- * nodes
- *
cssAttributes: object literal containing attributes to add to link
- * nodes
- *
timeout:
- * The number of milliseconds before a timeout occurs when dynamically
- * loading nodes. If not set, there is no timeout
- *
context:
- * execution context for all callbacks
- *
onSuccess:
- * callback for the 'success' event
- *
onFailure: callback for the 'failure' event
- *
onCSS: callback for the 'CSSComplete' event. When loading YUI
- * components with CSS the CSS is loaded first, then the script. This
- * provides a moment you can tie into to improve
- * the presentation of the page while the script is loading.
- *
onTimeout:
- * callback for the 'timeout' event
- *
onProgress:
- * callback executed each time a script or css file is loaded
- *
modules:
- * A list of module definitions. See Loader.addModule for the supported
- * module metadata
- *
groups:
- * A list of group definitions. Each group can contain specific definitions
- * for base, comboBase, combine, and accepts a list of modules. See above
- * for the description of these properties.
- *
2in3: the version of the YUI 2 in 3 wrapper to use. The intrinsic
- * support for YUI 2 modules in YUI 3 relies on versions of the YUI 2
- * components inside YUI 3 module wrappers. These wrappers
- * change over time to accomodate the issues that arise from running YUI 2
- * in a YUI 3 sandbox.
- *
yui2: when using the 2in3 project, you can select the version of
- * YUI 2 to use. Valid values * are 2.2.2, 2.3.1, 2.4.1, 2.5.2, 2.6.0,
- * 2.7.0, 2.8.0, and 2.8.1 [default] -- plus all versions of YUI 2
- * going forward.
- *
+ * @param {Object} config an optional set of configuration options.
+ * @param {String} config.base The base dir which to fetch this module from
+ * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
+ * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
+ * @param {String|Object} config.filter A filter to apply to result urls. See filter property
+ * @param {Object} config.filters Per-component filter specification. If specified for a given component, this overrides the filter config.
+ * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
+ * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
+ * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
+ * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
+ * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
+ * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
+ * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes. If not set, there is no timeout
+ * @param {Object} config.context Execution context for all callbacks
+ * @param {Function} config.onSuccess Callback for the 'success' event
+ * @param {Function} config.onFailure Callback for the 'failure' event
+ * @param {Function} config.onCSS Callback for the 'CSSComplete' event. When loading YUI components with CSS the CSS is loaded first, then the script. This provides a moment you can tie into to improve the presentation of the page while the script is loading.
+ * @param {Function} config.onTimeout Callback for the 'timeout' event
+ * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
+ * @param {Object} config.modules A list of module definitions. See Loader.addModule for the supported module metadata
+ * @param {Object} config.groups A list of group definitions. Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
+ * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use. The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers. These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
+ * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use. Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
*/
Y.Loader = function(o) {
var defaults = META.modules,
self = this;
+
+ //Catch no config passed.
+ o = o || {};
modulekey = META.md5;
@@ -408,7 +356,7 @@ Y.Loader = function(o) {
* @property ignoreRegistered
* @default false
*/
- // self.ignoreRegistered = false;
+ //self.ignoreRegistered = false;
/**
* Root path to prepend to module path for the combo
@@ -470,12 +418,12 @@ Y.Loader = function(o) {
*
* You can also define a custom filter, which must be an object literal
* containing a search expression and a replace string:
- *
+ *
+ * myFilter: {
+ * 'searchExp': "-min\\.js",
+ * 'replaceStr': "-debug.js"
+ * }
+ *
* @property filter
* @type string| {searchExp: string, replaceStr: string}
*/
@@ -524,29 +472,27 @@ Y.Loader = function(o) {
* being loaded for calendar (if calendar was requested), and
* 'sam' for all other skinnable components:
*
- *
- * skin: {
+ * skin: {
+ * // The default skin, which is automatically applied if not
+ * // overriden by a component-specific skin definition.
+ * // Change this in to apply a different skin globally
+ * defaultSkin: 'sam',
*
- * // The default skin, which is automatically applied if not
- * // overriden by a component-specific skin definition.
- * // Change this in to apply a different skin globally
- * defaultSkin: 'sam',
- *
- * // This is combined with the loader base property to get
- * // the default root directory for a skin. ex:
- * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
- * base: 'assets/skins/',
- *
- * // Any component-specific overrides can be specified here,
- * // making it possible to load different skins for different
- * // components. It is possible to load more than one skin
- * // for a given component as well.
- * overrides: {
- * calendar: ['skin1', 'skin2']
+ * // This is combined with the loader base property to get
+ * // the default root directory for a skin. ex:
+ * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
+ * base: 'assets/skins/',
+ *
+ * // Any component-specific overrides can be specified here,
+ * // making it possible to load different skins for different
+ * // components. It is possible to load more than one skin
+ * // for a given component as well.
+ * overrides: {
+ * calendar: ['skin1', 'skin2']
+ * }
* }
- * }
- *
- * @property skin
+ * @property skin
+ * @type {Object}
*/
self.skin = Y.merge(Y.Env.meta.skin);
@@ -567,27 +513,30 @@ Y.Loader = function(o) {
if (cache) {
oeach(cache, function modCache(v, k) {
- //self.moduleInfo[k] = Y.merge(v);
- self.moduleInfo[k] = v;
+ self.moduleInfo[k] = Y.merge(v);
});
cache = GLOBAL_ENV._conditions;
oeach(cache, function condCache(v, k) {
- //self.conditions[k] = Y.merge(v);
- self.conditions[k] = v;
+ self.conditions[k] = Y.merge(v);
});
} else {
oeach(defaults, self.addModule, self);
}
- if (!GLOBAL_ENV._renderedMods) {
- //GLOBAL_ENV._renderedMods = Y.merge(self.moduleInfo);
- //GLOBAL_ENV._conditions = Y.merge(self.conditions);
- GLOBAL_ENV._renderedMods = self.moduleInfo;
- GLOBAL_ENV._conditions = self.conditions;
- }
+
+ /**
+ * Set when beginning to compute the dependency tree.
+ * Composed of what YUI reports to be loaded combined
+ * with what has been loaded by any instance on the page
+ * with the version number specified in the metadata.
+ * @property loaded
+ * @type {string: boolean}
+ */
+ self.loaded = GLOBAL_LOADED[VERSION];
+
self._inspectPage();
@@ -595,6 +544,8 @@ Y.Loader = function(o) {
self._config(o);
+ self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
+
self.testresults = null;
if (Y.config.tests) {
@@ -625,16 +576,6 @@ Y.Loader = function(o) {
*/
self.sorted = [];
- /**
- * Set when beginning to compute the dependency tree.
- * Composed of what YUI reports to be loaded combined
- * with what has been loaded by any instance on the page
- * with the version number specified in the metadata.
- * @property loaded
- * @type {string: boolean}
- */
- self.loaded = GLOBAL_LOADED[VERSION];
-
/*
* A list of modules to attach to the YUI instance when complete.
* If not supplied, the sorted list of dependencies are applied.
@@ -679,7 +620,25 @@ Y.Loader = function(o) {
};
Y.Loader.prototype = {
+ /**
+ Regex that matches a CSS URL. Used to guess the file type when it's not
+ specified.
+ @property REGEX_CSS
+ @type RegExp
+ @final
+ @protected
+ @since 3.5.0
+ **/
+ REGEX_CSS: /\.css(?:[?;].*)?$/i,
+
+ /**
+ * Default filters for raw and debug
+ * @property FILTER_DEFS
+ * @type Object
+ * @final
+ * @protected
+ */
FILTER_DEFS: {
RAW: {
'searchExp': '-min\\.js',
@@ -696,6 +655,17 @@ Y.Loader.prototype = {
* @private
*/
_inspectPage: function() {
+
+ //Inspect the page for CSS only modules and mark them as loaded.
+ oeach(this.moduleInfo, function(v, k) {
+ if (v.type && v.type === CSS) {
+ if (this.isCSSLoaded(v.name)) {
+ Y.log('Found CSS module on page: ' + v.name, 'info', 'loader');
+ this.loaded[k] = true;
+ }
+ }
+ }, this);
+
oeach(ON_PAGE, function(v, k) {
if (v.details) {
var m = this.moduleInfo[k],
@@ -704,9 +674,7 @@ Y.Loader.prototype = {
if (m) {
if (!m._inspected && req && mr.length != req.length) {
// console.log('deleting ' + m.name);
- // m.requres = YObject.keys(Y.merge(YArray.hash(req), YArray.hash(mr)));
delete m.expanded;
- // delete m.expanded_map;
}
} else {
m = this.addModule(v.details, k);
@@ -784,6 +752,7 @@ Y.Loader.prototype = {
/**
* Apply a new config to the Loader instance
* @method _config
+ * @private
* @param {Object} o The new configuration
*/
_config: function(o) {
@@ -796,25 +765,37 @@ Y.Loader.prototype = {
if (i == 'require') {
self.require(val);
} else if (i == 'skin') {
- Y.mix(self.skin, o[i], true);
+ //If the config.skin is a string, format to the expected object
+ if (typeof val === 'string') {
+ self.skin.defaultSkin = o.skin;
+ val = {
+ defaultSkin: val
+ };
+ }
+
+ Y.mix(self.skin, val, true);
} else if (i == 'groups') {
for (j in val) {
if (val.hasOwnProperty(j)) {
+ // Y.log('group: ' + j);
groupName = j;
group = val[j];
self.addGroup(group, groupName);
+ if (group.aliases) {
+ oeach(group.aliases, self.addAlias, self);
+ }
}
}
} else if (i == 'modules') {
// add a hash of module definitions
oeach(val, self.addModule, self);
+ } else if (i === 'aliases') {
+ oeach(val, self.addAlias, self);
} else if (i == 'gallery') {
- this.groups.gallery.update(val);
+ this.groups.gallery.update(val, o);
} else if (i == 'yui2' || i == '2in3') {
- this.groups.yui2.update(o['2in3'], o.yui2);
- } else if (i == 'maxURLLength') {
- self[i] = Math.min(MAX_URL_LENGTH, val);
+ this.groups.yui2.update(o['2in3'], o.yui2, o);
} else {
self[i] = val;
}
@@ -833,9 +814,12 @@ Y.Loader.prototype = {
self.require('yui-log', 'dump');
}
}
+
if (self.lang) {
- self.require('intl-base', 'intl');
+ //Removed this so that when Loader is invoked
+ //it doesn't request what it doesn't need.
+ //self.require('intl-base', 'intl');
}
},
@@ -897,26 +881,54 @@ Y.Loader.prototype = {
}
this.addModule(nmod, name);
+ Y.log('Adding skin (' + name + '), ' + parent + ', ' + pkg + ', ' + info[name].path, 'info', 'loader');
}
}
return name;
},
-
+ /**
+ * Adds an alias module to the system
+ * @method addAlias
+ * @param {Array} use An array of modules that makes up this alias
+ * @param {String} name The name of the alias
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addAlias([ 'node', 'yql' ], 'davglass');
+ * loader.require(['davglass']);
+ * var out = loader.resolve(true);
+ *
+ * //out.js will contain Node and YQL modules
+ */
+ addAlias: function(use, name) {
+ YUI.Env.aliases[name] = use;
+ this.addModule({
+ name: name,
+ use: use
+ });
+ },
/**
* Add a new module group
- *
- *
name:
required, the group name
- *
base:
The base dir for this module group
- *
root:
The root path to add to each combo
- * resource path
- *
combine:
combo handle
- *
comboBase:
combo service base path
- *
modules:
the group of modules
- *
* @method addGroup
- * @param {object} o An object containing the module data.
- * @param {string} name the group name.
+ * @param {Object} config An object containing the group configuration data
+ * @param {String} config.name required, the group name
+ * @param {String} config.base The base directory for this module group
+ * @param {String} config.root The root path to add to each combo resource path
+ * @param {Boolean} config.combine Should the request be combined
+ * @param {String} config.comboBase Combo service base path
+ * @param {Object} config.modules The group of modules
+ * @param {String} name the group name.
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addGroup({
+ * name: 'davglass',
+ * combine: true,
+ * comboBase: '/combo?',
+ * root: '',
+ * modules: {
+ * //Module List here
+ * }
+ * }, 'davglass');
*/
addGroup: function(o, name) {
var mods = o.modules,
@@ -934,6 +946,9 @@ Y.Loader.prototype = {
if (mods) {
oeach(mods, function(v, k) {
+ if (typeof v === 'string') {
+ v = { name: k, fullpath: v };
+ }
v.group = name;
self.addModule(v, k);
}, self);
@@ -942,58 +957,40 @@ Y.Loader.prototype = {
/**
* Add a new module to the component metadata.
- *
- *
name:
required, the component name
- *
type:
required, the component type (js or css)
- *
- *
path:
required, the path to the script from
- * "base"
- *
requires:
array of modules required by this
- * component
- *
optional:
array of optional modules for this
- * component
- *
supersedes:
array of the modules this component
- * replaces
- *
after:
array of modules the components which, if
- * present, should be sorted above this one
- *
after_map:
faster alternative to 'after' -- supply
- * a hash instead of an array
- *
rollup:
the number of superseded modules required
- * for automatic rollup
- *
fullpath:
If fullpath is specified, this is used
- * instead of the configured base + path
- *
skinnable:
flag to determine if skin assets should
- * automatically be pulled in
- *
submodules:
a hash of submodules
- *
group:
The group the module belongs to -- this
- * is set automatically when it is added as part of a group
- * configuration.
- *
lang:
- *
array of BCP 47 language tags of languages for which this
- * module has localized resource bundles,
- * e.g., ["en-GB","zh-Hans-CN"]
- *
condition:
- *
Specifies that the module should be loaded automatically if
- * a condition is met. This is an object with up to three fields:
- * [trigger] - the name of a module that can trigger the auto-load
- * [test] - a function that returns true when the module is to be
- * loaded.
- * [when] - specifies the load order of the conditional module
- * with regard to the position of the trigger module.
- * This should be one of three values: 'before', 'after', or
- * 'instead'. The default is 'after'.
- *
- *
testresults:
a hash of test results from Y.Features.all()
- *
* @method addModule
- * @param {object} o An object containing the module data.
- * @param {string} name the module name (optional), required if not
- * in the module data.
- * @return {object} the module definition or null if
- * the object passed in did not provide all required attributes.
+ * @param {Object} config An object containing the module data.
+ * @param {String} config.name Required, the component name
+ * @param {String} config.type Required, the component type (js or css)
+ * @param {String} config.path Required, the path to the script from `base`
+ * @param {Array} config.requires Array of modules required by this component
+ * @param {Array} [config.optional] Array of optional modules for this component
+ * @param {Array} [config.supersedes] Array of the modules this component replaces
+ * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
+ * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
+ * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
+ * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
+ * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
+ * @param {Object} [config.submodules] Hash of submodules
+ * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
+ * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
+ * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to three fields:
+ * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
+ * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
+ * @param {String} [config.condition.when] Specifies the load order of the conditional module
+ * with regard to the position of the trigger module.
+ * This should be one of three values: `before`, `after`, or `instead`. The default is `after`.
+ * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
+ * @param {Function} [config.configFn] A function to exectute when configuring this module
+ * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
+ * @param {String} [name] The module name, required if not in the module data.
+ * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
*/
addModule: function(o, name) {
name = name || o.name;
+
+ if (typeof o === 'string') {
+ o = { name: name, fullpath: o };
+ }
//Only merge this data if the temp flag is set
//from an earlier pass from a pattern or else
@@ -1015,7 +1012,13 @@ Y.Loader.prototype = {
}
if (!o.type) {
+ //Always assume it's javascript unless the CSS pattern is matched.
o.type = JS;
+ var p = o.path || o.fullpath;
+ if (p && this.REGEX_CSS.test(p)) {
+ Y.log('Auto determined module type as CSS', 'warn', 'loader');
+ o.type = CSS;
+ }
}
if (!o.path && !o.fullpath) {
@@ -1024,7 +1027,6 @@ Y.Loader.prototype = {
o.supersedes = o.supersedes || o.use;
o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
- o.requires = this.filterRequires(o.requires) || [];
// Handle submodule logic
var subs = o.submodules, i, l, t, sup, s, smod, plugins, plug,
@@ -1032,9 +1034,18 @@ Y.Loader.prototype = {
overrides, skinname, when,
conditions = this.conditions, trigger;
// , existing = this.moduleInfo[name], newr;
-
+
this.moduleInfo[name] = o;
+ o.requires = o.requires || [];
+
+ if (o.skinnable) {
+ skinname = this._addSkin(this.skin.defaultSkin, name);
+ o.requires.unshift(skinname);
+ }
+
+ o.requires = this.filterRequires(o.requires) || [];
+
if (!o.langPack && o.lang) {
langs = YArray(o.lang);
for (j = 0; j < langs.length; j++) {
@@ -1047,6 +1058,7 @@ Y.Loader.prototype = {
}
}
+
if (subs) {
sup = o.supersedes || [];
l = 0;
@@ -1111,6 +1123,7 @@ Y.Loader.prototype = {
o.lang.push(lang);
}
+// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
// default packages
@@ -1127,6 +1140,7 @@ Y.Loader.prototype = {
smod.supersedes.push(supName);
}
+// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
}
@@ -1192,7 +1206,12 @@ Y.Loader.prototype = {
}
}
+ if (o.supersedes) {
+ o.supersedes = this.filterRequires(o.supersedes);
+ }
+
if (o.after) {
+ o.after = this.filterRequires(o.after);
o.after_map = YArray.hash(o.after);
}
@@ -1201,10 +1220,20 @@ Y.Loader.prototype = {
if (o.configFn) {
ret = o.configFn(o);
if (ret === false) {
+ Y.log('Config function returned false for ' + name + ', skipping.', 'info', 'loader');
delete this.moduleInfo[name];
+ delete GLOBAL_ENV._renderedMods[name];
o = null;
}
}
+ //Add to global cache
+ if (o) {
+ if (!GLOBAL_ENV._renderedMods) {
+ GLOBAL_ENV._renderedMods = {};
+ }
+ GLOBAL_ENV._renderedMods[name] = Y.merge(o);
+ GLOBAL_ENV._conditions = conditions;
+ }
return o;
},
@@ -1298,12 +1327,20 @@ Y.Loader.prototype = {
*/
getRequires: function(mod) {
- if (!mod || mod._parsed) {
+ if (!mod) {
+ //console.log('returning no reqs for ' + mod.name);
return NO_REQUIREMENTS;
}
+ if (mod._parsed) {
+ //console.log('returning requires for ' + mod.name, mod.requires);
+ return mod.expanded || NO_REQUIREMENTS;
+ }
+
+ //TODO add modue cache here out of scope..
+
var i, m, j, add, packName, lang, testresults = this.testresults,
- name = mod.name, cond, go,
+ name = mod.name, cond,
adddef = ON_PAGE[name] && ON_PAGE[name].details,
d, k, m1,
r, old_mod,
@@ -1328,13 +1365,13 @@ Y.Loader.prototype = {
// if (mod.expanded && (!mod.langCache || mod.langCache == this.lang)) {
if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
+ //Y.log('Already expanded ' + name + ', ' + mod.expanded);
return mod.expanded;
}
d = [];
hash = {};
-
r = this.filterRequires(mod.requires);
if (mod.lang) {
//If a module has a lang attribute, auto add the intl requirement.
@@ -1344,11 +1381,14 @@ Y.Loader.prototype = {
}
o = this.filterRequires(mod.optional);
+ // Y.log("getRequires: " + name + " (dirty:" + this.dirty +
+ // ", expanded:" + mod.expanded + ")");
mod._parsed = true;
mod.langCache = this.lang;
for (i = 0; i < r.length; i++) {
+ //Y.log(name + ' requiring ' + r[i], 'info', 'loader');
if (!hash[r[i]]) {
d.push(r[i]);
hash[r[i]] = true;
@@ -1413,6 +1453,8 @@ Y.Loader.prototype = {
cond = this.conditions[name];
if (cond) {
+ //Set the module to not parsed since we have conditionals and this could change the dependency tree.
+ mod._parsed = false;
if (testresults && ftests) {
oeach(testresults, function(result, id) {
var condmod = ftests[id].name;
@@ -1426,8 +1468,12 @@ Y.Loader.prototype = {
} else {
oeach(cond, function(def, condmod) {
if (!hash[condmod]) {
- go = def && ((def.ua && Y.UA[def.ua]) ||
- (def.test && def.test(Y, r)));
+ //first see if they've specfied a ua check
+ //then see if they've got a test fn & if it returns true
+ //otherwise just having a condition block is enough
+ var go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
+ (def.test && def.test(Y, r)));
+
if (go) {
hash[condmod] = true;
d.push(condmod);
@@ -1437,6 +1483,7 @@ Y.Loader.prototype = {
for (j = 0; j < add.length; j++) {
d.push(add[j]);
}
+
}
}
}
@@ -1459,11 +1506,15 @@ Y.Loader.prototype = {
}
for (i = 0; i < skindef[skinname].length; i++) {
skinmod = this._addSkin(skindef[skinname][i], name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
} else {
skinmod = this._addSkin(this.skin.defaultSkin, name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
}
@@ -1473,6 +1524,7 @@ Y.Loader.prototype = {
if (mod.lang && !mod.langPack && Y.Intl) {
lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
+ //Y.log('Best lang: ' + lang + ', this.lang: ' + this.lang + ', mod.lang: ' + mod.lang);
packName = this.getLangPackName(lang, name);
if (packName) {
d.unshift(packName);
@@ -1487,7 +1539,39 @@ Y.Loader.prototype = {
return mod.expanded;
},
+ /**
+ * Check to see if named css module is already loaded on the page
+ * @method isCSSLoaded
+ * @param {String} name The name of the css file
+ * @return Boolean
+ */
+ isCSSLoaded: function(name, skip) {
+ //TODO - Make this call a batching call with name being an array
+ if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
+ Y.log('isCSSLoaded was skipped for ' + name, 'warn', 'loader');
+ return false;
+ }
+ var el = YUI.Env.cssStampEl,
+ ret = false,
+ style = el.currentStyle; //IE
+
+ //Add the classname to the element
+ el.className = name;
+
+ if (!style) {
+ style = Y.config.doc.defaultView.getComputedStyle(el, null);
+ }
+
+ if (style && style['display'] === 'none') {
+ ret = true;
+ }
+
+ Y.log('Has Skin? ' + name + ' : ' + ret, 'info', 'loader');
+
+ el.className = ''; //Reset the classname to ''
+ return ret;
+ },
/**
* Returns a hash of module names the supplied module satisfies.
@@ -1553,6 +1637,7 @@ Y.Loader.prototype = {
/**
* Creates a "psuedo" package for languages provided in the lang array
* @method _addLangPack
+ * @private
* @param {String} lang The language to create
* @param {Object} m The module definition to create the language pack around
* @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
@@ -1560,19 +1645,27 @@ Y.Loader.prototype = {
*/
_addLangPack: function(lang, m, packName) {
var name = m.name,
- packPath,
+ packPath, conf,
existing = this.moduleInfo[packName];
if (!existing) {
packPath = _path((m.pkg || name), packName, JS, true);
- this.addModule({ path: packPath,
- intl: true,
- langPack: true,
- ext: m.ext,
- group: m.group,
- supersedes: [] }, packName);
+ conf = {
+ path: packPath,
+ intl: true,
+ langPack: true,
+ ext: m.ext,
+ group: m.group,
+ supersedes: []
+ };
+
+ if (m.configFn) {
+ conf.configFn = m.configFn;
+ }
+
+ this.addModule(conf, packName);
if (lang) {
Y.Env.lang = Y.Env.lang || {};
@@ -1669,6 +1762,7 @@ Y.Loader.prototype = {
* @private
*/
_explode: function() {
+ //TODO Move done out of scope
var r = this.required, m, reqs, done = {},
self = this;
@@ -1697,6 +1791,7 @@ Y.Loader.prototype = {
}
});
+ // Y.log('After explode: ' + YObject.keys(r));
},
/**
* Get's the loader meta data for the requested module
@@ -1717,13 +1812,23 @@ Y.Loader.prototype = {
// check the patterns library to see if we should automatically add
// the module with defaults
if (!m) {
+ // Y.log('testing patterns ' + YObject.keys(patterns));
for (pname in patterns) {
if (patterns.hasOwnProperty(pname)) {
+ // Y.log('testing pattern ' + i);
p = patterns[pname];
+
+ //There is no test method, create a default one that tests
+ // the pattern against the mod name
+ if (!p.test) {
+ p.test = function(mname, pname) {
+ return (mname.indexOf(pname) > -1);
+ };
+ }
- // use the metadata supplied for the pattern
- // as the module definition.
- if (mname.indexOf(pname) > -1) {
+ if (p.test(mname, pname)) {
+ // use the metadata supplied for the pattern
+ // as the module definition.
found = p;
break;
}
@@ -1732,8 +1837,11 @@ Y.Loader.prototype = {
if (found) {
if (p.action) {
+ // Y.log('executing pattern action: ' + pname);
p.action.call(this, mname, pname);
} else {
+Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
+ pname, 'info', 'loader');
// ext true or false?
m = this.addModule(Y.merge(found), mname);
m.temp = true;
@@ -1795,6 +1903,8 @@ Y.Loader.prototype = {
* @param {Boolean} success A boolean denoting success or failure
*/
_finish: function(msg, success) {
+ Y.log('loader finishing: ' + msg + ', ' + Y.id + ', ' +
+ this.data, 'info', 'loader');
_queue.running = false;
@@ -1848,12 +1958,35 @@ Y.Loader.prototype = {
self._finish(msg, success);
},
/**
+ * The default Loader onProgress handler, calls this.onProgress with a payload
+ * @method _onProgress
+ * @private
+ */
+ _onProgress: function(e) {
+ var self = this;
+ if (self.onProgress) {
+ self.onProgress.call(self.context, {
+ name: e.url,
+ data: e.data
+ });
+ }
+ },
+ /**
* The default Loader onFailure handler, calls this.onFailure with a payload
* @method _onFailure
* @private
*/
_onFailure: function(o) {
- var f = this.onFailure, msg = 'failure: ' + o.msg;
+ var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
+
+ for (i; i < len; i++) {
+ msg.push(o.errors[i].error);
+ }
+
+ msg = msg.join(',');
+
+ Y.log('load error: ' + msg + ', ' + Y.id, 'error', 'loader');
+
if (f) {
f.call(this.context, {
msg: msg,
@@ -1861,7 +1994,9 @@ Y.Loader.prototype = {
success: false
});
}
+
this._finish(msg, false);
+
},
/**
@@ -1870,6 +2005,7 @@ Y.Loader.prototype = {
* @private
*/
_onTimeout: function() {
+ Y.log('loader timeout: ' + Y.id, 'error', 'loader');
var f = this.onTimeout;
if (f) {
f.call(this.context, {
@@ -1878,7 +2014,6 @@ Y.Loader.prototype = {
success: false
});
}
- this._finish('timeout', false);
},
/**
@@ -1891,6 +2026,7 @@ Y.Loader.prototype = {
// create an indexed list
var s = YObject.keys(this.required),
// loaded = this.loaded,
+ //TODO Move this out of scope
done = {},
p = 0, l, a, b, j, k, moved, doneKey;
@@ -1951,18 +2087,11 @@ Y.Loader.prototype = {
this.sorted = s;
},
- /**
- * (Unimplemented)
- * @method partial
- * @unimplemented
- */
- partial: function(partial, o, type) {
- this.sorted = partial;
- this.insert(o, type, true);
- },
+
/**
* Handles the actual insertion of script/link tags
* @method _insert
+ * @private
* @param {Object} source The YUI instance the request came from
* @param {Object} o The metadata to include
* @param {String} type JS or CSS
@@ -1970,6 +2099,7 @@ Y.Loader.prototype = {
*/
_insert: function(source, o, type, skipcalc) {
+ Y.log('private _insert() ' + (type || '') + ', ' + Y.id, "info", "loader");
// restore the state at the time of the request
if (source) {
@@ -1983,53 +2113,124 @@ Y.Loader.prototype = {
this.calculate(o);
}
- this.loadType = type;
+ var modules = this.resolve(),
+ self = this, comp = 0, actions = 0;
- if (!type) {
-
- var self = this;
-
- this._internalCallback = function() {
-
- var f = self.onCSS, n, p, sib;
-
- // IE hack for style overrides that are not being applied
- if (this.insertBefore && Y.UA.ie) {
- n = Y.config.doc.getElementById(this.insertBefore);
- p = n.parentNode;
- sib = n.nextSibling;
- p.removeChild(n);
- if (sib) {
- p.insertBefore(n, sib);
- } else {
- p.appendChild(n);
- }
- }
-
- if (f) {
- f.call(self.context, Y);
- }
- self._internalCallback = null;
-
- self._insert(null, null, JS);
- };
-
- this._insert(null, null, CSS);
-
- return;
+ if (type) {
+ //Filter out the opposite type and reset the array so the checks later work
+ modules[((type === JS) ? CSS : JS)] = [];
+ }
+ if (modules.js.length) {
+ comp++;
+ }
+ if (modules.css.length) {
+ comp++;
}
- // set a flag to indicate the load has started
+ //console.log('Resolved Modules: ', modules);
+
+ var complete = function(d) {
+ actions++;
+ var errs = {}, i = 0, u = '', fn;
+
+ if (d && d.errors) {
+ for (i = 0; i < d.errors.length; i++) {
+ if (d.errors[i].request) {
+ u = d.errors[i].request.url;
+ } else {
+ u = d.errors[i];
+ }
+ errs[u] = u;
+ }
+ }
+
+ if (d && d.data && d.data.length && (d.type === 'success')) {
+ for (i = 0; i < d.data.length; i++) {
+ self.inserted[d.data[i].name] = true;
+ }
+ }
+
+ if (actions === comp) {
+ self._loading = null;
+ Y.log('Loader actions complete!', 'info', 'loader');
+ if (d && d.fn) {
+ Y.log('Firing final Loader callback!', 'info', 'loader');
+ fn = d.fn;
+ delete d.fn;
+ fn.call(self, d);
+ }
+ }
+ };
+
this._loading = true;
- // flag to indicate we are done with the combo service
- // and any additional files will need to be loaded
- // individually
- this._combineComplete = {};
+ if (!modules.js.length && !modules.css.length) {
+ Y.log('No modules resolved..', 'warn', 'loader');
+ actions = -1;
+ complete({
+ fn: self._onSuccess
+ });
+ return;
+ }
+
- // start the load
- this.loadNext();
+ if (modules.css.length) { //Load CSS first
+ Y.log('Loading CSS modules', 'info', 'loader');
+ Y.Get.css(modules.css, {
+ data: modules.cssMods,
+ attributes: self.cssAttributes,
+ insertBefore: self.insertBefore,
+ charset: self.charset,
+ timeout: self.timeout,
+ context: self,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
+ if (modules.js.length) {
+ Y.log('Loading JS modules', 'info', 'loader');
+ Y.Get.js(modules.js, {
+ data: modules.jsMods,
+ insertBefore: self.insertBefore,
+ attributes: self.jsAttributes,
+ charset: self.charset,
+ timeout: self.timeout,
+ autopurge: false,
+ context: self,
+ async: true,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
},
/**
* Once a loader operation is completely finished, process any additional queued items.
@@ -2052,6 +2253,8 @@ Y.Loader.prototype = {
* @param {string} type the type of dependency to insert.
*/
insert: function(o, type, skipsort) {
+ Y.log('public insert() ' + (type || '') + ', ' +
+ Y.Object.keys(this.required), "info", "loader");
var self = this, copy = Y.merge(this);
delete copy.require;
delete copy.dirty;
@@ -2067,263 +2270,14 @@ Y.Loader.prototype = {
* is possible to call this if using a method other than
* Y.register to determine when scripts are fully loaded
* @method loadNext
+ * @deprecated
* @param {string} mname optional the name of the module that has
* been loaded (which is usually why it is time to load the next
* one).
*/
loadNext: function(mname) {
- // It is possible that this function is executed due to something
- // else on the page loading a YUI module. Only react when we
- // are actively loading something
- if (!this._loading) {
- return;
- }
-
- var s, len, i, m, url, fn, msg, attr, group, groupName, j, frag,
- comboSource, comboSources, mods, combining, urls, comboBase,
- self = this,
- type = self.loadType,
- handleSuccess = function(o) {
- self.loadNext(o.data);
- },
- handleCombo = function(o) {
- self._combineComplete[type] = true;
- var i, len = combining.length;
-
- for (i = 0; i < len; i++) {
- self.inserted[combining[i]] = true;
- }
-
- handleSuccess(o);
- };
-
- if (self.combine && (!self._combineComplete[type])) {
-
- combining = [];
-
- self._combining = combining;
- s = self.sorted;
- len = s.length;
-
- // the default combo base
- comboBase = self.comboBase;
-
- url = comboBase;
- urls = [];
-
- comboSources = {};
-
- for (i = 0; i < len; i++) {
- comboSource = comboBase;
- m = self.getModule(s[i]);
- groupName = m && m.group;
- if (groupName) {
-
- group = self.groups[groupName];
-
- if (!group.combine) {
- m.combine = false;
- continue;
- }
- m.combine = true;
- if (group.comboBase) {
- comboSource = group.comboBase;
- }
-
- if ("root" in group && L.isValue(group.root)) {
- m.root = group.root;
- }
-
- }
-
- comboSources[comboSource] = comboSources[comboSource] || [];
- comboSources[comboSource].push(m);
- }
-
- for (j in comboSources) {
- if (comboSources.hasOwnProperty(j)) {
- url = j;
- mods = comboSources[j];
- len = mods.length;
-
- for (i = 0; i < len; i++) {
- // m = self.getModule(s[i]);
- m = mods[i];
-
- // Do not try to combine non-yui JS unless combo def
- // is found
- if (m && (m.type === type) && (m.combine || !m.ext)) {
-
- frag = ((L.isValue(m.root)) ? m.root : self.root) + m.path;
- frag = self._filter(frag, m.name);
- if ((url !== j) && (i <= (len - 1)) &&
- ((frag.length + url.length) > self.maxURLLength)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- url = j;
- }
-
- url += frag;
- if (i < (len - 1)) {
- url += self.comboSep;
- }
-
- combining.push(m.name);
- }
-
- }
-
- if (combining.length && (url != j)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- }
- }
- }
-
- if (combining.length) {
-
-
- // if (m.type === CSS) {
- if (type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- fn(urls, {
- data: self._loading,
- onSuccess: handleCombo,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
-
- } else {
- self._combineComplete[type] = true;
- }
- }
-
- if (mname) {
-
- // if the module that was just loaded isn't what we were expecting,
- // continue to wait
- if (mname !== self._loading) {
- return;
- }
-
-
- // The global handler that is called when each module is loaded
- // will pass that module name to this function. Storing this
- // data to avoid loading the same module multiple times
- // centralize this in the callback
- self.inserted[mname] = true;
- // self.loaded[mname] = true;
-
- // provided = self.getProvides(mname);
- // Y.mix(self.loaded, provided);
- // Y.mix(self.inserted, provided);
-
- if (self.onProgress) {
- self.onProgress.call(self.context, {
- name: mname,
- data: self.data
- });
- }
- }
-
- s = self.sorted;
- len = s.length;
-
- for (i = 0; i < len; i = i + 1) {
- // this.inserted keeps track of what the loader has loaded.
- // move on if this item is done.
- if (s[i] in self.inserted) {
- continue;
- }
-
- // Because rollups will cause multiple load notifications
- // from Y, loadNext may be called multiple times for
- // the same module when loading a rollup. We can safely
- // skip the subsequent requests
- if (s[i] === self._loading) {
- return;
- }
-
- // log("inserting " + s[i]);
- m = self.getModule(s[i]);
-
- if (!m) {
- if (!self.skipped[s[i]]) {
- msg = 'Undefined module ' + s[i] + ' skipped';
- // self.inserted[s[i]] = true;
- self.skipped[s[i]] = true;
- }
- continue;
-
- }
-
- group = (m.group && self.groups[m.group]) || NOT_FOUND;
-
- // The load type is stored to offer the possibility to load
- // the css separately from the script.
- if (!type || type === m.type) {
- self._loading = s[i];
-
- if (m.type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
- self._url(m.path, s[i], group.base || m.base);
-
- fn(url, {
- data: s[i],
- onSuccess: handleSuccess,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
- }
- }
-
- // we are finished
- self._loading = null;
-
- fn = self._internalCallback;
-
- // internal callback for loading css first
- if (fn) {
- self._internalCallback = null;
- fn.call(self);
- } else {
- self._onSuccess();
- }
+ Y.log('loadNext was called..', 'error', 'loader');
+ return;
},
/**
@@ -2335,15 +2289,16 @@ Y.Loader.prototype = {
* @return {string} the filtered string.
* @private
*/
- _filter: function(u, name) {
+ _filter: function(u, name, group) {
var f = this.filter,
hasFilter = name && (name in this.filters),
modFilter = hasFilter && this.filters[name],
- groupName = this.moduleInfo[name] ? this.moduleInfo[name].group:null;
- if (groupName && this.groups[groupName].filter) {
- modFilter = this.groups[groupName].filter;
- hasFilter = true;
- };
+ groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
+
+ if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
+ modFilter = this.groups[groupName].filter;
+ hasFilter = true;
+ };
if (u) {
if (hasFilter) {
@@ -2364,7 +2319,7 @@ Y.Loader.prototype = {
* @method _url
* @param {string} path the path fragment.
* @param {String} name The name of the module
- * @pamra {String} [base=self.base] The base url to use
+ * @param {String} [base=self.base] The base url to use
* @return {string} the full url.
* @private
*/
@@ -2391,71 +2346,222 @@ Y.Loader.prototype = {
*
*/
resolve: function(calc, s) {
- var self = this, i, m, url, out = { js: [], css: [] };
+
+ var len, i, m, url, fn, msg, attr, group, groupName, j, frag,
+ comboSource, comboSources, mods, comboBase,
+ base, urls, u = [], tmpBase, baseLen, resCombos = {},
+ self = this, comboSep, maxURLLength, singles = [],
+ inserted = (self.ignoreRegistered) ? {} : self.inserted,
+ resolved = { js: [], jsMods: [], css: [], cssMods: [] },
+ type = self.loadType || 'js';
if (calc) {
self.calculate();
}
s = s || self.sorted;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
+ var addSingle = function(m) {
+
if (m) {
- if (self.combine) {
- url = self._filter((self.root + m.path), m.name, self.root);
- } else {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
+ group = (m.group && self.groups[m.group]) || NOT_FOUND;
+
+ //Always assume it's async
+ if (group.async === false) {
+ m.async = group.async;
}
- out[m.type].push(url);
+
+ url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
+ self._url(m.path, s[i], group.base || m.base);
+
+ if (m.attributes || m.async === false) {
+ url = {
+ url: url,
+ async: m.async
+ };
+ if (m.attributes) {
+ url.attributes = m.attributes
+ }
+ }
+ resolved[m.type].push(url);
+ resolved[m.type + 'Mods'].push(m);
+ } else {
+ Y.log('Undefined Module', 'warn', 'loader');
}
- }
- if (self.combine) {
- out.js = [self.comboBase + out.js.join(self.comboSep)];
- out.css = [self.comboBase + out.css.join(self.comboSep)];
+
+ };
+
+ len = s.length;
+
+ // the default combo base
+ comboBase = self.comboBase;
+
+ url = comboBase;
+
+ comboSources = {};
+
+ for (i = 0; i < len; i++) {
+ comboSource = comboBase;
+ m = self.getModule(s[i]);
+ groupName = m && m.group;
+ group = self.groups[groupName];
+ if (groupName && group) {
+
+ if (!group.combine || m.fullpath) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ m.combine = true;
+ if (group.comboBase) {
+ comboSource = group.comboBase;
+ }
+
+ if ("root" in group && L.isValue(group.root)) {
+ m.root = group.root;
+ }
+ m.comboSep = group.comboSep || self.comboSep;
+ m.maxURLLength = group.maxURLLength || self.maxURLLength;
+ } else {
+ if (!self.combine) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ }
+
+ comboSources[comboSource] = comboSources[comboSource] || [];
+ comboSources[comboSource].push(m);
}
- return out;
+ for (j in comboSources) {
+ if (comboSources.hasOwnProperty(j)) {
+ resCombos[j] = resCombos[j] || { js: [], jsMods: [], css: [], cssMods: [] };
+ url = j;
+ mods = comboSources[j];
+ len = mods.length;
+
+ if (len) {
+ for (i = 0; i < len; i++) {
+ if (inserted[mods[i]]) {
+ continue;
+ }
+ m = mods[i];
+ // Do not try to combine non-yui JS unless combo def
+ // is found
+ if (m && (m.combine || !m.ext)) {
+ resCombos[j].comboSep = m.comboSep;
+ resCombos[j].group = m.group;
+ resCombos[j].maxURLLength = m.maxURLLength;
+ frag = ((L.isValue(m.root)) ? m.root : self.root) + (m.path || m.fullpath);
+ frag = self._filter(frag, m.name);
+ resCombos[j][m.type].push(frag);
+ resCombos[j][m.type + 'Mods'].push(m);
+ } else {
+ //Add them to the next process..
+ if (mods[i]) {
+ //singles.push(mods[i].name);
+ addSingle(mods[i]);
+ }
+ }
+
+ }
+ }
+ }
+ }
+
+
+ for (j in resCombos) {
+ base = j;
+ comboSep = resCombos[base].comboSep || self.comboSep;
+ maxURLLength = resCombos[base].maxURLLength || self.maxURLLength;
+ Y.log('Using maxURLLength of ' + maxURLLength, 'info', 'loader');
+ for (type in resCombos[base]) {
+ if (type === JS || type === CSS) {
+ urls = resCombos[base][type];
+ mods = resCombos[base][type + 'Mods'];
+ len = urls.length;
+ tmpBase = base + urls.join(comboSep);
+ baseLen = tmpBase.length;
+ if (maxURLLength <= base.length) {
+ Y.log('maxURLLength (' + maxURLLength + ') is lower than the comboBase length (' + base.length + '), resetting to default (' + MAX_URL_LENGTH + ')', 'error', 'loader');
+ maxURLLength = MAX_URL_LENGTH;
+ }
+
+ if (len) {
+ if (baseLen > maxURLLength) {
+ Y.log('Exceeded maxURLLength (' + maxURLLength + ') for ' + type + ', splitting', 'info', 'loader');
+ u = [];
+ for (s = 0; s < len; s++) {
+ u.push(urls[s]);
+ tmpBase = base + u.join(comboSep);
+
+ if (tmpBase.length > maxURLLength) {
+ m = u.pop();
+ tmpBase = base + u.join(comboSep)
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ u = [];
+ if (m) {
+ u.push(m);
+ }
+ }
+ }
+ if (u.length) {
+ tmpBase = base + u.join(comboSep);
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ } else {
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ }
+ resolved[type + 'Mods'] = resolved[type + 'Mods'].concat(mods);
+ }
+ }
+ }
+
+ resCombos = null;
+
+ return resolved;
},
/**
- * Returns an Object hash of hashes built from `loader.sorted` or from an arbitrary list of sorted modules.
- * @method hash
- * @private
- * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
- * @param {Array} [s=loader.sorted] An override for the loader.sorted array
- * @return {Object} Object hash (js and css) of two object hashes of file lists, with the module name as the key
- * @example This method can be used as an off-line dep calculator
- *
- * var Y = YUI();
- * var loader = new Y.Loader({
- * filter: 'debug',
- * base: '../../',
- * root: 'build/',
- * combine: true,
- * require: ['node', 'dd', 'console']
- * });
- * var out = loader.hash(true);
- *
+ Shortcut to calculate, resolve and load all modules.
+
+ var loader = new Y.Loader({
+ ignoreRegistered: true,
+ modules: {
+ mod: {
+ path: 'mod.js'
+ }
+ },
+ requires: [ 'mod' ]
+ });
+ loader.load(function() {
+ console.log('All modules have loaded..');
+ });
+
+
+ @method load
+ @param {Callback} cb Executed after all load operations are complete
*/
- hash: function(calc, s) {
- var self = this, i, m, url, out = { js: {}, css: {} };
-
- if (calc) {
- self.calculate();
+ load: function(cb) {
+ if (!cb) {
+ Y.log('No callback supplied to load()', 'error', 'loader');
+ return;
}
- s = s || self.sorted;
+ var self = this,
+ out = self.resolve(true);
+
+ self.data = out;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
- if (m) {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
- out[m.type][m.name] = url;
- }
- }
+ self.onEnd = function() {
+ cb.apply(self.context || self, arguments);
+ };
- return out;
+ self.insert();
}
};
-}, '3.4.1' ,{requires:['get']});
+}, '3.5.0' ,{requires:['get', 'features']});
diff --git a/lib/yui/3.5.0/build/loader-base/loader-base-min.js b/lib/yui/3.5.0/build/loader-base/loader-base-min.js
new file mode 100644
index 00000000000..6a6f2e10a2d
--- /dev/null
+++ b/lib/yui/3.5.0/build/loader-base/loader-base-min.js
@@ -0,0 +1,10 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("loader-base",function(d){if(!YUI.Env[d.version]){(function(){var I=d.version,E="/build/",F=I+E,D=d.Env.base,A="gallery-2012.04.10-14-57",C="2in3",B="4",z="2.9.0",G=D+"combo?",H={version:I,root:F,base:d.Env.base,comboBase:G,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},y=H.groups,x=function(K,O,L){var J=C+"."+(K||B)+"/"+(O||z)+E,M=(L&&L.base)?L.base:D,N=(L&&L.comboBase)?L.comboBase:G;y.yui2.base=M+J;y.yui2.root=J;y.yui2.comboBase=N;},w=function(J,L){var K=(J||A)+E,M=(L&&L.base)?L.base:D,N=(L&&L.comboBase)?L.comboBase:G;y.gallery.base=M+K;y.gallery.root=K;y.gallery.comboBase=N;};y[I]={};y.gallery={ext:false,combine:true,comboBase:G,update:w,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}};y.yui2={combine:true,ext:false,comboBase:G,update:x,patterns:{"yui2-":{configFn:function(J){if(/-skin|reset|fonts|grids|base/.test(J.name)){J.type="css";J.path=J.path.replace(/\.js/,".css");J.path=J.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin");}}}}};w();x();YUI.Env[I]=H;}());}var f={},c=[],m=1024,a=YUI.Env,p=a._loaded,q="css",k="js",v="intl",s=d.version,u="",e=d.Object,r=e.each,j=d.Array,h=a._loaderQueue,t=a[s],b="skin-",i=d.Lang,n=a.mods,l,o,g=function(x,y,z,w){var A=x+"/"+y;if(!w){A+="-min";}A+="."+(z||q);return A;};d.Env.meta=t;d.Loader=function(A){var z=t.modules,x=this;A=A||{};l=t.md5;x.context=d;x.base=d.Env.meta.base+d.Env.meta.root;x.comboBase=d.Env.meta.comboBase;x.combine=A.base&&(A.base.indexOf(x.comboBase.substr(0,20))>-1);x.comboSep="&";x.maxURLLength=m;x.root=d.Env.meta.root;x.timeout=0;x.forceMap={};x.allowRollup=false;x.filters={};x.required={};x.patterns={};x.moduleInfo={};x.groups=d.merge(d.Env.meta.groups);x.skin=d.merge(d.Env.meta.skin);x.conditions={};x.config=A;x._internal=true;o=a._renderedMods;if(o){r(o,function y(C,B){x.moduleInfo[B]=d.merge(C);});o=a._conditions;r(o,function w(C,B){x.conditions[B]=d.merge(C);});}else{r(z,x.addModule,x);}x.loaded=p[s];x._inspectPage();x._internal=false;x._config(A);x.forceMap=(x.force)?d.Array.hash(x.force):{};x.testresults=null;if(d.config.tests){x.testresults=d.config.tests;}x.sorted=[];x.dirty=true;x.inserted={};x.skipped={};x.tested={};};d.Loader.prototype={REGEX_CSS:/\.css(?:[?;].*)?$/i,FILTER_DEFS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},_inspectPage:function(){r(this.moduleInfo,function(x,w){if(x.type&&x.type===q){if(this.isCSSLoaded(x.name)){this.loaded[w]=true;}}},this);r(n,function(y,x){if(y.details){var w=this.moduleInfo[x],A=y.details.requires,z=w&&w.requires;if(w){if(!w._inspected&&A&&z.length!=A.length){delete w.expanded;}}else{w=this.addModule(y.details,x);}w._inspected=true;}},this);},_requires:function(C,B){var y,A,D,E,w=this.moduleInfo,x=w[C],z=w[B];if(!x||!z){return false;}A=x.expanded_map;D=x.after_map;if(D&&(B in D)){return true;}D=z.after_map;if(D&&(C in D)){return false;}E=w[B]&&w[B].supersedes;if(E){for(y=0;y-1){Q=W;}});if(P&&(P[U]||(Q&&P[Q]))){y=U;if(P[Q]){y=Q;}for(L=0;L
-1);};}if(A.test(B,x)){z=A;break;}}}if(z){if(A.action){A.action.call(this,B,x);}else{w=this.addModule(d.merge(z),B);w.temp=true;}}}return w;},_rollup:function(){},_reduce:function(B){B=B||this.required;var y,x,A,w,z=this.loadType,C=this.ignore?j.hash(this.ignore):false;for(y in B){if(B.hasOwnProperty(y)){w=this.getModule(y);if(((this.loaded[y]||n[y])&&!this.forceMap[y]&&!this.ignoreRegistered)||(z&&w&&w.type!=z)){delete B[y];}if(C&&C[y]){delete B[y];}A=w&&w.supersedes;if(A){for(x=0;x0){h.running=true;h.next()();}},insert:function(z,x,y){var w=this,A=d.merge(this);delete A.require;delete A.dirty;h.add(function(){w._insert(A,z,x,y);});this._continue();},loadNext:function(w){return;},_filter:function(y,x,B){var A=this.filter,w=x&&(x in this.filters),z=w&&this.filters[x],C=B||(this.moduleInfo[x]?this.moduleInfo[x].group:null);if(C&&this.groups[C]&&this.groups[C].filter){z=this.groups[C].filter;w=true;}if(y){if(w){A=(i.isString(z))?this.FILTER_DEFS[z.toUpperCase()]||null:z;}if(A){y=y.replace(new RegExp(A.searchExp,"g"),A.replaceStr);}}return y;},_url:function(y,w,x){return this._filter((x||this.base||"")+y,w);},resolve:function(x,O){var X,W,U,E,J,G,T,I,N,V,y,H,R,D,aa,F,Y,M=[],K,Q,A={},P=this,w,z,Z=[],B=(P.ignoreRegistered)?{}:P.inserted,S={js:[],jsMods:[],css:[],cssMods:[]},C=P.loadType||"js";if(x){P.calculate();}O=O||P.sorted;var L=function(ab){if(ab){I=(ab.group&&P.groups[ab.group])||f;if(I.async===false){ab.async=I.async;}E=(ab.fullpath)?P._filter(ab.fullpath,O[W]):P._url(ab.path,O[W],I.base||ab.base);if(ab.attributes||ab.async===false){E={url:E,async:ab.async};if(ab.attributes){E.attributes=ab.attributes;}}S[ab.type].push(E);S[ab.type+"Mods"].push(ab);}else{}};X=O.length;aa=P.comboBase;E=aa;R={};for(W=0;Wz){M=[];for(O=0;Oz){U=M.pop();K=F+M.join(w);S[C].push(P._filter(K,null,A[F].group));M=[];if(U){M.push(U);}}}if(M.length){K=F+M.join(w);S[C].push(P._filter(K,null,A[F].group));}}else{S[C].push(P._filter(K,null,A[F].group));}}S[C+"Mods"]=S[C+"Mods"].concat(D);}}}A=null;return S;},load:function(w){if(!w){return;}var x=this,y=x.resolve(true);x.data=y;x.onEnd=function(){w.apply(x.context||x,arguments);};x.insert();}};},"3.5.0",{requires:["get","features"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/loader-base/loader-base-debug.js b/lib/yui/3.5.0/build/loader-base/loader-base.js
similarity index 68%
rename from lib/yui/3.4.1/build/loader-base/loader-base-debug.js
rename to lib/yui/3.5.0/build/loader-base/loader-base.js
index ec4dcb8fdfc..d0166649e83 100644
--- a/lib/yui/3.4.1/build/loader-base/loader-base-debug.js
+++ b/lib/yui/3.5.0/build/loader-base/loader-base.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -19,7 +19,7 @@ if (!YUI.Env[Y.version]) {
BUILD = '/build/',
ROOT = VERSION + BUILD,
CDN_BASE = Y.Env.base,
- GALLERY_VERSION = 'gallery-2011.09.14-20-40',
+ GALLERY_VERSION = 'gallery-2012.04.10-14-57',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
@@ -40,18 +40,28 @@ if (!YUI.Env[Y.version]) {
groups: {},
patterns: {} },
groups = META.groups,
- yui2Update = function(tnt, yui2) {
- var root = TNT + '.' +
- (tnt || TNT_VERSION) + '/' +
- (yui2 || YUI2_VERSION) + BUILD;
- groups.yui2.base = CDN_BASE + root;
- groups.yui2.root = root;
- },
- galleryUpdate = function(tag) {
- var root = (tag || GALLERY_VERSION) + BUILD;
- groups.gallery.base = CDN_BASE + root;
- groups.gallery.root = root;
- };
+ yui2Update = function(tnt, yui2, config) {
+
+ var root = TNT + '.' +
+ (tnt || TNT_VERSION) + '/' +
+ (yui2 || YUI2_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.yui2.base = base + root;
+ groups.yui2.root = root;
+ groups.yui2.comboBase = combo;
+ },
+ galleryUpdate = function(tag, config) {
+ var root = (tag || GALLERY_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.gallery.base = base + root;
+ groups.gallery.root = root;
+ groups.gallery.comboBase = combo;
+ };
+
groups[VERSION] = {};
@@ -96,10 +106,8 @@ if (!YUI.Env[Y.version]) {
/**
* Loader dynamically loads script and css files. It includes the dependency
- * info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * information for the version of the library in use, and will automatically pull in
+ * dependencies for the modules requested. It can also load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
* YUI files.
@@ -111,7 +119,7 @@ if (!YUI.Env[Y.version]) {
var NOT_FOUND = {},
NO_REQUIREMENTS = [],
- MAX_URL_LENGTH = 2048,
+ MAX_URL_LENGTH = 1024,
GLOBAL_ENV = YUI.Env,
GLOBAL_LOADED = GLOBAL_ENV._loaded,
CSS = 'css',
@@ -139,10 +147,6 @@ var NOT_FOUND = {},
return path;
};
-if (YUI.Env.aliases) {
- YUI.Env.aliases = {}; //Don't need aliases if Loader is present
-}
-
/**
* The component metadata is stored in Y.Env.meta.
* Part of the loader module.
@@ -154,111 +158,55 @@ Y.Env.meta = META;
/**
* Loader dynamically loads script and css files. It includes the dependency
* info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * dependencies for the modules requested. It can load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
- * YUI files.
- *
- * While the loader can be instantiated by the end user, it normally is not.
- * @see YUI.use for the normal use case. The use function automatically will
- * pull in missing dependencies.
- *
+ * YUI files. You can also specify an external, custom combo service to host
+ * your modules as well.
+
+ var Y = YUI();
+ var loader = new Y.Loader({
+ filter: 'debug',
+ base: '../../',
+ root: 'build/',
+ combine: true,
+ require: ['node', 'dd', 'console']
+ });
+ var out = loader.resolve(true);
+
* @constructor
* @class Loader
- * @param {object} o an optional set of configuration options. Valid options:
- *
- *
base:
- * The base dir
- *
comboBase:
- * The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?
- *
root:
- * The root path to prepend to module names for the combo service.
- * Ex: 2.5.2/build/
- *
filter:.
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- *
- *
DEBUG
- *
Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget
- *
RAW
- *
Selects the non-minified version of the library (e.g., event.js).
- *
- *
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- *
filters: per-component filter specification. If specified
- * for a given component, this overrides the filter config. _Note:_ This does not work on combo urls, use the filter property instead.
- *
combine:
- * Use the YUI combo service to reduce the number of http connections
- * required to load your dependencies
- *
ignore:
- * A list of modules that should never be dynamically loaded
- *
force:
- * A list of modules that should always be loaded when required, even if
- * already present on the page
- *
insertBefore:
- * Node or id for a node that should be used as the insertion point for
- * new nodes
- *
charset:
- * charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes)
- *
- *
jsAttributes: object literal containing attributes to add to script
- * nodes
- *
cssAttributes: object literal containing attributes to add to link
- * nodes
- *
timeout:
- * The number of milliseconds before a timeout occurs when dynamically
- * loading nodes. If not set, there is no timeout
- *
context:
- * execution context for all callbacks
- *
onSuccess:
- * callback for the 'success' event
- *
onFailure: callback for the 'failure' event
- *
onCSS: callback for the 'CSSComplete' event. When loading YUI
- * components with CSS the CSS is loaded first, then the script. This
- * provides a moment you can tie into to improve
- * the presentation of the page while the script is loading.
- *
onTimeout:
- * callback for the 'timeout' event
- *
onProgress:
- * callback executed each time a script or css file is loaded
- *
modules:
- * A list of module definitions. See Loader.addModule for the supported
- * module metadata
- *
groups:
- * A list of group definitions. Each group can contain specific definitions
- * for base, comboBase, combine, and accepts a list of modules. See above
- * for the description of these properties.
- *
2in3: the version of the YUI 2 in 3 wrapper to use. The intrinsic
- * support for YUI 2 modules in YUI 3 relies on versions of the YUI 2
- * components inside YUI 3 module wrappers. These wrappers
- * change over time to accomodate the issues that arise from running YUI 2
- * in a YUI 3 sandbox.
- *
yui2: when using the 2in3 project, you can select the version of
- * YUI 2 to use. Valid values * are 2.2.2, 2.3.1, 2.4.1, 2.5.2, 2.6.0,
- * 2.7.0, 2.8.0, and 2.8.1 [default] -- plus all versions of YUI 2
- * going forward.
- *
+ * @param {Object} config an optional set of configuration options.
+ * @param {String} config.base The base dir which to fetch this module from
+ * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
+ * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
+ * @param {String|Object} config.filter A filter to apply to result urls. See filter property
+ * @param {Object} config.filters Per-component filter specification. If specified for a given component, this overrides the filter config.
+ * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
+ * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
+ * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
+ * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
+ * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
+ * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
+ * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes. If not set, there is no timeout
+ * @param {Object} config.context Execution context for all callbacks
+ * @param {Function} config.onSuccess Callback for the 'success' event
+ * @param {Function} config.onFailure Callback for the 'failure' event
+ * @param {Function} config.onCSS Callback for the 'CSSComplete' event. When loading YUI components with CSS the CSS is loaded first, then the script. This provides a moment you can tie into to improve the presentation of the page while the script is loading.
+ * @param {Function} config.onTimeout Callback for the 'timeout' event
+ * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
+ * @param {Object} config.modules A list of module definitions. See Loader.addModule for the supported module metadata
+ * @param {Object} config.groups A list of group definitions. Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
+ * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use. The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers. These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
+ * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use. Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
*/
Y.Loader = function(o) {
var defaults = META.modules,
self = this;
+
+ //Catch no config passed.
+ o = o || {};
modulekey = META.md5;
@@ -408,7 +356,7 @@ Y.Loader = function(o) {
* @property ignoreRegistered
* @default false
*/
- // self.ignoreRegistered = false;
+ //self.ignoreRegistered = false;
/**
* Root path to prepend to module path for the combo
@@ -470,12 +418,12 @@ Y.Loader = function(o) {
*
* You can also define a custom filter, which must be an object literal
* containing a search expression and a replace string:
- *
+ *
+ * myFilter: {
+ * 'searchExp': "-min\\.js",
+ * 'replaceStr': "-debug.js"
+ * }
+ *
* @property filter
* @type string| {searchExp: string, replaceStr: string}
*/
@@ -524,29 +472,27 @@ Y.Loader = function(o) {
* being loaded for calendar (if calendar was requested), and
* 'sam' for all other skinnable components:
*
- *
- * skin: {
+ * skin: {
+ * // The default skin, which is automatically applied if not
+ * // overriden by a component-specific skin definition.
+ * // Change this in to apply a different skin globally
+ * defaultSkin: 'sam',
*
- * // The default skin, which is automatically applied if not
- * // overriden by a component-specific skin definition.
- * // Change this in to apply a different skin globally
- * defaultSkin: 'sam',
- *
- * // This is combined with the loader base property to get
- * // the default root directory for a skin. ex:
- * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
- * base: 'assets/skins/',
- *
- * // Any component-specific overrides can be specified here,
- * // making it possible to load different skins for different
- * // components. It is possible to load more than one skin
- * // for a given component as well.
- * overrides: {
- * calendar: ['skin1', 'skin2']
+ * // This is combined with the loader base property to get
+ * // the default root directory for a skin. ex:
+ * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
+ * base: 'assets/skins/',
+ *
+ * // Any component-specific overrides can be specified here,
+ * // making it possible to load different skins for different
+ * // components. It is possible to load more than one skin
+ * // for a given component as well.
+ * overrides: {
+ * calendar: ['skin1', 'skin2']
+ * }
* }
- * }
- *
- * @property skin
+ * @property skin
+ * @type {Object}
*/
self.skin = Y.merge(Y.Env.meta.skin);
@@ -567,27 +513,30 @@ Y.Loader = function(o) {
if (cache) {
oeach(cache, function modCache(v, k) {
- //self.moduleInfo[k] = Y.merge(v);
- self.moduleInfo[k] = v;
+ self.moduleInfo[k] = Y.merge(v);
});
cache = GLOBAL_ENV._conditions;
oeach(cache, function condCache(v, k) {
- //self.conditions[k] = Y.merge(v);
- self.conditions[k] = v;
+ self.conditions[k] = Y.merge(v);
});
} else {
oeach(defaults, self.addModule, self);
}
- if (!GLOBAL_ENV._renderedMods) {
- //GLOBAL_ENV._renderedMods = Y.merge(self.moduleInfo);
- //GLOBAL_ENV._conditions = Y.merge(self.conditions);
- GLOBAL_ENV._renderedMods = self.moduleInfo;
- GLOBAL_ENV._conditions = self.conditions;
- }
+
+ /**
+ * Set when beginning to compute the dependency tree.
+ * Composed of what YUI reports to be loaded combined
+ * with what has been loaded by any instance on the page
+ * with the version number specified in the metadata.
+ * @property loaded
+ * @type {string: boolean}
+ */
+ self.loaded = GLOBAL_LOADED[VERSION];
+
self._inspectPage();
@@ -595,6 +544,8 @@ Y.Loader = function(o) {
self._config(o);
+ self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
+
self.testresults = null;
if (Y.config.tests) {
@@ -625,16 +576,6 @@ Y.Loader = function(o) {
*/
self.sorted = [];
- /**
- * Set when beginning to compute the dependency tree.
- * Composed of what YUI reports to be loaded combined
- * with what has been loaded by any instance on the page
- * with the version number specified in the metadata.
- * @property loaded
- * @type {string: boolean}
- */
- self.loaded = GLOBAL_LOADED[VERSION];
-
/*
* A list of modules to attach to the YUI instance when complete.
* If not supplied, the sorted list of dependencies are applied.
@@ -679,7 +620,25 @@ Y.Loader = function(o) {
};
Y.Loader.prototype = {
+ /**
+ Regex that matches a CSS URL. Used to guess the file type when it's not
+ specified.
+ @property REGEX_CSS
+ @type RegExp
+ @final
+ @protected
+ @since 3.5.0
+ **/
+ REGEX_CSS: /\.css(?:[?;].*)?$/i,
+
+ /**
+ * Default filters for raw and debug
+ * @property FILTER_DEFS
+ * @type Object
+ * @final
+ * @protected
+ */
FILTER_DEFS: {
RAW: {
'searchExp': '-min\\.js',
@@ -696,6 +655,16 @@ Y.Loader.prototype = {
* @private
*/
_inspectPage: function() {
+
+ //Inspect the page for CSS only modules and mark them as loaded.
+ oeach(this.moduleInfo, function(v, k) {
+ if (v.type && v.type === CSS) {
+ if (this.isCSSLoaded(v.name)) {
+ this.loaded[k] = true;
+ }
+ }
+ }, this);
+
oeach(ON_PAGE, function(v, k) {
if (v.details) {
var m = this.moduleInfo[k],
@@ -704,9 +673,7 @@ Y.Loader.prototype = {
if (m) {
if (!m._inspected && req && mr.length != req.length) {
// console.log('deleting ' + m.name);
- // m.requres = YObject.keys(Y.merge(YArray.hash(req), YArray.hash(mr)));
delete m.expanded;
- // delete m.expanded_map;
}
} else {
m = this.addModule(v.details, k);
@@ -784,6 +751,7 @@ Y.Loader.prototype = {
/**
* Apply a new config to the Loader instance
* @method _config
+ * @private
* @param {Object} o The new configuration
*/
_config: function(o) {
@@ -796,26 +764,36 @@ Y.Loader.prototype = {
if (i == 'require') {
self.require(val);
} else if (i == 'skin') {
- Y.mix(self.skin, o[i], true);
+ //If the config.skin is a string, format to the expected object
+ if (typeof val === 'string') {
+ self.skin.defaultSkin = o.skin;
+ val = {
+ defaultSkin: val
+ };
+ }
+
+ Y.mix(self.skin, val, true);
} else if (i == 'groups') {
for (j in val) {
if (val.hasOwnProperty(j)) {
- // Y.log('group: ' + j);
groupName = j;
group = val[j];
self.addGroup(group, groupName);
+ if (group.aliases) {
+ oeach(group.aliases, self.addAlias, self);
+ }
}
}
} else if (i == 'modules') {
// add a hash of module definitions
oeach(val, self.addModule, self);
+ } else if (i === 'aliases') {
+ oeach(val, self.addAlias, self);
} else if (i == 'gallery') {
- this.groups.gallery.update(val);
+ this.groups.gallery.update(val, o);
} else if (i == 'yui2' || i == '2in3') {
- this.groups.yui2.update(o['2in3'], o.yui2);
- } else if (i == 'maxURLLength') {
- self[i] = Math.min(MAX_URL_LENGTH, val);
+ this.groups.yui2.update(o['2in3'], o.yui2, o);
} else {
self[i] = val;
}
@@ -834,9 +812,12 @@ Y.Loader.prototype = {
self.require('yui-log', 'dump');
}
}
+
if (self.lang) {
- self.require('intl-base', 'intl');
+ //Removed this so that when Loader is invoked
+ //it doesn't request what it doesn't need.
+ //self.require('intl-base', 'intl');
}
},
@@ -898,27 +879,53 @@ Y.Loader.prototype = {
}
this.addModule(nmod, name);
- Y.log('adding skin ' + name + ', ' + parent + ', ' + pkg + ', ' + info[name].path);
}
}
return name;
},
-
+ /**
+ * Adds an alias module to the system
+ * @method addAlias
+ * @param {Array} use An array of modules that makes up this alias
+ * @param {String} name The name of the alias
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addAlias([ 'node', 'yql' ], 'davglass');
+ * loader.require(['davglass']);
+ * var out = loader.resolve(true);
+ *
+ * //out.js will contain Node and YQL modules
+ */
+ addAlias: function(use, name) {
+ YUI.Env.aliases[name] = use;
+ this.addModule({
+ name: name,
+ use: use
+ });
+ },
/**
* Add a new module group
- *
- *
name:
required, the group name
- *
base:
The base dir for this module group
- *
root:
The root path to add to each combo
- * resource path
- *
combine:
combo handle
- *
comboBase:
combo service base path
- *
modules:
the group of modules
- *
* @method addGroup
- * @param {object} o An object containing the module data.
- * @param {string} name the group name.
+ * @param {Object} config An object containing the group configuration data
+ * @param {String} config.name required, the group name
+ * @param {String} config.base The base directory for this module group
+ * @param {String} config.root The root path to add to each combo resource path
+ * @param {Boolean} config.combine Should the request be combined
+ * @param {String} config.comboBase Combo service base path
+ * @param {Object} config.modules The group of modules
+ * @param {String} name the group name.
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addGroup({
+ * name: 'davglass',
+ * combine: true,
+ * comboBase: '/combo?',
+ * root: '',
+ * modules: {
+ * //Module List here
+ * }
+ * }, 'davglass');
*/
addGroup: function(o, name) {
var mods = o.modules,
@@ -936,6 +943,9 @@ Y.Loader.prototype = {
if (mods) {
oeach(mods, function(v, k) {
+ if (typeof v === 'string') {
+ v = { name: k, fullpath: v };
+ }
v.group = name;
self.addModule(v, k);
}, self);
@@ -944,58 +954,40 @@ Y.Loader.prototype = {
/**
* Add a new module to the component metadata.
- *
- *
name:
required, the component name
- *
type:
required, the component type (js or css)
- *
- *
path:
required, the path to the script from
- * "base"
- *
requires:
array of modules required by this
- * component
- *
optional:
array of optional modules for this
- * component
- *
supersedes:
array of the modules this component
- * replaces
- *
after:
array of modules the components which, if
- * present, should be sorted above this one
- *
after_map:
faster alternative to 'after' -- supply
- * a hash instead of an array
- *
rollup:
the number of superseded modules required
- * for automatic rollup
- *
fullpath:
If fullpath is specified, this is used
- * instead of the configured base + path
- *
skinnable:
flag to determine if skin assets should
- * automatically be pulled in
- *
submodules:
a hash of submodules
- *
group:
The group the module belongs to -- this
- * is set automatically when it is added as part of a group
- * configuration.
- *
lang:
- *
array of BCP 47 language tags of languages for which this
- * module has localized resource bundles,
- * e.g., ["en-GB","zh-Hans-CN"]
- *
condition:
- *
Specifies that the module should be loaded automatically if
- * a condition is met. This is an object with up to three fields:
- * [trigger] - the name of a module that can trigger the auto-load
- * [test] - a function that returns true when the module is to be
- * loaded.
- * [when] - specifies the load order of the conditional module
- * with regard to the position of the trigger module.
- * This should be one of three values: 'before', 'after', or
- * 'instead'. The default is 'after'.
- *
- *
testresults:
a hash of test results from Y.Features.all()
- *
* @method addModule
- * @param {object} o An object containing the module data.
- * @param {string} name the module name (optional), required if not
- * in the module data.
- * @return {object} the module definition or null if
- * the object passed in did not provide all required attributes.
+ * @param {Object} config An object containing the module data.
+ * @param {String} config.name Required, the component name
+ * @param {String} config.type Required, the component type (js or css)
+ * @param {String} config.path Required, the path to the script from `base`
+ * @param {Array} config.requires Array of modules required by this component
+ * @param {Array} [config.optional] Array of optional modules for this component
+ * @param {Array} [config.supersedes] Array of the modules this component replaces
+ * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
+ * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
+ * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
+ * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
+ * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
+ * @param {Object} [config.submodules] Hash of submodules
+ * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
+ * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
+ * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to three fields:
+ * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
+ * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
+ * @param {String} [config.condition.when] Specifies the load order of the conditional module
+ * with regard to the position of the trigger module.
+ * This should be one of three values: `before`, `after`, or `instead`. The default is `after`.
+ * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
+ * @param {Function} [config.configFn] A function to exectute when configuring this module
+ * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
+ * @param {String} [name] The module name, required if not in the module data.
+ * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
*/
addModule: function(o, name) {
name = name || o.name;
+
+ if (typeof o === 'string') {
+ o = { name: name, fullpath: o };
+ }
//Only merge this data if the temp flag is set
//from an earlier pass from a pattern or else
@@ -1017,7 +1009,12 @@ Y.Loader.prototype = {
}
if (!o.type) {
+ //Always assume it's javascript unless the CSS pattern is matched.
o.type = JS;
+ var p = o.path || o.fullpath;
+ if (p && this.REGEX_CSS.test(p)) {
+ o.type = CSS;
+ }
}
if (!o.path && !o.fullpath) {
@@ -1026,7 +1023,6 @@ Y.Loader.prototype = {
o.supersedes = o.supersedes || o.use;
o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
- o.requires = this.filterRequires(o.requires) || [];
// Handle submodule logic
var subs = o.submodules, i, l, t, sup, s, smod, plugins, plug,
@@ -1034,9 +1030,18 @@ Y.Loader.prototype = {
overrides, skinname, when,
conditions = this.conditions, trigger;
// , existing = this.moduleInfo[name], newr;
-
+
this.moduleInfo[name] = o;
+ o.requires = o.requires || [];
+
+ if (o.skinnable) {
+ skinname = this._addSkin(this.skin.defaultSkin, name);
+ o.requires.unshift(skinname);
+ }
+
+ o.requires = this.filterRequires(o.requires) || [];
+
if (!o.langPack && o.lang) {
langs = YArray(o.lang);
for (j = 0; j < langs.length; j++) {
@@ -1049,6 +1054,7 @@ Y.Loader.prototype = {
}
}
+
if (subs) {
sup = o.supersedes || [];
l = 0;
@@ -1113,7 +1119,6 @@ Y.Loader.prototype = {
o.lang.push(lang);
}
-// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
// default packages
@@ -1130,7 +1135,6 @@ Y.Loader.prototype = {
smod.supersedes.push(supName);
}
-// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
}
@@ -1196,7 +1200,12 @@ Y.Loader.prototype = {
}
}
+ if (o.supersedes) {
+ o.supersedes = this.filterRequires(o.supersedes);
+ }
+
if (o.after) {
+ o.after = this.filterRequires(o.after);
o.after_map = YArray.hash(o.after);
}
@@ -1206,9 +1215,18 @@ Y.Loader.prototype = {
ret = o.configFn(o);
if (ret === false) {
delete this.moduleInfo[name];
+ delete GLOBAL_ENV._renderedMods[name];
o = null;
}
}
+ //Add to global cache
+ if (o) {
+ if (!GLOBAL_ENV._renderedMods) {
+ GLOBAL_ENV._renderedMods = {};
+ }
+ GLOBAL_ENV._renderedMods[name] = Y.merge(o);
+ GLOBAL_ENV._conditions = conditions;
+ }
return o;
},
@@ -1302,13 +1320,20 @@ Y.Loader.prototype = {
*/
getRequires: function(mod) {
- if (!mod || mod._parsed) {
- // Y.log('returning no reqs for ' + mod.name);
+ if (!mod) {
+ //console.log('returning no reqs for ' + mod.name);
return NO_REQUIREMENTS;
}
+ if (mod._parsed) {
+ //console.log('returning requires for ' + mod.name, mod.requires);
+ return mod.expanded || NO_REQUIREMENTS;
+ }
+
+ //TODO add modue cache here out of scope..
+
var i, m, j, add, packName, lang, testresults = this.testresults,
- name = mod.name, cond, go,
+ name = mod.name, cond,
adddef = ON_PAGE[name] && ON_PAGE[name].details,
d, k, m1,
r, old_mod,
@@ -1333,14 +1358,12 @@ Y.Loader.prototype = {
// if (mod.expanded && (!mod.langCache || mod.langCache == this.lang)) {
if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
- //Y.log('Already expanded ' + name + ', ' + mod.expanded);
return mod.expanded;
}
d = [];
hash = {};
-
r = this.filterRequires(mod.requires);
if (mod.lang) {
//If a module has a lang attribute, auto add the intl requirement.
@@ -1350,14 +1373,11 @@ Y.Loader.prototype = {
}
o = this.filterRequires(mod.optional);
- // Y.log("getRequires: " + name + " (dirty:" + this.dirty +
- // ", expanded:" + mod.expanded + ")");
mod._parsed = true;
mod.langCache = this.lang;
for (i = 0; i < r.length; i++) {
- //Y.log(name + ' requiring ' + r[i], 'info', 'loader');
if (!hash[r[i]]) {
d.push(r[i]);
hash[r[i]] = true;
@@ -1422,6 +1442,8 @@ Y.Loader.prototype = {
cond = this.conditions[name];
if (cond) {
+ //Set the module to not parsed since we have conditionals and this could change the dependency tree.
+ mod._parsed = false;
if (testresults && ftests) {
oeach(testresults, function(result, id) {
var condmod = ftests[id].name;
@@ -1435,18 +1457,22 @@ Y.Loader.prototype = {
} else {
oeach(cond, function(def, condmod) {
if (!hash[condmod]) {
- go = def && ((def.ua && Y.UA[def.ua]) ||
- (def.test && def.test(Y, r)));
+ //first see if they've specfied a ua check
+ //then see if they've got a test fn & if it returns true
+ //otherwise just having a condition block is enough
+ var go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
+ (def.test && def.test(Y, r)));
+
if (go) {
hash[condmod] = true;
d.push(condmod);
m = this.getModule(condmod);
- // Y.log('conditional', m);
if (m) {
add = this.getRequires(m);
for (j = 0; j < add.length; j++) {
d.push(add[j]);
}
+
}
}
}
@@ -1469,11 +1495,15 @@ Y.Loader.prototype = {
}
for (i = 0; i < skindef[skinname].length; i++) {
skinmod = this._addSkin(skindef[skinname][i], name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
} else {
skinmod = this._addSkin(this.skin.defaultSkin, name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
}
@@ -1483,7 +1513,6 @@ Y.Loader.prototype = {
if (mod.lang && !mod.langPack && Y.Intl) {
lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
- //Y.log('Best lang: ' + lang + ', this.lang: ' + this.lang + ', mod.lang: ' + mod.lang);
packName = this.getLangPackName(lang, name);
if (packName) {
d.unshift(packName);
@@ -1498,7 +1527,37 @@ Y.Loader.prototype = {
return mod.expanded;
},
+ /**
+ * Check to see if named css module is already loaded on the page
+ * @method isCSSLoaded
+ * @param {String} name The name of the css file
+ * @return Boolean
+ */
+ isCSSLoaded: function(name, skip) {
+ //TODO - Make this call a batching call with name being an array
+ if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
+ return false;
+ }
+ var el = YUI.Env.cssStampEl,
+ ret = false,
+ style = el.currentStyle; //IE
+
+ //Add the classname to the element
+ el.className = name;
+
+ if (!style) {
+ style = Y.config.doc.defaultView.getComputedStyle(el, null);
+ }
+
+ if (style && style['display'] === 'none') {
+ ret = true;
+ }
+
+
+ el.className = ''; //Reset the classname to ''
+ return ret;
+ },
/**
* Returns a hash of module names the supplied module satisfies.
@@ -1564,6 +1623,7 @@ Y.Loader.prototype = {
/**
* Creates a "psuedo" package for languages provided in the lang array
* @method _addLangPack
+ * @private
* @param {String} lang The language to create
* @param {Object} m The module definition to create the language pack around
* @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
@@ -1571,19 +1631,27 @@ Y.Loader.prototype = {
*/
_addLangPack: function(lang, m, packName) {
var name = m.name,
- packPath,
+ packPath, conf,
existing = this.moduleInfo[packName];
if (!existing) {
packPath = _path((m.pkg || name), packName, JS, true);
- this.addModule({ path: packPath,
- intl: true,
- langPack: true,
- ext: m.ext,
- group: m.group,
- supersedes: [] }, packName);
+ conf = {
+ path: packPath,
+ intl: true,
+ langPack: true,
+ ext: m.ext,
+ group: m.group,
+ supersedes: []
+ };
+
+ if (m.configFn) {
+ conf.configFn = m.configFn;
+ }
+
+ this.addModule(conf, packName);
if (lang) {
Y.Env.lang = Y.Env.lang || {};
@@ -1680,6 +1748,7 @@ Y.Loader.prototype = {
* @private
*/
_explode: function() {
+ //TODO Move done out of scope
var r = this.required, m, reqs, done = {},
self = this;
@@ -1708,7 +1777,6 @@ Y.Loader.prototype = {
}
});
- // Y.log('After explode: ' + YObject.keys(r));
},
/**
* Get's the loader meta data for the requested module
@@ -1729,15 +1797,21 @@ Y.Loader.prototype = {
// check the patterns library to see if we should automatically add
// the module with defaults
if (!m) {
- // Y.log('testing patterns ' + YObject.keys(patterns));
for (pname in patterns) {
if (patterns.hasOwnProperty(pname)) {
- // Y.log('testing pattern ' + i);
p = patterns[pname];
+
+ //There is no test method, create a default one that tests
+ // the pattern against the mod name
+ if (!p.test) {
+ p.test = function(mname, pname) {
+ return (mname.indexOf(pname) > -1);
+ };
+ }
- // use the metadata supplied for the pattern
- // as the module definition.
- if (mname.indexOf(pname) > -1) {
+ if (p.test(mname, pname)) {
+ // use the metadata supplied for the pattern
+ // as the module definition.
found = p;
break;
}
@@ -1746,11 +1820,8 @@ Y.Loader.prototype = {
if (found) {
if (p.action) {
- // Y.log('executing pattern action: ' + pname);
p.action.call(this, mname, pname);
} else {
-Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
- pname, 'info', 'loader');
// ext true or false?
m = this.addModule(Y.merge(found), mname);
m.temp = true;
@@ -1812,8 +1883,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* @param {Boolean} success A boolean denoting success or failure
*/
_finish: function(msg, success) {
- Y.log('loader finishing: ' + msg + ', ' + Y.id + ', ' +
- this.data, 'info', 'loader');
_queue.running = false;
@@ -1867,13 +1936,34 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
self._finish(msg, success);
},
/**
+ * The default Loader onProgress handler, calls this.onProgress with a payload
+ * @method _onProgress
+ * @private
+ */
+ _onProgress: function(e) {
+ var self = this;
+ if (self.onProgress) {
+ self.onProgress.call(self.context, {
+ name: e.url,
+ data: e.data
+ });
+ }
+ },
+ /**
* The default Loader onFailure handler, calls this.onFailure with a payload
* @method _onFailure
* @private
*/
_onFailure: function(o) {
- Y.log('load error: ' + o.msg + ', ' + Y.id, 'error', 'loader');
- var f = this.onFailure, msg = 'failure: ' + o.msg;
+ var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
+
+ for (i; i < len; i++) {
+ msg.push(o.errors[i].error);
+ }
+
+ msg = msg.join(',');
+
+
if (f) {
f.call(this.context, {
msg: msg,
@@ -1881,7 +1971,9 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
success: false
});
}
+
this._finish(msg, false);
+
},
/**
@@ -1890,7 +1982,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* @private
*/
_onTimeout: function() {
- Y.log('loader timeout: ' + Y.id, 'error', 'loader');
var f = this.onTimeout;
if (f) {
f.call(this.context, {
@@ -1899,7 +1990,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
success: false
});
}
- this._finish('timeout', false);
},
/**
@@ -1912,6 +2002,7 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
// create an indexed list
var s = YObject.keys(this.required),
// loaded = this.loaded,
+ //TODO Move this out of scope
done = {},
p = 0, l, a, b, j, k, moved, doneKey;
@@ -1972,18 +2063,11 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
this.sorted = s;
},
- /**
- * (Unimplemented)
- * @method partial
- * @unimplemented
- */
- partial: function(partial, o, type) {
- this.sorted = partial;
- this.insert(o, type, true);
- },
+
/**
* Handles the actual insertion of script/link tags
* @method _insert
+ * @private
* @param {Object} source The YUI instance the request came from
* @param {Object} o The metadata to include
* @param {String} type JS or CSS
@@ -1991,7 +2075,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
*/
_insert: function(source, o, type, skipcalc) {
-// Y.log('private _insert() ' + (type || '') + ', ' + Y.id, "info", "loader");
// restore the state at the time of the request
if (source) {
@@ -2005,54 +2088,119 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
this.calculate(o);
}
- this.loadType = type;
+ var modules = this.resolve(),
+ self = this, comp = 0, actions = 0;
- if (!type) {
-
- var self = this;
-
- // Y.log("trying to load css first");
- this._internalCallback = function() {
-
- var f = self.onCSS, n, p, sib;
-
- // IE hack for style overrides that are not being applied
- if (this.insertBefore && Y.UA.ie) {
- n = Y.config.doc.getElementById(this.insertBefore);
- p = n.parentNode;
- sib = n.nextSibling;
- p.removeChild(n);
- if (sib) {
- p.insertBefore(n, sib);
- } else {
- p.appendChild(n);
- }
- }
-
- if (f) {
- f.call(self.context, Y);
- }
- self._internalCallback = null;
-
- self._insert(null, null, JS);
- };
-
- this._insert(null, null, CSS);
-
- return;
+ if (type) {
+ //Filter out the opposite type and reset the array so the checks later work
+ modules[((type === JS) ? CSS : JS)] = [];
+ }
+ if (modules.js.length) {
+ comp++;
+ }
+ if (modules.css.length) {
+ comp++;
}
- // set a flag to indicate the load has started
+ //console.log('Resolved Modules: ', modules);
+
+ var complete = function(d) {
+ actions++;
+ var errs = {}, i = 0, u = '', fn;
+
+ if (d && d.errors) {
+ for (i = 0; i < d.errors.length; i++) {
+ if (d.errors[i].request) {
+ u = d.errors[i].request.url;
+ } else {
+ u = d.errors[i];
+ }
+ errs[u] = u;
+ }
+ }
+
+ if (d && d.data && d.data.length && (d.type === 'success')) {
+ for (i = 0; i < d.data.length; i++) {
+ self.inserted[d.data[i].name] = true;
+ }
+ }
+
+ if (actions === comp) {
+ self._loading = null;
+ if (d && d.fn) {
+ fn = d.fn;
+ delete d.fn;
+ fn.call(self, d);
+ }
+ }
+ };
+
this._loading = true;
- // flag to indicate we are done with the combo service
- // and any additional files will need to be loaded
- // individually
- this._combineComplete = {};
+ if (!modules.js.length && !modules.css.length) {
+ actions = -1;
+ complete({
+ fn: self._onSuccess
+ });
+ return;
+ }
+
- // start the load
- this.loadNext();
+ if (modules.css.length) { //Load CSS first
+ Y.Get.css(modules.css, {
+ data: modules.cssMods,
+ attributes: self.cssAttributes,
+ insertBefore: self.insertBefore,
+ charset: self.charset,
+ timeout: self.timeout,
+ context: self,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
+ if (modules.js.length) {
+ Y.Get.js(modules.js, {
+ data: modules.jsMods,
+ insertBefore: self.insertBefore,
+ attributes: self.jsAttributes,
+ charset: self.charset,
+ timeout: self.timeout,
+ autopurge: false,
+ context: self,
+ async: true,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
},
/**
* Once a loader operation is completely finished, process any additional queued items.
@@ -2075,8 +2223,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* @param {string} type the type of dependency to insert.
*/
insert: function(o, type, skipsort) {
- // Y.log('public insert() ' + (type || '') + ', ' +
- // Y.Object.keys(this.required), "info", "loader");
var self = this, copy = Y.merge(this);
delete copy.require;
delete copy.dirty;
@@ -2092,271 +2238,13 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* is possible to call this if using a method other than
* Y.register to determine when scripts are fully loaded
* @method loadNext
+ * @deprecated
* @param {string} mname optional the name of the module that has
* been loaded (which is usually why it is time to load the next
* one).
*/
loadNext: function(mname) {
- // It is possible that this function is executed due to something
- // else on the page loading a YUI module. Only react when we
- // are actively loading something
- if (!this._loading) {
- return;
- }
-
- var s, len, i, m, url, fn, msg, attr, group, groupName, j, frag,
- comboSource, comboSources, mods, combining, urls, comboBase,
- self = this,
- type = self.loadType,
- handleSuccess = function(o) {
- self.loadNext(o.data);
- },
- handleCombo = function(o) {
- self._combineComplete[type] = true;
- var i, len = combining.length;
-
- for (i = 0; i < len; i++) {
- self.inserted[combining[i]] = true;
- }
-
- handleSuccess(o);
- };
-
- if (self.combine && (!self._combineComplete[type])) {
-
- combining = [];
-
- self._combining = combining;
- s = self.sorted;
- len = s.length;
-
- // the default combo base
- comboBase = self.comboBase;
-
- url = comboBase;
- urls = [];
-
- comboSources = {};
-
- for (i = 0; i < len; i++) {
- comboSource = comboBase;
- m = self.getModule(s[i]);
- groupName = m && m.group;
- if (groupName) {
-
- group = self.groups[groupName];
-
- if (!group.combine) {
- m.combine = false;
- continue;
- }
- m.combine = true;
- if (group.comboBase) {
- comboSource = group.comboBase;
- }
-
- if ("root" in group && L.isValue(group.root)) {
- m.root = group.root;
- }
-
- }
-
- comboSources[comboSource] = comboSources[comboSource] || [];
- comboSources[comboSource].push(m);
- }
-
- for (j in comboSources) {
- if (comboSources.hasOwnProperty(j)) {
- url = j;
- mods = comboSources[j];
- len = mods.length;
-
- for (i = 0; i < len; i++) {
- // m = self.getModule(s[i]);
- m = mods[i];
-
- // Do not try to combine non-yui JS unless combo def
- // is found
- if (m && (m.type === type) && (m.combine || !m.ext)) {
-
- frag = ((L.isValue(m.root)) ? m.root : self.root) + m.path;
- frag = self._filter(frag, m.name);
- if ((url !== j) && (i <= (len - 1)) &&
- ((frag.length + url.length) > self.maxURLLength)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- url = j;
- }
-
- url += frag;
- if (i < (len - 1)) {
- url += self.comboSep;
- }
-
- combining.push(m.name);
- }
-
- }
-
- if (combining.length && (url != j)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- }
- }
- }
-
- if (combining.length) {
-
-Y.log('Attempting to use combo: ' + combining, 'info', 'loader');
-
- // if (m.type === CSS) {
- if (type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- fn(urls, {
- data: self._loading,
- onSuccess: handleCombo,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
-
- } else {
- self._combineComplete[type] = true;
- }
- }
-
- if (mname) {
-
- // if the module that was just loaded isn't what we were expecting,
- // continue to wait
- if (mname !== self._loading) {
- return;
- }
-
-// Y.log("loadNext executing, just loaded " + mname + ", " +
-// Y.id, "info", "loader");
-
- // The global handler that is called when each module is loaded
- // will pass that module name to this function. Storing this
- // data to avoid loading the same module multiple times
- // centralize this in the callback
- self.inserted[mname] = true;
- // self.loaded[mname] = true;
-
- // provided = self.getProvides(mname);
- // Y.mix(self.loaded, provided);
- // Y.mix(self.inserted, provided);
-
- if (self.onProgress) {
- self.onProgress.call(self.context, {
- name: mname,
- data: self.data
- });
- }
- }
-
- s = self.sorted;
- len = s.length;
-
- for (i = 0; i < len; i = i + 1) {
- // this.inserted keeps track of what the loader has loaded.
- // move on if this item is done.
- if (s[i] in self.inserted) {
- continue;
- }
-
- // Because rollups will cause multiple load notifications
- // from Y, loadNext may be called multiple times for
- // the same module when loading a rollup. We can safely
- // skip the subsequent requests
- if (s[i] === self._loading) {
- Y.log('still loading ' + s[i] + ', waiting', 'info', 'loader');
- return;
- }
-
- // log("inserting " + s[i]);
- m = self.getModule(s[i]);
-
- if (!m) {
- if (!self.skipped[s[i]]) {
- msg = 'Undefined module ' + s[i] + ' skipped';
- Y.log(msg, 'warn', 'loader');
- // self.inserted[s[i]] = true;
- self.skipped[s[i]] = true;
- }
- continue;
-
- }
-
- group = (m.group && self.groups[m.group]) || NOT_FOUND;
-
- // The load type is stored to offer the possibility to load
- // the css separately from the script.
- if (!type || type === m.type) {
- self._loading = s[i];
-Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
-
- if (m.type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
- self._url(m.path, s[i], group.base || m.base);
-
- fn(url, {
- data: s[i],
- onSuccess: handleSuccess,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
- }
- }
-
- // we are finished
- self._loading = null;
-
- fn = self._internalCallback;
-
- // internal callback for loading css first
- if (fn) {
- // Y.log('loader internal');
- self._internalCallback = null;
- fn.call(self);
- } else {
- // Y.log('loader complete');
- self._onSuccess();
- }
+ return;
},
/**
@@ -2368,15 +2256,16 @@ Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
* @return {string} the filtered string.
* @private
*/
- _filter: function(u, name) {
+ _filter: function(u, name, group) {
var f = this.filter,
hasFilter = name && (name in this.filters),
modFilter = hasFilter && this.filters[name],
- groupName = this.moduleInfo[name] ? this.moduleInfo[name].group:null;
- if (groupName && this.groups[groupName].filter) {
- modFilter = this.groups[groupName].filter;
- hasFilter = true;
- };
+ groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
+
+ if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
+ modFilter = this.groups[groupName].filter;
+ hasFilter = true;
+ };
if (u) {
if (hasFilter) {
@@ -2397,7 +2286,7 @@ Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
* @method _url
* @param {string} path the path fragment.
* @param {String} name The name of the module
- * @pamra {String} [base=self.base] The base url to use
+ * @param {String} [base=self.base] The base url to use
* @return {string} the full url.
* @private
*/
@@ -2424,71 +2313,217 @@ Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
*
*/
resolve: function(calc, s) {
- var self = this, i, m, url, out = { js: [], css: [] };
+
+ var len, i, m, url, fn, msg, attr, group, groupName, j, frag,
+ comboSource, comboSources, mods, comboBase,
+ base, urls, u = [], tmpBase, baseLen, resCombos = {},
+ self = this, comboSep, maxURLLength, singles = [],
+ inserted = (self.ignoreRegistered) ? {} : self.inserted,
+ resolved = { js: [], jsMods: [], css: [], cssMods: [] },
+ type = self.loadType || 'js';
if (calc) {
self.calculate();
}
s = s || self.sorted;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
+ var addSingle = function(m) {
+
if (m) {
- if (self.combine) {
- url = self._filter((self.root + m.path), m.name, self.root);
- } else {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
+ group = (m.group && self.groups[m.group]) || NOT_FOUND;
+
+ //Always assume it's async
+ if (group.async === false) {
+ m.async = group.async;
}
- out[m.type].push(url);
+
+ url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
+ self._url(m.path, s[i], group.base || m.base);
+
+ if (m.attributes || m.async === false) {
+ url = {
+ url: url,
+ async: m.async
+ };
+ if (m.attributes) {
+ url.attributes = m.attributes
+ }
+ }
+ resolved[m.type].push(url);
+ resolved[m.type + 'Mods'].push(m);
+ } else {
}
- }
- if (self.combine) {
- out.js = [self.comboBase + out.js.join(self.comboSep)];
- out.css = [self.comboBase + out.css.join(self.comboSep)];
+
+ };
+
+ len = s.length;
+
+ // the default combo base
+ comboBase = self.comboBase;
+
+ url = comboBase;
+
+ comboSources = {};
+
+ for (i = 0; i < len; i++) {
+ comboSource = comboBase;
+ m = self.getModule(s[i]);
+ groupName = m && m.group;
+ group = self.groups[groupName];
+ if (groupName && group) {
+
+ if (!group.combine || m.fullpath) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ m.combine = true;
+ if (group.comboBase) {
+ comboSource = group.comboBase;
+ }
+
+ if ("root" in group && L.isValue(group.root)) {
+ m.root = group.root;
+ }
+ m.comboSep = group.comboSep || self.comboSep;
+ m.maxURLLength = group.maxURLLength || self.maxURLLength;
+ } else {
+ if (!self.combine) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ }
+
+ comboSources[comboSource] = comboSources[comboSource] || [];
+ comboSources[comboSource].push(m);
}
- return out;
+ for (j in comboSources) {
+ if (comboSources.hasOwnProperty(j)) {
+ resCombos[j] = resCombos[j] || { js: [], jsMods: [], css: [], cssMods: [] };
+ url = j;
+ mods = comboSources[j];
+ len = mods.length;
+
+ if (len) {
+ for (i = 0; i < len; i++) {
+ if (inserted[mods[i]]) {
+ continue;
+ }
+ m = mods[i];
+ // Do not try to combine non-yui JS unless combo def
+ // is found
+ if (m && (m.combine || !m.ext)) {
+ resCombos[j].comboSep = m.comboSep;
+ resCombos[j].group = m.group;
+ resCombos[j].maxURLLength = m.maxURLLength;
+ frag = ((L.isValue(m.root)) ? m.root : self.root) + (m.path || m.fullpath);
+ frag = self._filter(frag, m.name);
+ resCombos[j][m.type].push(frag);
+ resCombos[j][m.type + 'Mods'].push(m);
+ } else {
+ //Add them to the next process..
+ if (mods[i]) {
+ //singles.push(mods[i].name);
+ addSingle(mods[i]);
+ }
+ }
+
+ }
+ }
+ }
+ }
+
+
+ for (j in resCombos) {
+ base = j;
+ comboSep = resCombos[base].comboSep || self.comboSep;
+ maxURLLength = resCombos[base].maxURLLength || self.maxURLLength;
+ for (type in resCombos[base]) {
+ if (type === JS || type === CSS) {
+ urls = resCombos[base][type];
+ mods = resCombos[base][type + 'Mods'];
+ len = urls.length;
+ tmpBase = base + urls.join(comboSep);
+ baseLen = tmpBase.length;
+ if (maxURLLength <= base.length) {
+ maxURLLength = MAX_URL_LENGTH;
+ }
+
+ if (len) {
+ if (baseLen > maxURLLength) {
+ u = [];
+ for (s = 0; s < len; s++) {
+ u.push(urls[s]);
+ tmpBase = base + u.join(comboSep);
+
+ if (tmpBase.length > maxURLLength) {
+ m = u.pop();
+ tmpBase = base + u.join(comboSep)
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ u = [];
+ if (m) {
+ u.push(m);
+ }
+ }
+ }
+ if (u.length) {
+ tmpBase = base + u.join(comboSep);
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ } else {
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ }
+ resolved[type + 'Mods'] = resolved[type + 'Mods'].concat(mods);
+ }
+ }
+ }
+
+ resCombos = null;
+
+ return resolved;
},
/**
- * Returns an Object hash of hashes built from `loader.sorted` or from an arbitrary list of sorted modules.
- * @method hash
- * @private
- * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
- * @param {Array} [s=loader.sorted] An override for the loader.sorted array
- * @return {Object} Object hash (js and css) of two object hashes of file lists, with the module name as the key
- * @example This method can be used as an off-line dep calculator
- *
- * var Y = YUI();
- * var loader = new Y.Loader({
- * filter: 'debug',
- * base: '../../',
- * root: 'build/',
- * combine: true,
- * require: ['node', 'dd', 'console']
- * });
- * var out = loader.hash(true);
- *
+ Shortcut to calculate, resolve and load all modules.
+
+ var loader = new Y.Loader({
+ ignoreRegistered: true,
+ modules: {
+ mod: {
+ path: 'mod.js'
+ }
+ },
+ requires: [ 'mod' ]
+ });
+ loader.load(function() {
+ console.log('All modules have loaded..');
+ });
+
+
+ @method load
+ @param {Callback} cb Executed after all load operations are complete
*/
- hash: function(calc, s) {
- var self = this, i, m, url, out = { js: {}, css: {} };
-
- if (calc) {
- self.calculate();
+ load: function(cb) {
+ if (!cb) {
+ return;
}
- s = s || self.sorted;
+ var self = this,
+ out = self.resolve(true);
+
+ self.data = out;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
- if (m) {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
- out[m.type][m.name] = url;
- }
- }
+ self.onEnd = function() {
+ cb.apply(self.context || self, arguments);
+ };
- return out;
+ self.insert();
}
};
-}, '3.4.1' ,{requires:['get']});
+}, '3.5.0' ,{requires:['get', 'features']});
diff --git a/lib/yui/3.4.1/build/loader-rollup/loader-rollup-debug.js b/lib/yui/3.5.0/build/loader-rollup/loader-rollup-debug.js
similarity index 94%
rename from lib/yui/3.4.1/build/loader-rollup/loader-rollup-debug.js
rename to lib/yui/3.5.0/build/loader-rollup/loader-rollup-debug.js
index 72841820a98..399bd2a1307 100644
--- a/lib/yui/3.4.1/build/loader-rollup/loader-rollup-debug.js
+++ b/lib/yui/3.5.0/build/loader-rollup/loader-rollup-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -39,8 +39,6 @@ Y.Loader.prototype._rollup = function() {
}
}
}
-
- this.forceMap = (this.force) ? Y.Array.hash(this.force) : {};
}
// make as many passes as needed to pick up rollup rollups
@@ -107,4 +105,4 @@ Y.Loader.prototype._rollup = function() {
};
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
diff --git a/lib/yui/3.5.0/build/loader-rollup/loader-rollup-min.js b/lib/yui/3.5.0/build/loader-rollup/loader-rollup-min.js
new file mode 100644
index 00000000000..6fb652c218e
--- /dev/null
+++ b/lib/yui/3.5.0/build/loader-rollup/loader-rollup-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("loader-rollup",function(a){a.Loader.prototype._rollup=function(){var k,h,g,o,b=this.required,e,f=this.moduleInfo,d,l,n;if(this.dirty||!this.rollups){this.rollups={};for(k in f){if(f.hasOwnProperty(k)){g=this.getModule(k);if(g&&g.rollup){this.rollups[k]=g;}}}}for(;;){d=false;for(k in this.rollups){if(this.rollups.hasOwnProperty(k)){if(!b[k]&&((!this.loaded[k])||this.forceMap[k])){g=this.getModule(k);o=g.supersedes||[];e=false;if(!g.rollup){continue;}l=0;for(h=0;h=g.rollup);if(e){break;}}}}if(e){b[k]=true;d=true;this.getRequires(g);}}}}if(!d){break;}}};},"3.5.0",{requires:["loader-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/loader-rollup/loader-rollup.js b/lib/yui/3.5.0/build/loader-rollup/loader-rollup.js
similarity index 94%
rename from lib/yui/3.4.1/build/loader-rollup/loader-rollup.js
rename to lib/yui/3.5.0/build/loader-rollup/loader-rollup.js
index 350e0ef8342..8d532927feb 100644
--- a/lib/yui/3.4.1/build/loader-rollup/loader-rollup.js
+++ b/lib/yui/3.5.0/build/loader-rollup/loader-rollup.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -39,8 +39,6 @@ Y.Loader.prototype._rollup = function() {
}
}
}
-
- this.forceMap = (this.force) ? Y.Array.hash(this.force) : {};
}
// make as many passes as needed to pick up rollup rollups
@@ -104,4 +102,4 @@ Y.Loader.prototype._rollup = function() {
};
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
diff --git a/lib/yui/3.4.1/build/loader-yui3/loader-yui3-debug.js b/lib/yui/3.5.0/build/loader-yui3/loader-yui3-debug.js
similarity index 80%
rename from lib/yui/3.4.1/build/loader-yui3/loader-yui3-debug.js
rename to lib/yui/3.5.0/build/loader-yui3/loader-yui3-debug.js
index 98feabbebba..071c06dd078 100644
--- a/lib/yui/3.4.1/build/loader-yui3/loader-yui3-debug.js
+++ b/lib/yui/3.5.0/build/loader-yui3/loader-yui3-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -63,6 +63,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"anim-base"
]
},
+ "anim-shape-transform": {
+ "requires": [
+ "anim-base",
+ "anim-easing",
+ "matrix"
+ ]
+ },
"anim-xy": {
"requires": [
"anim-base",
@@ -71,12 +78,52 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"app": {
"use": [
- "controller",
+ "app-base",
+ "app-transitions",
"model",
"model-list",
+ "router",
"view"
]
},
+ "app-base": {
+ "requires": [
+ "classnamemanager",
+ "pjax-base",
+ "router",
+ "view"
+ ]
+ },
+ "app-transitions": {
+ "requires": [
+ "app-base"
+ ]
+ },
+ "app-transitions-css": {
+ "type": "css"
+ },
+ "app-transitions-native": {
+ "condition": {
+ "name": "app-transitions-native",
+ "test": function (Y) {
+ var doc = Y.config.doc,
+ node = doc ? doc.documentElement : null;
+
+ if (node && node.style) {
+ return ('MozTransition' in node.style || 'WebkitTransition' in node.style);
+ }
+
+ return false;
+},
+ "trigger": "app-transitions"
+ },
+ "requires": [
+ "app-transitions",
+ "app-transitions-css",
+ "parallel",
+ "transition"
+ ]
+ },
"array-extras": {
"requires": [
"yui-base"
@@ -120,7 +167,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"attribute-base": {
"requires": [
- "event-custom"
+ "attribute-core",
+ "attribute-events",
+ "attribute-extras"
]
},
"attribute-complex": {
@@ -128,6 +177,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-base"
]
},
+ "attribute-core": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "attribute-events": {
+ "requires": [
+ "event-custom"
+ ]
+ },
+ "attribute-extras": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"autocomplete": {
"use": [
"autocomplete-base",
@@ -245,6 +309,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-complex"
],
"requires": [
+ "base-core",
"attribute-base"
]
},
@@ -253,12 +318,45 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"base-base"
]
},
+ "base-core": {
+ "requires": [
+ "attribute-core"
+ ]
+ },
"base-pluginhost": {
"requires": [
"base-base",
"pluginhost"
]
},
+ "button": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-core": {
+ "requires": [
+ "attribute-core",
+ "classnamemanager",
+ "node-base"
+ ]
+ },
+ "button-group": {
+ "requires": [
+ "button-plugin",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-plugin": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "node-pluginhost"
+ ]
+ },
"cache": {
"use": [
"cache-base",
@@ -285,9 +383,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"calendar-base",
@@ -297,9 +400,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar-base": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"widget",
@@ -321,18 +429,29 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"charts": {
+ "requires": [
+ "charts-base"
+ ]
+ },
+ "charts-base": {
"requires": [
"dom",
"datatype-number",
"datatype-date",
"event-custom",
"event-mouseenter",
+ "event-touch",
"widget",
"widget-position",
"widget-stack",
"graphics"
]
},
+ "charts-legend": {
+ "requires": [
+ "charts-base"
+ ]
+ },
"classnamemanager": {
"requires": [
"yui-base"
@@ -373,13 +492,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"controller": {
- "optional": [
- "querystring-parse"
- ],
- "requires": [
- "array-extras",
- "base-build",
- "history"
+ "use": [
+ "router"
]
},
"cookie": {
@@ -414,6 +528,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssbutton": {
+ "type": "css"
+ },
"cssfonts": {
"type": "css"
},
@@ -427,6 +544,23 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssgrids-base": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "type": "css"
+ },
+ "cssgrids-units": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "requires": [
+ "cssgrids-base"
+ ],
+ "type": "css"
+ },
"cssreset": {
"type": "css"
},
@@ -546,13 +680,28 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"datatable": {
"use": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
"datatable-base",
- "datatable-datasource",
+ "datatable-column-widths",
+ "datatable-message",
+ "datatable-mutable",
"datatable-sort",
- "datatable-scroll"
+ "datatable-datasource"
]
},
"datatable-base": {
+ "requires": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
+ "base-build",
+ "widget"
+ ],
+ "skinnable": true
+ },
+ "datatable-base-deprecated": {
"requires": [
"recordset-base",
"widget",
@@ -561,6 +710,25 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "datatable-body": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-column-widths": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
+ "datatable-core": {
+ "requires": [
+ "escape",
+ "model-list",
+ "node-event-delegate"
+ ]
+ },
"datatable-datasource": {
"requires": [
"datatable-base",
@@ -568,9 +736,53 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"datasource-local"
]
},
+ "datatable-datasource-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
+ "plugin",
+ "datasource-local"
+ ]
+ },
+ "datatable-deprecated": {
+ "use": [
+ "datatable-base-deprecated",
+ "datatable-datasource-deprecated",
+ "datatable-sort-deprecated",
+ "datatable-scroll-deprecated"
+ ]
+ },
+ "datatable-head": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-message": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-mutable": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
"datatable-scroll": {
"requires": [
"datatable-base",
+ "datatable-column-widths",
+ "dom-screen"
+ ],
+ "skinnable": true
+ },
+ "datatable-scroll-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
"plugin"
]
},
@@ -579,7 +791,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"en"
],
"requires": [
- "datatable-base",
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-sort-deprecated": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base-deprecated",
"plugin",
"recordset-sort"
]
@@ -770,7 +991,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "dd-gestures",
"test": function(Y) {
- return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome));
+ return ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.chrome && Y.UA.chrome < 6));
},
"trigger": "dd-drag"
},
@@ -895,7 +1116,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"editor": {
"use": [
"frame",
- "selection",
+ "editor-selection",
"exec-command",
"editor-base",
"editor-para",
@@ -911,7 +1132,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"frame",
"node",
"exec-command",
- "selection"
+ "editor-selection"
]
},
"editor-bidi": {
@@ -930,10 +1151,31 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"editor-para": {
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-para-base": {
"requires": [
"editor-base"
]
},
+ "editor-para-ie": {
+ "condition": {
+ "name": "editor-para-ie",
+ "trigger": "editor-para",
+ "ua": "ie",
+ "when": "instead"
+ },
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-selection": {
+ "requires": [
+ "node"
+ ]
+ },
"editor-tab": {
"requires": [
"editor-base"
@@ -958,7 +1200,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"event-focus",
"event-resize",
"event-hover",
- "event-outside"
+ "event-outside",
+ "event-touch",
+ "event-move",
+ "event-flick",
+ "event-valuechange"
]
},
"event-base": {
@@ -985,6 +1231,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "event-contextmenu": {
+ "requires": [
+ "event-synthetic",
+ "dom-screen"
+ ]
+ },
"event-custom": {
"use": [
"event-custom-base",
@@ -1094,6 +1346,22 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"yui-base"
]
},
+ "file": {
+ "requires": [
+ "file-flash",
+ "file-html5"
+ ]
+ },
+ "file-flash": {
+ "requires": [
+ "base"
+ ]
+ },
+ "file-html5": {
+ "requires": [
+ "base"
+ ]
+ },
"frame": {
"requires": [
"base",
@@ -1112,7 +1380,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"node",
"event-custom",
- "pluginhost"
+ "pluginhost",
+ "matrix"
]
},
"graphics-canvas": {
@@ -1120,8 +1389,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
},
@@ -1134,8 +1405,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas-default",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
}
@@ -1144,8 +1417,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
},
@@ -1157,8 +1434,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg-default",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
}
@@ -1188,6 +1469,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"trigger": "graphics"
}
},
+ "handlebars": {
+ "use": [
+ "handlebars-compiler"
+ ]
+ },
+ "handlebars-base": {
+ "requires": [
+ "escape"
+ ]
+ },
+ "handlebars-compiler": {
+ "requires": [
+ "handlebars-base"
+ ]
+ },
"highlight": {
"use": [
"highlight-base",
@@ -1296,6 +1592,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "io-nodejs": {
+ "condition": {
+ "name": "io-nodejs",
+ "trigger": "io-base",
+ "ua": "nodejs"
+ },
+ "requires": [
+ "io-base"
+ ]
+ },
"io-queue": {
"requires": [
"io-base",
@@ -1350,7 +1656,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"loader-base": {
"requires": [
- "get"
+ "get",
+ "features"
]
},
"loader-rollup": {
@@ -1363,6 +1670,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"loader-base"
]
},
+ "matrix": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"model": {
"requires": [
"base-build",
@@ -1496,17 +1808,42 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"panel": {
"requires": [
"widget",
- "widget-stdmod",
+ "widget-autohide",
+ "widget-buttons",
+ "widget-modality",
"widget-position",
"widget-position-align",
- "widget-stack",
"widget-position-constrain",
- "widget-modality",
- "widget-autohide",
- "widget-buttons"
+ "widget-stack",
+ "widget-stdmod"
],
"skinnable": true
},
+ "parallel": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "pjax": {
+ "requires": [
+ "pjax-base",
+ "io-base"
+ ]
+ },
+ "pjax-base": {
+ "requires": [
+ "classnamemanager",
+ "node-event-delegate",
+ "router"
+ ]
+ },
+ "pjax-plugin": {
+ "requires": [
+ "node-pluginhost",
+ "pjax",
+ "plugin"
+ ]
+ },
"plugin": {
"requires": [
"base-base"
@@ -1653,6 +1990,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"features"
]
},
+ "router": {
+ "optional": [
+ "querystring-parse"
+ ],
+ "requires": [
+ "array-extras",
+ "base-build",
+ "history"
+ ]
+ },
"scrollview": {
"requires": [
"scrollview-base",
@@ -1663,6 +2010,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"event-gestures",
+ "event-mousewheel",
"transition"
],
"skinnable": true
@@ -1697,11 +2045,6 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
- "selection": {
- "requires": [
- "node"
- ]
- },
"selector": {
"requires": [
"selector-native"
@@ -1751,7 +2094,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"dd-constrain",
- "substitute"
+ "substitute",
+ "event-key"
],
"skinnable": true
},
@@ -1831,6 +2175,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "test-console": {
+ "requires": [
+ "console-filters",
+ "test"
+ ],
+ "skinnable": true
+ },
"text": {
"use": [
"text-accentfold",
@@ -1885,6 +2236,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"uploader": {
+ "requires": [
+ "uploader-html5",
+ "uploader-flash"
+ ]
+ },
+ "uploader-deprecated": {
"requires": [
"event-custom",
"node",
@@ -1892,45 +2249,76 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"swf"
]
},
+ "uploader-flash": {
+ "requires": [
+ "swf",
+ "widget",
+ "substitute",
+ "base",
+ "cssbutton",
+ "node",
+ "event-custom",
+ "file-flash",
+ "uploader-queue"
+ ]
+ },
+ "uploader-html5": {
+ "requires": [
+ "widget",
+ "node-event-simulate",
+ "substitute",
+ "file-html5",
+ "uploader-queue"
+ ]
+ },
+ "uploader-queue": {
+ "requires": [
+ "base"
+ ]
+ },
"view": {
"requires": [
"base-build",
"node-event-delegate"
]
},
+ "view-node-map": {
+ "requires": [
+ "view"
+ ]
+ },
"widget": {
"use": [
"widget-base",
"widget-htmlparser",
- "widget-uievents",
- "widget-skin"
+ "widget-skin",
+ "widget-uievents"
]
},
"widget-anim": {
"requires": [
- "plugin",
"anim-base",
+ "plugin",
"widget"
]
},
"widget-autohide": {
"requires": [
- "widget",
- "event-outside",
"base-build",
- "event-key"
- ],
- "skinnable": false
+ "event-key",
+ "event-outside",
+ "widget"
+ ]
},
"widget-base": {
"requires": [
"attribute",
- "event-focus",
"base-base",
"base-pluginhost",
+ "classnamemanager",
+ "event-focus",
"node-base",
- "node-style",
- "classnamemanager"
+ "node-style"
],
"skinnable": true
},
@@ -1946,11 +2334,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-buttons": {
"requires": [
- "widget",
- "base-build",
+ "button-plugin",
+ "cssbutton",
"widget-stdmod"
- ],
- "skinnable": true
+ ]
},
"widget-child": {
"requires": [
@@ -1970,16 +2357,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-modality": {
"requires": [
- "widget",
+ "base-build",
"event-outside",
- "base-build"
+ "widget"
],
- "skinnable": false
+ "skinnable": true
},
"widget-parent": {
"requires": [
- "base-build",
"arraylist",
+ "base-build",
"widget"
]
},
@@ -2020,8 +2407,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-uievents": {
"requires": [
- "widget-base",
- "node-event-delegate"
+ "node-event-delegate",
+ "widget-base"
]
},
"yql": {
@@ -2049,7 +2436,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
}
};
-YUI.Env[Y.version].md5 = '105ebffae27a0e3d7331f8cf5c0bb282';
+YUI.Env[Y.version].md5 = 'f5a3bc9bda2441a3b15fb52c567fc1f7';
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
diff --git a/lib/yui/3.5.0/build/loader-yui3/loader-yui3-min.js b/lib/yui/3.5.0/build/loader-yui3/loader-yui3-min.js
new file mode 100644
index 00000000000..1168dc88f77
--- /dev/null
+++ b/lib/yui/3.5.0/build/loader-yui3/loader-yui3-min.js
@@ -0,0 +1,10 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("loader-yui3",function(a){YUI.Env[a.version].modules=YUI.Env[a.version].modules||{"align-plugin":{"requires":["node-screen","node-pluginhost"]},"anim":{"use":["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"]},"anim-base":{"requires":["base-base","node-style"]},"anim-color":{"requires":["anim-base"]},"anim-curve":{"requires":["anim-xy"]},"anim-easing":{"requires":["anim-base"]},"anim-node-plugin":{"requires":["node-pluginhost","anim-base"]},"anim-scroll":{"requires":["anim-base"]},"anim-shape-transform":{"requires":["anim-base","anim-easing","matrix"]},"anim-xy":{"requires":["anim-base","node-screen"]},"app":{"use":["app-base","app-transitions","model","model-list","router","view"]},"app-base":{"requires":["classnamemanager","pjax-base","router","view"]},"app-transitions":{"requires":["app-base"]},"app-transitions-css":{"type":"css"},"app-transitions-native":{"condition":{"name":"app-transitions-native","test":function(d){var c=d.config.doc,b=c?c.documentElement:null;if(b&&b.style){return("MozTransition" in b.style||"WebkitTransition" in b.style);}return false;},"trigger":"app-transitions"},"requires":["app-transitions","app-transitions-css","parallel","transition"]},"array-extras":{"requires":["yui-base"]},"array-invoke":{"requires":["yui-base"]},"arraylist":{"requires":["yui-base"]},"arraylist-add":{"requires":["arraylist"]},"arraylist-filter":{"requires":["arraylist"]},"arraysort":{"requires":["yui-base"]},"async-queue":{"requires":["event-custom"]},"attribute":{"use":["attribute-base","attribute-complex"]},"attribute-base":{"requires":["attribute-core","attribute-events","attribute-extras"]},"attribute-complex":{"requires":["attribute-base"]},"attribute-core":{"requires":["yui-base"]},"attribute-events":{"requires":["event-custom"]},"attribute-extras":{"requires":["yui-base"]},"autocomplete":{"use":["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"]},"autocomplete-base":{"optional":["autocomplete-sources"],"requires":["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-filters":{"requires":["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{"requires":["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{"requires":["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{"requires":["array-extras","highlight-accentfold"]},"autocomplete-list":{"after":["autocomplete-sources"],"lang":["en"],"requires":["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],"skinnable":true},"autocomplete-list-keys":{"condition":{"name":"autocomplete-list-keys","test":function(b){return !(b.UA.ios||b.UA.android);},"trigger":"autocomplete-list"},"requires":["autocomplete-list","base-build"]},"autocomplete-plugin":{"requires":["autocomplete-list","node-pluginhost"]},"autocomplete-sources":{"optional":["io-base","json-parse","jsonp","yql"],"requires":["autocomplete-base"]},"base":{"use":["base-base","base-pluginhost","base-build"]},"base-base":{"after":["attribute-complex"],"requires":["base-core","attribute-base"]},"base-build":{"requires":["base-base"]},"base-core":{"requires":["attribute-core"]},"base-pluginhost":{"requires":["base-base","pluginhost"]},"button":{"requires":["button-core","cssbutton","widget"]},"button-core":{"requires":["attribute-core","classnamemanager","node-base"]},"button-group":{"requires":["button-plugin","cssbutton","widget"]},"button-plugin":{"requires":["button-core","cssbutton","node-pluginhost"]},"cache":{"use":["cache-base","cache-offline","cache-plugin"]},"cache-base":{"requires":["base"]},"cache-offline":{"requires":["cache-base","json"]},"cache-plugin":{"requires":["plugin","cache-base"]},"calendar":{"lang":["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],"requires":["calendar-base","calendarnavigator"],"skinnable":true},"calendar-base":{"lang":["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],"requires":["widget","substitute","datatype-date","datatype-date-math","cssgrids"],"skinnable":true},"calendarnavigator":{"requires":["plugin","classnamemanager","datatype-date","node","substitute"],"skinnable":true},"charts":{"requires":["charts-base"]},"charts-base":{"requires":["dom","datatype-number","datatype-date","event-custom","event-mouseenter","event-touch","widget","widget-position","widget-stack","graphics"]},"charts-legend":{"requires":["charts-base"]},"classnamemanager":{"requires":["yui-base"]},"clickable-rail":{"requires":["slider-base"]},"collection":{"use":["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"]},"console":{"lang":["en","es","ja"],"requires":["yui-log","widget","substitute"],"skinnable":true},"console-filters":{"requires":["plugin","console"],"skinnable":true},"controller":{"use":["router"]},"cookie":{"requires":["yui-base"]},"createlink-base":{"requires":["editor-base"]},"cssbase":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssbase-context":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssbutton":{"type":"css"},"cssfonts":{"type":"css"},"cssfonts-context":{"type":"css"},"cssgrids":{"optional":["cssreset","cssfonts"],"type":"css"},"cssgrids-base":{"optional":["cssreset","cssfonts"],"type":"css"},"cssgrids-units":{"optional":["cssreset","cssfonts"],"requires":["cssgrids-base"],"type":"css"},"cssreset":{"type":"css"},"cssreset-context":{"type":"css"},"dataschema":{"use":["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"]},"dataschema-array":{"requires":["dataschema-base"]},"dataschema-base":{"requires":["base"]},"dataschema-json":{"requires":["dataschema-base","json"]},"dataschema-text":{"requires":["dataschema-base"]},"dataschema-xml":{"requires":["dataschema-base"]},"datasource":{"use":["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"]},"datasource-arrayschema":{"requires":["datasource-local","plugin","dataschema-array"]},"datasource-cache":{"requires":["datasource-local","plugin","cache-base"]},"datasource-function":{"requires":["datasource-local"]},"datasource-get":{"requires":["datasource-local","get"]},"datasource-io":{"requires":["datasource-local","io-base"]},"datasource-jsonschema":{"requires":["datasource-local","plugin","dataschema-json"]},"datasource-local":{"requires":["base"]},"datasource-polling":{"requires":["datasource-local"]},"datasource-textschema":{"requires":["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{"requires":["datasource-local","plugin","dataschema-xml"]},"datatable":{"use":["datatable-core","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"]},"datatable-base":{"requires":["datatable-core","datatable-head","datatable-body","base-build","widget"],"skinnable":true},"datatable-base-deprecated":{"requires":["recordset-base","widget","substitute","event-mouseenter"],"skinnable":true},"datatable-body":{"requires":["datatable-core","view","classnamemanager"]},"datatable-column-widths":{"requires":["datatable-base"]},"datatable-core":{"requires":["escape","model-list","node-event-delegate"]},"datatable-datasource":{"requires":["datatable-base","plugin","datasource-local"]},"datatable-datasource-deprecated":{"requires":["datatable-base-deprecated","plugin","datasource-local"]},"datatable-deprecated":{"use":["datatable-base-deprecated","datatable-datasource-deprecated","datatable-sort-deprecated","datatable-scroll-deprecated"]},"datatable-head":{"requires":["datatable-core","view","classnamemanager"]},"datatable-message":{"lang":["en"],"requires":["datatable-base"],"skinnable":true},"datatable-mutable":{"requires":["datatable-base"]},"datatable-scroll":{"requires":["datatable-base","datatable-column-widths","dom-screen"],"skinnable":true},"datatable-scroll-deprecated":{"requires":["datatable-base-deprecated","plugin"]},"datatable-sort":{"lang":["en"],"requires":["datatable-base"],"skinnable":true},"datatable-sort-deprecated":{"lang":["en"],"requires":["datatable-base-deprecated","plugin","recordset-sort"]},"datatype":{"use":["datatype-number","datatype-date","datatype-xml"]},"datatype-date":{"supersedes":["datatype-date-format"],"use":["datatype-date-parse","datatype-date-format"]},"datatype-date-format":{"lang":["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]},"datatype-date-math":{"requires":["yui-base"]},"datatype-date-parse":{},"datatype-number":{"use":["datatype-number-parse","datatype-number-format"]},"datatype-number-format":{},"datatype-number-parse":{},"datatype-xml":{"use":["datatype-xml-parse","datatype-xml-format"]},"datatype-xml-format":{},"datatype-xml-parse":{},"dd":{"use":["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"]},"dd-constrain":{"requires":["dd-drag"]},"dd-ddm":{"requires":["dd-ddm-base","event-resize"]},"dd-ddm-base":{"requires":["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{"requires":["dd-ddm"]},"dd-delegate":{"requires":["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{"requires":["dd-ddm-base"]},"dd-drop":{"requires":["dd-drag","dd-ddm-drop"]},"dd-drop-plugin":{"requires":["dd-drop"]},"dd-gestures":{"condition":{"name":"dd-gestures","test":function(b){return((b.config.win&&("ontouchstart" in b.config.win))&&!(b.UA.chrome&&b.UA.chrome<6));
+},"trigger":"dd-drag"},"requires":["dd-drag","event-synthetic","event-gestures"]},"dd-plugin":{"optional":["dd-constrain","dd-proxy"],"requires":["dd-drag"]},"dd-proxy":{"requires":["dd-drag"]},"dd-scroll":{"requires":["dd-drag"]},"dial":{"lang":["en","es"],"requires":["widget","dd-drag","substitute","event-mouseenter","event-move","event-key","transition","intl"],"skinnable":true},"dom":{"use":["dom-base","dom-screen","dom-style","selector-native","selector"]},"dom-base":{"requires":["dom-core"]},"dom-core":{"requires":["oop","features"]},"dom-deprecated":{"requires":["dom-base"]},"dom-screen":{"requires":["dom-base","dom-style"]},"dom-style":{"requires":["dom-base"]},"dom-style-ie":{"condition":{"name":"dom-style-ie","test":function(h){var f=h.Features.test,g=h.Features.add,d=h.config.win,e=h.config.doc,b="documentElement",c=false;g("style","computedStyle",{test:function(){return d&&"getComputedStyle" in d;}});g("style","opacity",{test:function(){return e&&"opacity" in e[b].style;}});c=(!f("style","opacity")&&!f("style","computedStyle"));return c;},"trigger":"dom-style"},"requires":["dom-style"]},"dump":{"requires":["yui-base"]},"editor":{"use":["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"]},"editor-base":{"requires":["base","frame","node","exec-command","editor-selection"]},"editor-bidi":{"requires":["editor-base"]},"editor-br":{"requires":["editor-base"]},"editor-lists":{"requires":["editor-base"]},"editor-para":{"requires":["editor-para-base"]},"editor-para-base":{"requires":["editor-base"]},"editor-para-ie":{"condition":{"name":"editor-para-ie","trigger":"editor-para","ua":"ie","when":"instead"},"requires":["editor-para-base"]},"editor-selection":{"requires":["node"]},"editor-tab":{"requires":["editor-base"]},"escape":{"requires":["yui-base"]},"event":{"after":["node-base"],"use":["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange"]},"event-base":{"after":["node-base"],"requires":["event-custom-base"]},"event-base-ie":{"after":["event-base"],"condition":{"name":"event-base-ie","test":function(c){var b=c.config.doc&&c.config.doc.implementation;return(b&&(!b.hasFeature("Events","2.0")));},"trigger":"node-base"},"requires":["node-base"]},"event-contextmenu":{"requires":["event-synthetic","dom-screen"]},"event-custom":{"use":["event-custom-base","event-custom-complex"]},"event-custom-base":{"requires":["oop"]},"event-custom-complex":{"requires":["event-custom-base"]},"event-delegate":{"requires":["node-base"]},"event-flick":{"requires":["node-base","event-touch","event-synthetic"]},"event-focus":{"requires":["event-synthetic"]},"event-gestures":{"use":["event-flick","event-move"]},"event-hover":{"requires":["event-mouseenter"]},"event-key":{"requires":["event-synthetic"]},"event-mouseenter":{"requires":["event-synthetic"]},"event-mousewheel":{"requires":["node-base"]},"event-move":{"requires":["node-base","event-touch","event-synthetic"]},"event-outside":{"requires":["event-synthetic"]},"event-resize":{"requires":["node-base","event-synthetic"]},"event-simulate":{"requires":["event-base"]},"event-synthetic":{"requires":["node-base","event-custom-complex"]},"event-touch":{"requires":["node-base"]},"event-valuechange":{"requires":["event-focus","event-synthetic"]},"exec-command":{"requires":["frame"]},"features":{"requires":["yui-base"]},"file":{"requires":["file-flash","file-html5"]},"file-flash":{"requires":["base"]},"file-html5":{"requires":["base"]},"frame":{"requires":["base","node","selector-css3","substitute","yui-throttle"]},"get":{"requires":["yui-base"]},"graphics":{"requires":["node","event-custom","pluginhost","matrix"]},"graphics-canvas":{"condition":{"name":"graphics-canvas","test":function(f){var d=f.config.doc,e=f.config.defaultGraphicEngine&&f.config.defaultGraphicEngine=="canvas",c=d&&d.createElement("canvas"),b=(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return(!b||e)&&(c&&c.getContext&&c.getContext("2d"));},"trigger":"graphics"},"requires":["graphics"]},"graphics-canvas-default":{"condition":{"name":"graphics-canvas-default","test":function(f){var d=f.config.doc,e=f.config.defaultGraphicEngine&&f.config.defaultGraphicEngine=="canvas",c=d&&d.createElement("canvas"),b=(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return(!b||e)&&(c&&c.getContext&&c.getContext("2d"));},"trigger":"graphics"}},"graphics-svg":{"condition":{"name":"graphics-svg","test":function(f){var e=f.config.doc,d=!f.config.defaultGraphicEngine||f.config.defaultGraphicEngine!="canvas",c=e&&e.createElement("canvas"),b=(e&&e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return b&&(d||!c);},"trigger":"graphics"},"requires":["graphics"]},"graphics-svg-default":{"condition":{"name":"graphics-svg-default","test":function(f){var e=f.config.doc,d=!f.config.defaultGraphicEngine||f.config.defaultGraphicEngine!="canvas",c=e&&e.createElement("canvas"),b=(e&&e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return b&&(d||!c);},"trigger":"graphics"}},"graphics-vml":{"condition":{"name":"graphics-vml","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"},"requires":["graphics"]},"graphics-vml-default":{"condition":{"name":"graphics-vml-default","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"}},"handlebars":{"use":["handlebars-compiler"]},"handlebars-base":{"requires":["escape"]},"handlebars-compiler":{"requires":["handlebars-base"]},"highlight":{"use":["highlight-base","highlight-accentfold"]},"highlight-accentfold":{"requires":["highlight-base","text-accentfold"]},"highlight-base":{"requires":["array-extras","classnamemanager","escape","text-wordbreak"]},"history":{"use":["history-base","history-hash","history-hash-ie","history-html5"]},"history-base":{"requires":["event-custom-complex"]},"history-hash":{"after":["history-html5"],"requires":["event-synthetic","history-base","yui-later"]},"history-hash-ie":{"condition":{"name":"history-hash-ie","test":function(c){var b=c.config.doc&&c.config.doc.documentMode;
+return c.UA.ie&&(!("onhashchange" in c.config.win)||!b||b<8);},"trigger":"history-hash"},"requires":["history-hash","node-base"]},"history-html5":{"optional":["json"],"requires":["event-base","history-base","node-base"]},"imageloader":{"requires":["base-base","node-style","node-screen"]},"intl":{"requires":["intl-base","event-custom"]},"intl-base":{"requires":["yui-base"]},"io":{"use":["io-base","io-xdr","io-form","io-upload-iframe","io-queue"]},"io-base":{"requires":["event-custom-base","querystring-stringify-simple"]},"io-form":{"requires":["io-base","node-base"]},"io-nodejs":{"condition":{"name":"io-nodejs","trigger":"io-base","ua":"nodejs"},"requires":["io-base"]},"io-queue":{"requires":["io-base","queue-promote"]},"io-upload-iframe":{"requires":["io-base","node-base"]},"io-xdr":{"requires":["io-base","datatype-xml-parse"]},"json":{"use":["json-parse","json-stringify"]},"json-parse":{"requires":["yui-base"]},"json-stringify":{"requires":["yui-base"]},"jsonp":{"requires":["get","oop"]},"jsonp-url":{"requires":["jsonp"]},"loader":{"use":["loader-base","loader-rollup","loader-yui3"]},"loader-base":{"requires":["get","features"]},"loader-rollup":{"requires":["loader-base"]},"loader-yui3":{"requires":["loader-base"]},"matrix":{"requires":["yui-base"]},"model":{"requires":["base-build","escape","json-parse"]},"model-list":{"requires":["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]},"node":{"use":["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"]},"node-base":{"requires":["event-base","node-core","dom-base"]},"node-core":{"requires":["dom-core","selector"]},"node-deprecated":{"requires":["node-base"]},"node-event-delegate":{"requires":["node-base","event-delegate"]},"node-event-html5":{"requires":["node-base"]},"node-event-simulate":{"requires":["node-base","event-simulate"]},"node-flick":{"requires":["classnamemanager","transition","event-flick","plugin"],"skinnable":true},"node-focusmanager":{"requires":["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-load":{"requires":["node-base","io-base"]},"node-menunav":{"requires":["node","classnamemanager","plugin","node-focusmanager"],"skinnable":true},"node-pluginhost":{"requires":["node-base","pluginhost"]},"node-screen":{"requires":["dom-screen","node-base"]},"node-style":{"requires":["dom-style","node-base"]},"oop":{"requires":["yui-base"]},"overlay":{"requires":["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],"skinnable":true},"panel":{"requires":["widget","widget-autohide","widget-buttons","widget-modality","widget-position","widget-position-align","widget-position-constrain","widget-stack","widget-stdmod"],"skinnable":true},"parallel":{"requires":["yui-base"]},"pjax":{"requires":["pjax-base","io-base"]},"pjax-base":{"requires":["classnamemanager","node-event-delegate","router"]},"pjax-plugin":{"requires":["node-pluginhost","pjax","plugin"]},"plugin":{"requires":["base-base"]},"pluginhost":{"use":["pluginhost-base","pluginhost-config"]},"pluginhost-base":{"requires":["yui-base"]},"pluginhost-config":{"requires":["pluginhost-base"]},"profiler":{"requires":["yui-base"]},"querystring":{"use":["querystring-parse","querystring-stringify"]},"querystring-parse":{"requires":["yui-base","array-extras"]},"querystring-parse-simple":{"requires":["yui-base"]},"querystring-stringify":{"requires":["yui-base"]},"querystring-stringify-simple":{"requires":["yui-base"]},"queue-promote":{"requires":["yui-base"]},"range-slider":{"requires":["slider-base","slider-value-range","clickable-rail"]},"recordset":{"use":["recordset-base","recordset-sort","recordset-filter","recordset-indexer"]},"recordset-base":{"requires":["base","arraylist"]},"recordset-filter":{"requires":["recordset-base","array-extras","plugin"]},"recordset-indexer":{"requires":["recordset-base","plugin"]},"recordset-sort":{"requires":["arraysort","recordset-base","plugin"]},"resize":{"use":["resize-base","resize-proxy","resize-constrain"]},"resize-base":{"requires":["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],"skinnable":true},"resize-constrain":{"requires":["plugin","resize-base"]},"resize-plugin":{"optional":["resize-constrain"],"requires":["resize-base","plugin"]},"resize-proxy":{"requires":["plugin","resize-base"]},"rls":{"requires":["get","features"]},"router":{"optional":["querystring-parse"],"requires":["array-extras","base-build","history"]},"scrollview":{"requires":["scrollview-base","scrollview-scrollbars"]},"scrollview-base":{"requires":["widget","event-gestures","event-mousewheel","transition"],"skinnable":true},"scrollview-base-ie":{"condition":{"name":"scrollview-base-ie","trigger":"scrollview-base","ua":"ie"},"requires":["scrollview-base"]},"scrollview-list":{"requires":["plugin","classnamemanager"],"skinnable":true},"scrollview-paginator":{"requires":["plugin"]},"scrollview-scrollbars":{"requires":["classnamemanager","transition","plugin"],"skinnable":true},"selector":{"requires":["selector-native"]},"selector-css2":{"condition":{"name":"selector-css2","test":function(d){var c=d.config.doc,b=c&&!("querySelectorAll" in c);return b;},"trigger":"selector"},"requires":["selector-native"]},"selector-css3":{"requires":["selector-native","selector-css2"]},"selector-native":{"requires":["dom-base"]},"shim-plugin":{"requires":["node-style","node-pluginhost"]},"slider":{"use":["slider-base","slider-value-range","clickable-rail","range-slider"]},"slider-base":{"requires":["widget","dd-constrain","substitute","event-key"],"skinnable":true},"slider-value-range":{"requires":["slider-base"]},"sortable":{"requires":["dd-delegate","dd-drop-plugin","dd-proxy"]},"sortable-scroll":{"requires":["dd-scroll","sortable"]},"stylesheet":{"requires":["yui-base"]},"substitute":{"optional":["dump"],"requires":["yui-base"]},"swf":{"requires":["event-custom","node","swfdetect","escape"]},"swfdetect":{"requires":["yui-base"]},"tabview":{"requires":["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],"skinnable":true},"tabview-base":{"requires":["node-event-delegate","classnamemanager","skin-sam-tabview"]},"tabview-plugin":{"requires":["tabview-base"]},"test":{"requires":["event-simulate","event-custom","substitute","json-stringify"],"skinnable":true},"test-console":{"requires":["console-filters","test"],"skinnable":true},"text":{"use":["text-accentfold","text-wordbreak"]},"text-accentfold":{"requires":["array-extras","text-data-accentfold"]},"text-data-accentfold":{"requires":["yui-base"]},"text-data-wordbreak":{"requires":["yui-base"]},"text-wordbreak":{"requires":["array-extras","text-data-wordbreak"]},"transition":{"requires":["node-style"]},"transition-timer":{"condition":{"name":"transition-timer","test":function(e){var d=e.config.doc,c=(d)?d.documentElement:null,b=true;
+if(c&&c.style){b=!("MozTransition" in c.style||"WebkitTransition" in c.style);}return b;},"trigger":"transition"},"requires":["transition"]},"uploader":{"requires":["uploader-html5","uploader-flash"]},"uploader-deprecated":{"requires":["event-custom","node","base","swf"]},"uploader-flash":{"requires":["swf","widget","substitute","base","cssbutton","node","event-custom","file-flash","uploader-queue"]},"uploader-html5":{"requires":["widget","node-event-simulate","substitute","file-html5","uploader-queue"]},"uploader-queue":{"requires":["base"]},"view":{"requires":["base-build","node-event-delegate"]},"view-node-map":{"requires":["view"]},"widget":{"use":["widget-base","widget-htmlparser","widget-skin","widget-uievents"]},"widget-anim":{"requires":["anim-base","plugin","widget"]},"widget-autohide":{"requires":["base-build","event-key","event-outside","widget"]},"widget-base":{"requires":["attribute","base-base","base-pluginhost","classnamemanager","event-focus","node-base","node-style"],"skinnable":true},"widget-base-ie":{"condition":{"name":"widget-base-ie","trigger":"widget-base","ua":"ie"},"requires":["widget-base"]},"widget-buttons":{"requires":["button-plugin","cssbutton","widget-stdmod"]},"widget-child":{"requires":["base-build","widget"]},"widget-htmlparser":{"requires":["widget-base"]},"widget-locale":{"requires":["widget-base"]},"widget-modality":{"requires":["base-build","event-outside","widget"],"skinnable":true},"widget-parent":{"requires":["arraylist","base-build","widget"]},"widget-position":{"requires":["base-build","node-screen","widget"]},"widget-position-align":{"requires":["widget-position"]},"widget-position-constrain":{"requires":["widget-position"]},"widget-skin":{"requires":["widget-base"]},"widget-stack":{"requires":["base-build","widget"],"skinnable":true},"widget-stdmod":{"requires":["base-build","widget"]},"widget-uievents":{"requires":["node-event-delegate","widget-base"]},"yql":{"requires":["jsonp","jsonp-url"]},"yui":{},"yui-base":{},"yui-later":{"requires":["yui-base"]},"yui-log":{"requires":["yui-base"]},"yui-rls":{},"yui-throttle":{"requires":["yui-base"]}};YUI.Env[a.version].md5="f5a3bc9bda2441a3b15fb52c567fc1f7";},"3.5.0",{requires:["loader-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/loader-yui3/loader-yui3.js b/lib/yui/3.5.0/build/loader-yui3/loader-yui3.js
similarity index 80%
rename from lib/yui/3.4.1/build/loader-yui3/loader-yui3.js
rename to lib/yui/3.5.0/build/loader-yui3/loader-yui3.js
index 98feabbebba..071c06dd078 100644
--- a/lib/yui/3.4.1/build/loader-yui3/loader-yui3.js
+++ b/lib/yui/3.5.0/build/loader-yui3/loader-yui3.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -63,6 +63,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"anim-base"
]
},
+ "anim-shape-transform": {
+ "requires": [
+ "anim-base",
+ "anim-easing",
+ "matrix"
+ ]
+ },
"anim-xy": {
"requires": [
"anim-base",
@@ -71,12 +78,52 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"app": {
"use": [
- "controller",
+ "app-base",
+ "app-transitions",
"model",
"model-list",
+ "router",
"view"
]
},
+ "app-base": {
+ "requires": [
+ "classnamemanager",
+ "pjax-base",
+ "router",
+ "view"
+ ]
+ },
+ "app-transitions": {
+ "requires": [
+ "app-base"
+ ]
+ },
+ "app-transitions-css": {
+ "type": "css"
+ },
+ "app-transitions-native": {
+ "condition": {
+ "name": "app-transitions-native",
+ "test": function (Y) {
+ var doc = Y.config.doc,
+ node = doc ? doc.documentElement : null;
+
+ if (node && node.style) {
+ return ('MozTransition' in node.style || 'WebkitTransition' in node.style);
+ }
+
+ return false;
+},
+ "trigger": "app-transitions"
+ },
+ "requires": [
+ "app-transitions",
+ "app-transitions-css",
+ "parallel",
+ "transition"
+ ]
+ },
"array-extras": {
"requires": [
"yui-base"
@@ -120,7 +167,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"attribute-base": {
"requires": [
- "event-custom"
+ "attribute-core",
+ "attribute-events",
+ "attribute-extras"
]
},
"attribute-complex": {
@@ -128,6 +177,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-base"
]
},
+ "attribute-core": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "attribute-events": {
+ "requires": [
+ "event-custom"
+ ]
+ },
+ "attribute-extras": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"autocomplete": {
"use": [
"autocomplete-base",
@@ -245,6 +309,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-complex"
],
"requires": [
+ "base-core",
"attribute-base"
]
},
@@ -253,12 +318,45 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"base-base"
]
},
+ "base-core": {
+ "requires": [
+ "attribute-core"
+ ]
+ },
"base-pluginhost": {
"requires": [
"base-base",
"pluginhost"
]
},
+ "button": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-core": {
+ "requires": [
+ "attribute-core",
+ "classnamemanager",
+ "node-base"
+ ]
+ },
+ "button-group": {
+ "requires": [
+ "button-plugin",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-plugin": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "node-pluginhost"
+ ]
+ },
"cache": {
"use": [
"cache-base",
@@ -285,9 +383,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"calendar-base",
@@ -297,9 +400,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar-base": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"widget",
@@ -321,18 +429,29 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"charts": {
+ "requires": [
+ "charts-base"
+ ]
+ },
+ "charts-base": {
"requires": [
"dom",
"datatype-number",
"datatype-date",
"event-custom",
"event-mouseenter",
+ "event-touch",
"widget",
"widget-position",
"widget-stack",
"graphics"
]
},
+ "charts-legend": {
+ "requires": [
+ "charts-base"
+ ]
+ },
"classnamemanager": {
"requires": [
"yui-base"
@@ -373,13 +492,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"controller": {
- "optional": [
- "querystring-parse"
- ],
- "requires": [
- "array-extras",
- "base-build",
- "history"
+ "use": [
+ "router"
]
},
"cookie": {
@@ -414,6 +528,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssbutton": {
+ "type": "css"
+ },
"cssfonts": {
"type": "css"
},
@@ -427,6 +544,23 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssgrids-base": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "type": "css"
+ },
+ "cssgrids-units": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "requires": [
+ "cssgrids-base"
+ ],
+ "type": "css"
+ },
"cssreset": {
"type": "css"
},
@@ -546,13 +680,28 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"datatable": {
"use": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
"datatable-base",
- "datatable-datasource",
+ "datatable-column-widths",
+ "datatable-message",
+ "datatable-mutable",
"datatable-sort",
- "datatable-scroll"
+ "datatable-datasource"
]
},
"datatable-base": {
+ "requires": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
+ "base-build",
+ "widget"
+ ],
+ "skinnable": true
+ },
+ "datatable-base-deprecated": {
"requires": [
"recordset-base",
"widget",
@@ -561,6 +710,25 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "datatable-body": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-column-widths": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
+ "datatable-core": {
+ "requires": [
+ "escape",
+ "model-list",
+ "node-event-delegate"
+ ]
+ },
"datatable-datasource": {
"requires": [
"datatable-base",
@@ -568,9 +736,53 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"datasource-local"
]
},
+ "datatable-datasource-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
+ "plugin",
+ "datasource-local"
+ ]
+ },
+ "datatable-deprecated": {
+ "use": [
+ "datatable-base-deprecated",
+ "datatable-datasource-deprecated",
+ "datatable-sort-deprecated",
+ "datatable-scroll-deprecated"
+ ]
+ },
+ "datatable-head": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-message": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-mutable": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
"datatable-scroll": {
"requires": [
"datatable-base",
+ "datatable-column-widths",
+ "dom-screen"
+ ],
+ "skinnable": true
+ },
+ "datatable-scroll-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
"plugin"
]
},
@@ -579,7 +791,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"en"
],
"requires": [
- "datatable-base",
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-sort-deprecated": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base-deprecated",
"plugin",
"recordset-sort"
]
@@ -770,7 +991,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "dd-gestures",
"test": function(Y) {
- return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome));
+ return ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.chrome && Y.UA.chrome < 6));
},
"trigger": "dd-drag"
},
@@ -895,7 +1116,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"editor": {
"use": [
"frame",
- "selection",
+ "editor-selection",
"exec-command",
"editor-base",
"editor-para",
@@ -911,7 +1132,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"frame",
"node",
"exec-command",
- "selection"
+ "editor-selection"
]
},
"editor-bidi": {
@@ -930,10 +1151,31 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"editor-para": {
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-para-base": {
"requires": [
"editor-base"
]
},
+ "editor-para-ie": {
+ "condition": {
+ "name": "editor-para-ie",
+ "trigger": "editor-para",
+ "ua": "ie",
+ "when": "instead"
+ },
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-selection": {
+ "requires": [
+ "node"
+ ]
+ },
"editor-tab": {
"requires": [
"editor-base"
@@ -958,7 +1200,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"event-focus",
"event-resize",
"event-hover",
- "event-outside"
+ "event-outside",
+ "event-touch",
+ "event-move",
+ "event-flick",
+ "event-valuechange"
]
},
"event-base": {
@@ -985,6 +1231,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "event-contextmenu": {
+ "requires": [
+ "event-synthetic",
+ "dom-screen"
+ ]
+ },
"event-custom": {
"use": [
"event-custom-base",
@@ -1094,6 +1346,22 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"yui-base"
]
},
+ "file": {
+ "requires": [
+ "file-flash",
+ "file-html5"
+ ]
+ },
+ "file-flash": {
+ "requires": [
+ "base"
+ ]
+ },
+ "file-html5": {
+ "requires": [
+ "base"
+ ]
+ },
"frame": {
"requires": [
"base",
@@ -1112,7 +1380,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"node",
"event-custom",
- "pluginhost"
+ "pluginhost",
+ "matrix"
]
},
"graphics-canvas": {
@@ -1120,8 +1389,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
},
@@ -1134,8 +1405,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas-default",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
}
@@ -1144,8 +1417,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
},
@@ -1157,8 +1434,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg-default",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
}
@@ -1188,6 +1469,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"trigger": "graphics"
}
},
+ "handlebars": {
+ "use": [
+ "handlebars-compiler"
+ ]
+ },
+ "handlebars-base": {
+ "requires": [
+ "escape"
+ ]
+ },
+ "handlebars-compiler": {
+ "requires": [
+ "handlebars-base"
+ ]
+ },
"highlight": {
"use": [
"highlight-base",
@@ -1296,6 +1592,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "io-nodejs": {
+ "condition": {
+ "name": "io-nodejs",
+ "trigger": "io-base",
+ "ua": "nodejs"
+ },
+ "requires": [
+ "io-base"
+ ]
+ },
"io-queue": {
"requires": [
"io-base",
@@ -1350,7 +1656,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"loader-base": {
"requires": [
- "get"
+ "get",
+ "features"
]
},
"loader-rollup": {
@@ -1363,6 +1670,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"loader-base"
]
},
+ "matrix": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"model": {
"requires": [
"base-build",
@@ -1496,17 +1808,42 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"panel": {
"requires": [
"widget",
- "widget-stdmod",
+ "widget-autohide",
+ "widget-buttons",
+ "widget-modality",
"widget-position",
"widget-position-align",
- "widget-stack",
"widget-position-constrain",
- "widget-modality",
- "widget-autohide",
- "widget-buttons"
+ "widget-stack",
+ "widget-stdmod"
],
"skinnable": true
},
+ "parallel": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "pjax": {
+ "requires": [
+ "pjax-base",
+ "io-base"
+ ]
+ },
+ "pjax-base": {
+ "requires": [
+ "classnamemanager",
+ "node-event-delegate",
+ "router"
+ ]
+ },
+ "pjax-plugin": {
+ "requires": [
+ "node-pluginhost",
+ "pjax",
+ "plugin"
+ ]
+ },
"plugin": {
"requires": [
"base-base"
@@ -1653,6 +1990,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"features"
]
},
+ "router": {
+ "optional": [
+ "querystring-parse"
+ ],
+ "requires": [
+ "array-extras",
+ "base-build",
+ "history"
+ ]
+ },
"scrollview": {
"requires": [
"scrollview-base",
@@ -1663,6 +2010,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"event-gestures",
+ "event-mousewheel",
"transition"
],
"skinnable": true
@@ -1697,11 +2045,6 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
- "selection": {
- "requires": [
- "node"
- ]
- },
"selector": {
"requires": [
"selector-native"
@@ -1751,7 +2094,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"dd-constrain",
- "substitute"
+ "substitute",
+ "event-key"
],
"skinnable": true
},
@@ -1831,6 +2175,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "test-console": {
+ "requires": [
+ "console-filters",
+ "test"
+ ],
+ "skinnable": true
+ },
"text": {
"use": [
"text-accentfold",
@@ -1885,6 +2236,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"uploader": {
+ "requires": [
+ "uploader-html5",
+ "uploader-flash"
+ ]
+ },
+ "uploader-deprecated": {
"requires": [
"event-custom",
"node",
@@ -1892,45 +2249,76 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"swf"
]
},
+ "uploader-flash": {
+ "requires": [
+ "swf",
+ "widget",
+ "substitute",
+ "base",
+ "cssbutton",
+ "node",
+ "event-custom",
+ "file-flash",
+ "uploader-queue"
+ ]
+ },
+ "uploader-html5": {
+ "requires": [
+ "widget",
+ "node-event-simulate",
+ "substitute",
+ "file-html5",
+ "uploader-queue"
+ ]
+ },
+ "uploader-queue": {
+ "requires": [
+ "base"
+ ]
+ },
"view": {
"requires": [
"base-build",
"node-event-delegate"
]
},
+ "view-node-map": {
+ "requires": [
+ "view"
+ ]
+ },
"widget": {
"use": [
"widget-base",
"widget-htmlparser",
- "widget-uievents",
- "widget-skin"
+ "widget-skin",
+ "widget-uievents"
]
},
"widget-anim": {
"requires": [
- "plugin",
"anim-base",
+ "plugin",
"widget"
]
},
"widget-autohide": {
"requires": [
- "widget",
- "event-outside",
"base-build",
- "event-key"
- ],
- "skinnable": false
+ "event-key",
+ "event-outside",
+ "widget"
+ ]
},
"widget-base": {
"requires": [
"attribute",
- "event-focus",
"base-base",
"base-pluginhost",
+ "classnamemanager",
+ "event-focus",
"node-base",
- "node-style",
- "classnamemanager"
+ "node-style"
],
"skinnable": true
},
@@ -1946,11 +2334,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-buttons": {
"requires": [
- "widget",
- "base-build",
+ "button-plugin",
+ "cssbutton",
"widget-stdmod"
- ],
- "skinnable": true
+ ]
},
"widget-child": {
"requires": [
@@ -1970,16 +2357,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-modality": {
"requires": [
- "widget",
+ "base-build",
"event-outside",
- "base-build"
+ "widget"
],
- "skinnable": false
+ "skinnable": true
},
"widget-parent": {
"requires": [
- "base-build",
"arraylist",
+ "base-build",
"widget"
]
},
@@ -2020,8 +2407,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-uievents": {
"requires": [
- "widget-base",
- "node-event-delegate"
+ "node-event-delegate",
+ "widget-base"
]
},
"yql": {
@@ -2049,7 +2436,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
}
};
-YUI.Env[Y.version].md5 = '105ebffae27a0e3d7331f8cf5c0bb282';
+YUI.Env[Y.version].md5 = 'f5a3bc9bda2441a3b15fb52c567fc1f7';
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
diff --git a/lib/yui/3.4.1/build/loader/loader.js b/lib/yui/3.5.0/build/loader/loader-debug.js
similarity index 72%
rename from lib/yui/3.4.1/build/loader/loader.js
rename to lib/yui/3.5.0/build/loader/loader-debug.js
index 88468571728..d1662288be2 100644
--- a/lib/yui/3.4.1/build/loader/loader.js
+++ b/lib/yui/3.5.0/build/loader/loader-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -19,7 +19,7 @@ if (!YUI.Env[Y.version]) {
BUILD = '/build/',
ROOT = VERSION + BUILD,
CDN_BASE = Y.Env.base,
- GALLERY_VERSION = 'gallery-2011.09.14-20-40',
+ GALLERY_VERSION = 'gallery-2012.04.10-14-57',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
@@ -40,18 +40,28 @@ if (!YUI.Env[Y.version]) {
groups: {},
patterns: {} },
groups = META.groups,
- yui2Update = function(tnt, yui2) {
- var root = TNT + '.' +
- (tnt || TNT_VERSION) + '/' +
- (yui2 || YUI2_VERSION) + BUILD;
- groups.yui2.base = CDN_BASE + root;
- groups.yui2.root = root;
- },
- galleryUpdate = function(tag) {
- var root = (tag || GALLERY_VERSION) + BUILD;
- groups.gallery.base = CDN_BASE + root;
- groups.gallery.root = root;
- };
+ yui2Update = function(tnt, yui2, config) {
+
+ var root = TNT + '.' +
+ (tnt || TNT_VERSION) + '/' +
+ (yui2 || YUI2_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.yui2.base = base + root;
+ groups.yui2.root = root;
+ groups.yui2.comboBase = combo;
+ },
+ galleryUpdate = function(tag, config) {
+ var root = (tag || GALLERY_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.gallery.base = base + root;
+ groups.gallery.root = root;
+ groups.gallery.comboBase = combo;
+ };
+
groups[VERSION] = {};
@@ -96,10 +106,8 @@ if (!YUI.Env[Y.version]) {
/**
* Loader dynamically loads script and css files. It includes the dependency
- * info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * information for the version of the library in use, and will automatically pull in
+ * dependencies for the modules requested. It can also load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
* YUI files.
@@ -111,7 +119,7 @@ if (!YUI.Env[Y.version]) {
var NOT_FOUND = {},
NO_REQUIREMENTS = [],
- MAX_URL_LENGTH = 2048,
+ MAX_URL_LENGTH = 1024,
GLOBAL_ENV = YUI.Env,
GLOBAL_LOADED = GLOBAL_ENV._loaded,
CSS = 'css',
@@ -139,10 +147,6 @@ var NOT_FOUND = {},
return path;
};
-if (YUI.Env.aliases) {
- YUI.Env.aliases = {}; //Don't need aliases if Loader is present
-}
-
/**
* The component metadata is stored in Y.Env.meta.
* Part of the loader module.
@@ -154,111 +158,55 @@ Y.Env.meta = META;
/**
* Loader dynamically loads script and css files. It includes the dependency
* info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * dependencies for the modules requested. It can load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
- * YUI files.
- *
- * While the loader can be instantiated by the end user, it normally is not.
- * @see YUI.use for the normal use case. The use function automatically will
- * pull in missing dependencies.
- *
+ * YUI files. You can also specify an external, custom combo service to host
+ * your modules as well.
+
+ var Y = YUI();
+ var loader = new Y.Loader({
+ filter: 'debug',
+ base: '../../',
+ root: 'build/',
+ combine: true,
+ require: ['node', 'dd', 'console']
+ });
+ var out = loader.resolve(true);
+
* @constructor
* @class Loader
- * @param {object} o an optional set of configuration options. Valid options:
- *
- *
base:
- * The base dir
- *
comboBase:
- * The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?
- *
root:
- * The root path to prepend to module names for the combo service.
- * Ex: 2.5.2/build/
- *
filter:.
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- *
- *
DEBUG
- *
Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget
- *
RAW
- *
Selects the non-minified version of the library (e.g., event.js).
- *
- *
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- *
filters: per-component filter specification. If specified
- * for a given component, this overrides the filter config. _Note:_ This does not work on combo urls, use the filter property instead.
- *
combine:
- * Use the YUI combo service to reduce the number of http connections
- * required to load your dependencies
- *
ignore:
- * A list of modules that should never be dynamically loaded
- *
force:
- * A list of modules that should always be loaded when required, even if
- * already present on the page
- *
insertBefore:
- * Node or id for a node that should be used as the insertion point for
- * new nodes
- *
charset:
- * charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes)
- *
- *
jsAttributes: object literal containing attributes to add to script
- * nodes
- *
cssAttributes: object literal containing attributes to add to link
- * nodes
- *
timeout:
- * The number of milliseconds before a timeout occurs when dynamically
- * loading nodes. If not set, there is no timeout
- *
context:
- * execution context for all callbacks
- *
onSuccess:
- * callback for the 'success' event
- *
onFailure: callback for the 'failure' event
- *
onCSS: callback for the 'CSSComplete' event. When loading YUI
- * components with CSS the CSS is loaded first, then the script. This
- * provides a moment you can tie into to improve
- * the presentation of the page while the script is loading.
- *
onTimeout:
- * callback for the 'timeout' event
- *
onProgress:
- * callback executed each time a script or css file is loaded
- *
modules:
- * A list of module definitions. See Loader.addModule for the supported
- * module metadata
- *
groups:
- * A list of group definitions. Each group can contain specific definitions
- * for base, comboBase, combine, and accepts a list of modules. See above
- * for the description of these properties.
- *
2in3: the version of the YUI 2 in 3 wrapper to use. The intrinsic
- * support for YUI 2 modules in YUI 3 relies on versions of the YUI 2
- * components inside YUI 3 module wrappers. These wrappers
- * change over time to accomodate the issues that arise from running YUI 2
- * in a YUI 3 sandbox.
- *
yui2: when using the 2in3 project, you can select the version of
- * YUI 2 to use. Valid values * are 2.2.2, 2.3.1, 2.4.1, 2.5.2, 2.6.0,
- * 2.7.0, 2.8.0, and 2.8.1 [default] -- plus all versions of YUI 2
- * going forward.
- *
+ * @param {Object} config an optional set of configuration options.
+ * @param {String} config.base The base dir which to fetch this module from
+ * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
+ * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
+ * @param {String|Object} config.filter A filter to apply to result urls. See filter property
+ * @param {Object} config.filters Per-component filter specification. If specified for a given component, this overrides the filter config.
+ * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
+ * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
+ * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
+ * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
+ * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
+ * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
+ * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes. If not set, there is no timeout
+ * @param {Object} config.context Execution context for all callbacks
+ * @param {Function} config.onSuccess Callback for the 'success' event
+ * @param {Function} config.onFailure Callback for the 'failure' event
+ * @param {Function} config.onCSS Callback for the 'CSSComplete' event. When loading YUI components with CSS the CSS is loaded first, then the script. This provides a moment you can tie into to improve the presentation of the page while the script is loading.
+ * @param {Function} config.onTimeout Callback for the 'timeout' event
+ * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
+ * @param {Object} config.modules A list of module definitions. See Loader.addModule for the supported module metadata
+ * @param {Object} config.groups A list of group definitions. Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
+ * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use. The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers. These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
+ * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use. Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
*/
Y.Loader = function(o) {
var defaults = META.modules,
self = this;
+
+ //Catch no config passed.
+ o = o || {};
modulekey = META.md5;
@@ -408,7 +356,7 @@ Y.Loader = function(o) {
* @property ignoreRegistered
* @default false
*/
- // self.ignoreRegistered = false;
+ //self.ignoreRegistered = false;
/**
* Root path to prepend to module path for the combo
@@ -470,12 +418,12 @@ Y.Loader = function(o) {
*
* You can also define a custom filter, which must be an object literal
* containing a search expression and a replace string:
- *
+ *
+ * myFilter: {
+ * 'searchExp': "-min\\.js",
+ * 'replaceStr': "-debug.js"
+ * }
+ *
* @property filter
* @type string| {searchExp: string, replaceStr: string}
*/
@@ -524,29 +472,27 @@ Y.Loader = function(o) {
* being loaded for calendar (if calendar was requested), and
* 'sam' for all other skinnable components:
*
- *
- * skin: {
+ * skin: {
+ * // The default skin, which is automatically applied if not
+ * // overriden by a component-specific skin definition.
+ * // Change this in to apply a different skin globally
+ * defaultSkin: 'sam',
*
- * // The default skin, which is automatically applied if not
- * // overriden by a component-specific skin definition.
- * // Change this in to apply a different skin globally
- * defaultSkin: 'sam',
- *
- * // This is combined with the loader base property to get
- * // the default root directory for a skin. ex:
- * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
- * base: 'assets/skins/',
- *
- * // Any component-specific overrides can be specified here,
- * // making it possible to load different skins for different
- * // components. It is possible to load more than one skin
- * // for a given component as well.
- * overrides: {
- * calendar: ['skin1', 'skin2']
+ * // This is combined with the loader base property to get
+ * // the default root directory for a skin. ex:
+ * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
+ * base: 'assets/skins/',
+ *
+ * // Any component-specific overrides can be specified here,
+ * // making it possible to load different skins for different
+ * // components. It is possible to load more than one skin
+ * // for a given component as well.
+ * overrides: {
+ * calendar: ['skin1', 'skin2']
+ * }
* }
- * }
- *
- * @property skin
+ * @property skin
+ * @type {Object}
*/
self.skin = Y.merge(Y.Env.meta.skin);
@@ -567,27 +513,30 @@ Y.Loader = function(o) {
if (cache) {
oeach(cache, function modCache(v, k) {
- //self.moduleInfo[k] = Y.merge(v);
- self.moduleInfo[k] = v;
+ self.moduleInfo[k] = Y.merge(v);
});
cache = GLOBAL_ENV._conditions;
oeach(cache, function condCache(v, k) {
- //self.conditions[k] = Y.merge(v);
- self.conditions[k] = v;
+ self.conditions[k] = Y.merge(v);
});
} else {
oeach(defaults, self.addModule, self);
}
- if (!GLOBAL_ENV._renderedMods) {
- //GLOBAL_ENV._renderedMods = Y.merge(self.moduleInfo);
- //GLOBAL_ENV._conditions = Y.merge(self.conditions);
- GLOBAL_ENV._renderedMods = self.moduleInfo;
- GLOBAL_ENV._conditions = self.conditions;
- }
+
+ /**
+ * Set when beginning to compute the dependency tree.
+ * Composed of what YUI reports to be loaded combined
+ * with what has been loaded by any instance on the page
+ * with the version number specified in the metadata.
+ * @property loaded
+ * @type {string: boolean}
+ */
+ self.loaded = GLOBAL_LOADED[VERSION];
+
self._inspectPage();
@@ -595,6 +544,8 @@ Y.Loader = function(o) {
self._config(o);
+ self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
+
self.testresults = null;
if (Y.config.tests) {
@@ -625,16 +576,6 @@ Y.Loader = function(o) {
*/
self.sorted = [];
- /**
- * Set when beginning to compute the dependency tree.
- * Composed of what YUI reports to be loaded combined
- * with what has been loaded by any instance on the page
- * with the version number specified in the metadata.
- * @property loaded
- * @type {string: boolean}
- */
- self.loaded = GLOBAL_LOADED[VERSION];
-
/*
* A list of modules to attach to the YUI instance when complete.
* If not supplied, the sorted list of dependencies are applied.
@@ -679,7 +620,25 @@ Y.Loader = function(o) {
};
Y.Loader.prototype = {
+ /**
+ Regex that matches a CSS URL. Used to guess the file type when it's not
+ specified.
+ @property REGEX_CSS
+ @type RegExp
+ @final
+ @protected
+ @since 3.5.0
+ **/
+ REGEX_CSS: /\.css(?:[?;].*)?$/i,
+
+ /**
+ * Default filters for raw and debug
+ * @property FILTER_DEFS
+ * @type Object
+ * @final
+ * @protected
+ */
FILTER_DEFS: {
RAW: {
'searchExp': '-min\\.js',
@@ -696,6 +655,17 @@ Y.Loader.prototype = {
* @private
*/
_inspectPage: function() {
+
+ //Inspect the page for CSS only modules and mark them as loaded.
+ oeach(this.moduleInfo, function(v, k) {
+ if (v.type && v.type === CSS) {
+ if (this.isCSSLoaded(v.name)) {
+ Y.log('Found CSS module on page: ' + v.name, 'info', 'loader');
+ this.loaded[k] = true;
+ }
+ }
+ }, this);
+
oeach(ON_PAGE, function(v, k) {
if (v.details) {
var m = this.moduleInfo[k],
@@ -704,9 +674,7 @@ Y.Loader.prototype = {
if (m) {
if (!m._inspected && req && mr.length != req.length) {
// console.log('deleting ' + m.name);
- // m.requres = YObject.keys(Y.merge(YArray.hash(req), YArray.hash(mr)));
delete m.expanded;
- // delete m.expanded_map;
}
} else {
m = this.addModule(v.details, k);
@@ -784,6 +752,7 @@ Y.Loader.prototype = {
/**
* Apply a new config to the Loader instance
* @method _config
+ * @private
* @param {Object} o The new configuration
*/
_config: function(o) {
@@ -796,25 +765,37 @@ Y.Loader.prototype = {
if (i == 'require') {
self.require(val);
} else if (i == 'skin') {
- Y.mix(self.skin, o[i], true);
+ //If the config.skin is a string, format to the expected object
+ if (typeof val === 'string') {
+ self.skin.defaultSkin = o.skin;
+ val = {
+ defaultSkin: val
+ };
+ }
+
+ Y.mix(self.skin, val, true);
} else if (i == 'groups') {
for (j in val) {
if (val.hasOwnProperty(j)) {
+ // Y.log('group: ' + j);
groupName = j;
group = val[j];
self.addGroup(group, groupName);
+ if (group.aliases) {
+ oeach(group.aliases, self.addAlias, self);
+ }
}
}
} else if (i == 'modules') {
// add a hash of module definitions
oeach(val, self.addModule, self);
+ } else if (i === 'aliases') {
+ oeach(val, self.addAlias, self);
} else if (i == 'gallery') {
- this.groups.gallery.update(val);
+ this.groups.gallery.update(val, o);
} else if (i == 'yui2' || i == '2in3') {
- this.groups.yui2.update(o['2in3'], o.yui2);
- } else if (i == 'maxURLLength') {
- self[i] = Math.min(MAX_URL_LENGTH, val);
+ this.groups.yui2.update(o['2in3'], o.yui2, o);
} else {
self[i] = val;
}
@@ -833,9 +814,12 @@ Y.Loader.prototype = {
self.require('yui-log', 'dump');
}
}
+
if (self.lang) {
- self.require('intl-base', 'intl');
+ //Removed this so that when Loader is invoked
+ //it doesn't request what it doesn't need.
+ //self.require('intl-base', 'intl');
}
},
@@ -897,26 +881,54 @@ Y.Loader.prototype = {
}
this.addModule(nmod, name);
+ Y.log('Adding skin (' + name + '), ' + parent + ', ' + pkg + ', ' + info[name].path, 'info', 'loader');
}
}
return name;
},
-
+ /**
+ * Adds an alias module to the system
+ * @method addAlias
+ * @param {Array} use An array of modules that makes up this alias
+ * @param {String} name The name of the alias
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addAlias([ 'node', 'yql' ], 'davglass');
+ * loader.require(['davglass']);
+ * var out = loader.resolve(true);
+ *
+ * //out.js will contain Node and YQL modules
+ */
+ addAlias: function(use, name) {
+ YUI.Env.aliases[name] = use;
+ this.addModule({
+ name: name,
+ use: use
+ });
+ },
/**
* Add a new module group
- *
- *
name:
required, the group name
- *
base:
The base dir for this module group
- *
root:
The root path to add to each combo
- * resource path
- *
combine:
combo handle
- *
comboBase:
combo service base path
- *
modules:
the group of modules
- *
* @method addGroup
- * @param {object} o An object containing the module data.
- * @param {string} name the group name.
+ * @param {Object} config An object containing the group configuration data
+ * @param {String} config.name required, the group name
+ * @param {String} config.base The base directory for this module group
+ * @param {String} config.root The root path to add to each combo resource path
+ * @param {Boolean} config.combine Should the request be combined
+ * @param {String} config.comboBase Combo service base path
+ * @param {Object} config.modules The group of modules
+ * @param {String} name the group name.
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addGroup({
+ * name: 'davglass',
+ * combine: true,
+ * comboBase: '/combo?',
+ * root: '',
+ * modules: {
+ * //Module List here
+ * }
+ * }, 'davglass');
*/
addGroup: function(o, name) {
var mods = o.modules,
@@ -934,6 +946,9 @@ Y.Loader.prototype = {
if (mods) {
oeach(mods, function(v, k) {
+ if (typeof v === 'string') {
+ v = { name: k, fullpath: v };
+ }
v.group = name;
self.addModule(v, k);
}, self);
@@ -942,58 +957,40 @@ Y.Loader.prototype = {
/**
* Add a new module to the component metadata.
- *
- *
name:
required, the component name
- *
type:
required, the component type (js or css)
- *
- *
path:
required, the path to the script from
- * "base"
- *
requires:
array of modules required by this
- * component
- *
optional:
array of optional modules for this
- * component
- *
supersedes:
array of the modules this component
- * replaces
- *
after:
array of modules the components which, if
- * present, should be sorted above this one
- *
after_map:
faster alternative to 'after' -- supply
- * a hash instead of an array
- *
rollup:
the number of superseded modules required
- * for automatic rollup
- *
fullpath:
If fullpath is specified, this is used
- * instead of the configured base + path
- *
skinnable:
flag to determine if skin assets should
- * automatically be pulled in
- *
submodules:
a hash of submodules
- *
group:
The group the module belongs to -- this
- * is set automatically when it is added as part of a group
- * configuration.
- *
lang:
- *
array of BCP 47 language tags of languages for which this
- * module has localized resource bundles,
- * e.g., ["en-GB","zh-Hans-CN"]
- *
condition:
- *
Specifies that the module should be loaded automatically if
- * a condition is met. This is an object with up to three fields:
- * [trigger] - the name of a module that can trigger the auto-load
- * [test] - a function that returns true when the module is to be
- * loaded.
- * [when] - specifies the load order of the conditional module
- * with regard to the position of the trigger module.
- * This should be one of three values: 'before', 'after', or
- * 'instead'. The default is 'after'.
- *
- *
testresults:
a hash of test results from Y.Features.all()
- *
* @method addModule
- * @param {object} o An object containing the module data.
- * @param {string} name the module name (optional), required if not
- * in the module data.
- * @return {object} the module definition or null if
- * the object passed in did not provide all required attributes.
+ * @param {Object} config An object containing the module data.
+ * @param {String} config.name Required, the component name
+ * @param {String} config.type Required, the component type (js or css)
+ * @param {String} config.path Required, the path to the script from `base`
+ * @param {Array} config.requires Array of modules required by this component
+ * @param {Array} [config.optional] Array of optional modules for this component
+ * @param {Array} [config.supersedes] Array of the modules this component replaces
+ * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
+ * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
+ * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
+ * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
+ * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
+ * @param {Object} [config.submodules] Hash of submodules
+ * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
+ * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
+ * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to three fields:
+ * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
+ * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
+ * @param {String} [config.condition.when] Specifies the load order of the conditional module
+ * with regard to the position of the trigger module.
+ * This should be one of three values: `before`, `after`, or `instead`. The default is `after`.
+ * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
+ * @param {Function} [config.configFn] A function to exectute when configuring this module
+ * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
+ * @param {String} [name] The module name, required if not in the module data.
+ * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
*/
addModule: function(o, name) {
name = name || o.name;
+
+ if (typeof o === 'string') {
+ o = { name: name, fullpath: o };
+ }
//Only merge this data if the temp flag is set
//from an earlier pass from a pattern or else
@@ -1015,7 +1012,13 @@ Y.Loader.prototype = {
}
if (!o.type) {
+ //Always assume it's javascript unless the CSS pattern is matched.
o.type = JS;
+ var p = o.path || o.fullpath;
+ if (p && this.REGEX_CSS.test(p)) {
+ Y.log('Auto determined module type as CSS', 'warn', 'loader');
+ o.type = CSS;
+ }
}
if (!o.path && !o.fullpath) {
@@ -1024,7 +1027,6 @@ Y.Loader.prototype = {
o.supersedes = o.supersedes || o.use;
o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
- o.requires = this.filterRequires(o.requires) || [];
// Handle submodule logic
var subs = o.submodules, i, l, t, sup, s, smod, plugins, plug,
@@ -1032,9 +1034,18 @@ Y.Loader.prototype = {
overrides, skinname, when,
conditions = this.conditions, trigger;
// , existing = this.moduleInfo[name], newr;
-
+
this.moduleInfo[name] = o;
+ o.requires = o.requires || [];
+
+ if (o.skinnable) {
+ skinname = this._addSkin(this.skin.defaultSkin, name);
+ o.requires.unshift(skinname);
+ }
+
+ o.requires = this.filterRequires(o.requires) || [];
+
if (!o.langPack && o.lang) {
langs = YArray(o.lang);
for (j = 0; j < langs.length; j++) {
@@ -1047,6 +1058,7 @@ Y.Loader.prototype = {
}
}
+
if (subs) {
sup = o.supersedes || [];
l = 0;
@@ -1111,6 +1123,7 @@ Y.Loader.prototype = {
o.lang.push(lang);
}
+// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
// default packages
@@ -1127,6 +1140,7 @@ Y.Loader.prototype = {
smod.supersedes.push(supName);
}
+// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
}
@@ -1192,7 +1206,12 @@ Y.Loader.prototype = {
}
}
+ if (o.supersedes) {
+ o.supersedes = this.filterRequires(o.supersedes);
+ }
+
if (o.after) {
+ o.after = this.filterRequires(o.after);
o.after_map = YArray.hash(o.after);
}
@@ -1201,10 +1220,20 @@ Y.Loader.prototype = {
if (o.configFn) {
ret = o.configFn(o);
if (ret === false) {
+ Y.log('Config function returned false for ' + name + ', skipping.', 'info', 'loader');
delete this.moduleInfo[name];
+ delete GLOBAL_ENV._renderedMods[name];
o = null;
}
}
+ //Add to global cache
+ if (o) {
+ if (!GLOBAL_ENV._renderedMods) {
+ GLOBAL_ENV._renderedMods = {};
+ }
+ GLOBAL_ENV._renderedMods[name] = Y.merge(o);
+ GLOBAL_ENV._conditions = conditions;
+ }
return o;
},
@@ -1298,12 +1327,20 @@ Y.Loader.prototype = {
*/
getRequires: function(mod) {
- if (!mod || mod._parsed) {
+ if (!mod) {
+ //console.log('returning no reqs for ' + mod.name);
return NO_REQUIREMENTS;
}
+ if (mod._parsed) {
+ //console.log('returning requires for ' + mod.name, mod.requires);
+ return mod.expanded || NO_REQUIREMENTS;
+ }
+
+ //TODO add modue cache here out of scope..
+
var i, m, j, add, packName, lang, testresults = this.testresults,
- name = mod.name, cond, go,
+ name = mod.name, cond,
adddef = ON_PAGE[name] && ON_PAGE[name].details,
d, k, m1,
r, old_mod,
@@ -1328,13 +1365,13 @@ Y.Loader.prototype = {
// if (mod.expanded && (!mod.langCache || mod.langCache == this.lang)) {
if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
+ //Y.log('Already expanded ' + name + ', ' + mod.expanded);
return mod.expanded;
}
d = [];
hash = {};
-
r = this.filterRequires(mod.requires);
if (mod.lang) {
//If a module has a lang attribute, auto add the intl requirement.
@@ -1344,11 +1381,14 @@ Y.Loader.prototype = {
}
o = this.filterRequires(mod.optional);
+ // Y.log("getRequires: " + name + " (dirty:" + this.dirty +
+ // ", expanded:" + mod.expanded + ")");
mod._parsed = true;
mod.langCache = this.lang;
for (i = 0; i < r.length; i++) {
+ //Y.log(name + ' requiring ' + r[i], 'info', 'loader');
if (!hash[r[i]]) {
d.push(r[i]);
hash[r[i]] = true;
@@ -1413,6 +1453,8 @@ Y.Loader.prototype = {
cond = this.conditions[name];
if (cond) {
+ //Set the module to not parsed since we have conditionals and this could change the dependency tree.
+ mod._parsed = false;
if (testresults && ftests) {
oeach(testresults, function(result, id) {
var condmod = ftests[id].name;
@@ -1426,8 +1468,12 @@ Y.Loader.prototype = {
} else {
oeach(cond, function(def, condmod) {
if (!hash[condmod]) {
- go = def && ((def.ua && Y.UA[def.ua]) ||
- (def.test && def.test(Y, r)));
+ //first see if they've specfied a ua check
+ //then see if they've got a test fn & if it returns true
+ //otherwise just having a condition block is enough
+ var go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
+ (def.test && def.test(Y, r)));
+
if (go) {
hash[condmod] = true;
d.push(condmod);
@@ -1437,6 +1483,7 @@ Y.Loader.prototype = {
for (j = 0; j < add.length; j++) {
d.push(add[j]);
}
+
}
}
}
@@ -1459,11 +1506,15 @@ Y.Loader.prototype = {
}
for (i = 0; i < skindef[skinname].length; i++) {
skinmod = this._addSkin(skindef[skinname][i], name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
} else {
skinmod = this._addSkin(this.skin.defaultSkin, name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
}
@@ -1473,6 +1524,7 @@ Y.Loader.prototype = {
if (mod.lang && !mod.langPack && Y.Intl) {
lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
+ //Y.log('Best lang: ' + lang + ', this.lang: ' + this.lang + ', mod.lang: ' + mod.lang);
packName = this.getLangPackName(lang, name);
if (packName) {
d.unshift(packName);
@@ -1487,7 +1539,39 @@ Y.Loader.prototype = {
return mod.expanded;
},
+ /**
+ * Check to see if named css module is already loaded on the page
+ * @method isCSSLoaded
+ * @param {String} name The name of the css file
+ * @return Boolean
+ */
+ isCSSLoaded: function(name, skip) {
+ //TODO - Make this call a batching call with name being an array
+ if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
+ Y.log('isCSSLoaded was skipped for ' + name, 'warn', 'loader');
+ return false;
+ }
+ var el = YUI.Env.cssStampEl,
+ ret = false,
+ style = el.currentStyle; //IE
+
+ //Add the classname to the element
+ el.className = name;
+
+ if (!style) {
+ style = Y.config.doc.defaultView.getComputedStyle(el, null);
+ }
+
+ if (style && style['display'] === 'none') {
+ ret = true;
+ }
+
+ Y.log('Has Skin? ' + name + ' : ' + ret, 'info', 'loader');
+
+ el.className = ''; //Reset the classname to ''
+ return ret;
+ },
/**
* Returns a hash of module names the supplied module satisfies.
@@ -1553,6 +1637,7 @@ Y.Loader.prototype = {
/**
* Creates a "psuedo" package for languages provided in the lang array
* @method _addLangPack
+ * @private
* @param {String} lang The language to create
* @param {Object} m The module definition to create the language pack around
* @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
@@ -1560,19 +1645,27 @@ Y.Loader.prototype = {
*/
_addLangPack: function(lang, m, packName) {
var name = m.name,
- packPath,
+ packPath, conf,
existing = this.moduleInfo[packName];
if (!existing) {
packPath = _path((m.pkg || name), packName, JS, true);
- this.addModule({ path: packPath,
- intl: true,
- langPack: true,
- ext: m.ext,
- group: m.group,
- supersedes: [] }, packName);
+ conf = {
+ path: packPath,
+ intl: true,
+ langPack: true,
+ ext: m.ext,
+ group: m.group,
+ supersedes: []
+ };
+
+ if (m.configFn) {
+ conf.configFn = m.configFn;
+ }
+
+ this.addModule(conf, packName);
if (lang) {
Y.Env.lang = Y.Env.lang || {};
@@ -1669,6 +1762,7 @@ Y.Loader.prototype = {
* @private
*/
_explode: function() {
+ //TODO Move done out of scope
var r = this.required, m, reqs, done = {},
self = this;
@@ -1697,6 +1791,7 @@ Y.Loader.prototype = {
}
});
+ // Y.log('After explode: ' + YObject.keys(r));
},
/**
* Get's the loader meta data for the requested module
@@ -1717,13 +1812,23 @@ Y.Loader.prototype = {
// check the patterns library to see if we should automatically add
// the module with defaults
if (!m) {
+ // Y.log('testing patterns ' + YObject.keys(patterns));
for (pname in patterns) {
if (patterns.hasOwnProperty(pname)) {
+ // Y.log('testing pattern ' + i);
p = patterns[pname];
+
+ //There is no test method, create a default one that tests
+ // the pattern against the mod name
+ if (!p.test) {
+ p.test = function(mname, pname) {
+ return (mname.indexOf(pname) > -1);
+ };
+ }
- // use the metadata supplied for the pattern
- // as the module definition.
- if (mname.indexOf(pname) > -1) {
+ if (p.test(mname, pname)) {
+ // use the metadata supplied for the pattern
+ // as the module definition.
found = p;
break;
}
@@ -1732,8 +1837,11 @@ Y.Loader.prototype = {
if (found) {
if (p.action) {
+ // Y.log('executing pattern action: ' + pname);
p.action.call(this, mname, pname);
} else {
+Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
+ pname, 'info', 'loader');
// ext true or false?
m = this.addModule(Y.merge(found), mname);
m.temp = true;
@@ -1795,6 +1903,8 @@ Y.Loader.prototype = {
* @param {Boolean} success A boolean denoting success or failure
*/
_finish: function(msg, success) {
+ Y.log('loader finishing: ' + msg + ', ' + Y.id + ', ' +
+ this.data, 'info', 'loader');
_queue.running = false;
@@ -1848,12 +1958,35 @@ Y.Loader.prototype = {
self._finish(msg, success);
},
/**
+ * The default Loader onProgress handler, calls this.onProgress with a payload
+ * @method _onProgress
+ * @private
+ */
+ _onProgress: function(e) {
+ var self = this;
+ if (self.onProgress) {
+ self.onProgress.call(self.context, {
+ name: e.url,
+ data: e.data
+ });
+ }
+ },
+ /**
* The default Loader onFailure handler, calls this.onFailure with a payload
* @method _onFailure
* @private
*/
_onFailure: function(o) {
- var f = this.onFailure, msg = 'failure: ' + o.msg;
+ var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
+
+ for (i; i < len; i++) {
+ msg.push(o.errors[i].error);
+ }
+
+ msg = msg.join(',');
+
+ Y.log('load error: ' + msg + ', ' + Y.id, 'error', 'loader');
+
if (f) {
f.call(this.context, {
msg: msg,
@@ -1861,7 +1994,9 @@ Y.Loader.prototype = {
success: false
});
}
+
this._finish(msg, false);
+
},
/**
@@ -1870,6 +2005,7 @@ Y.Loader.prototype = {
* @private
*/
_onTimeout: function() {
+ Y.log('loader timeout: ' + Y.id, 'error', 'loader');
var f = this.onTimeout;
if (f) {
f.call(this.context, {
@@ -1878,7 +2014,6 @@ Y.Loader.prototype = {
success: false
});
}
- this._finish('timeout', false);
},
/**
@@ -1891,6 +2026,7 @@ Y.Loader.prototype = {
// create an indexed list
var s = YObject.keys(this.required),
// loaded = this.loaded,
+ //TODO Move this out of scope
done = {},
p = 0, l, a, b, j, k, moved, doneKey;
@@ -1951,18 +2087,11 @@ Y.Loader.prototype = {
this.sorted = s;
},
- /**
- * (Unimplemented)
- * @method partial
- * @unimplemented
- */
- partial: function(partial, o, type) {
- this.sorted = partial;
- this.insert(o, type, true);
- },
+
/**
* Handles the actual insertion of script/link tags
* @method _insert
+ * @private
* @param {Object} source The YUI instance the request came from
* @param {Object} o The metadata to include
* @param {String} type JS or CSS
@@ -1970,6 +2099,7 @@ Y.Loader.prototype = {
*/
_insert: function(source, o, type, skipcalc) {
+ Y.log('private _insert() ' + (type || '') + ', ' + Y.id, "info", "loader");
// restore the state at the time of the request
if (source) {
@@ -1983,53 +2113,124 @@ Y.Loader.prototype = {
this.calculate(o);
}
- this.loadType = type;
+ var modules = this.resolve(),
+ self = this, comp = 0, actions = 0;
- if (!type) {
-
- var self = this;
-
- this._internalCallback = function() {
-
- var f = self.onCSS, n, p, sib;
-
- // IE hack for style overrides that are not being applied
- if (this.insertBefore && Y.UA.ie) {
- n = Y.config.doc.getElementById(this.insertBefore);
- p = n.parentNode;
- sib = n.nextSibling;
- p.removeChild(n);
- if (sib) {
- p.insertBefore(n, sib);
- } else {
- p.appendChild(n);
- }
- }
-
- if (f) {
- f.call(self.context, Y);
- }
- self._internalCallback = null;
-
- self._insert(null, null, JS);
- };
-
- this._insert(null, null, CSS);
-
- return;
+ if (type) {
+ //Filter out the opposite type and reset the array so the checks later work
+ modules[((type === JS) ? CSS : JS)] = [];
+ }
+ if (modules.js.length) {
+ comp++;
+ }
+ if (modules.css.length) {
+ comp++;
}
- // set a flag to indicate the load has started
+ //console.log('Resolved Modules: ', modules);
+
+ var complete = function(d) {
+ actions++;
+ var errs = {}, i = 0, u = '', fn;
+
+ if (d && d.errors) {
+ for (i = 0; i < d.errors.length; i++) {
+ if (d.errors[i].request) {
+ u = d.errors[i].request.url;
+ } else {
+ u = d.errors[i];
+ }
+ errs[u] = u;
+ }
+ }
+
+ if (d && d.data && d.data.length && (d.type === 'success')) {
+ for (i = 0; i < d.data.length; i++) {
+ self.inserted[d.data[i].name] = true;
+ }
+ }
+
+ if (actions === comp) {
+ self._loading = null;
+ Y.log('Loader actions complete!', 'info', 'loader');
+ if (d && d.fn) {
+ Y.log('Firing final Loader callback!', 'info', 'loader');
+ fn = d.fn;
+ delete d.fn;
+ fn.call(self, d);
+ }
+ }
+ };
+
this._loading = true;
- // flag to indicate we are done with the combo service
- // and any additional files will need to be loaded
- // individually
- this._combineComplete = {};
+ if (!modules.js.length && !modules.css.length) {
+ Y.log('No modules resolved..', 'warn', 'loader');
+ actions = -1;
+ complete({
+ fn: self._onSuccess
+ });
+ return;
+ }
+
- // start the load
- this.loadNext();
+ if (modules.css.length) { //Load CSS first
+ Y.log('Loading CSS modules', 'info', 'loader');
+ Y.Get.css(modules.css, {
+ data: modules.cssMods,
+ attributes: self.cssAttributes,
+ insertBefore: self.insertBefore,
+ charset: self.charset,
+ timeout: self.timeout,
+ context: self,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
+ if (modules.js.length) {
+ Y.log('Loading JS modules', 'info', 'loader');
+ Y.Get.js(modules.js, {
+ data: modules.jsMods,
+ insertBefore: self.insertBefore,
+ attributes: self.jsAttributes,
+ charset: self.charset,
+ timeout: self.timeout,
+ autopurge: false,
+ context: self,
+ async: true,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
},
/**
* Once a loader operation is completely finished, process any additional queued items.
@@ -2052,6 +2253,8 @@ Y.Loader.prototype = {
* @param {string} type the type of dependency to insert.
*/
insert: function(o, type, skipsort) {
+ Y.log('public insert() ' + (type || '') + ', ' +
+ Y.Object.keys(this.required), "info", "loader");
var self = this, copy = Y.merge(this);
delete copy.require;
delete copy.dirty;
@@ -2067,263 +2270,14 @@ Y.Loader.prototype = {
* is possible to call this if using a method other than
* Y.register to determine when scripts are fully loaded
* @method loadNext
+ * @deprecated
* @param {string} mname optional the name of the module that has
* been loaded (which is usually why it is time to load the next
* one).
*/
loadNext: function(mname) {
- // It is possible that this function is executed due to something
- // else on the page loading a YUI module. Only react when we
- // are actively loading something
- if (!this._loading) {
- return;
- }
-
- var s, len, i, m, url, fn, msg, attr, group, groupName, j, frag,
- comboSource, comboSources, mods, combining, urls, comboBase,
- self = this,
- type = self.loadType,
- handleSuccess = function(o) {
- self.loadNext(o.data);
- },
- handleCombo = function(o) {
- self._combineComplete[type] = true;
- var i, len = combining.length;
-
- for (i = 0; i < len; i++) {
- self.inserted[combining[i]] = true;
- }
-
- handleSuccess(o);
- };
-
- if (self.combine && (!self._combineComplete[type])) {
-
- combining = [];
-
- self._combining = combining;
- s = self.sorted;
- len = s.length;
-
- // the default combo base
- comboBase = self.comboBase;
-
- url = comboBase;
- urls = [];
-
- comboSources = {};
-
- for (i = 0; i < len; i++) {
- comboSource = comboBase;
- m = self.getModule(s[i]);
- groupName = m && m.group;
- if (groupName) {
-
- group = self.groups[groupName];
-
- if (!group.combine) {
- m.combine = false;
- continue;
- }
- m.combine = true;
- if (group.comboBase) {
- comboSource = group.comboBase;
- }
-
- if ("root" in group && L.isValue(group.root)) {
- m.root = group.root;
- }
-
- }
-
- comboSources[comboSource] = comboSources[comboSource] || [];
- comboSources[comboSource].push(m);
- }
-
- for (j in comboSources) {
- if (comboSources.hasOwnProperty(j)) {
- url = j;
- mods = comboSources[j];
- len = mods.length;
-
- for (i = 0; i < len; i++) {
- // m = self.getModule(s[i]);
- m = mods[i];
-
- // Do not try to combine non-yui JS unless combo def
- // is found
- if (m && (m.type === type) && (m.combine || !m.ext)) {
-
- frag = ((L.isValue(m.root)) ? m.root : self.root) + m.path;
- frag = self._filter(frag, m.name);
- if ((url !== j) && (i <= (len - 1)) &&
- ((frag.length + url.length) > self.maxURLLength)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- url = j;
- }
-
- url += frag;
- if (i < (len - 1)) {
- url += self.comboSep;
- }
-
- combining.push(m.name);
- }
-
- }
-
- if (combining.length && (url != j)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- }
- }
- }
-
- if (combining.length) {
-
-
- // if (m.type === CSS) {
- if (type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- fn(urls, {
- data: self._loading,
- onSuccess: handleCombo,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
-
- } else {
- self._combineComplete[type] = true;
- }
- }
-
- if (mname) {
-
- // if the module that was just loaded isn't what we were expecting,
- // continue to wait
- if (mname !== self._loading) {
- return;
- }
-
-
- // The global handler that is called when each module is loaded
- // will pass that module name to this function. Storing this
- // data to avoid loading the same module multiple times
- // centralize this in the callback
- self.inserted[mname] = true;
- // self.loaded[mname] = true;
-
- // provided = self.getProvides(mname);
- // Y.mix(self.loaded, provided);
- // Y.mix(self.inserted, provided);
-
- if (self.onProgress) {
- self.onProgress.call(self.context, {
- name: mname,
- data: self.data
- });
- }
- }
-
- s = self.sorted;
- len = s.length;
-
- for (i = 0; i < len; i = i + 1) {
- // this.inserted keeps track of what the loader has loaded.
- // move on if this item is done.
- if (s[i] in self.inserted) {
- continue;
- }
-
- // Because rollups will cause multiple load notifications
- // from Y, loadNext may be called multiple times for
- // the same module when loading a rollup. We can safely
- // skip the subsequent requests
- if (s[i] === self._loading) {
- return;
- }
-
- // log("inserting " + s[i]);
- m = self.getModule(s[i]);
-
- if (!m) {
- if (!self.skipped[s[i]]) {
- msg = 'Undefined module ' + s[i] + ' skipped';
- // self.inserted[s[i]] = true;
- self.skipped[s[i]] = true;
- }
- continue;
-
- }
-
- group = (m.group && self.groups[m.group]) || NOT_FOUND;
-
- // The load type is stored to offer the possibility to load
- // the css separately from the script.
- if (!type || type === m.type) {
- self._loading = s[i];
-
- if (m.type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
- self._url(m.path, s[i], group.base || m.base);
-
- fn(url, {
- data: s[i],
- onSuccess: handleSuccess,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
- }
- }
-
- // we are finished
- self._loading = null;
-
- fn = self._internalCallback;
-
- // internal callback for loading css first
- if (fn) {
- self._internalCallback = null;
- fn.call(self);
- } else {
- self._onSuccess();
- }
+ Y.log('loadNext was called..', 'error', 'loader');
+ return;
},
/**
@@ -2335,15 +2289,16 @@ Y.Loader.prototype = {
* @return {string} the filtered string.
* @private
*/
- _filter: function(u, name) {
+ _filter: function(u, name, group) {
var f = this.filter,
hasFilter = name && (name in this.filters),
modFilter = hasFilter && this.filters[name],
- groupName = this.moduleInfo[name] ? this.moduleInfo[name].group:null;
- if (groupName && this.groups[groupName].filter) {
- modFilter = this.groups[groupName].filter;
- hasFilter = true;
- };
+ groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
+
+ if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
+ modFilter = this.groups[groupName].filter;
+ hasFilter = true;
+ };
if (u) {
if (hasFilter) {
@@ -2364,7 +2319,7 @@ Y.Loader.prototype = {
* @method _url
* @param {string} path the path fragment.
* @param {String} name The name of the module
- * @pamra {String} [base=self.base] The base url to use
+ * @param {String} [base=self.base] The base url to use
* @return {string} the full url.
* @private
*/
@@ -2391,74 +2346,225 @@ Y.Loader.prototype = {
*
*/
resolve: function(calc, s) {
- var self = this, i, m, url, out = { js: [], css: [] };
+
+ var len, i, m, url, fn, msg, attr, group, groupName, j, frag,
+ comboSource, comboSources, mods, comboBase,
+ base, urls, u = [], tmpBase, baseLen, resCombos = {},
+ self = this, comboSep, maxURLLength, singles = [],
+ inserted = (self.ignoreRegistered) ? {} : self.inserted,
+ resolved = { js: [], jsMods: [], css: [], cssMods: [] },
+ type = self.loadType || 'js';
if (calc) {
self.calculate();
}
s = s || self.sorted;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
+ var addSingle = function(m) {
+
if (m) {
- if (self.combine) {
- url = self._filter((self.root + m.path), m.name, self.root);
- } else {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
+ group = (m.group && self.groups[m.group]) || NOT_FOUND;
+
+ //Always assume it's async
+ if (group.async === false) {
+ m.async = group.async;
}
- out[m.type].push(url);
+
+ url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
+ self._url(m.path, s[i], group.base || m.base);
+
+ if (m.attributes || m.async === false) {
+ url = {
+ url: url,
+ async: m.async
+ };
+ if (m.attributes) {
+ url.attributes = m.attributes
+ }
+ }
+ resolved[m.type].push(url);
+ resolved[m.type + 'Mods'].push(m);
+ } else {
+ Y.log('Undefined Module', 'warn', 'loader');
}
- }
- if (self.combine) {
- out.js = [self.comboBase + out.js.join(self.comboSep)];
- out.css = [self.comboBase + out.css.join(self.comboSep)];
+
+ };
+
+ len = s.length;
+
+ // the default combo base
+ comboBase = self.comboBase;
+
+ url = comboBase;
+
+ comboSources = {};
+
+ for (i = 0; i < len; i++) {
+ comboSource = comboBase;
+ m = self.getModule(s[i]);
+ groupName = m && m.group;
+ group = self.groups[groupName];
+ if (groupName && group) {
+
+ if (!group.combine || m.fullpath) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ m.combine = true;
+ if (group.comboBase) {
+ comboSource = group.comboBase;
+ }
+
+ if ("root" in group && L.isValue(group.root)) {
+ m.root = group.root;
+ }
+ m.comboSep = group.comboSep || self.comboSep;
+ m.maxURLLength = group.maxURLLength || self.maxURLLength;
+ } else {
+ if (!self.combine) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ }
+
+ comboSources[comboSource] = comboSources[comboSource] || [];
+ comboSources[comboSource].push(m);
}
- return out;
+ for (j in comboSources) {
+ if (comboSources.hasOwnProperty(j)) {
+ resCombos[j] = resCombos[j] || { js: [], jsMods: [], css: [], cssMods: [] };
+ url = j;
+ mods = comboSources[j];
+ len = mods.length;
+
+ if (len) {
+ for (i = 0; i < len; i++) {
+ if (inserted[mods[i]]) {
+ continue;
+ }
+ m = mods[i];
+ // Do not try to combine non-yui JS unless combo def
+ // is found
+ if (m && (m.combine || !m.ext)) {
+ resCombos[j].comboSep = m.comboSep;
+ resCombos[j].group = m.group;
+ resCombos[j].maxURLLength = m.maxURLLength;
+ frag = ((L.isValue(m.root)) ? m.root : self.root) + (m.path || m.fullpath);
+ frag = self._filter(frag, m.name);
+ resCombos[j][m.type].push(frag);
+ resCombos[j][m.type + 'Mods'].push(m);
+ } else {
+ //Add them to the next process..
+ if (mods[i]) {
+ //singles.push(mods[i].name);
+ addSingle(mods[i]);
+ }
+ }
+
+ }
+ }
+ }
+ }
+
+
+ for (j in resCombos) {
+ base = j;
+ comboSep = resCombos[base].comboSep || self.comboSep;
+ maxURLLength = resCombos[base].maxURLLength || self.maxURLLength;
+ Y.log('Using maxURLLength of ' + maxURLLength, 'info', 'loader');
+ for (type in resCombos[base]) {
+ if (type === JS || type === CSS) {
+ urls = resCombos[base][type];
+ mods = resCombos[base][type + 'Mods'];
+ len = urls.length;
+ tmpBase = base + urls.join(comboSep);
+ baseLen = tmpBase.length;
+ if (maxURLLength <= base.length) {
+ Y.log('maxURLLength (' + maxURLLength + ') is lower than the comboBase length (' + base.length + '), resetting to default (' + MAX_URL_LENGTH + ')', 'error', 'loader');
+ maxURLLength = MAX_URL_LENGTH;
+ }
+
+ if (len) {
+ if (baseLen > maxURLLength) {
+ Y.log('Exceeded maxURLLength (' + maxURLLength + ') for ' + type + ', splitting', 'info', 'loader');
+ u = [];
+ for (s = 0; s < len; s++) {
+ u.push(urls[s]);
+ tmpBase = base + u.join(comboSep);
+
+ if (tmpBase.length > maxURLLength) {
+ m = u.pop();
+ tmpBase = base + u.join(comboSep)
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ u = [];
+ if (m) {
+ u.push(m);
+ }
+ }
+ }
+ if (u.length) {
+ tmpBase = base + u.join(comboSep);
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ } else {
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ }
+ resolved[type + 'Mods'] = resolved[type + 'Mods'].concat(mods);
+ }
+ }
+ }
+
+ resCombos = null;
+
+ return resolved;
},
/**
- * Returns an Object hash of hashes built from `loader.sorted` or from an arbitrary list of sorted modules.
- * @method hash
- * @private
- * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
- * @param {Array} [s=loader.sorted] An override for the loader.sorted array
- * @return {Object} Object hash (js and css) of two object hashes of file lists, with the module name as the key
- * @example This method can be used as an off-line dep calculator
- *
- * var Y = YUI();
- * var loader = new Y.Loader({
- * filter: 'debug',
- * base: '../../',
- * root: 'build/',
- * combine: true,
- * require: ['node', 'dd', 'console']
- * });
- * var out = loader.hash(true);
- *
+ Shortcut to calculate, resolve and load all modules.
+
+ var loader = new Y.Loader({
+ ignoreRegistered: true,
+ modules: {
+ mod: {
+ path: 'mod.js'
+ }
+ },
+ requires: [ 'mod' ]
+ });
+ loader.load(function() {
+ console.log('All modules have loaded..');
+ });
+
+
+ @method load
+ @param {Callback} cb Executed after all load operations are complete
*/
- hash: function(calc, s) {
- var self = this, i, m, url, out = { js: {}, css: {} };
-
- if (calc) {
- self.calculate();
+ load: function(cb) {
+ if (!cb) {
+ Y.log('No callback supplied to load()', 'error', 'loader');
+ return;
}
- s = s || self.sorted;
+ var self = this,
+ out = self.resolve(true);
+
+ self.data = out;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
- if (m) {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
- out[m.type][m.name] = url;
- }
- }
+ self.onEnd = function() {
+ cb.apply(self.context || self, arguments);
+ };
- return out;
+ self.insert();
}
};
-}, '3.4.1' ,{requires:['get']});
+}, '3.5.0' ,{requires:['get', 'features']});
YUI.add('loader-rollup', function(Y) {
/**
@@ -2494,8 +2600,6 @@ Y.Loader.prototype._rollup = function() {
}
}
}
-
- this.forceMap = (this.force) ? Y.Array.hash(this.force) : {};
}
// make as many passes as needed to pick up rollup rollups
@@ -2532,14 +2636,17 @@ Y.Loader.prototype._rollup = function() {
// use the rollup module
} else if (r[s[j]] && m.type == smod.type) {
c++;
+ // Y.log("adding to thresh: " + c + ", " + s[j]);
roll = (c >= m.rollup);
if (roll) {
+ // Y.log("over thresh " + c + ", " + s[j]);
break;
}
}
}
if (roll) {
+ // Y.log("adding rollup: " + i);
// add the rollup
r[i] = true;
rolled = true;
@@ -2559,7 +2666,7 @@ Y.Loader.prototype._rollup = function() {
};
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
YUI.add('loader-yui3', function(Y) {
/* This file is auto-generated by src/loader/scripts/meta_join.py */
@@ -2619,6 +2726,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"anim-base"
]
},
+ "anim-shape-transform": {
+ "requires": [
+ "anim-base",
+ "anim-easing",
+ "matrix"
+ ]
+ },
"anim-xy": {
"requires": [
"anim-base",
@@ -2627,12 +2741,52 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"app": {
"use": [
- "controller",
+ "app-base",
+ "app-transitions",
"model",
"model-list",
+ "router",
"view"
]
},
+ "app-base": {
+ "requires": [
+ "classnamemanager",
+ "pjax-base",
+ "router",
+ "view"
+ ]
+ },
+ "app-transitions": {
+ "requires": [
+ "app-base"
+ ]
+ },
+ "app-transitions-css": {
+ "type": "css"
+ },
+ "app-transitions-native": {
+ "condition": {
+ "name": "app-transitions-native",
+ "test": function (Y) {
+ var doc = Y.config.doc,
+ node = doc ? doc.documentElement : null;
+
+ if (node && node.style) {
+ return ('MozTransition' in node.style || 'WebkitTransition' in node.style);
+ }
+
+ return false;
+},
+ "trigger": "app-transitions"
+ },
+ "requires": [
+ "app-transitions",
+ "app-transitions-css",
+ "parallel",
+ "transition"
+ ]
+ },
"array-extras": {
"requires": [
"yui-base"
@@ -2676,7 +2830,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"attribute-base": {
"requires": [
- "event-custom"
+ "attribute-core",
+ "attribute-events",
+ "attribute-extras"
]
},
"attribute-complex": {
@@ -2684,6 +2840,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-base"
]
},
+ "attribute-core": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "attribute-events": {
+ "requires": [
+ "event-custom"
+ ]
+ },
+ "attribute-extras": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"autocomplete": {
"use": [
"autocomplete-base",
@@ -2801,6 +2972,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-complex"
],
"requires": [
+ "base-core",
"attribute-base"
]
},
@@ -2809,12 +2981,45 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"base-base"
]
},
+ "base-core": {
+ "requires": [
+ "attribute-core"
+ ]
+ },
"base-pluginhost": {
"requires": [
"base-base",
"pluginhost"
]
},
+ "button": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-core": {
+ "requires": [
+ "attribute-core",
+ "classnamemanager",
+ "node-base"
+ ]
+ },
+ "button-group": {
+ "requires": [
+ "button-plugin",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-plugin": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "node-pluginhost"
+ ]
+ },
"cache": {
"use": [
"cache-base",
@@ -2841,9 +3046,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"calendar-base",
@@ -2853,9 +3063,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar-base": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"widget",
@@ -2877,18 +3092,29 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"charts": {
+ "requires": [
+ "charts-base"
+ ]
+ },
+ "charts-base": {
"requires": [
"dom",
"datatype-number",
"datatype-date",
"event-custom",
"event-mouseenter",
+ "event-touch",
"widget",
"widget-position",
"widget-stack",
"graphics"
]
},
+ "charts-legend": {
+ "requires": [
+ "charts-base"
+ ]
+ },
"classnamemanager": {
"requires": [
"yui-base"
@@ -2929,13 +3155,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"controller": {
- "optional": [
- "querystring-parse"
- ],
- "requires": [
- "array-extras",
- "base-build",
- "history"
+ "use": [
+ "router"
]
},
"cookie": {
@@ -2970,6 +3191,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssbutton": {
+ "type": "css"
+ },
"cssfonts": {
"type": "css"
},
@@ -2983,6 +3207,23 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssgrids-base": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "type": "css"
+ },
+ "cssgrids-units": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "requires": [
+ "cssgrids-base"
+ ],
+ "type": "css"
+ },
"cssreset": {
"type": "css"
},
@@ -3102,13 +3343,28 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"datatable": {
"use": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
"datatable-base",
- "datatable-datasource",
+ "datatable-column-widths",
+ "datatable-message",
+ "datatable-mutable",
"datatable-sort",
- "datatable-scroll"
+ "datatable-datasource"
]
},
"datatable-base": {
+ "requires": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
+ "base-build",
+ "widget"
+ ],
+ "skinnable": true
+ },
+ "datatable-base-deprecated": {
"requires": [
"recordset-base",
"widget",
@@ -3117,6 +3373,25 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "datatable-body": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-column-widths": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
+ "datatable-core": {
+ "requires": [
+ "escape",
+ "model-list",
+ "node-event-delegate"
+ ]
+ },
"datatable-datasource": {
"requires": [
"datatable-base",
@@ -3124,9 +3399,53 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"datasource-local"
]
},
+ "datatable-datasource-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
+ "plugin",
+ "datasource-local"
+ ]
+ },
+ "datatable-deprecated": {
+ "use": [
+ "datatable-base-deprecated",
+ "datatable-datasource-deprecated",
+ "datatable-sort-deprecated",
+ "datatable-scroll-deprecated"
+ ]
+ },
+ "datatable-head": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-message": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-mutable": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
"datatable-scroll": {
"requires": [
"datatable-base",
+ "datatable-column-widths",
+ "dom-screen"
+ ],
+ "skinnable": true
+ },
+ "datatable-scroll-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
"plugin"
]
},
@@ -3135,7 +3454,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"en"
],
"requires": [
- "datatable-base",
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-sort-deprecated": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base-deprecated",
"plugin",
"recordset-sort"
]
@@ -3326,7 +3654,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "dd-gestures",
"test": function(Y) {
- return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome));
+ return ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.chrome && Y.UA.chrome < 6));
},
"trigger": "dd-drag"
},
@@ -3451,7 +3779,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"editor": {
"use": [
"frame",
- "selection",
+ "editor-selection",
"exec-command",
"editor-base",
"editor-para",
@@ -3467,7 +3795,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"frame",
"node",
"exec-command",
- "selection"
+ "editor-selection"
]
},
"editor-bidi": {
@@ -3486,10 +3814,31 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"editor-para": {
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-para-base": {
"requires": [
"editor-base"
]
},
+ "editor-para-ie": {
+ "condition": {
+ "name": "editor-para-ie",
+ "trigger": "editor-para",
+ "ua": "ie",
+ "when": "instead"
+ },
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-selection": {
+ "requires": [
+ "node"
+ ]
+ },
"editor-tab": {
"requires": [
"editor-base"
@@ -3514,7 +3863,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"event-focus",
"event-resize",
"event-hover",
- "event-outside"
+ "event-outside",
+ "event-touch",
+ "event-move",
+ "event-flick",
+ "event-valuechange"
]
},
"event-base": {
@@ -3541,6 +3894,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "event-contextmenu": {
+ "requires": [
+ "event-synthetic",
+ "dom-screen"
+ ]
+ },
"event-custom": {
"use": [
"event-custom-base",
@@ -3650,6 +4009,22 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"yui-base"
]
},
+ "file": {
+ "requires": [
+ "file-flash",
+ "file-html5"
+ ]
+ },
+ "file-flash": {
+ "requires": [
+ "base"
+ ]
+ },
+ "file-html5": {
+ "requires": [
+ "base"
+ ]
+ },
"frame": {
"requires": [
"base",
@@ -3668,7 +4043,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"node",
"event-custom",
- "pluginhost"
+ "pluginhost",
+ "matrix"
]
},
"graphics-canvas": {
@@ -3676,8 +4052,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
},
@@ -3690,8 +4068,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas-default",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
}
@@ -3700,8 +4080,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
},
@@ -3713,8 +4097,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg-default",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
}
@@ -3744,6 +4132,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"trigger": "graphics"
}
},
+ "handlebars": {
+ "use": [
+ "handlebars-compiler"
+ ]
+ },
+ "handlebars-base": {
+ "requires": [
+ "escape"
+ ]
+ },
+ "handlebars-compiler": {
+ "requires": [
+ "handlebars-base"
+ ]
+ },
"highlight": {
"use": [
"highlight-base",
@@ -3852,6 +4255,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "io-nodejs": {
+ "condition": {
+ "name": "io-nodejs",
+ "trigger": "io-base",
+ "ua": "nodejs"
+ },
+ "requires": [
+ "io-base"
+ ]
+ },
"io-queue": {
"requires": [
"io-base",
@@ -3906,7 +4319,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"loader-base": {
"requires": [
- "get"
+ "get",
+ "features"
]
},
"loader-rollup": {
@@ -3919,6 +4333,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"loader-base"
]
},
+ "matrix": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"model": {
"requires": [
"base-build",
@@ -4052,17 +4471,42 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"panel": {
"requires": [
"widget",
- "widget-stdmod",
+ "widget-autohide",
+ "widget-buttons",
+ "widget-modality",
"widget-position",
"widget-position-align",
- "widget-stack",
"widget-position-constrain",
- "widget-modality",
- "widget-autohide",
- "widget-buttons"
+ "widget-stack",
+ "widget-stdmod"
],
"skinnable": true
},
+ "parallel": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "pjax": {
+ "requires": [
+ "pjax-base",
+ "io-base"
+ ]
+ },
+ "pjax-base": {
+ "requires": [
+ "classnamemanager",
+ "node-event-delegate",
+ "router"
+ ]
+ },
+ "pjax-plugin": {
+ "requires": [
+ "node-pluginhost",
+ "pjax",
+ "plugin"
+ ]
+ },
"plugin": {
"requires": [
"base-base"
@@ -4209,6 +4653,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"features"
]
},
+ "router": {
+ "optional": [
+ "querystring-parse"
+ ],
+ "requires": [
+ "array-extras",
+ "base-build",
+ "history"
+ ]
+ },
"scrollview": {
"requires": [
"scrollview-base",
@@ -4219,6 +4673,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"event-gestures",
+ "event-mousewheel",
"transition"
],
"skinnable": true
@@ -4253,11 +4708,6 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
- "selection": {
- "requires": [
- "node"
- ]
- },
"selector": {
"requires": [
"selector-native"
@@ -4307,7 +4757,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"dd-constrain",
- "substitute"
+ "substitute",
+ "event-key"
],
"skinnable": true
},
@@ -4387,6 +4838,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "test-console": {
+ "requires": [
+ "console-filters",
+ "test"
+ ],
+ "skinnable": true
+ },
"text": {
"use": [
"text-accentfold",
@@ -4441,6 +4899,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"uploader": {
+ "requires": [
+ "uploader-html5",
+ "uploader-flash"
+ ]
+ },
+ "uploader-deprecated": {
"requires": [
"event-custom",
"node",
@@ -4448,45 +4912,76 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"swf"
]
},
+ "uploader-flash": {
+ "requires": [
+ "swf",
+ "widget",
+ "substitute",
+ "base",
+ "cssbutton",
+ "node",
+ "event-custom",
+ "file-flash",
+ "uploader-queue"
+ ]
+ },
+ "uploader-html5": {
+ "requires": [
+ "widget",
+ "node-event-simulate",
+ "substitute",
+ "file-html5",
+ "uploader-queue"
+ ]
+ },
+ "uploader-queue": {
+ "requires": [
+ "base"
+ ]
+ },
"view": {
"requires": [
"base-build",
"node-event-delegate"
]
},
+ "view-node-map": {
+ "requires": [
+ "view"
+ ]
+ },
"widget": {
"use": [
"widget-base",
"widget-htmlparser",
- "widget-uievents",
- "widget-skin"
+ "widget-skin",
+ "widget-uievents"
]
},
"widget-anim": {
"requires": [
- "plugin",
"anim-base",
+ "plugin",
"widget"
]
},
"widget-autohide": {
"requires": [
- "widget",
- "event-outside",
"base-build",
- "event-key"
- ],
- "skinnable": false
+ "event-key",
+ "event-outside",
+ "widget"
+ ]
},
"widget-base": {
"requires": [
"attribute",
- "event-focus",
"base-base",
"base-pluginhost",
+ "classnamemanager",
+ "event-focus",
"node-base",
- "node-style",
- "classnamemanager"
+ "node-style"
],
"skinnable": true
},
@@ -4502,11 +4997,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-buttons": {
"requires": [
- "widget",
- "base-build",
+ "button-plugin",
+ "cssbutton",
"widget-stdmod"
- ],
- "skinnable": true
+ ]
},
"widget-child": {
"requires": [
@@ -4526,16 +5020,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-modality": {
"requires": [
- "widget",
+ "base-build",
"event-outside",
- "base-build"
+ "widget"
],
- "skinnable": false
+ "skinnable": true
},
"widget-parent": {
"requires": [
- "base-build",
"arraylist",
+ "base-build",
"widget"
]
},
@@ -4576,8 +5070,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-uievents": {
"requires": [
- "widget-base",
- "node-event-delegate"
+ "node-event-delegate",
+ "widget-base"
]
},
"yql": {
@@ -4605,11 +5099,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
}
};
-YUI.Env[Y.version].md5 = '105ebffae27a0e3d7331f8cf5c0bb282';
+YUI.Env[Y.version].md5 = 'f5a3bc9bda2441a3b15fb52c567fc1f7';
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
-YUI.add('loader', function(Y){}, '3.4.1' ,{use:['loader-base', 'loader-rollup', 'loader-yui3' ]});
+YUI.add('loader', function(Y){}, '3.5.0' ,{use:['loader-base', 'loader-rollup', 'loader-yui3' ]});
diff --git a/lib/yui/3.5.0/build/loader/loader-min.js b/lib/yui/3.5.0/build/loader/loader-min.js
new file mode 100644
index 00000000000..34f7269955e
--- /dev/null
+++ b/lib/yui/3.5.0/build/loader/loader-min.js
@@ -0,0 +1,13 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("loader-base",function(d){if(!YUI.Env[d.version]){(function(){var I=d.version,E="/build/",F=I+E,D=d.Env.base,A="gallery-2012.04.10-14-57",C="2in3",B="4",z="2.9.0",G=D+"combo?",H={version:I,root:F,base:d.Env.base,comboBase:G,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},y=H.groups,x=function(K,O,L){var J=C+"."+(K||B)+"/"+(O||z)+E,M=(L&&L.base)?L.base:D,N=(L&&L.comboBase)?L.comboBase:G;y.yui2.base=M+J;y.yui2.root=J;y.yui2.comboBase=N;},w=function(J,L){var K=(J||A)+E,M=(L&&L.base)?L.base:D,N=(L&&L.comboBase)?L.comboBase:G;y.gallery.base=M+K;y.gallery.root=K;y.gallery.comboBase=N;};y[I]={};y.gallery={ext:false,combine:true,comboBase:G,update:w,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}};y.yui2={combine:true,ext:false,comboBase:G,update:x,patterns:{"yui2-":{configFn:function(J){if(/-skin|reset|fonts|grids|base/.test(J.name)){J.type="css";J.path=J.path.replace(/\.js/,".css");J.path=J.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin");}}}}};w();x();YUI.Env[I]=H;}());}var f={},c=[],m=1024,a=YUI.Env,p=a._loaded,q="css",k="js",v="intl",s=d.version,u="",e=d.Object,r=e.each,j=d.Array,h=a._loaderQueue,t=a[s],b="skin-",i=d.Lang,n=a.mods,l,o,g=function(x,y,z,w){var A=x+"/"+y;if(!w){A+="-min";}A+="."+(z||q);return A;};d.Env.meta=t;d.Loader=function(A){var z=t.modules,x=this;A=A||{};l=t.md5;x.context=d;x.base=d.Env.meta.base+d.Env.meta.root;x.comboBase=d.Env.meta.comboBase;x.combine=A.base&&(A.base.indexOf(x.comboBase.substr(0,20))>-1);x.comboSep="&";x.maxURLLength=m;x.root=d.Env.meta.root;x.timeout=0;x.forceMap={};x.allowRollup=false;x.filters={};x.required={};x.patterns={};x.moduleInfo={};x.groups=d.merge(d.Env.meta.groups);x.skin=d.merge(d.Env.meta.skin);x.conditions={};x.config=A;x._internal=true;o=a._renderedMods;if(o){r(o,function y(C,B){x.moduleInfo[B]=d.merge(C);});o=a._conditions;r(o,function w(C,B){x.conditions[B]=d.merge(C);});}else{r(z,x.addModule,x);}x.loaded=p[s];x._inspectPage();x._internal=false;x._config(A);x.forceMap=(x.force)?d.Array.hash(x.force):{};x.testresults=null;if(d.config.tests){x.testresults=d.config.tests;}x.sorted=[];x.dirty=true;x.inserted={};x.skipped={};x.tested={};};d.Loader.prototype={REGEX_CSS:/\.css(?:[?;].*)?$/i,FILTER_DEFS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},_inspectPage:function(){r(this.moduleInfo,function(x,w){if(x.type&&x.type===q){if(this.isCSSLoaded(x.name)){this.loaded[w]=true;}}},this);r(n,function(y,x){if(y.details){var w=this.moduleInfo[x],A=y.details.requires,z=w&&w.requires;if(w){if(!w._inspected&&A&&z.length!=A.length){delete w.expanded;}}else{w=this.addModule(y.details,x);}w._inspected=true;}},this);},_requires:function(C,B){var y,A,D,E,w=this.moduleInfo,x=w[C],z=w[B];if(!x||!z){return false;}A=x.expanded_map;D=x.after_map;if(D&&(B in D)){return true;}D=z.after_map;if(D&&(C in D)){return false;}E=w[B]&&w[B].supersedes;if(E){for(y=0;y-1){Q=W;}});if(P&&(P[U]||(Q&&P[Q]))){y=U;if(P[Q]){y=Q;}for(L=0;L
-1);};}if(A.test(B,x)){z=A;break;}}}if(z){if(A.action){A.action.call(this,B,x);}else{w=this.addModule(d.merge(z),B);w.temp=true;}}}return w;},_rollup:function(){},_reduce:function(B){B=B||this.required;var y,x,A,w,z=this.loadType,C=this.ignore?j.hash(this.ignore):false;for(y in B){if(B.hasOwnProperty(y)){w=this.getModule(y);if(((this.loaded[y]||n[y])&&!this.forceMap[y]&&!this.ignoreRegistered)||(z&&w&&w.type!=z)){delete B[y];}if(C&&C[y]){delete B[y];}A=w&&w.supersedes;if(A){for(x=0;x0){h.running=true;h.next()();}},insert:function(z,x,y){var w=this,A=d.merge(this);delete A.require;delete A.dirty;h.add(function(){w._insert(A,z,x,y);});this._continue();},loadNext:function(w){return;},_filter:function(y,x,B){var A=this.filter,w=x&&(x in this.filters),z=w&&this.filters[x],C=B||(this.moduleInfo[x]?this.moduleInfo[x].group:null);if(C&&this.groups[C]&&this.groups[C].filter){z=this.groups[C].filter;w=true;}if(y){if(w){A=(i.isString(z))?this.FILTER_DEFS[z.toUpperCase()]||null:z;}if(A){y=y.replace(new RegExp(A.searchExp,"g"),A.replaceStr);}}return y;},_url:function(y,w,x){return this._filter((x||this.base||"")+y,w);},resolve:function(x,O){var X,W,U,E,J,G,T,I,N,V,y,H,R,D,aa,F,Y,M=[],K,Q,A={},P=this,w,z,Z=[],B=(P.ignoreRegistered)?{}:P.inserted,S={js:[],jsMods:[],css:[],cssMods:[]},C=P.loadType||"js";if(x){P.calculate();}O=O||P.sorted;var L=function(ab){if(ab){I=(ab.group&&P.groups[ab.group])||f;if(I.async===false){ab.async=I.async;}E=(ab.fullpath)?P._filter(ab.fullpath,O[W]):P._url(ab.path,O[W],I.base||ab.base);if(ab.attributes||ab.async===false){E={url:E,async:ab.async};if(ab.attributes){E.attributes=ab.attributes;}}S[ab.type].push(E);S[ab.type+"Mods"].push(ab);}else{}};X=O.length;aa=P.comboBase;E=aa;R={};for(W=0;Wz){M=[];for(O=0;Oz){U=M.pop();K=F+M.join(w);S[C].push(P._filter(K,null,A[F].group));M=[];if(U){M.push(U);}}}if(M.length){K=F+M.join(w);S[C].push(P._filter(K,null,A[F].group));}}else{S[C].push(P._filter(K,null,A[F].group));}}S[C+"Mods"]=S[C+"Mods"].concat(D);}}}A=null;return S;},load:function(w){if(!w){return;}var x=this,y=x.resolve(true);x.data=y;x.onEnd=function(){w.apply(x.context||x,arguments);};x.insert();}};},"3.5.0",{requires:["get","features"]});YUI.add("loader-rollup",function(a){a.Loader.prototype._rollup=function(){var k,h,g,o,b=this.required,e,f=this.moduleInfo,d,l,n;if(this.dirty||!this.rollups){this.rollups={};for(k in f){if(f.hasOwnProperty(k)){g=this.getModule(k);if(g&&g.rollup){this.rollups[k]=g;}}}}for(;;){d=false;for(k in this.rollups){if(this.rollups.hasOwnProperty(k)){if(!b[k]&&((!this.loaded[k])||this.forceMap[k])){g=this.getModule(k);o=g.supersedes||[];e=false;if(!g.rollup){continue;}l=0;for(h=0;h=g.rollup);if(e){break;}}}}if(e){b[k]=true;d=true;this.getRequires(g);}}}}if(!d){break;}}};},"3.5.0",{requires:["loader-base"]});YUI.add("loader-yui3",function(a){YUI.Env[a.version].modules=YUI.Env[a.version].modules||{"align-plugin":{"requires":["node-screen","node-pluginhost"]},"anim":{"use":["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"]},"anim-base":{"requires":["base-base","node-style"]},"anim-color":{"requires":["anim-base"]},"anim-curve":{"requires":["anim-xy"]},"anim-easing":{"requires":["anim-base"]},"anim-node-plugin":{"requires":["node-pluginhost","anim-base"]},"anim-scroll":{"requires":["anim-base"]},"anim-shape-transform":{"requires":["anim-base","anim-easing","matrix"]},"anim-xy":{"requires":["anim-base","node-screen"]},"app":{"use":["app-base","app-transitions","model","model-list","router","view"]},"app-base":{"requires":["classnamemanager","pjax-base","router","view"]},"app-transitions":{"requires":["app-base"]},"app-transitions-css":{"type":"css"},"app-transitions-native":{"condition":{"name":"app-transitions-native","test":function(d){var c=d.config.doc,b=c?c.documentElement:null;if(b&&b.style){return("MozTransition" in b.style||"WebkitTransition" in b.style);}return false;},"trigger":"app-transitions"},"requires":["app-transitions","app-transitions-css","parallel","transition"]},"array-extras":{"requires":["yui-base"]},"array-invoke":{"requires":["yui-base"]},"arraylist":{"requires":["yui-base"]},"arraylist-add":{"requires":["arraylist"]},"arraylist-filter":{"requires":["arraylist"]},"arraysort":{"requires":["yui-base"]},"async-queue":{"requires":["event-custom"]},"attribute":{"use":["attribute-base","attribute-complex"]},"attribute-base":{"requires":["attribute-core","attribute-events","attribute-extras"]},"attribute-complex":{"requires":["attribute-base"]},"attribute-core":{"requires":["yui-base"]},"attribute-events":{"requires":["event-custom"]},"attribute-extras":{"requires":["yui-base"]},"autocomplete":{"use":["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"]},"autocomplete-base":{"optional":["autocomplete-sources"],"requires":["array-extras","base-build","escape","event-valuechange","node-base"]},"autocomplete-filters":{"requires":["array-extras","text-wordbreak"]},"autocomplete-filters-accentfold":{"requires":["array-extras","text-accentfold","text-wordbreak"]},"autocomplete-highlighters":{"requires":["array-extras","highlight-base"]},"autocomplete-highlighters-accentfold":{"requires":["array-extras","highlight-accentfold"]},"autocomplete-list":{"after":["autocomplete-sources"],"lang":["en"],"requires":["autocomplete-base","event-resize","node-screen","selector-css3","shim-plugin","widget","widget-position","widget-position-align"],"skinnable":true},"autocomplete-list-keys":{"condition":{"name":"autocomplete-list-keys","test":function(b){return !(b.UA.ios||b.UA.android);},"trigger":"autocomplete-list"},"requires":["autocomplete-list","base-build"]},"autocomplete-plugin":{"requires":["autocomplete-list","node-pluginhost"]},"autocomplete-sources":{"optional":["io-base","json-parse","jsonp","yql"],"requires":["autocomplete-base"]},"base":{"use":["base-base","base-pluginhost","base-build"]},"base-base":{"after":["attribute-complex"],"requires":["base-core","attribute-base"]},"base-build":{"requires":["base-base"]},"base-core":{"requires":["attribute-core"]},"base-pluginhost":{"requires":["base-base","pluginhost"]},"button":{"requires":["button-core","cssbutton","widget"]},"button-core":{"requires":["attribute-core","classnamemanager","node-base"]},"button-group":{"requires":["button-plugin","cssbutton","widget"]},"button-plugin":{"requires":["button-core","cssbutton","node-pluginhost"]},"cache":{"use":["cache-base","cache-offline","cache-plugin"]},"cache-base":{"requires":["base"]},"cache-offline":{"requires":["cache-base","json"]},"cache-plugin":{"requires":["plugin","cache-base"]},"calendar":{"lang":["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],"requires":["calendar-base","calendarnavigator"],"skinnable":true},"calendar-base":{"lang":["de","en","fr","ja","nb-NO","pt-BR","ru","zh-HANT-TW"],"requires":["widget","substitute","datatype-date","datatype-date-math","cssgrids"],"skinnable":true},"calendarnavigator":{"requires":["plugin","classnamemanager","datatype-date","node","substitute"],"skinnable":true},"charts":{"requires":["charts-base"]},"charts-base":{"requires":["dom","datatype-number","datatype-date","event-custom","event-mouseenter","event-touch","widget","widget-position","widget-stack","graphics"]},"charts-legend":{"requires":["charts-base"]},"classnamemanager":{"requires":["yui-base"]},"clickable-rail":{"requires":["slider-base"]},"collection":{"use":["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"]},"console":{"lang":["en","es","ja"],"requires":["yui-log","widget","substitute"],"skinnable":true},"console-filters":{"requires":["plugin","console"],"skinnable":true},"controller":{"use":["router"]},"cookie":{"requires":["yui-base"]},"createlink-base":{"requires":["editor-base"]},"cssbase":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssbase-context":{"after":["cssreset","cssfonts","cssgrids","cssreset-context","cssfonts-context","cssgrids-context"],"type":"css"},"cssbutton":{"type":"css"},"cssfonts":{"type":"css"},"cssfonts-context":{"type":"css"},"cssgrids":{"optional":["cssreset","cssfonts"],"type":"css"},"cssgrids-base":{"optional":["cssreset","cssfonts"],"type":"css"},"cssgrids-units":{"optional":["cssreset","cssfonts"],"requires":["cssgrids-base"],"type":"css"},"cssreset":{"type":"css"},"cssreset-context":{"type":"css"},"dataschema":{"use":["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"]},"dataschema-array":{"requires":["dataschema-base"]},"dataschema-base":{"requires":["base"]},"dataschema-json":{"requires":["dataschema-base","json"]},"dataschema-text":{"requires":["dataschema-base"]},"dataschema-xml":{"requires":["dataschema-base"]},"datasource":{"use":["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"]},"datasource-arrayschema":{"requires":["datasource-local","plugin","dataschema-array"]},"datasource-cache":{"requires":["datasource-local","plugin","cache-base"]},"datasource-function":{"requires":["datasource-local"]},"datasource-get":{"requires":["datasource-local","get"]},"datasource-io":{"requires":["datasource-local","io-base"]},"datasource-jsonschema":{"requires":["datasource-local","plugin","dataschema-json"]},"datasource-local":{"requires":["base"]},"datasource-polling":{"requires":["datasource-local"]},"datasource-textschema":{"requires":["datasource-local","plugin","dataschema-text"]},"datasource-xmlschema":{"requires":["datasource-local","plugin","dataschema-xml"]},"datatable":{"use":["datatable-core","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"]},"datatable-base":{"requires":["datatable-core","datatable-head","datatable-body","base-build","widget"],"skinnable":true},"datatable-base-deprecated":{"requires":["recordset-base","widget","substitute","event-mouseenter"],"skinnable":true},"datatable-body":{"requires":["datatable-core","view","classnamemanager"]},"datatable-column-widths":{"requires":["datatable-base"]},"datatable-core":{"requires":["escape","model-list","node-event-delegate"]},"datatable-datasource":{"requires":["datatable-base","plugin","datasource-local"]},"datatable-datasource-deprecated":{"requires":["datatable-base-deprecated","plugin","datasource-local"]},"datatable-deprecated":{"use":["datatable-base-deprecated","datatable-datasource-deprecated","datatable-sort-deprecated","datatable-scroll-deprecated"]},"datatable-head":{"requires":["datatable-core","view","classnamemanager"]},"datatable-message":{"lang":["en"],"requires":["datatable-base"],"skinnable":true},"datatable-mutable":{"requires":["datatable-base"]},"datatable-scroll":{"requires":["datatable-base","datatable-column-widths","dom-screen"],"skinnable":true},"datatable-scroll-deprecated":{"requires":["datatable-base-deprecated","plugin"]},"datatable-sort":{"lang":["en"],"requires":["datatable-base"],"skinnable":true},"datatable-sort-deprecated":{"lang":["en"],"requires":["datatable-base-deprecated","plugin","recordset-sort"]},"datatype":{"use":["datatype-number","datatype-date","datatype-xml"]},"datatype-date":{"supersedes":["datatype-date-format"],"use":["datatype-date-parse","datatype-date-format"]},"datatype-date-format":{"lang":["ar","ar-JO","ca","ca-ES","da","da-DK","de","de-AT","de-DE","el","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-JO","en-MY","en-NZ","en-PH","en-SG","en-US","es","es-AR","es-BO","es-CL","es-CO","es-EC","es-ES","es-MX","es-PE","es-PY","es-US","es-UY","es-VE","fi","fi-FI","fr","fr-BE","fr-CA","fr-FR","hi","hi-IN","id","id-ID","it","it-IT","ja","ja-JP","ko","ko-KR","ms","ms-MY","nb","nb-NO","nl","nl-BE","nl-NL","pl","pl-PL","pt","pt-BR","ro","ro-RO","ru","ru-RU","sv","sv-SE","th","th-TH","tr","tr-TR","vi","vi-VN","zh-Hans","zh-Hans-CN","zh-Hant","zh-Hant-HK","zh-Hant-TW"]},"datatype-date-math":{"requires":["yui-base"]},"datatype-date-parse":{},"datatype-number":{"use":["datatype-number-parse","datatype-number-format"]},"datatype-number-format":{},"datatype-number-parse":{},"datatype-xml":{"use":["datatype-xml-parse","datatype-xml-format"]},"datatype-xml-format":{},"datatype-xml-parse":{},"dd":{"use":["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"]},"dd-constrain":{"requires":["dd-drag"]},"dd-ddm":{"requires":["dd-ddm-base","event-resize"]},"dd-ddm-base":{"requires":["node","base","yui-throttle","classnamemanager"]},"dd-ddm-drop":{"requires":["dd-ddm"]},"dd-delegate":{"requires":["dd-drag","dd-drop-plugin","event-mouseenter"]},"dd-drag":{"requires":["dd-ddm-base"]},"dd-drop":{"requires":["dd-drag","dd-ddm-drop"]},"dd-drop-plugin":{"requires":["dd-drop"]},"dd-gestures":{"condition":{"name":"dd-gestures","test":function(b){return((b.config.win&&("ontouchstart" in b.config.win))&&!(b.UA.chrome&&b.UA.chrome<6));
+},"trigger":"dd-drag"},"requires":["dd-drag","event-synthetic","event-gestures"]},"dd-plugin":{"optional":["dd-constrain","dd-proxy"],"requires":["dd-drag"]},"dd-proxy":{"requires":["dd-drag"]},"dd-scroll":{"requires":["dd-drag"]},"dial":{"lang":["en","es"],"requires":["widget","dd-drag","substitute","event-mouseenter","event-move","event-key","transition","intl"],"skinnable":true},"dom":{"use":["dom-base","dom-screen","dom-style","selector-native","selector"]},"dom-base":{"requires":["dom-core"]},"dom-core":{"requires":["oop","features"]},"dom-deprecated":{"requires":["dom-base"]},"dom-screen":{"requires":["dom-base","dom-style"]},"dom-style":{"requires":["dom-base"]},"dom-style-ie":{"condition":{"name":"dom-style-ie","test":function(h){var f=h.Features.test,g=h.Features.add,d=h.config.win,e=h.config.doc,b="documentElement",c=false;g("style","computedStyle",{test:function(){return d&&"getComputedStyle" in d;}});g("style","opacity",{test:function(){return e&&"opacity" in e[b].style;}});c=(!f("style","opacity")&&!f("style","computedStyle"));return c;},"trigger":"dom-style"},"requires":["dom-style"]},"dump":{"requires":["yui-base"]},"editor":{"use":["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"]},"editor-base":{"requires":["base","frame","node","exec-command","editor-selection"]},"editor-bidi":{"requires":["editor-base"]},"editor-br":{"requires":["editor-base"]},"editor-lists":{"requires":["editor-base"]},"editor-para":{"requires":["editor-para-base"]},"editor-para-base":{"requires":["editor-base"]},"editor-para-ie":{"condition":{"name":"editor-para-ie","trigger":"editor-para","ua":"ie","when":"instead"},"requires":["editor-para-base"]},"editor-selection":{"requires":["node"]},"editor-tab":{"requires":["editor-base"]},"escape":{"requires":["yui-base"]},"event":{"after":["node-base"],"use":["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange"]},"event-base":{"after":["node-base"],"requires":["event-custom-base"]},"event-base-ie":{"after":["event-base"],"condition":{"name":"event-base-ie","test":function(c){var b=c.config.doc&&c.config.doc.implementation;return(b&&(!b.hasFeature("Events","2.0")));},"trigger":"node-base"},"requires":["node-base"]},"event-contextmenu":{"requires":["event-synthetic","dom-screen"]},"event-custom":{"use":["event-custom-base","event-custom-complex"]},"event-custom-base":{"requires":["oop"]},"event-custom-complex":{"requires":["event-custom-base"]},"event-delegate":{"requires":["node-base"]},"event-flick":{"requires":["node-base","event-touch","event-synthetic"]},"event-focus":{"requires":["event-synthetic"]},"event-gestures":{"use":["event-flick","event-move"]},"event-hover":{"requires":["event-mouseenter"]},"event-key":{"requires":["event-synthetic"]},"event-mouseenter":{"requires":["event-synthetic"]},"event-mousewheel":{"requires":["node-base"]},"event-move":{"requires":["node-base","event-touch","event-synthetic"]},"event-outside":{"requires":["event-synthetic"]},"event-resize":{"requires":["node-base","event-synthetic"]},"event-simulate":{"requires":["event-base"]},"event-synthetic":{"requires":["node-base","event-custom-complex"]},"event-touch":{"requires":["node-base"]},"event-valuechange":{"requires":["event-focus","event-synthetic"]},"exec-command":{"requires":["frame"]},"features":{"requires":["yui-base"]},"file":{"requires":["file-flash","file-html5"]},"file-flash":{"requires":["base"]},"file-html5":{"requires":["base"]},"frame":{"requires":["base","node","selector-css3","substitute","yui-throttle"]},"get":{"requires":["yui-base"]},"graphics":{"requires":["node","event-custom","pluginhost","matrix"]},"graphics-canvas":{"condition":{"name":"graphics-canvas","test":function(f){var d=f.config.doc,e=f.config.defaultGraphicEngine&&f.config.defaultGraphicEngine=="canvas",c=d&&d.createElement("canvas"),b=(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return(!b||e)&&(c&&c.getContext&&c.getContext("2d"));},"trigger":"graphics"},"requires":["graphics"]},"graphics-canvas-default":{"condition":{"name":"graphics-canvas-default","test":function(f){var d=f.config.doc,e=f.config.defaultGraphicEngine&&f.config.defaultGraphicEngine=="canvas",c=d&&d.createElement("canvas"),b=(d&&d.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return(!b||e)&&(c&&c.getContext&&c.getContext("2d"));},"trigger":"graphics"}},"graphics-svg":{"condition":{"name":"graphics-svg","test":function(f){var e=f.config.doc,d=!f.config.defaultGraphicEngine||f.config.defaultGraphicEngine!="canvas",c=e&&e.createElement("canvas"),b=(e&&e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return b&&(d||!c);},"trigger":"graphics"},"requires":["graphics"]},"graphics-svg-default":{"condition":{"name":"graphics-svg-default","test":function(f){var e=f.config.doc,d=!f.config.defaultGraphicEngine||f.config.defaultGraphicEngine!="canvas",c=e&&e.createElement("canvas"),b=(e&&e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));return b&&(d||!c);},"trigger":"graphics"}},"graphics-vml":{"condition":{"name":"graphics-vml","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"},"requires":["graphics"]},"graphics-vml-default":{"condition":{"name":"graphics-vml-default","test":function(d){var c=d.config.doc,b=c&&c.createElement("canvas");return(c&&!c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(!b||!b.getContext||!b.getContext("2d")));},"trigger":"graphics"}},"handlebars":{"use":["handlebars-compiler"]},"handlebars-base":{"requires":["escape"]},"handlebars-compiler":{"requires":["handlebars-base"]},"highlight":{"use":["highlight-base","highlight-accentfold"]},"highlight-accentfold":{"requires":["highlight-base","text-accentfold"]},"highlight-base":{"requires":["array-extras","classnamemanager","escape","text-wordbreak"]},"history":{"use":["history-base","history-hash","history-hash-ie","history-html5"]},"history-base":{"requires":["event-custom-complex"]},"history-hash":{"after":["history-html5"],"requires":["event-synthetic","history-base","yui-later"]},"history-hash-ie":{"condition":{"name":"history-hash-ie","test":function(c){var b=c.config.doc&&c.config.doc.documentMode;
+return c.UA.ie&&(!("onhashchange" in c.config.win)||!b||b<8);},"trigger":"history-hash"},"requires":["history-hash","node-base"]},"history-html5":{"optional":["json"],"requires":["event-base","history-base","node-base"]},"imageloader":{"requires":["base-base","node-style","node-screen"]},"intl":{"requires":["intl-base","event-custom"]},"intl-base":{"requires":["yui-base"]},"io":{"use":["io-base","io-xdr","io-form","io-upload-iframe","io-queue"]},"io-base":{"requires":["event-custom-base","querystring-stringify-simple"]},"io-form":{"requires":["io-base","node-base"]},"io-nodejs":{"condition":{"name":"io-nodejs","trigger":"io-base","ua":"nodejs"},"requires":["io-base"]},"io-queue":{"requires":["io-base","queue-promote"]},"io-upload-iframe":{"requires":["io-base","node-base"]},"io-xdr":{"requires":["io-base","datatype-xml-parse"]},"json":{"use":["json-parse","json-stringify"]},"json-parse":{"requires":["yui-base"]},"json-stringify":{"requires":["yui-base"]},"jsonp":{"requires":["get","oop"]},"jsonp-url":{"requires":["jsonp"]},"loader":{"use":["loader-base","loader-rollup","loader-yui3"]},"loader-base":{"requires":["get","features"]},"loader-rollup":{"requires":["loader-base"]},"loader-yui3":{"requires":["loader-base"]},"matrix":{"requires":["yui-base"]},"model":{"requires":["base-build","escape","json-parse"]},"model-list":{"requires":["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]},"node":{"use":["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"]},"node-base":{"requires":["event-base","node-core","dom-base"]},"node-core":{"requires":["dom-core","selector"]},"node-deprecated":{"requires":["node-base"]},"node-event-delegate":{"requires":["node-base","event-delegate"]},"node-event-html5":{"requires":["node-base"]},"node-event-simulate":{"requires":["node-base","event-simulate"]},"node-flick":{"requires":["classnamemanager","transition","event-flick","plugin"],"skinnable":true},"node-focusmanager":{"requires":["attribute","node","plugin","node-event-simulate","event-key","event-focus"]},"node-load":{"requires":["node-base","io-base"]},"node-menunav":{"requires":["node","classnamemanager","plugin","node-focusmanager"],"skinnable":true},"node-pluginhost":{"requires":["node-base","pluginhost"]},"node-screen":{"requires":["dom-screen","node-base"]},"node-style":{"requires":["dom-style","node-base"]},"oop":{"requires":["yui-base"]},"overlay":{"requires":["widget","widget-stdmod","widget-position","widget-position-align","widget-stack","widget-position-constrain"],"skinnable":true},"panel":{"requires":["widget","widget-autohide","widget-buttons","widget-modality","widget-position","widget-position-align","widget-position-constrain","widget-stack","widget-stdmod"],"skinnable":true},"parallel":{"requires":["yui-base"]},"pjax":{"requires":["pjax-base","io-base"]},"pjax-base":{"requires":["classnamemanager","node-event-delegate","router"]},"pjax-plugin":{"requires":["node-pluginhost","pjax","plugin"]},"plugin":{"requires":["base-base"]},"pluginhost":{"use":["pluginhost-base","pluginhost-config"]},"pluginhost-base":{"requires":["yui-base"]},"pluginhost-config":{"requires":["pluginhost-base"]},"profiler":{"requires":["yui-base"]},"querystring":{"use":["querystring-parse","querystring-stringify"]},"querystring-parse":{"requires":["yui-base","array-extras"]},"querystring-parse-simple":{"requires":["yui-base"]},"querystring-stringify":{"requires":["yui-base"]},"querystring-stringify-simple":{"requires":["yui-base"]},"queue-promote":{"requires":["yui-base"]},"range-slider":{"requires":["slider-base","slider-value-range","clickable-rail"]},"recordset":{"use":["recordset-base","recordset-sort","recordset-filter","recordset-indexer"]},"recordset-base":{"requires":["base","arraylist"]},"recordset-filter":{"requires":["recordset-base","array-extras","plugin"]},"recordset-indexer":{"requires":["recordset-base","plugin"]},"recordset-sort":{"requires":["arraysort","recordset-base","plugin"]},"resize":{"use":["resize-base","resize-proxy","resize-constrain"]},"resize-base":{"requires":["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],"skinnable":true},"resize-constrain":{"requires":["plugin","resize-base"]},"resize-plugin":{"optional":["resize-constrain"],"requires":["resize-base","plugin"]},"resize-proxy":{"requires":["plugin","resize-base"]},"rls":{"requires":["get","features"]},"router":{"optional":["querystring-parse"],"requires":["array-extras","base-build","history"]},"scrollview":{"requires":["scrollview-base","scrollview-scrollbars"]},"scrollview-base":{"requires":["widget","event-gestures","event-mousewheel","transition"],"skinnable":true},"scrollview-base-ie":{"condition":{"name":"scrollview-base-ie","trigger":"scrollview-base","ua":"ie"},"requires":["scrollview-base"]},"scrollview-list":{"requires":["plugin","classnamemanager"],"skinnable":true},"scrollview-paginator":{"requires":["plugin"]},"scrollview-scrollbars":{"requires":["classnamemanager","transition","plugin"],"skinnable":true},"selector":{"requires":["selector-native"]},"selector-css2":{"condition":{"name":"selector-css2","test":function(d){var c=d.config.doc,b=c&&!("querySelectorAll" in c);return b;},"trigger":"selector"},"requires":["selector-native"]},"selector-css3":{"requires":["selector-native","selector-css2"]},"selector-native":{"requires":["dom-base"]},"shim-plugin":{"requires":["node-style","node-pluginhost"]},"slider":{"use":["slider-base","slider-value-range","clickable-rail","range-slider"]},"slider-base":{"requires":["widget","dd-constrain","substitute","event-key"],"skinnable":true},"slider-value-range":{"requires":["slider-base"]},"sortable":{"requires":["dd-delegate","dd-drop-plugin","dd-proxy"]},"sortable-scroll":{"requires":["dd-scroll","sortable"]},"stylesheet":{"requires":["yui-base"]},"substitute":{"optional":["dump"],"requires":["yui-base"]},"swf":{"requires":["event-custom","node","swfdetect","escape"]},"swfdetect":{"requires":["yui-base"]},"tabview":{"requires":["widget","widget-parent","widget-child","tabview-base","node-pluginhost","node-focusmanager"],"skinnable":true},"tabview-base":{"requires":["node-event-delegate","classnamemanager","skin-sam-tabview"]},"tabview-plugin":{"requires":["tabview-base"]},"test":{"requires":["event-simulate","event-custom","substitute","json-stringify"],"skinnable":true},"test-console":{"requires":["console-filters","test"],"skinnable":true},"text":{"use":["text-accentfold","text-wordbreak"]},"text-accentfold":{"requires":["array-extras","text-data-accentfold"]},"text-data-accentfold":{"requires":["yui-base"]},"text-data-wordbreak":{"requires":["yui-base"]},"text-wordbreak":{"requires":["array-extras","text-data-wordbreak"]},"transition":{"requires":["node-style"]},"transition-timer":{"condition":{"name":"transition-timer","test":function(e){var d=e.config.doc,c=(d)?d.documentElement:null,b=true;
+if(c&&c.style){b=!("MozTransition" in c.style||"WebkitTransition" in c.style);}return b;},"trigger":"transition"},"requires":["transition"]},"uploader":{"requires":["uploader-html5","uploader-flash"]},"uploader-deprecated":{"requires":["event-custom","node","base","swf"]},"uploader-flash":{"requires":["swf","widget","substitute","base","cssbutton","node","event-custom","file-flash","uploader-queue"]},"uploader-html5":{"requires":["widget","node-event-simulate","substitute","file-html5","uploader-queue"]},"uploader-queue":{"requires":["base"]},"view":{"requires":["base-build","node-event-delegate"]},"view-node-map":{"requires":["view"]},"widget":{"use":["widget-base","widget-htmlparser","widget-skin","widget-uievents"]},"widget-anim":{"requires":["anim-base","plugin","widget"]},"widget-autohide":{"requires":["base-build","event-key","event-outside","widget"]},"widget-base":{"requires":["attribute","base-base","base-pluginhost","classnamemanager","event-focus","node-base","node-style"],"skinnable":true},"widget-base-ie":{"condition":{"name":"widget-base-ie","trigger":"widget-base","ua":"ie"},"requires":["widget-base"]},"widget-buttons":{"requires":["button-plugin","cssbutton","widget-stdmod"]},"widget-child":{"requires":["base-build","widget"]},"widget-htmlparser":{"requires":["widget-base"]},"widget-locale":{"requires":["widget-base"]},"widget-modality":{"requires":["base-build","event-outside","widget"],"skinnable":true},"widget-parent":{"requires":["arraylist","base-build","widget"]},"widget-position":{"requires":["base-build","node-screen","widget"]},"widget-position-align":{"requires":["widget-position"]},"widget-position-constrain":{"requires":["widget-position"]},"widget-skin":{"requires":["widget-base"]},"widget-stack":{"requires":["base-build","widget"],"skinnable":true},"widget-stdmod":{"requires":["base-build","widget"]},"widget-uievents":{"requires":["node-event-delegate","widget-base"]},"yql":{"requires":["jsonp","jsonp-url"]},"yui":{},"yui-base":{},"yui-later":{"requires":["yui-base"]},"yui-log":{"requires":["yui-base"]},"yui-rls":{},"yui-throttle":{"requires":["yui-base"]}};YUI.Env[a.version].md5="f5a3bc9bda2441a3b15fb52c567fc1f7";},"3.5.0",{requires:["loader-base"]});YUI.add("loader",function(a){},"3.5.0",{use:["loader-base","loader-rollup","loader-yui3"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/loader/loader-debug.js b/lib/yui/3.5.0/build/loader/loader.js
similarity index 73%
rename from lib/yui/3.4.1/build/loader/loader-debug.js
rename to lib/yui/3.5.0/build/loader/loader.js
index 2ac3715fc8b..8ff75ce3e34 100644
--- a/lib/yui/3.4.1/build/loader/loader-debug.js
+++ b/lib/yui/3.5.0/build/loader/loader.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -19,7 +19,7 @@ if (!YUI.Env[Y.version]) {
BUILD = '/build/',
ROOT = VERSION + BUILD,
CDN_BASE = Y.Env.base,
- GALLERY_VERSION = 'gallery-2011.09.14-20-40',
+ GALLERY_VERSION = 'gallery-2012.04.10-14-57',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
@@ -40,18 +40,28 @@ if (!YUI.Env[Y.version]) {
groups: {},
patterns: {} },
groups = META.groups,
- yui2Update = function(tnt, yui2) {
- var root = TNT + '.' +
- (tnt || TNT_VERSION) + '/' +
- (yui2 || YUI2_VERSION) + BUILD;
- groups.yui2.base = CDN_BASE + root;
- groups.yui2.root = root;
- },
- galleryUpdate = function(tag) {
- var root = (tag || GALLERY_VERSION) + BUILD;
- groups.gallery.base = CDN_BASE + root;
- groups.gallery.root = root;
- };
+ yui2Update = function(tnt, yui2, config) {
+
+ var root = TNT + '.' +
+ (tnt || TNT_VERSION) + '/' +
+ (yui2 || YUI2_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.yui2.base = base + root;
+ groups.yui2.root = root;
+ groups.yui2.comboBase = combo;
+ },
+ galleryUpdate = function(tag, config) {
+ var root = (tag || GALLERY_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.gallery.base = base + root;
+ groups.gallery.root = root;
+ groups.gallery.comboBase = combo;
+ };
+
groups[VERSION] = {};
@@ -96,10 +106,8 @@ if (!YUI.Env[Y.version]) {
/**
* Loader dynamically loads script and css files. It includes the dependency
- * info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * information for the version of the library in use, and will automatically pull in
+ * dependencies for the modules requested. It can also load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
* YUI files.
@@ -111,7 +119,7 @@ if (!YUI.Env[Y.version]) {
var NOT_FOUND = {},
NO_REQUIREMENTS = [],
- MAX_URL_LENGTH = 2048,
+ MAX_URL_LENGTH = 1024,
GLOBAL_ENV = YUI.Env,
GLOBAL_LOADED = GLOBAL_ENV._loaded,
CSS = 'css',
@@ -139,10 +147,6 @@ var NOT_FOUND = {},
return path;
};
-if (YUI.Env.aliases) {
- YUI.Env.aliases = {}; //Don't need aliases if Loader is present
-}
-
/**
* The component metadata is stored in Y.Env.meta.
* Part of the loader module.
@@ -154,111 +158,55 @@ Y.Env.meta = META;
/**
* Loader dynamically loads script and css files. It includes the dependency
* info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * dependencies for the modules requested. It can load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
- * YUI files.
- *
- * While the loader can be instantiated by the end user, it normally is not.
- * @see YUI.use for the normal use case. The use function automatically will
- * pull in missing dependencies.
- *
+ * YUI files. You can also specify an external, custom combo service to host
+ * your modules as well.
+
+ var Y = YUI();
+ var loader = new Y.Loader({
+ filter: 'debug',
+ base: '../../',
+ root: 'build/',
+ combine: true,
+ require: ['node', 'dd', 'console']
+ });
+ var out = loader.resolve(true);
+
* @constructor
* @class Loader
- * @param {object} o an optional set of configuration options. Valid options:
- *
- *
base:
- * The base dir
- *
comboBase:
- * The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?
- *
root:
- * The root path to prepend to module names for the combo service.
- * Ex: 2.5.2/build/
- *
filter:.
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- *
- *
DEBUG
- *
Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget
- *
RAW
- *
Selects the non-minified version of the library (e.g., event.js).
- *
- *
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- *
filters: per-component filter specification. If specified
- * for a given component, this overrides the filter config. _Note:_ This does not work on combo urls, use the filter property instead.
- *
combine:
- * Use the YUI combo service to reduce the number of http connections
- * required to load your dependencies
- *
ignore:
- * A list of modules that should never be dynamically loaded
- *
force:
- * A list of modules that should always be loaded when required, even if
- * already present on the page
- *
insertBefore:
- * Node or id for a node that should be used as the insertion point for
- * new nodes
- *
charset:
- * charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes)
- *
- *
jsAttributes: object literal containing attributes to add to script
- * nodes
- *
cssAttributes: object literal containing attributes to add to link
- * nodes
- *
timeout:
- * The number of milliseconds before a timeout occurs when dynamically
- * loading nodes. If not set, there is no timeout
- *
context:
- * execution context for all callbacks
- *
onSuccess:
- * callback for the 'success' event
- *
onFailure: callback for the 'failure' event
- *
onCSS: callback for the 'CSSComplete' event. When loading YUI
- * components with CSS the CSS is loaded first, then the script. This
- * provides a moment you can tie into to improve
- * the presentation of the page while the script is loading.
- *
onTimeout:
- * callback for the 'timeout' event
- *
onProgress:
- * callback executed each time a script or css file is loaded
- *
modules:
- * A list of module definitions. See Loader.addModule for the supported
- * module metadata
- *
groups:
- * A list of group definitions. Each group can contain specific definitions
- * for base, comboBase, combine, and accepts a list of modules. See above
- * for the description of these properties.
- *
2in3: the version of the YUI 2 in 3 wrapper to use. The intrinsic
- * support for YUI 2 modules in YUI 3 relies on versions of the YUI 2
- * components inside YUI 3 module wrappers. These wrappers
- * change over time to accomodate the issues that arise from running YUI 2
- * in a YUI 3 sandbox.
- *
yui2: when using the 2in3 project, you can select the version of
- * YUI 2 to use. Valid values * are 2.2.2, 2.3.1, 2.4.1, 2.5.2, 2.6.0,
- * 2.7.0, 2.8.0, and 2.8.1 [default] -- plus all versions of YUI 2
- * going forward.
- *
+ * @param {Object} config an optional set of configuration options.
+ * @param {String} config.base The base dir which to fetch this module from
+ * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
+ * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
+ * @param {String|Object} config.filter A filter to apply to result urls. See filter property
+ * @param {Object} config.filters Per-component filter specification. If specified for a given component, this overrides the filter config.
+ * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
+ * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
+ * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
+ * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
+ * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
+ * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
+ * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes. If not set, there is no timeout
+ * @param {Object} config.context Execution context for all callbacks
+ * @param {Function} config.onSuccess Callback for the 'success' event
+ * @param {Function} config.onFailure Callback for the 'failure' event
+ * @param {Function} config.onCSS Callback for the 'CSSComplete' event. When loading YUI components with CSS the CSS is loaded first, then the script. This provides a moment you can tie into to improve the presentation of the page while the script is loading.
+ * @param {Function} config.onTimeout Callback for the 'timeout' event
+ * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
+ * @param {Object} config.modules A list of module definitions. See Loader.addModule for the supported module metadata
+ * @param {Object} config.groups A list of group definitions. Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
+ * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use. The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers. These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
+ * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use. Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
*/
Y.Loader = function(o) {
var defaults = META.modules,
self = this;
+
+ //Catch no config passed.
+ o = o || {};
modulekey = META.md5;
@@ -408,7 +356,7 @@ Y.Loader = function(o) {
* @property ignoreRegistered
* @default false
*/
- // self.ignoreRegistered = false;
+ //self.ignoreRegistered = false;
/**
* Root path to prepend to module path for the combo
@@ -470,12 +418,12 @@ Y.Loader = function(o) {
*
* You can also define a custom filter, which must be an object literal
* containing a search expression and a replace string:
- *
+ *
+ * myFilter: {
+ * 'searchExp': "-min\\.js",
+ * 'replaceStr': "-debug.js"
+ * }
+ *
* @property filter
* @type string| {searchExp: string, replaceStr: string}
*/
@@ -524,29 +472,27 @@ Y.Loader = function(o) {
* being loaded for calendar (if calendar was requested), and
* 'sam' for all other skinnable components:
*
- *
- * skin: {
+ * skin: {
+ * // The default skin, which is automatically applied if not
+ * // overriden by a component-specific skin definition.
+ * // Change this in to apply a different skin globally
+ * defaultSkin: 'sam',
*
- * // The default skin, which is automatically applied if not
- * // overriden by a component-specific skin definition.
- * // Change this in to apply a different skin globally
- * defaultSkin: 'sam',
- *
- * // This is combined with the loader base property to get
- * // the default root directory for a skin. ex:
- * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
- * base: 'assets/skins/',
- *
- * // Any component-specific overrides can be specified here,
- * // making it possible to load different skins for different
- * // components. It is possible to load more than one skin
- * // for a given component as well.
- * overrides: {
- * calendar: ['skin1', 'skin2']
+ * // This is combined with the loader base property to get
+ * // the default root directory for a skin. ex:
+ * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
+ * base: 'assets/skins/',
+ *
+ * // Any component-specific overrides can be specified here,
+ * // making it possible to load different skins for different
+ * // components. It is possible to load more than one skin
+ * // for a given component as well.
+ * overrides: {
+ * calendar: ['skin1', 'skin2']
+ * }
* }
- * }
- *
- * @property skin
+ * @property skin
+ * @type {Object}
*/
self.skin = Y.merge(Y.Env.meta.skin);
@@ -567,27 +513,30 @@ Y.Loader = function(o) {
if (cache) {
oeach(cache, function modCache(v, k) {
- //self.moduleInfo[k] = Y.merge(v);
- self.moduleInfo[k] = v;
+ self.moduleInfo[k] = Y.merge(v);
});
cache = GLOBAL_ENV._conditions;
oeach(cache, function condCache(v, k) {
- //self.conditions[k] = Y.merge(v);
- self.conditions[k] = v;
+ self.conditions[k] = Y.merge(v);
});
} else {
oeach(defaults, self.addModule, self);
}
- if (!GLOBAL_ENV._renderedMods) {
- //GLOBAL_ENV._renderedMods = Y.merge(self.moduleInfo);
- //GLOBAL_ENV._conditions = Y.merge(self.conditions);
- GLOBAL_ENV._renderedMods = self.moduleInfo;
- GLOBAL_ENV._conditions = self.conditions;
- }
+
+ /**
+ * Set when beginning to compute the dependency tree.
+ * Composed of what YUI reports to be loaded combined
+ * with what has been loaded by any instance on the page
+ * with the version number specified in the metadata.
+ * @property loaded
+ * @type {string: boolean}
+ */
+ self.loaded = GLOBAL_LOADED[VERSION];
+
self._inspectPage();
@@ -595,6 +544,8 @@ Y.Loader = function(o) {
self._config(o);
+ self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
+
self.testresults = null;
if (Y.config.tests) {
@@ -625,16 +576,6 @@ Y.Loader = function(o) {
*/
self.sorted = [];
- /**
- * Set when beginning to compute the dependency tree.
- * Composed of what YUI reports to be loaded combined
- * with what has been loaded by any instance on the page
- * with the version number specified in the metadata.
- * @property loaded
- * @type {string: boolean}
- */
- self.loaded = GLOBAL_LOADED[VERSION];
-
/*
* A list of modules to attach to the YUI instance when complete.
* If not supplied, the sorted list of dependencies are applied.
@@ -679,7 +620,25 @@ Y.Loader = function(o) {
};
Y.Loader.prototype = {
+ /**
+ Regex that matches a CSS URL. Used to guess the file type when it's not
+ specified.
+ @property REGEX_CSS
+ @type RegExp
+ @final
+ @protected
+ @since 3.5.0
+ **/
+ REGEX_CSS: /\.css(?:[?;].*)?$/i,
+
+ /**
+ * Default filters for raw and debug
+ * @property FILTER_DEFS
+ * @type Object
+ * @final
+ * @protected
+ */
FILTER_DEFS: {
RAW: {
'searchExp': '-min\\.js',
@@ -696,6 +655,16 @@ Y.Loader.prototype = {
* @private
*/
_inspectPage: function() {
+
+ //Inspect the page for CSS only modules and mark them as loaded.
+ oeach(this.moduleInfo, function(v, k) {
+ if (v.type && v.type === CSS) {
+ if (this.isCSSLoaded(v.name)) {
+ this.loaded[k] = true;
+ }
+ }
+ }, this);
+
oeach(ON_PAGE, function(v, k) {
if (v.details) {
var m = this.moduleInfo[k],
@@ -704,9 +673,7 @@ Y.Loader.prototype = {
if (m) {
if (!m._inspected && req && mr.length != req.length) {
// console.log('deleting ' + m.name);
- // m.requres = YObject.keys(Y.merge(YArray.hash(req), YArray.hash(mr)));
delete m.expanded;
- // delete m.expanded_map;
}
} else {
m = this.addModule(v.details, k);
@@ -784,6 +751,7 @@ Y.Loader.prototype = {
/**
* Apply a new config to the Loader instance
* @method _config
+ * @private
* @param {Object} o The new configuration
*/
_config: function(o) {
@@ -796,26 +764,36 @@ Y.Loader.prototype = {
if (i == 'require') {
self.require(val);
} else if (i == 'skin') {
- Y.mix(self.skin, o[i], true);
+ //If the config.skin is a string, format to the expected object
+ if (typeof val === 'string') {
+ self.skin.defaultSkin = o.skin;
+ val = {
+ defaultSkin: val
+ };
+ }
+
+ Y.mix(self.skin, val, true);
} else if (i == 'groups') {
for (j in val) {
if (val.hasOwnProperty(j)) {
- // Y.log('group: ' + j);
groupName = j;
group = val[j];
self.addGroup(group, groupName);
+ if (group.aliases) {
+ oeach(group.aliases, self.addAlias, self);
+ }
}
}
} else if (i == 'modules') {
// add a hash of module definitions
oeach(val, self.addModule, self);
+ } else if (i === 'aliases') {
+ oeach(val, self.addAlias, self);
} else if (i == 'gallery') {
- this.groups.gallery.update(val);
+ this.groups.gallery.update(val, o);
} else if (i == 'yui2' || i == '2in3') {
- this.groups.yui2.update(o['2in3'], o.yui2);
- } else if (i == 'maxURLLength') {
- self[i] = Math.min(MAX_URL_LENGTH, val);
+ this.groups.yui2.update(o['2in3'], o.yui2, o);
} else {
self[i] = val;
}
@@ -834,9 +812,12 @@ Y.Loader.prototype = {
self.require('yui-log', 'dump');
}
}
+
if (self.lang) {
- self.require('intl-base', 'intl');
+ //Removed this so that when Loader is invoked
+ //it doesn't request what it doesn't need.
+ //self.require('intl-base', 'intl');
}
},
@@ -898,27 +879,53 @@ Y.Loader.prototype = {
}
this.addModule(nmod, name);
- Y.log('adding skin ' + name + ', ' + parent + ', ' + pkg + ', ' + info[name].path);
}
}
return name;
},
-
+ /**
+ * Adds an alias module to the system
+ * @method addAlias
+ * @param {Array} use An array of modules that makes up this alias
+ * @param {String} name The name of the alias
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addAlias([ 'node', 'yql' ], 'davglass');
+ * loader.require(['davglass']);
+ * var out = loader.resolve(true);
+ *
+ * //out.js will contain Node and YQL modules
+ */
+ addAlias: function(use, name) {
+ YUI.Env.aliases[name] = use;
+ this.addModule({
+ name: name,
+ use: use
+ });
+ },
/**
* Add a new module group
- *
- *
name:
required, the group name
- *
base:
The base dir for this module group
- *
root:
The root path to add to each combo
- * resource path
- *
combine:
combo handle
- *
comboBase:
combo service base path
- *
modules:
the group of modules
- *
* @method addGroup
- * @param {object} o An object containing the module data.
- * @param {string} name the group name.
+ * @param {Object} config An object containing the group configuration data
+ * @param {String} config.name required, the group name
+ * @param {String} config.base The base directory for this module group
+ * @param {String} config.root The root path to add to each combo resource path
+ * @param {Boolean} config.combine Should the request be combined
+ * @param {String} config.comboBase Combo service base path
+ * @param {Object} config.modules The group of modules
+ * @param {String} name the group name.
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addGroup({
+ * name: 'davglass',
+ * combine: true,
+ * comboBase: '/combo?',
+ * root: '',
+ * modules: {
+ * //Module List here
+ * }
+ * }, 'davglass');
*/
addGroup: function(o, name) {
var mods = o.modules,
@@ -936,6 +943,9 @@ Y.Loader.prototype = {
if (mods) {
oeach(mods, function(v, k) {
+ if (typeof v === 'string') {
+ v = { name: k, fullpath: v };
+ }
v.group = name;
self.addModule(v, k);
}, self);
@@ -944,58 +954,40 @@ Y.Loader.prototype = {
/**
* Add a new module to the component metadata.
- *
- *
name:
required, the component name
- *
type:
required, the component type (js or css)
- *
- *
path:
required, the path to the script from
- * "base"
- *
requires:
array of modules required by this
- * component
- *
optional:
array of optional modules for this
- * component
- *
supersedes:
array of the modules this component
- * replaces
- *
after:
array of modules the components which, if
- * present, should be sorted above this one
- *
after_map:
faster alternative to 'after' -- supply
- * a hash instead of an array
- *
rollup:
the number of superseded modules required
- * for automatic rollup
- *
fullpath:
If fullpath is specified, this is used
- * instead of the configured base + path
- *
skinnable:
flag to determine if skin assets should
- * automatically be pulled in
- *
submodules:
a hash of submodules
- *
group:
The group the module belongs to -- this
- * is set automatically when it is added as part of a group
- * configuration.
- *
lang:
- *
array of BCP 47 language tags of languages for which this
- * module has localized resource bundles,
- * e.g., ["en-GB","zh-Hans-CN"]
- *
condition:
- *
Specifies that the module should be loaded automatically if
- * a condition is met. This is an object with up to three fields:
- * [trigger] - the name of a module that can trigger the auto-load
- * [test] - a function that returns true when the module is to be
- * loaded.
- * [when] - specifies the load order of the conditional module
- * with regard to the position of the trigger module.
- * This should be one of three values: 'before', 'after', or
- * 'instead'. The default is 'after'.
- *
- *
testresults:
a hash of test results from Y.Features.all()
- *
* @method addModule
- * @param {object} o An object containing the module data.
- * @param {string} name the module name (optional), required if not
- * in the module data.
- * @return {object} the module definition or null if
- * the object passed in did not provide all required attributes.
+ * @param {Object} config An object containing the module data.
+ * @param {String} config.name Required, the component name
+ * @param {String} config.type Required, the component type (js or css)
+ * @param {String} config.path Required, the path to the script from `base`
+ * @param {Array} config.requires Array of modules required by this component
+ * @param {Array} [config.optional] Array of optional modules for this component
+ * @param {Array} [config.supersedes] Array of the modules this component replaces
+ * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
+ * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
+ * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
+ * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
+ * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
+ * @param {Object} [config.submodules] Hash of submodules
+ * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
+ * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
+ * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to three fields:
+ * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
+ * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
+ * @param {String} [config.condition.when] Specifies the load order of the conditional module
+ * with regard to the position of the trigger module.
+ * This should be one of three values: `before`, `after`, or `instead`. The default is `after`.
+ * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
+ * @param {Function} [config.configFn] A function to exectute when configuring this module
+ * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
+ * @param {String} [name] The module name, required if not in the module data.
+ * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
*/
addModule: function(o, name) {
name = name || o.name;
+
+ if (typeof o === 'string') {
+ o = { name: name, fullpath: o };
+ }
//Only merge this data if the temp flag is set
//from an earlier pass from a pattern or else
@@ -1017,7 +1009,12 @@ Y.Loader.prototype = {
}
if (!o.type) {
+ //Always assume it's javascript unless the CSS pattern is matched.
o.type = JS;
+ var p = o.path || o.fullpath;
+ if (p && this.REGEX_CSS.test(p)) {
+ o.type = CSS;
+ }
}
if (!o.path && !o.fullpath) {
@@ -1026,7 +1023,6 @@ Y.Loader.prototype = {
o.supersedes = o.supersedes || o.use;
o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
- o.requires = this.filterRequires(o.requires) || [];
// Handle submodule logic
var subs = o.submodules, i, l, t, sup, s, smod, plugins, plug,
@@ -1034,9 +1030,18 @@ Y.Loader.prototype = {
overrides, skinname, when,
conditions = this.conditions, trigger;
// , existing = this.moduleInfo[name], newr;
-
+
this.moduleInfo[name] = o;
+ o.requires = o.requires || [];
+
+ if (o.skinnable) {
+ skinname = this._addSkin(this.skin.defaultSkin, name);
+ o.requires.unshift(skinname);
+ }
+
+ o.requires = this.filterRequires(o.requires) || [];
+
if (!o.langPack && o.lang) {
langs = YArray(o.lang);
for (j = 0; j < langs.length; j++) {
@@ -1049,6 +1054,7 @@ Y.Loader.prototype = {
}
}
+
if (subs) {
sup = o.supersedes || [];
l = 0;
@@ -1113,7 +1119,6 @@ Y.Loader.prototype = {
o.lang.push(lang);
}
-// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
// default packages
@@ -1130,7 +1135,6 @@ Y.Loader.prototype = {
smod.supersedes.push(supName);
}
-// Y.log('pack ' + packName + ' should supersede ' + supName);
// Add rollup file, need to add to supersedes list too
}
@@ -1196,7 +1200,12 @@ Y.Loader.prototype = {
}
}
+ if (o.supersedes) {
+ o.supersedes = this.filterRequires(o.supersedes);
+ }
+
if (o.after) {
+ o.after = this.filterRequires(o.after);
o.after_map = YArray.hash(o.after);
}
@@ -1206,9 +1215,18 @@ Y.Loader.prototype = {
ret = o.configFn(o);
if (ret === false) {
delete this.moduleInfo[name];
+ delete GLOBAL_ENV._renderedMods[name];
o = null;
}
}
+ //Add to global cache
+ if (o) {
+ if (!GLOBAL_ENV._renderedMods) {
+ GLOBAL_ENV._renderedMods = {};
+ }
+ GLOBAL_ENV._renderedMods[name] = Y.merge(o);
+ GLOBAL_ENV._conditions = conditions;
+ }
return o;
},
@@ -1302,13 +1320,20 @@ Y.Loader.prototype = {
*/
getRequires: function(mod) {
- if (!mod || mod._parsed) {
- // Y.log('returning no reqs for ' + mod.name);
+ if (!mod) {
+ //console.log('returning no reqs for ' + mod.name);
return NO_REQUIREMENTS;
}
+ if (mod._parsed) {
+ //console.log('returning requires for ' + mod.name, mod.requires);
+ return mod.expanded || NO_REQUIREMENTS;
+ }
+
+ //TODO add modue cache here out of scope..
+
var i, m, j, add, packName, lang, testresults = this.testresults,
- name = mod.name, cond, go,
+ name = mod.name, cond,
adddef = ON_PAGE[name] && ON_PAGE[name].details,
d, k, m1,
r, old_mod,
@@ -1333,14 +1358,12 @@ Y.Loader.prototype = {
// if (mod.expanded && (!mod.langCache || mod.langCache == this.lang)) {
if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
- //Y.log('Already expanded ' + name + ', ' + mod.expanded);
return mod.expanded;
}
d = [];
hash = {};
-
r = this.filterRequires(mod.requires);
if (mod.lang) {
//If a module has a lang attribute, auto add the intl requirement.
@@ -1350,14 +1373,11 @@ Y.Loader.prototype = {
}
o = this.filterRequires(mod.optional);
- // Y.log("getRequires: " + name + " (dirty:" + this.dirty +
- // ", expanded:" + mod.expanded + ")");
mod._parsed = true;
mod.langCache = this.lang;
for (i = 0; i < r.length; i++) {
- //Y.log(name + ' requiring ' + r[i], 'info', 'loader');
if (!hash[r[i]]) {
d.push(r[i]);
hash[r[i]] = true;
@@ -1422,6 +1442,8 @@ Y.Loader.prototype = {
cond = this.conditions[name];
if (cond) {
+ //Set the module to not parsed since we have conditionals and this could change the dependency tree.
+ mod._parsed = false;
if (testresults && ftests) {
oeach(testresults, function(result, id) {
var condmod = ftests[id].name;
@@ -1435,18 +1457,22 @@ Y.Loader.prototype = {
} else {
oeach(cond, function(def, condmod) {
if (!hash[condmod]) {
- go = def && ((def.ua && Y.UA[def.ua]) ||
- (def.test && def.test(Y, r)));
+ //first see if they've specfied a ua check
+ //then see if they've got a test fn & if it returns true
+ //otherwise just having a condition block is enough
+ var go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
+ (def.test && def.test(Y, r)));
+
if (go) {
hash[condmod] = true;
d.push(condmod);
m = this.getModule(condmod);
- // Y.log('conditional', m);
if (m) {
add = this.getRequires(m);
for (j = 0; j < add.length; j++) {
d.push(add[j]);
}
+
}
}
}
@@ -1469,11 +1495,15 @@ Y.Loader.prototype = {
}
for (i = 0; i < skindef[skinname].length; i++) {
skinmod = this._addSkin(skindef[skinname][i], name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
} else {
skinmod = this._addSkin(this.skin.defaultSkin, name);
- d.push(skinmod);
+ if (!this.isCSSLoaded(skinmod, this._boot)) {
+ d.push(skinmod);
+ }
}
}
@@ -1483,7 +1513,6 @@ Y.Loader.prototype = {
if (mod.lang && !mod.langPack && Y.Intl) {
lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
- //Y.log('Best lang: ' + lang + ', this.lang: ' + this.lang + ', mod.lang: ' + mod.lang);
packName = this.getLangPackName(lang, name);
if (packName) {
d.unshift(packName);
@@ -1498,7 +1527,37 @@ Y.Loader.prototype = {
return mod.expanded;
},
+ /**
+ * Check to see if named css module is already loaded on the page
+ * @method isCSSLoaded
+ * @param {String} name The name of the css file
+ * @return Boolean
+ */
+ isCSSLoaded: function(name, skip) {
+ //TODO - Make this call a batching call with name being an array
+ if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
+ return false;
+ }
+ var el = YUI.Env.cssStampEl,
+ ret = false,
+ style = el.currentStyle; //IE
+
+ //Add the classname to the element
+ el.className = name;
+
+ if (!style) {
+ style = Y.config.doc.defaultView.getComputedStyle(el, null);
+ }
+
+ if (style && style['display'] === 'none') {
+ ret = true;
+ }
+
+
+ el.className = ''; //Reset the classname to ''
+ return ret;
+ },
/**
* Returns a hash of module names the supplied module satisfies.
@@ -1564,6 +1623,7 @@ Y.Loader.prototype = {
/**
* Creates a "psuedo" package for languages provided in the lang array
* @method _addLangPack
+ * @private
* @param {String} lang The language to create
* @param {Object} m The module definition to create the language pack around
* @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
@@ -1571,19 +1631,27 @@ Y.Loader.prototype = {
*/
_addLangPack: function(lang, m, packName) {
var name = m.name,
- packPath,
+ packPath, conf,
existing = this.moduleInfo[packName];
if (!existing) {
packPath = _path((m.pkg || name), packName, JS, true);
- this.addModule({ path: packPath,
- intl: true,
- langPack: true,
- ext: m.ext,
- group: m.group,
- supersedes: [] }, packName);
+ conf = {
+ path: packPath,
+ intl: true,
+ langPack: true,
+ ext: m.ext,
+ group: m.group,
+ supersedes: []
+ };
+
+ if (m.configFn) {
+ conf.configFn = m.configFn;
+ }
+
+ this.addModule(conf, packName);
if (lang) {
Y.Env.lang = Y.Env.lang || {};
@@ -1680,6 +1748,7 @@ Y.Loader.prototype = {
* @private
*/
_explode: function() {
+ //TODO Move done out of scope
var r = this.required, m, reqs, done = {},
self = this;
@@ -1708,7 +1777,6 @@ Y.Loader.prototype = {
}
});
- // Y.log('After explode: ' + YObject.keys(r));
},
/**
* Get's the loader meta data for the requested module
@@ -1729,15 +1797,21 @@ Y.Loader.prototype = {
// check the patterns library to see if we should automatically add
// the module with defaults
if (!m) {
- // Y.log('testing patterns ' + YObject.keys(patterns));
for (pname in patterns) {
if (patterns.hasOwnProperty(pname)) {
- // Y.log('testing pattern ' + i);
p = patterns[pname];
+
+ //There is no test method, create a default one that tests
+ // the pattern against the mod name
+ if (!p.test) {
+ p.test = function(mname, pname) {
+ return (mname.indexOf(pname) > -1);
+ };
+ }
- // use the metadata supplied for the pattern
- // as the module definition.
- if (mname.indexOf(pname) > -1) {
+ if (p.test(mname, pname)) {
+ // use the metadata supplied for the pattern
+ // as the module definition.
found = p;
break;
}
@@ -1746,11 +1820,8 @@ Y.Loader.prototype = {
if (found) {
if (p.action) {
- // Y.log('executing pattern action: ' + pname);
p.action.call(this, mname, pname);
} else {
-Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
- pname, 'info', 'loader');
// ext true or false?
m = this.addModule(Y.merge(found), mname);
m.temp = true;
@@ -1812,8 +1883,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* @param {Boolean} success A boolean denoting success or failure
*/
_finish: function(msg, success) {
- Y.log('loader finishing: ' + msg + ', ' + Y.id + ', ' +
- this.data, 'info', 'loader');
_queue.running = false;
@@ -1867,13 +1936,34 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
self._finish(msg, success);
},
/**
+ * The default Loader onProgress handler, calls this.onProgress with a payload
+ * @method _onProgress
+ * @private
+ */
+ _onProgress: function(e) {
+ var self = this;
+ if (self.onProgress) {
+ self.onProgress.call(self.context, {
+ name: e.url,
+ data: e.data
+ });
+ }
+ },
+ /**
* The default Loader onFailure handler, calls this.onFailure with a payload
* @method _onFailure
* @private
*/
_onFailure: function(o) {
- Y.log('load error: ' + o.msg + ', ' + Y.id, 'error', 'loader');
- var f = this.onFailure, msg = 'failure: ' + o.msg;
+ var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
+
+ for (i; i < len; i++) {
+ msg.push(o.errors[i].error);
+ }
+
+ msg = msg.join(',');
+
+
if (f) {
f.call(this.context, {
msg: msg,
@@ -1881,7 +1971,9 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
success: false
});
}
+
this._finish(msg, false);
+
},
/**
@@ -1890,7 +1982,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* @private
*/
_onTimeout: function() {
- Y.log('loader timeout: ' + Y.id, 'error', 'loader');
var f = this.onTimeout;
if (f) {
f.call(this.context, {
@@ -1899,7 +1990,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
success: false
});
}
- this._finish('timeout', false);
},
/**
@@ -1912,6 +2002,7 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
// create an indexed list
var s = YObject.keys(this.required),
// loaded = this.loaded,
+ //TODO Move this out of scope
done = {},
p = 0, l, a, b, j, k, moved, doneKey;
@@ -1972,18 +2063,11 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
this.sorted = s;
},
- /**
- * (Unimplemented)
- * @method partial
- * @unimplemented
- */
- partial: function(partial, o, type) {
- this.sorted = partial;
- this.insert(o, type, true);
- },
+
/**
* Handles the actual insertion of script/link tags
* @method _insert
+ * @private
* @param {Object} source The YUI instance the request came from
* @param {Object} o The metadata to include
* @param {String} type JS or CSS
@@ -1991,7 +2075,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
*/
_insert: function(source, o, type, skipcalc) {
-// Y.log('private _insert() ' + (type || '') + ', ' + Y.id, "info", "loader");
// restore the state at the time of the request
if (source) {
@@ -2005,54 +2088,119 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
this.calculate(o);
}
- this.loadType = type;
+ var modules = this.resolve(),
+ self = this, comp = 0, actions = 0;
- if (!type) {
-
- var self = this;
-
- // Y.log("trying to load css first");
- this._internalCallback = function() {
-
- var f = self.onCSS, n, p, sib;
-
- // IE hack for style overrides that are not being applied
- if (this.insertBefore && Y.UA.ie) {
- n = Y.config.doc.getElementById(this.insertBefore);
- p = n.parentNode;
- sib = n.nextSibling;
- p.removeChild(n);
- if (sib) {
- p.insertBefore(n, sib);
- } else {
- p.appendChild(n);
- }
- }
-
- if (f) {
- f.call(self.context, Y);
- }
- self._internalCallback = null;
-
- self._insert(null, null, JS);
- };
-
- this._insert(null, null, CSS);
-
- return;
+ if (type) {
+ //Filter out the opposite type and reset the array so the checks later work
+ modules[((type === JS) ? CSS : JS)] = [];
+ }
+ if (modules.js.length) {
+ comp++;
+ }
+ if (modules.css.length) {
+ comp++;
}
- // set a flag to indicate the load has started
+ //console.log('Resolved Modules: ', modules);
+
+ var complete = function(d) {
+ actions++;
+ var errs = {}, i = 0, u = '', fn;
+
+ if (d && d.errors) {
+ for (i = 0; i < d.errors.length; i++) {
+ if (d.errors[i].request) {
+ u = d.errors[i].request.url;
+ } else {
+ u = d.errors[i];
+ }
+ errs[u] = u;
+ }
+ }
+
+ if (d && d.data && d.data.length && (d.type === 'success')) {
+ for (i = 0; i < d.data.length; i++) {
+ self.inserted[d.data[i].name] = true;
+ }
+ }
+
+ if (actions === comp) {
+ self._loading = null;
+ if (d && d.fn) {
+ fn = d.fn;
+ delete d.fn;
+ fn.call(self, d);
+ }
+ }
+ };
+
this._loading = true;
- // flag to indicate we are done with the combo service
- // and any additional files will need to be loaded
- // individually
- this._combineComplete = {};
+ if (!modules.js.length && !modules.css.length) {
+ actions = -1;
+ complete({
+ fn: self._onSuccess
+ });
+ return;
+ }
+
- // start the load
- this.loadNext();
+ if (modules.css.length) { //Load CSS first
+ Y.Get.css(modules.css, {
+ data: modules.cssMods,
+ attributes: self.cssAttributes,
+ insertBefore: self.insertBefore,
+ charset: self.charset,
+ timeout: self.timeout,
+ context: self,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
+ if (modules.js.length) {
+ Y.Get.js(modules.js, {
+ data: modules.jsMods,
+ insertBefore: self.insertBefore,
+ attributes: self.jsAttributes,
+ charset: self.charset,
+ timeout: self.timeout,
+ autopurge: false,
+ context: self,
+ async: true,
+ onProgress: function(e) {
+ self._onProgress.call(self, e);
+ },
+ onTimeout: function(d) {
+ self._onTimeout.call(self, d);
+ },
+ onSuccess: function(d) {
+ d.type = 'success';
+ d.fn = self._onSuccess;
+ complete.call(self, d);
+ },
+ onFailure: function(d) {
+ d.type = 'failure';
+ d.fn = self._onFailure;
+ complete.call(self, d);
+ }
+ });
+ }
},
/**
* Once a loader operation is completely finished, process any additional queued items.
@@ -2075,8 +2223,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* @param {string} type the type of dependency to insert.
*/
insert: function(o, type, skipsort) {
- // Y.log('public insert() ' + (type || '') + ', ' +
- // Y.Object.keys(this.required), "info", "loader");
var self = this, copy = Y.merge(this);
delete copy.require;
delete copy.dirty;
@@ -2092,271 +2238,13 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* is possible to call this if using a method other than
* Y.register to determine when scripts are fully loaded
* @method loadNext
+ * @deprecated
* @param {string} mname optional the name of the module that has
* been loaded (which is usually why it is time to load the next
* one).
*/
loadNext: function(mname) {
- // It is possible that this function is executed due to something
- // else on the page loading a YUI module. Only react when we
- // are actively loading something
- if (!this._loading) {
- return;
- }
-
- var s, len, i, m, url, fn, msg, attr, group, groupName, j, frag,
- comboSource, comboSources, mods, combining, urls, comboBase,
- self = this,
- type = self.loadType,
- handleSuccess = function(o) {
- self.loadNext(o.data);
- },
- handleCombo = function(o) {
- self._combineComplete[type] = true;
- var i, len = combining.length;
-
- for (i = 0; i < len; i++) {
- self.inserted[combining[i]] = true;
- }
-
- handleSuccess(o);
- };
-
- if (self.combine && (!self._combineComplete[type])) {
-
- combining = [];
-
- self._combining = combining;
- s = self.sorted;
- len = s.length;
-
- // the default combo base
- comboBase = self.comboBase;
-
- url = comboBase;
- urls = [];
-
- comboSources = {};
-
- for (i = 0; i < len; i++) {
- comboSource = comboBase;
- m = self.getModule(s[i]);
- groupName = m && m.group;
- if (groupName) {
-
- group = self.groups[groupName];
-
- if (!group.combine) {
- m.combine = false;
- continue;
- }
- m.combine = true;
- if (group.comboBase) {
- comboSource = group.comboBase;
- }
-
- if ("root" in group && L.isValue(group.root)) {
- m.root = group.root;
- }
-
- }
-
- comboSources[comboSource] = comboSources[comboSource] || [];
- comboSources[comboSource].push(m);
- }
-
- for (j in comboSources) {
- if (comboSources.hasOwnProperty(j)) {
- url = j;
- mods = comboSources[j];
- len = mods.length;
-
- for (i = 0; i < len; i++) {
- // m = self.getModule(s[i]);
- m = mods[i];
-
- // Do not try to combine non-yui JS unless combo def
- // is found
- if (m && (m.type === type) && (m.combine || !m.ext)) {
-
- frag = ((L.isValue(m.root)) ? m.root : self.root) + m.path;
- frag = self._filter(frag, m.name);
- if ((url !== j) && (i <= (len - 1)) &&
- ((frag.length + url.length) > self.maxURLLength)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- url = j;
- }
-
- url += frag;
- if (i < (len - 1)) {
- url += self.comboSep;
- }
-
- combining.push(m.name);
- }
-
- }
-
- if (combining.length && (url != j)) {
- //Hack until this is rewritten to use an array and not string concat:
- if (url.substr(url.length - 1, 1) === self.comboSep) {
- url = url.substr(0, (url.length - 1));
- }
- urls.push(self._filter(url));
- }
- }
- }
-
- if (combining.length) {
-
-Y.log('Attempting to use combo: ' + combining, 'info', 'loader');
-
- // if (m.type === CSS) {
- if (type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- fn(urls, {
- data: self._loading,
- onSuccess: handleCombo,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
-
- } else {
- self._combineComplete[type] = true;
- }
- }
-
- if (mname) {
-
- // if the module that was just loaded isn't what we were expecting,
- // continue to wait
- if (mname !== self._loading) {
- return;
- }
-
-// Y.log("loadNext executing, just loaded " + mname + ", " +
-// Y.id, "info", "loader");
-
- // The global handler that is called when each module is loaded
- // will pass that module name to this function. Storing this
- // data to avoid loading the same module multiple times
- // centralize this in the callback
- self.inserted[mname] = true;
- // self.loaded[mname] = true;
-
- // provided = self.getProvides(mname);
- // Y.mix(self.loaded, provided);
- // Y.mix(self.inserted, provided);
-
- if (self.onProgress) {
- self.onProgress.call(self.context, {
- name: mname,
- data: self.data
- });
- }
- }
-
- s = self.sorted;
- len = s.length;
-
- for (i = 0; i < len; i = i + 1) {
- // this.inserted keeps track of what the loader has loaded.
- // move on if this item is done.
- if (s[i] in self.inserted) {
- continue;
- }
-
- // Because rollups will cause multiple load notifications
- // from Y, loadNext may be called multiple times for
- // the same module when loading a rollup. We can safely
- // skip the subsequent requests
- if (s[i] === self._loading) {
- Y.log('still loading ' + s[i] + ', waiting', 'info', 'loader');
- return;
- }
-
- // log("inserting " + s[i]);
- m = self.getModule(s[i]);
-
- if (!m) {
- if (!self.skipped[s[i]]) {
- msg = 'Undefined module ' + s[i] + ' skipped';
- Y.log(msg, 'warn', 'loader');
- // self.inserted[s[i]] = true;
- self.skipped[s[i]] = true;
- }
- continue;
-
- }
-
- group = (m.group && self.groups[m.group]) || NOT_FOUND;
-
- // The load type is stored to offer the possibility to load
- // the css separately from the script.
- if (!type || type === m.type) {
- self._loading = s[i];
-Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
-
- if (m.type === CSS) {
- fn = Y.Get.css;
- attr = self.cssAttributes;
- } else {
- fn = Y.Get.script;
- attr = self.jsAttributes;
- }
-
- url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
- self._url(m.path, s[i], group.base || m.base);
-
- fn(url, {
- data: s[i],
- onSuccess: handleSuccess,
- insertBefore: self.insertBefore,
- charset: self.charset,
- attributes: attr,
- onFailure: self._onFailure,
- onTimeout: self._onTimeout,
- timeout: self.timeout,
- autopurge: false,
- context: self
- });
-
- return;
- }
- }
-
- // we are finished
- self._loading = null;
-
- fn = self._internalCallback;
-
- // internal callback for loading css first
- if (fn) {
- // Y.log('loader internal');
- self._internalCallback = null;
- fn.call(self);
- } else {
- // Y.log('loader complete');
- self._onSuccess();
- }
+ return;
},
/**
@@ -2368,15 +2256,16 @@ Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
* @return {string} the filtered string.
* @private
*/
- _filter: function(u, name) {
+ _filter: function(u, name, group) {
var f = this.filter,
hasFilter = name && (name in this.filters),
modFilter = hasFilter && this.filters[name],
- groupName = this.moduleInfo[name] ? this.moduleInfo[name].group:null;
- if (groupName && this.groups[groupName].filter) {
- modFilter = this.groups[groupName].filter;
- hasFilter = true;
- };
+ groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
+
+ if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
+ modFilter = this.groups[groupName].filter;
+ hasFilter = true;
+ };
if (u) {
if (hasFilter) {
@@ -2397,7 +2286,7 @@ Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
* @method _url
* @param {string} path the path fragment.
* @param {String} name The name of the module
- * @pamra {String} [base=self.base] The base url to use
+ * @param {String} [base=self.base] The base url to use
* @return {string} the full url.
* @private
*/
@@ -2424,74 +2313,220 @@ Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader');
*
*/
resolve: function(calc, s) {
- var self = this, i, m, url, out = { js: [], css: [] };
+
+ var len, i, m, url, fn, msg, attr, group, groupName, j, frag,
+ comboSource, comboSources, mods, comboBase,
+ base, urls, u = [], tmpBase, baseLen, resCombos = {},
+ self = this, comboSep, maxURLLength, singles = [],
+ inserted = (self.ignoreRegistered) ? {} : self.inserted,
+ resolved = { js: [], jsMods: [], css: [], cssMods: [] },
+ type = self.loadType || 'js';
if (calc) {
self.calculate();
}
s = s || self.sorted;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
+ var addSingle = function(m) {
+
if (m) {
- if (self.combine) {
- url = self._filter((self.root + m.path), m.name, self.root);
- } else {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
+ group = (m.group && self.groups[m.group]) || NOT_FOUND;
+
+ //Always assume it's async
+ if (group.async === false) {
+ m.async = group.async;
}
- out[m.type].push(url);
+
+ url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
+ self._url(m.path, s[i], group.base || m.base);
+
+ if (m.attributes || m.async === false) {
+ url = {
+ url: url,
+ async: m.async
+ };
+ if (m.attributes) {
+ url.attributes = m.attributes
+ }
+ }
+ resolved[m.type].push(url);
+ resolved[m.type + 'Mods'].push(m);
+ } else {
}
- }
- if (self.combine) {
- out.js = [self.comboBase + out.js.join(self.comboSep)];
- out.css = [self.comboBase + out.css.join(self.comboSep)];
+
+ };
+
+ len = s.length;
+
+ // the default combo base
+ comboBase = self.comboBase;
+
+ url = comboBase;
+
+ comboSources = {};
+
+ for (i = 0; i < len; i++) {
+ comboSource = comboBase;
+ m = self.getModule(s[i]);
+ groupName = m && m.group;
+ group = self.groups[groupName];
+ if (groupName && group) {
+
+ if (!group.combine || m.fullpath) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ m.combine = true;
+ if (group.comboBase) {
+ comboSource = group.comboBase;
+ }
+
+ if ("root" in group && L.isValue(group.root)) {
+ m.root = group.root;
+ }
+ m.comboSep = group.comboSep || self.comboSep;
+ m.maxURLLength = group.maxURLLength || self.maxURLLength;
+ } else {
+ if (!self.combine) {
+ //This is not a combo module, skip it and load it singly later.
+ //singles.push(s[i]);
+ addSingle(m);
+ continue;
+ }
+ }
+
+ comboSources[comboSource] = comboSources[comboSource] || [];
+ comboSources[comboSource].push(m);
}
- return out;
+ for (j in comboSources) {
+ if (comboSources.hasOwnProperty(j)) {
+ resCombos[j] = resCombos[j] || { js: [], jsMods: [], css: [], cssMods: [] };
+ url = j;
+ mods = comboSources[j];
+ len = mods.length;
+
+ if (len) {
+ for (i = 0; i < len; i++) {
+ if (inserted[mods[i]]) {
+ continue;
+ }
+ m = mods[i];
+ // Do not try to combine non-yui JS unless combo def
+ // is found
+ if (m && (m.combine || !m.ext)) {
+ resCombos[j].comboSep = m.comboSep;
+ resCombos[j].group = m.group;
+ resCombos[j].maxURLLength = m.maxURLLength;
+ frag = ((L.isValue(m.root)) ? m.root : self.root) + (m.path || m.fullpath);
+ frag = self._filter(frag, m.name);
+ resCombos[j][m.type].push(frag);
+ resCombos[j][m.type + 'Mods'].push(m);
+ } else {
+ //Add them to the next process..
+ if (mods[i]) {
+ //singles.push(mods[i].name);
+ addSingle(mods[i]);
+ }
+ }
+
+ }
+ }
+ }
+ }
+
+
+ for (j in resCombos) {
+ base = j;
+ comboSep = resCombos[base].comboSep || self.comboSep;
+ maxURLLength = resCombos[base].maxURLLength || self.maxURLLength;
+ for (type in resCombos[base]) {
+ if (type === JS || type === CSS) {
+ urls = resCombos[base][type];
+ mods = resCombos[base][type + 'Mods'];
+ len = urls.length;
+ tmpBase = base + urls.join(comboSep);
+ baseLen = tmpBase.length;
+ if (maxURLLength <= base.length) {
+ maxURLLength = MAX_URL_LENGTH;
+ }
+
+ if (len) {
+ if (baseLen > maxURLLength) {
+ u = [];
+ for (s = 0; s < len; s++) {
+ u.push(urls[s]);
+ tmpBase = base + u.join(comboSep);
+
+ if (tmpBase.length > maxURLLength) {
+ m = u.pop();
+ tmpBase = base + u.join(comboSep)
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ u = [];
+ if (m) {
+ u.push(m);
+ }
+ }
+ }
+ if (u.length) {
+ tmpBase = base + u.join(comboSep);
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ } else {
+ resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
+ }
+ }
+ resolved[type + 'Mods'] = resolved[type + 'Mods'].concat(mods);
+ }
+ }
+ }
+
+ resCombos = null;
+
+ return resolved;
},
/**
- * Returns an Object hash of hashes built from `loader.sorted` or from an arbitrary list of sorted modules.
- * @method hash
- * @private
- * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
- * @param {Array} [s=loader.sorted] An override for the loader.sorted array
- * @return {Object} Object hash (js and css) of two object hashes of file lists, with the module name as the key
- * @example This method can be used as an off-line dep calculator
- *
- * var Y = YUI();
- * var loader = new Y.Loader({
- * filter: 'debug',
- * base: '../../',
- * root: 'build/',
- * combine: true,
- * require: ['node', 'dd', 'console']
- * });
- * var out = loader.hash(true);
- *
+ Shortcut to calculate, resolve and load all modules.
+
+ var loader = new Y.Loader({
+ ignoreRegistered: true,
+ modules: {
+ mod: {
+ path: 'mod.js'
+ }
+ },
+ requires: [ 'mod' ]
+ });
+ loader.load(function() {
+ console.log('All modules have loaded..');
+ });
+
+
+ @method load
+ @param {Callback} cb Executed after all load operations are complete
*/
- hash: function(calc, s) {
- var self = this, i, m, url, out = { js: {}, css: {} };
-
- if (calc) {
- self.calculate();
+ load: function(cb) {
+ if (!cb) {
+ return;
}
- s = s || self.sorted;
+ var self = this,
+ out = self.resolve(true);
+
+ self.data = out;
- for (i = 0; i < s.length; i++) {
- m = self.getModule(s[i]);
- if (m) {
- url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name);
- out[m.type][m.name] = url;
- }
- }
+ self.onEnd = function() {
+ cb.apply(self.context || self, arguments);
+ };
- return out;
+ self.insert();
}
};
-}, '3.4.1' ,{requires:['get']});
+}, '3.5.0' ,{requires:['get', 'features']});
YUI.add('loader-rollup', function(Y) {
/**
@@ -2527,8 +2562,6 @@ Y.Loader.prototype._rollup = function() {
}
}
}
-
- this.forceMap = (this.force) ? Y.Array.hash(this.force) : {};
}
// make as many passes as needed to pick up rollup rollups
@@ -2565,17 +2598,14 @@ Y.Loader.prototype._rollup = function() {
// use the rollup module
} else if (r[s[j]] && m.type == smod.type) {
c++;
- // Y.log("adding to thresh: " + c + ", " + s[j]);
roll = (c >= m.rollup);
if (roll) {
- // Y.log("over thresh " + c + ", " + s[j]);
break;
}
}
}
if (roll) {
- // Y.log("adding rollup: " + i);
// add the rollup
r[i] = true;
rolled = true;
@@ -2595,7 +2625,7 @@ Y.Loader.prototype._rollup = function() {
};
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
YUI.add('loader-yui3', function(Y) {
/* This file is auto-generated by src/loader/scripts/meta_join.py */
@@ -2655,6 +2685,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"anim-base"
]
},
+ "anim-shape-transform": {
+ "requires": [
+ "anim-base",
+ "anim-easing",
+ "matrix"
+ ]
+ },
"anim-xy": {
"requires": [
"anim-base",
@@ -2663,12 +2700,52 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"app": {
"use": [
- "controller",
+ "app-base",
+ "app-transitions",
"model",
"model-list",
+ "router",
"view"
]
},
+ "app-base": {
+ "requires": [
+ "classnamemanager",
+ "pjax-base",
+ "router",
+ "view"
+ ]
+ },
+ "app-transitions": {
+ "requires": [
+ "app-base"
+ ]
+ },
+ "app-transitions-css": {
+ "type": "css"
+ },
+ "app-transitions-native": {
+ "condition": {
+ "name": "app-transitions-native",
+ "test": function (Y) {
+ var doc = Y.config.doc,
+ node = doc ? doc.documentElement : null;
+
+ if (node && node.style) {
+ return ('MozTransition' in node.style || 'WebkitTransition' in node.style);
+ }
+
+ return false;
+},
+ "trigger": "app-transitions"
+ },
+ "requires": [
+ "app-transitions",
+ "app-transitions-css",
+ "parallel",
+ "transition"
+ ]
+ },
"array-extras": {
"requires": [
"yui-base"
@@ -2712,7 +2789,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"attribute-base": {
"requires": [
- "event-custom"
+ "attribute-core",
+ "attribute-events",
+ "attribute-extras"
]
},
"attribute-complex": {
@@ -2720,6 +2799,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-base"
]
},
+ "attribute-core": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "attribute-events": {
+ "requires": [
+ "event-custom"
+ ]
+ },
+ "attribute-extras": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"autocomplete": {
"use": [
"autocomplete-base",
@@ -2837,6 +2931,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"attribute-complex"
],
"requires": [
+ "base-core",
"attribute-base"
]
},
@@ -2845,12 +2940,45 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"base-base"
]
},
+ "base-core": {
+ "requires": [
+ "attribute-core"
+ ]
+ },
"base-pluginhost": {
"requires": [
"base-base",
"pluginhost"
]
},
+ "button": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-core": {
+ "requires": [
+ "attribute-core",
+ "classnamemanager",
+ "node-base"
+ ]
+ },
+ "button-group": {
+ "requires": [
+ "button-plugin",
+ "cssbutton",
+ "widget"
+ ]
+ },
+ "button-plugin": {
+ "requires": [
+ "button-core",
+ "cssbutton",
+ "node-pluginhost"
+ ]
+ },
"cache": {
"use": [
"cache-base",
@@ -2877,9 +3005,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"calendar-base",
@@ -2889,9 +3022,14 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"calendar-base": {
"lang": [
+ "de",
"en",
+ "fr",
"ja",
- "ru"
+ "nb-NO",
+ "pt-BR",
+ "ru",
+ "zh-HANT-TW"
],
"requires": [
"widget",
@@ -2913,18 +3051,29 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"charts": {
+ "requires": [
+ "charts-base"
+ ]
+ },
+ "charts-base": {
"requires": [
"dom",
"datatype-number",
"datatype-date",
"event-custom",
"event-mouseenter",
+ "event-touch",
"widget",
"widget-position",
"widget-stack",
"graphics"
]
},
+ "charts-legend": {
+ "requires": [
+ "charts-base"
+ ]
+ },
"classnamemanager": {
"requires": [
"yui-base"
@@ -2965,13 +3114,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"skinnable": true
},
"controller": {
- "optional": [
- "querystring-parse"
- ],
- "requires": [
- "array-extras",
- "base-build",
- "history"
+ "use": [
+ "router"
]
},
"cookie": {
@@ -3006,6 +3150,9 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssbutton": {
+ "type": "css"
+ },
"cssfonts": {
"type": "css"
},
@@ -3019,6 +3166,23 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"type": "css"
},
+ "cssgrids-base": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "type": "css"
+ },
+ "cssgrids-units": {
+ "optional": [
+ "cssreset",
+ "cssfonts"
+ ],
+ "requires": [
+ "cssgrids-base"
+ ],
+ "type": "css"
+ },
"cssreset": {
"type": "css"
},
@@ -3138,13 +3302,28 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"datatable": {
"use": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
"datatable-base",
- "datatable-datasource",
+ "datatable-column-widths",
+ "datatable-message",
+ "datatable-mutable",
"datatable-sort",
- "datatable-scroll"
+ "datatable-datasource"
]
},
"datatable-base": {
+ "requires": [
+ "datatable-core",
+ "datatable-head",
+ "datatable-body",
+ "base-build",
+ "widget"
+ ],
+ "skinnable": true
+ },
+ "datatable-base-deprecated": {
"requires": [
"recordset-base",
"widget",
@@ -3153,6 +3332,25 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "datatable-body": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-column-widths": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
+ "datatable-core": {
+ "requires": [
+ "escape",
+ "model-list",
+ "node-event-delegate"
+ ]
+ },
"datatable-datasource": {
"requires": [
"datatable-base",
@@ -3160,9 +3358,53 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"datasource-local"
]
},
+ "datatable-datasource-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
+ "plugin",
+ "datasource-local"
+ ]
+ },
+ "datatable-deprecated": {
+ "use": [
+ "datatable-base-deprecated",
+ "datatable-datasource-deprecated",
+ "datatable-sort-deprecated",
+ "datatable-scroll-deprecated"
+ ]
+ },
+ "datatable-head": {
+ "requires": [
+ "datatable-core",
+ "view",
+ "classnamemanager"
+ ]
+ },
+ "datatable-message": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-mutable": {
+ "requires": [
+ "datatable-base"
+ ]
+ },
"datatable-scroll": {
"requires": [
"datatable-base",
+ "datatable-column-widths",
+ "dom-screen"
+ ],
+ "skinnable": true
+ },
+ "datatable-scroll-deprecated": {
+ "requires": [
+ "datatable-base-deprecated",
"plugin"
]
},
@@ -3171,7 +3413,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"en"
],
"requires": [
- "datatable-base",
+ "datatable-base"
+ ],
+ "skinnable": true
+ },
+ "datatable-sort-deprecated": {
+ "lang": [
+ "en"
+ ],
+ "requires": [
+ "datatable-base-deprecated",
"plugin",
"recordset-sort"
]
@@ -3362,7 +3613,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "dd-gestures",
"test": function(Y) {
- return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome));
+ return ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.chrome && Y.UA.chrome < 6));
},
"trigger": "dd-drag"
},
@@ -3487,7 +3738,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"editor": {
"use": [
"frame",
- "selection",
+ "editor-selection",
"exec-command",
"editor-base",
"editor-para",
@@ -3503,7 +3754,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"frame",
"node",
"exec-command",
- "selection"
+ "editor-selection"
]
},
"editor-bidi": {
@@ -3522,10 +3773,31 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"editor-para": {
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-para-base": {
"requires": [
"editor-base"
]
},
+ "editor-para-ie": {
+ "condition": {
+ "name": "editor-para-ie",
+ "trigger": "editor-para",
+ "ua": "ie",
+ "when": "instead"
+ },
+ "requires": [
+ "editor-para-base"
+ ]
+ },
+ "editor-selection": {
+ "requires": [
+ "node"
+ ]
+ },
"editor-tab": {
"requires": [
"editor-base"
@@ -3550,7 +3822,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"event-focus",
"event-resize",
"event-hover",
- "event-outside"
+ "event-outside",
+ "event-touch",
+ "event-move",
+ "event-flick",
+ "event-valuechange"
]
},
"event-base": {
@@ -3577,6 +3853,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "event-contextmenu": {
+ "requires": [
+ "event-synthetic",
+ "dom-screen"
+ ]
+ },
"event-custom": {
"use": [
"event-custom-base",
@@ -3686,6 +3968,22 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"yui-base"
]
},
+ "file": {
+ "requires": [
+ "file-flash",
+ "file-html5"
+ ]
+ },
+ "file-flash": {
+ "requires": [
+ "base"
+ ]
+ },
+ "file-html5": {
+ "requires": [
+ "base"
+ ]
+ },
"frame": {
"requires": [
"base",
@@ -3704,7 +4002,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"node",
"event-custom",
- "pluginhost"
+ "pluginhost",
+ "matrix"
]
},
"graphics-canvas": {
@@ -3712,8 +4011,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
},
@@ -3726,8 +4027,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"name": "graphics-canvas-default",
"test": function(Y) {
var DOCUMENT = Y.config.doc,
- canvas = DOCUMENT && DOCUMENT.createElement("canvas");
- return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d")));
+ useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
},
"trigger": "graphics"
}
@@ -3736,8 +4039,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
},
@@ -3749,8 +4056,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"condition": {
"name": "graphics-svg-default",
"test": function(Y) {
- var DOCUMENT = Y.config.doc;
- return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+ var DOCUMENT = Y.config.doc,
+ useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
+ canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
+ svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
+
+ return svg && (useSVG || !canvas);
},
"trigger": "graphics"
}
@@ -3780,6 +4091,21 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"trigger": "graphics"
}
},
+ "handlebars": {
+ "use": [
+ "handlebars-compiler"
+ ]
+ },
+ "handlebars-base": {
+ "requires": [
+ "escape"
+ ]
+ },
+ "handlebars-compiler": {
+ "requires": [
+ "handlebars-base"
+ ]
+ },
"highlight": {
"use": [
"highlight-base",
@@ -3888,6 +4214,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"node-base"
]
},
+ "io-nodejs": {
+ "condition": {
+ "name": "io-nodejs",
+ "trigger": "io-base",
+ "ua": "nodejs"
+ },
+ "requires": [
+ "io-base"
+ ]
+ },
"io-queue": {
"requires": [
"io-base",
@@ -3942,7 +4278,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"loader-base": {
"requires": [
- "get"
+ "get",
+ "features"
]
},
"loader-rollup": {
@@ -3955,6 +4292,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"loader-base"
]
},
+ "matrix": {
+ "requires": [
+ "yui-base"
+ ]
+ },
"model": {
"requires": [
"base-build",
@@ -4088,17 +4430,42 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"panel": {
"requires": [
"widget",
- "widget-stdmod",
+ "widget-autohide",
+ "widget-buttons",
+ "widget-modality",
"widget-position",
"widget-position-align",
- "widget-stack",
"widget-position-constrain",
- "widget-modality",
- "widget-autohide",
- "widget-buttons"
+ "widget-stack",
+ "widget-stdmod"
],
"skinnable": true
},
+ "parallel": {
+ "requires": [
+ "yui-base"
+ ]
+ },
+ "pjax": {
+ "requires": [
+ "pjax-base",
+ "io-base"
+ ]
+ },
+ "pjax-base": {
+ "requires": [
+ "classnamemanager",
+ "node-event-delegate",
+ "router"
+ ]
+ },
+ "pjax-plugin": {
+ "requires": [
+ "node-pluginhost",
+ "pjax",
+ "plugin"
+ ]
+ },
"plugin": {
"requires": [
"base-base"
@@ -4245,6 +4612,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"features"
]
},
+ "router": {
+ "optional": [
+ "querystring-parse"
+ ],
+ "requires": [
+ "array-extras",
+ "base-build",
+ "history"
+ ]
+ },
"scrollview": {
"requires": [
"scrollview-base",
@@ -4255,6 +4632,7 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"event-gestures",
+ "event-mousewheel",
"transition"
],
"skinnable": true
@@ -4289,11 +4667,6 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
- "selection": {
- "requires": [
- "node"
- ]
- },
"selector": {
"requires": [
"selector-native"
@@ -4343,7 +4716,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"requires": [
"widget",
"dd-constrain",
- "substitute"
+ "substitute",
+ "event-key"
],
"skinnable": true
},
@@ -4423,6 +4797,13 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
],
"skinnable": true
},
+ "test-console": {
+ "requires": [
+ "console-filters",
+ "test"
+ ],
+ "skinnable": true
+ },
"text": {
"use": [
"text-accentfold",
@@ -4477,6 +4858,12 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
},
"uploader": {
+ "requires": [
+ "uploader-html5",
+ "uploader-flash"
+ ]
+ },
+ "uploader-deprecated": {
"requires": [
"event-custom",
"node",
@@ -4484,45 +4871,76 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
"swf"
]
},
+ "uploader-flash": {
+ "requires": [
+ "swf",
+ "widget",
+ "substitute",
+ "base",
+ "cssbutton",
+ "node",
+ "event-custom",
+ "file-flash",
+ "uploader-queue"
+ ]
+ },
+ "uploader-html5": {
+ "requires": [
+ "widget",
+ "node-event-simulate",
+ "substitute",
+ "file-html5",
+ "uploader-queue"
+ ]
+ },
+ "uploader-queue": {
+ "requires": [
+ "base"
+ ]
+ },
"view": {
"requires": [
"base-build",
"node-event-delegate"
]
},
+ "view-node-map": {
+ "requires": [
+ "view"
+ ]
+ },
"widget": {
"use": [
"widget-base",
"widget-htmlparser",
- "widget-uievents",
- "widget-skin"
+ "widget-skin",
+ "widget-uievents"
]
},
"widget-anim": {
"requires": [
- "plugin",
"anim-base",
+ "plugin",
"widget"
]
},
"widget-autohide": {
"requires": [
- "widget",
- "event-outside",
"base-build",
- "event-key"
- ],
- "skinnable": false
+ "event-key",
+ "event-outside",
+ "widget"
+ ]
},
"widget-base": {
"requires": [
"attribute",
- "event-focus",
"base-base",
"base-pluginhost",
+ "classnamemanager",
+ "event-focus",
"node-base",
- "node-style",
- "classnamemanager"
+ "node-style"
],
"skinnable": true
},
@@ -4538,11 +4956,10 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-buttons": {
"requires": [
- "widget",
- "base-build",
+ "button-plugin",
+ "cssbutton",
"widget-stdmod"
- ],
- "skinnable": true
+ ]
},
"widget-child": {
"requires": [
@@ -4562,16 +4979,16 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-modality": {
"requires": [
- "widget",
+ "base-build",
"event-outside",
- "base-build"
+ "widget"
],
- "skinnable": false
+ "skinnable": true
},
"widget-parent": {
"requires": [
- "base-build",
"arraylist",
+ "base-build",
"widget"
]
},
@@ -4612,8 +5029,8 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
},
"widget-uievents": {
"requires": [
- "widget-base",
- "node-event-delegate"
+ "node-event-delegate",
+ "widget-base"
]
},
"yql": {
@@ -4641,11 +5058,11 @@ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {
]
}
};
-YUI.Env[Y.version].md5 = '105ebffae27a0e3d7331f8cf5c0bb282';
+YUI.Env[Y.version].md5 = 'f5a3bc9bda2441a3b15fb52c567fc1f7';
-}, '3.4.1' ,{requires:['loader-base']});
+}, '3.5.0' ,{requires:['loader-base']});
-YUI.add('loader', function(Y){}, '3.4.1' ,{use:['loader-base', 'loader-rollup', 'loader-yui3' ]});
+YUI.add('loader', function(Y){}, '3.5.0' ,{use:['loader-base', 'loader-rollup', 'loader-yui3' ]});
diff --git a/lib/yui/3.5.0/build/matrix/matrix-debug.js b/lib/yui/3.5.0/build/matrix/matrix-debug.js
new file mode 100644
index 00000000000..041d9ca24b5
--- /dev/null
+++ b/lib/yui/3.5.0/build/matrix/matrix-debug.js
@@ -0,0 +1,937 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add('matrix', function(Y) {
+
+var MatrixUtil = {
+ /**
+ * Used as value for the _rounding method.
+ *
+ * @property _rounder
+ * @private
+ */
+ _rounder: 100000,
+
+ /**
+ * Rounds values
+ *
+ * @method _round
+ * @private
+ */
+ _round: function(val) {
+ val = Math.round(val * MatrixUtil._rounder) / MatrixUtil._rounder;
+ return val;
+ },
+ /**
+ * Converts a radian value to a degree.
+ *
+ * @method rad2deg
+ * @param {Number} rad Radian value to be converted.
+ * @return Number
+ */
+ rad2deg: function(rad) {
+ var deg = rad * (180 / Math.PI);
+ return deg;
+ },
+
+ /**
+ * Converts a degree value to a radian.
+ *
+ * @method deg2rad
+ * @param {Number} deg Degree value to be converted to radian.
+ * @return Number
+ */
+ deg2rad: function(deg) {
+ var rad = deg * (Math.PI / 180);
+ return rad;
+ },
+
+ /**
+ * Converts an angle to a radian
+ *
+ * @method angle2rad
+ * @param {Objecxt} val Value to be converted to radian.
+ * @return Number
+ */
+ angle2rad: function(val) {
+ if (typeof val === 'string' && val.indexOf('rad') > -1) {
+ val = parseFloat(val);
+ } else { // default to deg
+ val = MatrixUtil.deg2rad(parseFloat(val));
+ }
+
+ return val;
+ },
+
+ /**
+ * Converts a transform object to an array of column vectors.
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * \ /
+ *
+ * @method getnxn
+ * @return Array
+ */
+ convertTransformToArray: function(matrix)
+ {
+ var matrixArray = [
+ [matrix.a, matrix.c, matrix.dx],
+ [matrix.b, matrix.d, matrix.dy],
+ [0, 0, 1]
+ ];
+ return matrixArray;
+ },
+
+ /**
+ * Returns the determinant of a given matrix.
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * | matrix[0][3] matrix[1][3] matrix[2][3] |
+ * \ /
+ *
+ * @method getDeterminant
+ * @param {Array} matrix An nxn matrix represented an array of vector (column) arrays. Each vector array has index for each row.
+ * @return Number
+ */
+ getDeterminant: function(matrix)
+ {
+ var determinant = 0,
+ len = matrix.length,
+ i = 0,
+ multiplier;
+
+ if(len == 2)
+ {
+ return matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0];
+ }
+ for(; i < len; ++i)
+ {
+ multiplier = matrix[i][0];
+ if(i % 2 === 0 || i === 0)
+ {
+ determinant += multiplier * MatrixUtil.getDeterminant(MatrixUtil.getMinors(matrix, i, 0));
+ }
+ else
+ {
+ determinant -= multiplier * MatrixUtil.getDeterminant(MatrixUtil.getMinors(matrix, i, 0));
+ }
+ }
+ return determinant;
+ },
+
+ /**
+ * Returns the inverse of a matrix
+ *
+ * @method inverse
+ * @param Array matrix An array representing an nxn matrix
+ * @return Array
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * | matrix[0][3] matrix[1][3] matrix[2][3] |
+ * \ /
+ */
+ inverse: function(matrix)
+ {
+ var determinant = 0,
+ len = matrix.length,
+ i = 0,
+ j,
+ inverse,
+ adjunct = [],
+ //vector representing 2x2 matrix
+ minor = [],
+ multiplier;
+ if(len === 2)
+ {
+ determinant = matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0];
+ inverse = [
+ [matrix[1][1] * determinant, -matrix[1][0] * determinant],
+ [-matrix[0][1] * determinant, matrix[0][0] * determinant]
+ ];
+ }
+ else
+ {
+ determinant = MatrixUtil.getDeterminant(matrix);
+ for(; i < len; ++i)
+ {
+ adjunct[i] = [];
+ for(j = 0; j < len; ++j)
+ {
+ minor = MatrixUtil.getMinors(matrix, j, i);
+ adjunct[i][j] = MatrixUtil.getDeterminant(minor);
+ if((i + j) % 2 !== 0 && (i + j) !== 0)
+ {
+ adjunct[i][j] *= -1;
+ }
+ }
+ }
+ inverse = MatrixUtil.scalarMultiply(adjunct, 1/determinant);
+ }
+ return inverse;
+ },
+
+ /**
+ * Multiplies a matrix by a numeric value.
+ *
+ * @method scalarMultiply
+ * @param {Array} matrix The matrix to be altered.
+ * @param {Number} multiplier The number to multiply against the matrix.
+ * @return Array
+ */
+ scalarMultiply: function(matrix, multiplier)
+ {
+ var i = 0,
+ j,
+ len = matrix.length;
+ for(; i < len; ++i)
+ {
+ for(j = 0; j < len; ++j)
+ {
+ matrix[i][j] = MatrixUtil._round(matrix[i][j] * multiplier);
+ }
+ }
+ return matrix;
+ },
+
+ /**
+ * Returns the transpose for an nxn matrix.
+ *
+ * @method transpose
+ * @param matrix An nxn matrix represented by an array of vector arrays.
+ * @return Array
+ */
+ transpose: function(matrix)
+ {
+ var len = matrix.length,
+ i = 0,
+ j = 0,
+ transpose = [];
+ for(; i < len; ++i)
+ {
+ transpose[i] = [];
+ for(j = 0; j < len; ++j)
+ {
+ transpose[i].push(matrix[j][i]);
+ }
+ }
+ return transpose;
+ },
+
+ /**
+ * Returns a matrix of minors based on a matrix, column index and row index.
+ *
+ * @method getMinors
+ * @param {Array} matrix The matrix from which to extract the matrix of minors.
+ * @param {Number} columnIndex A zero-based index representing the specified column to exclude.
+ * @param {Number} rowIndex A zero-based index represeenting the specified row to exclude.
+ * @return Array
+ */
+ getMinors: function(matrix, columnIndex, rowIndex)
+ {
+ var minors = [],
+ len = matrix.length,
+ i = 0,
+ j,
+ column;
+ for(; i < len; ++i)
+ {
+ if(i !== columnIndex)
+ {
+ column = [];
+ for(j = 0; j < len; ++j)
+ {
+ if(j !== rowIndex)
+ {
+ column.push(matrix[i][j]);
+ }
+ }
+ minors.push(column);
+ }
+ }
+ return minors;
+ },
+
+ /**
+ * Returns the sign of value
+ *
+ * @method sign
+ * @param {Number} val value to be interpreted
+ * @return Number
+ */
+ sign: function(val)
+ {
+ return val === 0 ? 1 : val/Math.abs(val);
+ },
+
+ /**
+ * Multiplies a vector and a matrix
+ *
+ * @method vectorMatrixProduct
+ * @param {Array} vector Array representing a column vector
+ * @param {Array} matrix Array representing an nxn matrix
+ * @return Array
+ */
+ vectorMatrixProduct: function(vector, matrix)
+ {
+ var i,
+ j,
+ len = vector.length,
+ product = [],
+ rowProduct;
+ for(i = 0; i < len; ++i)
+ {
+ rowProduct = 0;
+ for(j = 0; j < len; ++j)
+ {
+ rowProduct += vector[i] * matrix[i][j];
+ }
+ product[i] = rowProduct;
+ }
+ return product;
+ },
+
+ /**
+ * Breaks up a 2d transform matrix into a series of transform operations.
+ *
+ * @method decompose
+ * @param {Array} 3x3 matrix array
+ * @return Array
+ */
+ decompose: function(matrix)
+ {
+ var a = matrix[0][0],
+ b = matrix[1][0],
+ c = matrix[0][1],
+ d = matrix[1][1],
+ dx = matrix[0][2],
+ dy = matrix[1][2],
+ translate = [dx, dy],
+ rotate,
+ sx,
+ sy,
+ sign = sign,
+ shear;
+ if((a * d - b * c) === 0)
+ {
+ return false;
+ }
+ //get length of vector(ab)
+ sx = MatrixUtil._round(Math.sqrt(a * a + b * b));
+ //normalize components of vector(ab)
+ a /= sx;
+ b /= sx;
+ shear = MatrixUtil._round(a * c + b * d);
+ c -= a * shear;
+ d -= b * shear;
+ //get length of vector(cd)
+ sy = MatrixUtil._round(Math.sqrt(c * c + d * d));
+ //normalize components of vector(cd)
+ c /= sy;
+ d /= sy;
+ shear /=sy;
+ if(a * b < c * d)
+ {
+ a = -a;
+ b = -b;
+ c = -c;
+ d = -d;
+ shear = -shear;
+ sx = -sx;
+ sy = -sy;
+ }
+ shear = MatrixUtil._round(MatrixUtil.rad2deg(Math.atan(shear)));
+ rotate = MatrixUtil._round(MatrixUtil.rad2deg(Math.atan2(matrix[1][0], matrix[0][0])));
+
+ return [
+ ["translate", dx, dy],
+ ["rotate", rotate],
+ ["skewX", shear],
+ ["scale", sx, sy]
+ ];
+ },
+
+ /**
+ * Parses a transform string and returns an array of transform arrays.
+ *
+ * @method getTransformArray
+ * @param {String} val A transform string
+ * @return Array
+ */
+ getTransformArray: function(transform) {
+ var re = /\s*([a-z]*)\(([\w,\.,\-,\s]*)\)/gi,
+ transforms = [],
+ args,
+ m,
+ decomp,
+ methods = MatrixUtil.transformMethods;
+
+ while ((m = re.exec(transform))) {
+ if (methods.hasOwnProperty(m[1]))
+ {
+ args = m[2].split(',');
+ args.unshift(m[1]);
+ transforms.push(args);
+ }
+ else if(m[1] == "matrix")
+ {
+ args = m[2].split(',');
+ decomp = MatrixUtil.decompose([
+ [args[0], args[2], args[4]],
+ [args[1], args[3], args[5]],
+ [0, 0, 1]
+ ]);
+ transforms.push(decomp[0]);
+ transforms.push(decomp[1]);
+ transforms.push(decomp[2]);
+ transforms.push(decomp[3]);
+ }
+ }
+ return transforms;
+ },
+
+ /**
+ * Returns an array of transform arrays representing transform functions and arguments.
+ *
+ * @method getTransformFunctionArray
+ * @return Array
+ */
+ getTransformFunctionArray: function(transform) {
+ var list;
+ switch(transform)
+ {
+ case "skew" :
+ list = [transform, 0, 0];
+ break;
+ case "scale" :
+ list = [transform, 1, 1];
+ break;
+ case "scaleX" :
+ list = [transform, 1];
+ break;
+ case "scaleY" :
+ list = [transform, 1];
+ break;
+ case "translate" :
+ list = [transform, 0, 0];
+ break;
+ default :
+ list = [transform, 0];
+ break;
+ }
+ return list;
+ },
+
+ /**
+ * Compares to arrays or transform functions to ensure both contain the same functions in the same
+ * order.
+ *
+ * @method compareTransformSequence
+ * @param {Array} list1 Array to compare
+ * @param {Array} list2 Array to compare
+ * @return Boolean
+ */
+ compareTransformSequence: function(list1, list2)
+ {
+ var i = 0,
+ len = list1.length,
+ len2 = list2.length,
+ isEqual = len === len2;
+ if(isEqual)
+ {
+ for(; i < len; ++i)
+ {
+ if(list1[i][0] != list2[i][0])
+ {
+ isEqual = false;
+ break;
+ }
+ }
+ }
+ return isEqual;
+ },
+
+ /**
+ * Mapping of possible transform method names.
+ *
+ * @property transformMethods
+ * @type Object
+ */
+ transformMethods: {
+ rotate: "rotate",
+ skew: "skew",
+ skewX: "skewX",
+ skewY: "skewY",
+ translate: "translate",
+ translateX: "translateX",
+ translateY: "tranlsateY",
+ scale: "scale",
+ scaleX: "scaleX",
+ scaleY: "scaleY"
+ }
+
+};
+
+Y.MatrixUtil = MatrixUtil;
+
+/**
+ * Matrix is a class that allows for the manipulation of a transform matrix.
+ * This class is a work in progress.
+ *
+ * @class Matrix
+ * @constructor
+ * @module matrix
+ */
+var Matrix = function(config) {
+ this.init(config);
+};
+
+Matrix.prototype = {
+ /**
+ * Used as value for the _rounding method.
+ *
+ * @property _rounder
+ * @private
+ */
+ _rounder: 100000,
+
+ /**
+ * Updates the matrix.
+ *
+ * @method multiple
+ * @param {Number} a
+ * @param {Number} b
+ * @param {Number} c
+ * @param {Number} d
+ * @param {Number} dx
+ * @param {Number} dy
+ */
+ multiply: function(a, b, c, d, dx, dy) {
+ var matrix = this,
+ matrix_a = matrix.a * a + matrix.c * b,
+ matrix_b = matrix.b * a + matrix.d * b,
+ matrix_c = matrix.a * c + matrix.c * d,
+ matrix_d = matrix.b * c + matrix.d * d,
+ matrix_dx = matrix.a * dx + matrix.c * dy + matrix.dx,
+ matrix_dy = matrix.b * dx + matrix.d * dy + matrix.dy;
+
+ matrix.a = matrix_a;
+ matrix.b = matrix_b;
+ matrix.c = matrix_c;
+ matrix.d = matrix_d;
+ matrix.dx = matrix_dx;
+ matrix.dy = matrix_dy;
+ return this;
+ },
+
+ /**
+ * Parses a string and updates the matrix.
+ *
+ * @method applyCSSText
+ * @param {String} val A css transform string
+ */
+ applyCSSText: function(val) {
+ var re = /\s*([a-z]*)\(([\w,\s]*)\)/gi,
+ args,
+ m;
+
+ while ((m = re.exec(val))) {
+ if (typeof this[m[1]] === 'function') {
+ args = m[2].split(',');
+ this[m[1]].apply(this, args);
+ }
+ }
+ },
+
+ /**
+ * Parses a string and returns an array of transform arrays.
+ *
+ * @method getTransformArray
+ * @param {String} val A css transform string
+ * @return Array
+ */
+ getTransformArray: function(val) {
+ var re = /\s*([a-z]*)\(([\w,\.,\-,\s]*)\)/gi,
+ transforms = [],
+ args,
+ m;
+
+ val = val.replace(/matrix/g, "multiply");
+ while ((m = re.exec(val))) {
+ if (typeof this[m[1]] === 'function') {
+ args = m[2].split(',');
+ args.unshift(m[1]);
+ transforms.push(args);
+ }
+ }
+ return transforms;
+ },
+
+ /**
+ * Default values for the matrix
+ *
+ * @property _defaults
+ * @private
+ */
+ _defaults: {
+ a: 1,
+ b: 0,
+ c: 0,
+ d: 1,
+ dx: 0,
+ dy: 0
+ },
+
+ /**
+ * Rounds values
+ *
+ * @method _round
+ * @private
+ */
+ _round: function(val) {
+ val = Math.round(val * this._rounder) / this._rounder;
+ return val;
+ },
+
+ /**
+ * Initializes a matrix.
+ *
+ * @method init
+ * @param {Object} config Specified key value pairs for matrix properties. If a property is not explicitly defined in the config argument,
+ * the default value will be used.
+ */
+ init: function(config) {
+ var defaults = this._defaults,
+ prop;
+
+ config = config || {};
+
+ for (prop in defaults) {
+ if(defaults.hasOwnProperty(prop))
+ {
+ this[prop] = (prop in config) ? config[prop] : defaults[prop];
+ }
+ }
+
+ this._config = config;
+ },
+
+ /**
+ * Applies a scale transform
+ *
+ * @method scale
+ * @param {Number} val
+ */
+ scale: function(x, y) {
+ this.multiply(x, 0, 0, y, 0, 0);
+ return this;
+ },
+
+ /**
+ * Applies a skew transformation.
+ *
+ * @method skew
+ * @param {Number} x The value to skew on the x-axis.
+ * @param {Number} y The value to skew on the y-axis.
+ */
+ skew: function(x, y) {
+ x = x || 0;
+ y = y || 0;
+
+ if (x !== undefined) { // null or undef
+ x = this._round(Math.tan(this.angle2rad(x)));
+
+ }
+
+ if (y !== undefined) { // null or undef
+ y = this._round(Math.tan(this.angle2rad(y)));
+ }
+
+ this.multiply(1, y, x, 1, 0, 0);
+ return this;
+ },
+
+ /**
+ * Applies a skew to the x-coordinate
+ *
+ * @method skewX
+ * @param {Number} x x-coordinate
+ */
+ skewX: function(x) {
+ this.skew(x);
+ return this;
+ },
+
+ /**
+ * Applies a skew to the y-coordinate
+ *
+ * @method skewY
+ * @param {Number} y y-coordinate
+ */
+ skewY: function(y) {
+ this.skew(null, y);
+ return this;
+ },
+
+ /**
+ * Returns a string of text that can be used to populate a the css transform property of an element.
+ *
+ * @method toCSSText
+ * @return String
+ */
+ toCSSText: function() {
+ var matrix = this,
+ dx = matrix.dx,
+ dy = matrix.dy,
+ text = 'matrix(';
+
+
+ if (Y.UA.gecko) { // requires unit
+ if (!isNaN(dx)) {
+ dx += 'px';
+ }
+ if (!isNaN(dy)) {
+ dy += 'px';
+ }
+ }
+
+ text += matrix.a + ',' +
+ matrix.b + ',' +
+ matrix.c + ',' +
+ matrix.d + ',' +
+ dx + ',' +
+ dy;
+
+ text += ')';
+
+ return text;
+ },
+
+ /**
+ * Returns a string that can be used to populate the css filter property of an element.
+ *
+ * @method toFilterText
+ * @return String
+ */
+ toFilterText: function() {
+ var matrix = this,
+ text = 'progid:DXImageTransform.Microsoft.Matrix(';
+ text += 'M11=' + matrix.a + ',' +
+ 'M21=' + matrix.b + ',' +
+ 'M12=' + matrix.c + ',' +
+ 'M22=' + matrix.d + ',' +
+ 'sizingMethod="auto expand")';
+
+ text += '';
+
+ return text;
+ },
+
+ /**
+ * Converts a radian value to a degree.
+ *
+ * @method rad2deg
+ * @param {Number} rad Radian value to be converted.
+ * @return Number
+ */
+ rad2deg: function(rad) {
+ var deg = rad * (180 / Math.PI);
+ return deg;
+ },
+
+ /**
+ * Converts a degree value to a radian.
+ *
+ * @method deg2rad
+ * @param {Number} deg Degree value to be converted to radian.
+ * @return Number
+ */
+ deg2rad: function(deg) {
+ var rad = deg * (Math.PI / 180);
+ return rad;
+ },
+
+ angle2rad: function(val) {
+ if (typeof val === 'string' && val.indexOf('rad') > -1) {
+ val = parseFloat(val);
+ } else { // default to deg
+ val = this.deg2rad(parseFloat(val));
+ }
+
+ return val;
+ },
+
+ /**
+ * Applies a rotate transform.
+ *
+ * @method rotate
+ * @param {Number} deg The degree of the rotation.
+ */
+ rotate: function(deg, x, y) {
+ var matrix = [],
+ rad = this.angle2rad(deg),
+ sin = this._round(Math.sin(rad)),
+ cos = this._round(Math.cos(rad));
+ this.multiply(cos, sin, 0 - sin, cos, 0, 0);
+ return this;
+ },
+
+ /**
+ * Applies translate transformation.
+ *
+ * @method translate
+ * @param {Number} x The value to transate on the x-axis.
+ * @param {Number} y The value to translate on the y-axis.
+ */
+ translate: function(x, y) {
+ x = parseFloat(x) || 0;
+ y = parseFloat(y) || 0;
+ this.multiply(1, 0, 0, 1, x, y);
+ return this;
+ },
+
+ /**
+ * Returns an identity matrix.
+ *
+ * @method identity
+ * @return Object
+ */
+ identity: function() {
+ var config = this._config,
+ defaults = this._defaults,
+ prop;
+
+ for (prop in config) {
+ if (prop in defaults) {
+ this[prop] = defaults[prop];
+ }
+ }
+ return this;
+ },
+
+ /**
+ * Returns a 3x3 Matrix array
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * \ /
+ *
+ * @method getMatrixArray
+ * @return Array
+ */
+ getMatrixArray: function()
+ {
+ var matrix = this,
+ matrixArray = [
+ [matrix.a, matrix.c, matrix.dx],
+ [matrix.b, matrix.d, matrix.dy],
+ [0, 0, 1]
+ ];
+ return matrixArray;
+ },
+
+ /**
+ * Returns the left, top, right and bottom coordinates for a transformed
+ * item.
+ *
+ * @method getContentRect
+ * @param {Number} width The width of the item.
+ * @param {Number} height The height of the item.
+ * @param {Number} x The x-coordinate of the item.
+ * @param {Number} y The y-coordinate of the item.
+ * @return Object
+ */
+ getContentRect: function(width, height, x, y)
+ {
+ var left = !isNaN(x) ? x : 0,
+ top = !isNaN(y) ? y : 0,
+ right = left + width,
+ bottom = top + height,
+ matrix = this,
+ a = matrix.a,
+ b = matrix.b,
+ c = matrix.c,
+ d = matrix.d,
+ dx = matrix.dx,
+ dy = matrix.dy,
+ x1 = (a * left + c * top + dx),
+ y1 = (b * left + d * top + dy),
+ //[x2, y2]
+ x2 = (a * right + c * top + dx),
+ y2 = (b * right + d * top + dy),
+ //[x3, y3]
+ x3 = (a * left + c * bottom + dx),
+ y3 = (b * left + d * bottom + dy),
+ //[x4, y4]
+ x4 = (a * right + c * bottom + dx),
+ y4 = (b * right + d * bottom + dy);
+ return {
+ left: Math.min(x3, Math.min(x1, Math.min(x2, x4))),
+ right: Math.max(x3, Math.max(x1, Math.max(x2, x4))),
+ top: Math.min(y2, Math.min(y4, Math.min(y3, y1))),
+ bottom: Math.max(y2, Math.max(y4, Math.max(y3, y1)))
+ };
+ },
+
+ /**
+ * Returns the determinant of the matrix.
+ *
+ * @method getDeterminant
+ * @return Number
+ */
+ getDeterminant: function()
+ {
+ return Y.MatrixUtil.getDeterminant(this.getMatrixArray());
+ },
+
+ /**
+ * Returns the inverse (in array form) of the matrix.
+ *
+ * @method inverse
+ * @return Array
+ */
+ inverse: function()
+ {
+ return Y.MatrixUtil.inverse(this.getMatrixArray());
+ },
+
+ /**
+ * Returns the transpose of the matrix
+ *
+ * @method transpose
+ * @return Array
+ */
+ transpose: function()
+ {
+ return Y.MatrixUtil.transpose(this.getMatrixArray());
+ },
+
+ /**
+ * Returns an array of transform commands that represent the matrix.
+ *
+ * @method decompose
+ * @return Array
+ */
+ decompose: function()
+ {
+ return Y.MatrixUtil.decompose(this.getMatrixArray());
+ }
+};
+
+Y.Matrix = Matrix;
+
+
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.5.0/build/matrix/matrix-min.js b/lib/yui/3.5.0/build/matrix/matrix-min.js
new file mode 100644
index 00000000000..aea75890ff0
--- /dev/null
+++ b/lib/yui/3.5.0/build/matrix/matrix-min.js
@@ -0,0 +1,8 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("matrix",function(c){var a={_rounder:100000,_round:function(d){d=Math.round(d*a._rounder)/a._rounder;return d;},rad2deg:function(d){var e=d*(180/Math.PI);return e;},deg2rad:function(e){var d=e*(Math.PI/180);return d;},angle2rad:function(d){if(typeof d==="string"&&d.indexOf("rad")>-1){d=parseFloat(d);}else{d=a.deg2rad(parseFloat(d));}return d;},convertTransformToArray:function(d){var e=[[d.a,d.c,d.dx],[d.b,d.d,d.dy],[0,0,1]];return e;},getDeterminant:function(f){var e=0,d=f.length,g=0,h;if(d==2){return f[0][0]*f[1][1]-f[0][1]*f[1][0];}for(;g-1){d=parseFloat(d);}else{d=this.deg2rad(parseFloat(d));}return d;},rotate:function(h,e,j){var g=[],d=this.angle2rad(h),f=this._round(Math.sin(d)),i=this._round(Math.cos(d));this.multiply(i,f,0-f,i,0,0);return this;},translate:function(d,e){d=parseFloat(d)||0;e=parseFloat(e)||0;this.multiply(1,0,0,1,d,e);return this;},identity:function(){var d=this._config,e=this._defaults,f;for(f in d){if(f in e){this[f]=e[f];}}return this;},getMatrixArray:function(){var d=this,e=[[d.a,d.c,d.dx],[d.b,d.d,d.dy],[0,0,1]];return e;},getContentRect:function(q,p,l,k){var i=!isNaN(l)?l:0,o=!isNaN(k)?k:0,z=i+q,j=o+p,s=this,C=s.a,B=s.b,A=s.c,w=s.d,n=s.dx,m=s.dy,v=(C*i+A*o+n),h=(B*i+w*o+m),u=(C*z+A*o+n),g=(B*z+w*o+m),t=(C*i+A*j+n),f=(B*i+w*j+m),r=(C*z+A*j+n),e=(B*z+w*j+m);return{left:Math.min(t,Math.min(v,Math.min(u,r))),right:Math.max(t,Math.max(v,Math.max(u,r))),top:Math.min(g,Math.min(e,Math.min(f,h))),bottom:Math.max(g,Math.max(e,Math.max(f,h)))};},getDeterminant:function(){return c.MatrixUtil.getDeterminant(this.getMatrixArray());},inverse:function(){return c.MatrixUtil.inverse(this.getMatrixArray());},transpose:function(){return c.MatrixUtil.transpose(this.getMatrixArray());},decompose:function(){return c.MatrixUtil.decompose(this.getMatrixArray());
+}};c.Matrix=b;},"3.5.0",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.5.0/build/matrix/matrix.js b/lib/yui/3.5.0/build/matrix/matrix.js
new file mode 100644
index 00000000000..041d9ca24b5
--- /dev/null
+++ b/lib/yui/3.5.0/build/matrix/matrix.js
@@ -0,0 +1,937 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add('matrix', function(Y) {
+
+var MatrixUtil = {
+ /**
+ * Used as value for the _rounding method.
+ *
+ * @property _rounder
+ * @private
+ */
+ _rounder: 100000,
+
+ /**
+ * Rounds values
+ *
+ * @method _round
+ * @private
+ */
+ _round: function(val) {
+ val = Math.round(val * MatrixUtil._rounder) / MatrixUtil._rounder;
+ return val;
+ },
+ /**
+ * Converts a radian value to a degree.
+ *
+ * @method rad2deg
+ * @param {Number} rad Radian value to be converted.
+ * @return Number
+ */
+ rad2deg: function(rad) {
+ var deg = rad * (180 / Math.PI);
+ return deg;
+ },
+
+ /**
+ * Converts a degree value to a radian.
+ *
+ * @method deg2rad
+ * @param {Number} deg Degree value to be converted to radian.
+ * @return Number
+ */
+ deg2rad: function(deg) {
+ var rad = deg * (Math.PI / 180);
+ return rad;
+ },
+
+ /**
+ * Converts an angle to a radian
+ *
+ * @method angle2rad
+ * @param {Objecxt} val Value to be converted to radian.
+ * @return Number
+ */
+ angle2rad: function(val) {
+ if (typeof val === 'string' && val.indexOf('rad') > -1) {
+ val = parseFloat(val);
+ } else { // default to deg
+ val = MatrixUtil.deg2rad(parseFloat(val));
+ }
+
+ return val;
+ },
+
+ /**
+ * Converts a transform object to an array of column vectors.
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * \ /
+ *
+ * @method getnxn
+ * @return Array
+ */
+ convertTransformToArray: function(matrix)
+ {
+ var matrixArray = [
+ [matrix.a, matrix.c, matrix.dx],
+ [matrix.b, matrix.d, matrix.dy],
+ [0, 0, 1]
+ ];
+ return matrixArray;
+ },
+
+ /**
+ * Returns the determinant of a given matrix.
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * | matrix[0][3] matrix[1][3] matrix[2][3] |
+ * \ /
+ *
+ * @method getDeterminant
+ * @param {Array} matrix An nxn matrix represented an array of vector (column) arrays. Each vector array has index for each row.
+ * @return Number
+ */
+ getDeterminant: function(matrix)
+ {
+ var determinant = 0,
+ len = matrix.length,
+ i = 0,
+ multiplier;
+
+ if(len == 2)
+ {
+ return matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0];
+ }
+ for(; i < len; ++i)
+ {
+ multiplier = matrix[i][0];
+ if(i % 2 === 0 || i === 0)
+ {
+ determinant += multiplier * MatrixUtil.getDeterminant(MatrixUtil.getMinors(matrix, i, 0));
+ }
+ else
+ {
+ determinant -= multiplier * MatrixUtil.getDeterminant(MatrixUtil.getMinors(matrix, i, 0));
+ }
+ }
+ return determinant;
+ },
+
+ /**
+ * Returns the inverse of a matrix
+ *
+ * @method inverse
+ * @param Array matrix An array representing an nxn matrix
+ * @return Array
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * | matrix[0][3] matrix[1][3] matrix[2][3] |
+ * \ /
+ */
+ inverse: function(matrix)
+ {
+ var determinant = 0,
+ len = matrix.length,
+ i = 0,
+ j,
+ inverse,
+ adjunct = [],
+ //vector representing 2x2 matrix
+ minor = [],
+ multiplier;
+ if(len === 2)
+ {
+ determinant = matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0];
+ inverse = [
+ [matrix[1][1] * determinant, -matrix[1][0] * determinant],
+ [-matrix[0][1] * determinant, matrix[0][0] * determinant]
+ ];
+ }
+ else
+ {
+ determinant = MatrixUtil.getDeterminant(matrix);
+ for(; i < len; ++i)
+ {
+ adjunct[i] = [];
+ for(j = 0; j < len; ++j)
+ {
+ minor = MatrixUtil.getMinors(matrix, j, i);
+ adjunct[i][j] = MatrixUtil.getDeterminant(minor);
+ if((i + j) % 2 !== 0 && (i + j) !== 0)
+ {
+ adjunct[i][j] *= -1;
+ }
+ }
+ }
+ inverse = MatrixUtil.scalarMultiply(adjunct, 1/determinant);
+ }
+ return inverse;
+ },
+
+ /**
+ * Multiplies a matrix by a numeric value.
+ *
+ * @method scalarMultiply
+ * @param {Array} matrix The matrix to be altered.
+ * @param {Number} multiplier The number to multiply against the matrix.
+ * @return Array
+ */
+ scalarMultiply: function(matrix, multiplier)
+ {
+ var i = 0,
+ j,
+ len = matrix.length;
+ for(; i < len; ++i)
+ {
+ for(j = 0; j < len; ++j)
+ {
+ matrix[i][j] = MatrixUtil._round(matrix[i][j] * multiplier);
+ }
+ }
+ return matrix;
+ },
+
+ /**
+ * Returns the transpose for an nxn matrix.
+ *
+ * @method transpose
+ * @param matrix An nxn matrix represented by an array of vector arrays.
+ * @return Array
+ */
+ transpose: function(matrix)
+ {
+ var len = matrix.length,
+ i = 0,
+ j = 0,
+ transpose = [];
+ for(; i < len; ++i)
+ {
+ transpose[i] = [];
+ for(j = 0; j < len; ++j)
+ {
+ transpose[i].push(matrix[j][i]);
+ }
+ }
+ return transpose;
+ },
+
+ /**
+ * Returns a matrix of minors based on a matrix, column index and row index.
+ *
+ * @method getMinors
+ * @param {Array} matrix The matrix from which to extract the matrix of minors.
+ * @param {Number} columnIndex A zero-based index representing the specified column to exclude.
+ * @param {Number} rowIndex A zero-based index represeenting the specified row to exclude.
+ * @return Array
+ */
+ getMinors: function(matrix, columnIndex, rowIndex)
+ {
+ var minors = [],
+ len = matrix.length,
+ i = 0,
+ j,
+ column;
+ for(; i < len; ++i)
+ {
+ if(i !== columnIndex)
+ {
+ column = [];
+ for(j = 0; j < len; ++j)
+ {
+ if(j !== rowIndex)
+ {
+ column.push(matrix[i][j]);
+ }
+ }
+ minors.push(column);
+ }
+ }
+ return minors;
+ },
+
+ /**
+ * Returns the sign of value
+ *
+ * @method sign
+ * @param {Number} val value to be interpreted
+ * @return Number
+ */
+ sign: function(val)
+ {
+ return val === 0 ? 1 : val/Math.abs(val);
+ },
+
+ /**
+ * Multiplies a vector and a matrix
+ *
+ * @method vectorMatrixProduct
+ * @param {Array} vector Array representing a column vector
+ * @param {Array} matrix Array representing an nxn matrix
+ * @return Array
+ */
+ vectorMatrixProduct: function(vector, matrix)
+ {
+ var i,
+ j,
+ len = vector.length,
+ product = [],
+ rowProduct;
+ for(i = 0; i < len; ++i)
+ {
+ rowProduct = 0;
+ for(j = 0; j < len; ++j)
+ {
+ rowProduct += vector[i] * matrix[i][j];
+ }
+ product[i] = rowProduct;
+ }
+ return product;
+ },
+
+ /**
+ * Breaks up a 2d transform matrix into a series of transform operations.
+ *
+ * @method decompose
+ * @param {Array} 3x3 matrix array
+ * @return Array
+ */
+ decompose: function(matrix)
+ {
+ var a = matrix[0][0],
+ b = matrix[1][0],
+ c = matrix[0][1],
+ d = matrix[1][1],
+ dx = matrix[0][2],
+ dy = matrix[1][2],
+ translate = [dx, dy],
+ rotate,
+ sx,
+ sy,
+ sign = sign,
+ shear;
+ if((a * d - b * c) === 0)
+ {
+ return false;
+ }
+ //get length of vector(ab)
+ sx = MatrixUtil._round(Math.sqrt(a * a + b * b));
+ //normalize components of vector(ab)
+ a /= sx;
+ b /= sx;
+ shear = MatrixUtil._round(a * c + b * d);
+ c -= a * shear;
+ d -= b * shear;
+ //get length of vector(cd)
+ sy = MatrixUtil._round(Math.sqrt(c * c + d * d));
+ //normalize components of vector(cd)
+ c /= sy;
+ d /= sy;
+ shear /=sy;
+ if(a * b < c * d)
+ {
+ a = -a;
+ b = -b;
+ c = -c;
+ d = -d;
+ shear = -shear;
+ sx = -sx;
+ sy = -sy;
+ }
+ shear = MatrixUtil._round(MatrixUtil.rad2deg(Math.atan(shear)));
+ rotate = MatrixUtil._round(MatrixUtil.rad2deg(Math.atan2(matrix[1][0], matrix[0][0])));
+
+ return [
+ ["translate", dx, dy],
+ ["rotate", rotate],
+ ["skewX", shear],
+ ["scale", sx, sy]
+ ];
+ },
+
+ /**
+ * Parses a transform string and returns an array of transform arrays.
+ *
+ * @method getTransformArray
+ * @param {String} val A transform string
+ * @return Array
+ */
+ getTransformArray: function(transform) {
+ var re = /\s*([a-z]*)\(([\w,\.,\-,\s]*)\)/gi,
+ transforms = [],
+ args,
+ m,
+ decomp,
+ methods = MatrixUtil.transformMethods;
+
+ while ((m = re.exec(transform))) {
+ if (methods.hasOwnProperty(m[1]))
+ {
+ args = m[2].split(',');
+ args.unshift(m[1]);
+ transforms.push(args);
+ }
+ else if(m[1] == "matrix")
+ {
+ args = m[2].split(',');
+ decomp = MatrixUtil.decompose([
+ [args[0], args[2], args[4]],
+ [args[1], args[3], args[5]],
+ [0, 0, 1]
+ ]);
+ transforms.push(decomp[0]);
+ transforms.push(decomp[1]);
+ transforms.push(decomp[2]);
+ transforms.push(decomp[3]);
+ }
+ }
+ return transforms;
+ },
+
+ /**
+ * Returns an array of transform arrays representing transform functions and arguments.
+ *
+ * @method getTransformFunctionArray
+ * @return Array
+ */
+ getTransformFunctionArray: function(transform) {
+ var list;
+ switch(transform)
+ {
+ case "skew" :
+ list = [transform, 0, 0];
+ break;
+ case "scale" :
+ list = [transform, 1, 1];
+ break;
+ case "scaleX" :
+ list = [transform, 1];
+ break;
+ case "scaleY" :
+ list = [transform, 1];
+ break;
+ case "translate" :
+ list = [transform, 0, 0];
+ break;
+ default :
+ list = [transform, 0];
+ break;
+ }
+ return list;
+ },
+
+ /**
+ * Compares to arrays or transform functions to ensure both contain the same functions in the same
+ * order.
+ *
+ * @method compareTransformSequence
+ * @param {Array} list1 Array to compare
+ * @param {Array} list2 Array to compare
+ * @return Boolean
+ */
+ compareTransformSequence: function(list1, list2)
+ {
+ var i = 0,
+ len = list1.length,
+ len2 = list2.length,
+ isEqual = len === len2;
+ if(isEqual)
+ {
+ for(; i < len; ++i)
+ {
+ if(list1[i][0] != list2[i][0])
+ {
+ isEqual = false;
+ break;
+ }
+ }
+ }
+ return isEqual;
+ },
+
+ /**
+ * Mapping of possible transform method names.
+ *
+ * @property transformMethods
+ * @type Object
+ */
+ transformMethods: {
+ rotate: "rotate",
+ skew: "skew",
+ skewX: "skewX",
+ skewY: "skewY",
+ translate: "translate",
+ translateX: "translateX",
+ translateY: "tranlsateY",
+ scale: "scale",
+ scaleX: "scaleX",
+ scaleY: "scaleY"
+ }
+
+};
+
+Y.MatrixUtil = MatrixUtil;
+
+/**
+ * Matrix is a class that allows for the manipulation of a transform matrix.
+ * This class is a work in progress.
+ *
+ * @class Matrix
+ * @constructor
+ * @module matrix
+ */
+var Matrix = function(config) {
+ this.init(config);
+};
+
+Matrix.prototype = {
+ /**
+ * Used as value for the _rounding method.
+ *
+ * @property _rounder
+ * @private
+ */
+ _rounder: 100000,
+
+ /**
+ * Updates the matrix.
+ *
+ * @method multiple
+ * @param {Number} a
+ * @param {Number} b
+ * @param {Number} c
+ * @param {Number} d
+ * @param {Number} dx
+ * @param {Number} dy
+ */
+ multiply: function(a, b, c, d, dx, dy) {
+ var matrix = this,
+ matrix_a = matrix.a * a + matrix.c * b,
+ matrix_b = matrix.b * a + matrix.d * b,
+ matrix_c = matrix.a * c + matrix.c * d,
+ matrix_d = matrix.b * c + matrix.d * d,
+ matrix_dx = matrix.a * dx + matrix.c * dy + matrix.dx,
+ matrix_dy = matrix.b * dx + matrix.d * dy + matrix.dy;
+
+ matrix.a = matrix_a;
+ matrix.b = matrix_b;
+ matrix.c = matrix_c;
+ matrix.d = matrix_d;
+ matrix.dx = matrix_dx;
+ matrix.dy = matrix_dy;
+ return this;
+ },
+
+ /**
+ * Parses a string and updates the matrix.
+ *
+ * @method applyCSSText
+ * @param {String} val A css transform string
+ */
+ applyCSSText: function(val) {
+ var re = /\s*([a-z]*)\(([\w,\s]*)\)/gi,
+ args,
+ m;
+
+ while ((m = re.exec(val))) {
+ if (typeof this[m[1]] === 'function') {
+ args = m[2].split(',');
+ this[m[1]].apply(this, args);
+ }
+ }
+ },
+
+ /**
+ * Parses a string and returns an array of transform arrays.
+ *
+ * @method getTransformArray
+ * @param {String} val A css transform string
+ * @return Array
+ */
+ getTransformArray: function(val) {
+ var re = /\s*([a-z]*)\(([\w,\.,\-,\s]*)\)/gi,
+ transforms = [],
+ args,
+ m;
+
+ val = val.replace(/matrix/g, "multiply");
+ while ((m = re.exec(val))) {
+ if (typeof this[m[1]] === 'function') {
+ args = m[2].split(',');
+ args.unshift(m[1]);
+ transforms.push(args);
+ }
+ }
+ return transforms;
+ },
+
+ /**
+ * Default values for the matrix
+ *
+ * @property _defaults
+ * @private
+ */
+ _defaults: {
+ a: 1,
+ b: 0,
+ c: 0,
+ d: 1,
+ dx: 0,
+ dy: 0
+ },
+
+ /**
+ * Rounds values
+ *
+ * @method _round
+ * @private
+ */
+ _round: function(val) {
+ val = Math.round(val * this._rounder) / this._rounder;
+ return val;
+ },
+
+ /**
+ * Initializes a matrix.
+ *
+ * @method init
+ * @param {Object} config Specified key value pairs for matrix properties. If a property is not explicitly defined in the config argument,
+ * the default value will be used.
+ */
+ init: function(config) {
+ var defaults = this._defaults,
+ prop;
+
+ config = config || {};
+
+ for (prop in defaults) {
+ if(defaults.hasOwnProperty(prop))
+ {
+ this[prop] = (prop in config) ? config[prop] : defaults[prop];
+ }
+ }
+
+ this._config = config;
+ },
+
+ /**
+ * Applies a scale transform
+ *
+ * @method scale
+ * @param {Number} val
+ */
+ scale: function(x, y) {
+ this.multiply(x, 0, 0, y, 0, 0);
+ return this;
+ },
+
+ /**
+ * Applies a skew transformation.
+ *
+ * @method skew
+ * @param {Number} x The value to skew on the x-axis.
+ * @param {Number} y The value to skew on the y-axis.
+ */
+ skew: function(x, y) {
+ x = x || 0;
+ y = y || 0;
+
+ if (x !== undefined) { // null or undef
+ x = this._round(Math.tan(this.angle2rad(x)));
+
+ }
+
+ if (y !== undefined) { // null or undef
+ y = this._round(Math.tan(this.angle2rad(y)));
+ }
+
+ this.multiply(1, y, x, 1, 0, 0);
+ return this;
+ },
+
+ /**
+ * Applies a skew to the x-coordinate
+ *
+ * @method skewX
+ * @param {Number} x x-coordinate
+ */
+ skewX: function(x) {
+ this.skew(x);
+ return this;
+ },
+
+ /**
+ * Applies a skew to the y-coordinate
+ *
+ * @method skewY
+ * @param {Number} y y-coordinate
+ */
+ skewY: function(y) {
+ this.skew(null, y);
+ return this;
+ },
+
+ /**
+ * Returns a string of text that can be used to populate a the css transform property of an element.
+ *
+ * @method toCSSText
+ * @return String
+ */
+ toCSSText: function() {
+ var matrix = this,
+ dx = matrix.dx,
+ dy = matrix.dy,
+ text = 'matrix(';
+
+
+ if (Y.UA.gecko) { // requires unit
+ if (!isNaN(dx)) {
+ dx += 'px';
+ }
+ if (!isNaN(dy)) {
+ dy += 'px';
+ }
+ }
+
+ text += matrix.a + ',' +
+ matrix.b + ',' +
+ matrix.c + ',' +
+ matrix.d + ',' +
+ dx + ',' +
+ dy;
+
+ text += ')';
+
+ return text;
+ },
+
+ /**
+ * Returns a string that can be used to populate the css filter property of an element.
+ *
+ * @method toFilterText
+ * @return String
+ */
+ toFilterText: function() {
+ var matrix = this,
+ text = 'progid:DXImageTransform.Microsoft.Matrix(';
+ text += 'M11=' + matrix.a + ',' +
+ 'M21=' + matrix.b + ',' +
+ 'M12=' + matrix.c + ',' +
+ 'M22=' + matrix.d + ',' +
+ 'sizingMethod="auto expand")';
+
+ text += '';
+
+ return text;
+ },
+
+ /**
+ * Converts a radian value to a degree.
+ *
+ * @method rad2deg
+ * @param {Number} rad Radian value to be converted.
+ * @return Number
+ */
+ rad2deg: function(rad) {
+ var deg = rad * (180 / Math.PI);
+ return deg;
+ },
+
+ /**
+ * Converts a degree value to a radian.
+ *
+ * @method deg2rad
+ * @param {Number} deg Degree value to be converted to radian.
+ * @return Number
+ */
+ deg2rad: function(deg) {
+ var rad = deg * (Math.PI / 180);
+ return rad;
+ },
+
+ angle2rad: function(val) {
+ if (typeof val === 'string' && val.indexOf('rad') > -1) {
+ val = parseFloat(val);
+ } else { // default to deg
+ val = this.deg2rad(parseFloat(val));
+ }
+
+ return val;
+ },
+
+ /**
+ * Applies a rotate transform.
+ *
+ * @method rotate
+ * @param {Number} deg The degree of the rotation.
+ */
+ rotate: function(deg, x, y) {
+ var matrix = [],
+ rad = this.angle2rad(deg),
+ sin = this._round(Math.sin(rad)),
+ cos = this._round(Math.cos(rad));
+ this.multiply(cos, sin, 0 - sin, cos, 0, 0);
+ return this;
+ },
+
+ /**
+ * Applies translate transformation.
+ *
+ * @method translate
+ * @param {Number} x The value to transate on the x-axis.
+ * @param {Number} y The value to translate on the y-axis.
+ */
+ translate: function(x, y) {
+ x = parseFloat(x) || 0;
+ y = parseFloat(y) || 0;
+ this.multiply(1, 0, 0, 1, x, y);
+ return this;
+ },
+
+ /**
+ * Returns an identity matrix.
+ *
+ * @method identity
+ * @return Object
+ */
+ identity: function() {
+ var config = this._config,
+ defaults = this._defaults,
+ prop;
+
+ for (prop in config) {
+ if (prop in defaults) {
+ this[prop] = defaults[prop];
+ }
+ }
+ return this;
+ },
+
+ /**
+ * Returns a 3x3 Matrix array
+ *
+ * / \
+ * | matrix[0][0] matrix[1][0] matrix[2][0] |
+ * | matrix[0][1] matrix[1][1] matrix[2][1] |
+ * | matrix[0][2] matrix[1][2] matrix[2][2] |
+ * \ /
+ *
+ * @method getMatrixArray
+ * @return Array
+ */
+ getMatrixArray: function()
+ {
+ var matrix = this,
+ matrixArray = [
+ [matrix.a, matrix.c, matrix.dx],
+ [matrix.b, matrix.d, matrix.dy],
+ [0, 0, 1]
+ ];
+ return matrixArray;
+ },
+
+ /**
+ * Returns the left, top, right and bottom coordinates for a transformed
+ * item.
+ *
+ * @method getContentRect
+ * @param {Number} width The width of the item.
+ * @param {Number} height The height of the item.
+ * @param {Number} x The x-coordinate of the item.
+ * @param {Number} y The y-coordinate of the item.
+ * @return Object
+ */
+ getContentRect: function(width, height, x, y)
+ {
+ var left = !isNaN(x) ? x : 0,
+ top = !isNaN(y) ? y : 0,
+ right = left + width,
+ bottom = top + height,
+ matrix = this,
+ a = matrix.a,
+ b = matrix.b,
+ c = matrix.c,
+ d = matrix.d,
+ dx = matrix.dx,
+ dy = matrix.dy,
+ x1 = (a * left + c * top + dx),
+ y1 = (b * left + d * top + dy),
+ //[x2, y2]
+ x2 = (a * right + c * top + dx),
+ y2 = (b * right + d * top + dy),
+ //[x3, y3]
+ x3 = (a * left + c * bottom + dx),
+ y3 = (b * left + d * bottom + dy),
+ //[x4, y4]
+ x4 = (a * right + c * bottom + dx),
+ y4 = (b * right + d * bottom + dy);
+ return {
+ left: Math.min(x3, Math.min(x1, Math.min(x2, x4))),
+ right: Math.max(x3, Math.max(x1, Math.max(x2, x4))),
+ top: Math.min(y2, Math.min(y4, Math.min(y3, y1))),
+ bottom: Math.max(y2, Math.max(y4, Math.max(y3, y1)))
+ };
+ },
+
+ /**
+ * Returns the determinant of the matrix.
+ *
+ * @method getDeterminant
+ * @return Number
+ */
+ getDeterminant: function()
+ {
+ return Y.MatrixUtil.getDeterminant(this.getMatrixArray());
+ },
+
+ /**
+ * Returns the inverse (in array form) of the matrix.
+ *
+ * @method inverse
+ * @return Array
+ */
+ inverse: function()
+ {
+ return Y.MatrixUtil.inverse(this.getMatrixArray());
+ },
+
+ /**
+ * Returns the transpose of the matrix
+ *
+ * @method transpose
+ * @return Array
+ */
+ transpose: function()
+ {
+ return Y.MatrixUtil.transpose(this.getMatrixArray());
+ },
+
+ /**
+ * Returns an array of transform commands that represent the matrix.
+ *
+ * @method decompose
+ * @return Array
+ */
+ decompose: function()
+ {
+ return Y.MatrixUtil.decompose(this.getMatrixArray());
+ }
+};
+
+Y.Matrix = Matrix;
+
+
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/model-list/model-list-debug.js b/lib/yui/3.5.0/build/model-list/model-list-debug.js
similarity index 72%
rename from lib/yui/3.4.1/build/model-list/model-list-debug.js
rename to lib/yui/3.5.0/build/model-list/model-list-debug.js
index ed4a4fc571c..6635aac0c9b 100644
--- a/lib/yui/3.4.1/build/model-list/model-list-debug.js
+++ b/lib/yui/3.5.0/build/model-list/model-list-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -9,6 +9,7 @@ YUI.add('model-list', function(Y) {
/**
Provides an API for managing an ordered list of Model instances.
+@module app
@submodule model-list
@since 3.4.0
**/
@@ -54,6 +55,17 @@ var AttrProto = Y.Attribute.prototype,
**/
EVT_ADD = 'add',
+ /**
+ Fired when a model is created or updated via the `create()` method, but
+ before the model is actually saved or added to the list. The `add` event
+ will be fired after the model has been saved and added to the list.
+
+ @event create
+ @param {Model} model The model being created/updated.
+ @since 3.5.0
+ **/
+ EVT_CREATE = 'create',
+
/**
Fired when an error occurs, such as when an attempt is made to add a
duplicate model to the list, or when a sync layer response can't be parsed.
@@ -76,6 +88,35 @@ var AttrProto = Y.Attribute.prototype,
**/
EVT_ERROR = 'error',
+ /**
+ Fired after models are loaded from a sync layer.
+
+ @event load
+ @param {Object} parsed The parsed version of the sync layer's response to
+ the load request.
+ @param {Mixed} response The sync layer's raw, unparsed response to the load
+ request.
+ @since 3.5.0
+ **/
+ EVT_LOAD = 'load',
+
+ /**
+ Fired when a model is removed from the list.
+
+ Listen to the `on` phase of this event to be notified before a model is
+ removed from the list. Calling `e.preventDefault()` during the `on` phase
+ will prevent the model from being removed.
+
+ Listen to the `after` phase of this event to be notified after a model has
+ been removed from the list.
+
+ @event remove
+ @param {Model} model The model being removed.
+ @param {Number} index The index of the model being removed.
+ @preventable _defRemoveFn
+ **/
+ EVT_REMOVE = 'remove',
+
/**
Fired when the list is completely reset via the `reset()` method or sorted
via the `sort()` method.
@@ -93,24 +134,7 @@ var AttrProto = Y.Attribute.prototype,
`'sort'`.
@preventable _defResetFn
**/
- EVT_RESET = 'reset',
-
- /**
- Fired when a model is removed from the list.
-
- Listen to the `on` phase of this event to be notified before a model is
- removed from the list. Calling `e.preventDefault()` during the `on` phase
- will prevent the model from being removed.
-
- Listen to the `after` phase of this event to be notified after a model has
- been removed from the list.
-
- @event remove
- @param {Model} model The model being removed.
- @param {int} index The index of the model being removed.
- @preventable _defRemoveFn
- **/
- EVT_REMOVE = 'remove';
+ EVT_RESET = 'reset';
function ModelList() {
ModelList.superclass.constructor.apply(this, arguments);
@@ -122,16 +146,34 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
/**
The `Model` class or subclass of the models in this list.
- This property is `null` by default, and is intended to be overridden in a
- subclass or specified as a config property at instantiation time. It will be
- used to create model instances automatically based on attribute hashes
- passed to the `add()`, `create()`, and `reset()` methods.
+ The class specified here will be used to create model instances
+ automatically based on attribute hashes passed to the `add()`, `create()`,
+ and `reset()` methods.
+
+ You may specify the class as an actual class reference or as a string that
+ resolves to a class reference at runtime (the latter can be useful if the
+ specified class will be loaded lazily).
@property model
- @type Model
- @default `null`
+ @type Model|String
+ @default Y.Model
**/
- model: null,
+ model: Y.Model,
+
+ // -- Protected Properties -------------------------------------------------
+
+ /**
+ Total hack to allow us to identify ModelList instances without using
+ `instanceof`, which won't work when the instance was created in another
+ window or YUI sandbox.
+
+ @property _isYUIModelList
+ @type Boolean
+ @default true
+ @protected
+ @since 3.5.0
+ **/
+ _isYUIModelList: true,
// -- Lifecycle Methods ----------------------------------------------------
initializer: function (config) {
@@ -139,15 +181,20 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
var model = this.model = config.model || this.model;
+ if (typeof model === 'string') {
+ // Look for a namespaced Model class on `Y`.
+ this.model = Y.Object.getValue(Y, model.split('.'));
+
+ if (!this.model) {
+ Y.error('ModelList: Model class not found: ' + model);
+ }
+ }
+
this.publish(EVT_ADD, {defaultFn: this._defAddFn});
this.publish(EVT_RESET, {defaultFn: this._defResetFn});
this.publish(EVT_REMOVE, {defaultFn: this._defRemoveFn});
- if (model) {
- this.after('*:idChange', this._afterIdChange);
- } else {
- Y.log('No model class specified.', 'warn', 'model-list');
- }
+ this.after('*:idChange', this._afterIdChange);
this._clear();
},
@@ -159,9 +206,12 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
// -- Public Methods -------------------------------------------------------
/**
- Adds the specified model or array of models to this list.
+ Adds the specified model or array of models to this list. You may also pass
+ another ModelList instance, in which case all the models in that list will
+ be added to this one as well.
@example
+
// Add a single model instance.
list.add(new Model({foo: 'bar'}));
@@ -174,19 +224,28 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
{baz: 'quux'}
]);
+ // Add all the models in another ModelList instance.
+ list.add(otherList);
+
@method add
- @param {Model|Model[]|Object|Object[]} models Models to add. May be existing
- model instances or hashes of model attributes, in which case new model
- instances will be created from the hashes.
+ @param {Model|Model[]|ModelList|Object|Object[]} models Model or array of
+ models to add. May be existing model instances or hashes of model
+ attributes, in which case new model instances will be created from the
+ hashes. You may also pass a ModelList instance to add all the models it
+ contains.
@param {Object} [options] Data to be mixed into the event facade of the
`add` event(s) for the added models.
- @param {Boolean} [options.silent=false] If `true`, no `add` event(s) will
- be fired.
+
+ @param {Boolean} [options.silent=false] If `true`, no `add` event(s)
+ will be fired.
+
@return {Model|Model[]} Added model or array of added models.
**/
add: function (models, options) {
- if (Lang.isArray(models)) {
- return YArray.map(models, function (model) {
+ var isList = models._isYUIModelList;
+
+ if (isList || Lang.isArray(models)) {
+ return YArray.map(isList ? models.toArray() : models, function (model) {
return this._add(model, options);
}, this);
} else {
@@ -226,15 +285,14 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
instance or a hash of model attributes, in which case a new model instance
will be created from the hash.
@param {Object} [options] Options to be passed to the model's `sync()` and
- `set()` methods and mixed into the `add` event when the model is added
- to the list.
+ `set()` methods and mixed into the `create` and `add` event facades.
@param {Boolean} [options.silent=false] If `true`, no `add` event(s) will
be fired.
- @param {callback} [callback] Called when the sync operation finishes.
+ @param {Function} [callback] Called when the sync operation finishes.
@param {Error} callback.err If an error occurred, this parameter will
contain the error. If the sync operation succeeded, _err_ will be
falsy.
- @param {mixed} callback.response The server's response.
+ @param {Any} callback.response The server's response.
@return {Model} Created model.
**/
create: function (model, options, callback) {
@@ -246,10 +304,16 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
options = {};
}
- if (!(model instanceof Y.Model)) {
+ options || (options = {});
+
+ if (!model._isYUIModel) {
model = new this.model(model);
}
+ self.fire(EVT_CREATE, Y.merge(options, {
+ model: model
+ }));
+
return model.save(options, function (err) {
if (!err) {
self.add(model, options);
@@ -259,6 +323,72 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
});
},
+ /**
+ Executes the supplied function on each model in this list. Returns an array
+ containing the models for which the supplied function returned a truthy
+ value.
+
+ The callback function's `this` object will refer to this ModelList. Use
+ `Y.bind()` to bind the `this` object to another object if desired.
+
+ @example
+
+ // Get an array containing only the models whose "enabled" attribute is
+ // truthy.
+ var filtered = list.filter(function (model) {
+ return model.get('enabled');
+ });
+
+ // Get a new ModelList containing only the models whose "enabled"
+ // attribute is truthy.
+ var filteredList = list.filter({asList: true}, function (model) {
+ return model.get('enabled');
+ });
+
+ @method filter
+ @param {Object} [options] Filter options.
+ @param {Boolean} [options.asList=false] If truthy, results will be
+ returned as a new ModelList instance rather than as an array.
+
+ @param {Function} callback Function to execute on each model.
+ @param {Model} callback.model Model instance.
+ @param {Number} callback.index Index of the current model.
+ @param {ModelList} callback.list The ModelList being filtered.
+
+ @return {Array|ModelList} Array of models for which the callback function
+ returned a truthy value (empty if it never returned a truthy value). If
+ the `options.asList` option is truthy, a new ModelList instance will be
+ returned instead of an array.
+ @since 3.5.0
+ */
+ filter: function (options, callback) {
+ var filtered = [],
+ items = this._items,
+ i, item, len, list;
+
+ // Allow options as first arg.
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ for (i = 0, len = items.length; i < len; ++i) {
+ item = items[i];
+
+ if (callback.call(this, item, i, this)) {
+ filtered.push(item);
+ }
+ }
+
+ if (options.asList) {
+ list = new Y.ModelList({model: this.model});
+ filtered.length && list.add(filtered, {silent: true});
+ return list;
+ } else {
+ return filtered;
+ }
+ },
+
/**
If _name_ refers to an attribute on this ModelList instance, returns the
value of that attribute. Otherwise, returns an array containing the values
@@ -299,7 +429,6 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
return this.invoke('getAsHTML', name);
},
-
/**
If _name_ refers to an attribute on this ModelList instance, returns the
URL-encoded value of that attribute. Otherwise, returns an array containing
@@ -404,9 +533,33 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
options = {};
}
+ options || (options = {});
+
this.sync('read', options, function (err, response) {
- if (!err) {
- self.reset(self.parse(response), options);
+ var facade = {
+ options : options,
+ response: response
+ },
+
+ parsed;
+
+ if (err) {
+ facade.error = err;
+ facade.src = 'load';
+
+ self.fire(EVT_ERROR, facade);
+ } else {
+ // Lazy publish.
+ if (!self._loadEvent) {
+ self._loadEvent = self.publish(EVT_LOAD, {
+ preventable: false
+ });
+ }
+
+ parsed = facade.parsed = self.parse(response);
+
+ self.reset(parsed, options);
+ self.fire(EVT_LOAD, facade);
}
callback && callback.apply(null, arguments);
@@ -468,19 +621,25 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
},
/**
- Removes the specified model or array of models from this list.
+ Removes the specified model or array of models from this list. You may also
+ pass another ModelList instance to remove all the models that are in both
+ that instance and this instance.
@method remove
- @param {Model|Model[]} models Models to remove.
+ @param {Model|Model[]|ModelList} models Models to remove.
@param {Object} [options] Data to be mixed into the event facade of the
`remove` event(s) for the removed models.
- @param {Boolean} [options.silent=false] If `true`, no `remove` event(s)
- will be fired.
+
+ @param {Boolean} [options.silent=false] If `true`, no `remove` event(s)
+ will be fired.
+
@return {Model|Model[]} Removed model or array of removed models.
**/
remove: function (models, options) {
- if (Lang.isArray(models)) {
- return YArray.map(models, function (model) {
+ var isList = models._isYUIModelList;
+
+ if (isList || Lang.isArray(models)) {
+ return YArray.map(isList ? models.toArray() : models, function (model) {
return this._remove(model, options);
}, this);
} else {
@@ -493,38 +652,49 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
single `reset` event.
Use `reset` when you want to add or remove a large number of items at once
- without firing `add` or `remove` events for each one.
+ with less overhead, and without firing `add` or `remove` events for each
+ one.
@method reset
- @param {Model[]|Object[]} [models] Models to add. May be existing model
- instances or hashes of model attributes, in which case new model instances
- will be created from the hashes. Calling `reset()` without passing in any
- models will clear the list.
+ @param {Model[]|ModelList|Object[]} [models] Models to add. May be existing
+ model instances or hashes of model attributes, in which case new model
+ instances will be created from the hashes. If a ModelList is passed, all
+ the models in that list will be added to this list. Calling `reset()`
+ without passing in any models will clear the list.
@param {Object} [options] Data to be mixed into the event facade of the
`reset` event.
- @param {Boolean} [options.silent=false] If `true`, no `reset` event will
- be fired.
+
+ @param {Boolean} [options.silent=false] If `true`, no `reset` event will
+ be fired.
+
@chainable
**/
reset: function (models, options) {
models || (models = []);
options || (options = {});
- var facade = Y.merge(options, {
- src : 'reset',
- models: YArray.map(models, function (model) {
- return model instanceof Y.Model ? model :
- new this.model(model);
- }, this)
- });
+ var facade = Y.merge({src: 'reset'}, options);
- // Sort the models in the facade before firing the reset event.
- if (this.comparator) {
- facade.models.sort(Y.bind(this._sort, this));
+ if (models._isYUIModelList) {
+ models = models.toArray();
+ } else {
+ models = YArray.map(models, function (model) {
+ return model._isYUIModel ? model : new this.model(model);
+ }, this);
}
- options.silent ? this._defResetFn(facade) :
+ facade.models = models;
+
+ if (options.silent) {
+ this._defResetFn(facade);
+ } else {
+ // Sort the models before firing the reset event.
+ if (this.comparator) {
+ models.sort(Y.bind(this._sort, this));
+ }
+
this.fire(EVT_RESET, facade);
+ }
return this;
},
@@ -545,13 +715,13 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@chainable
**/
sort: function (options) {
- var models = this._items.concat(),
- facade;
-
if (!this.comparator) {
return this;
}
+ var models = this._items.concat(),
+ facade;
+
options || (options = {});
models.sort(Y.bind(this._sort, this));
@@ -635,6 +805,9 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
/**
Adds the specified _model_ if it isn't already in this list.
+ If the model's `clientId` or `id` matches that of a model that's already in
+ the list, an `error` event will be fired and the model will not be added.
+
@method _add
@param {Model|Object} model Model or object to add.
@param {Object} [options] Data to be mixed into the event facade of the
@@ -645,15 +818,19 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@protected
**/
_add: function (model, options) {
- var facade;
+ var facade, id;
options || (options = {});
- if (!(model instanceof Y.Model)) {
+ if (!model._isYUIModel) {
model = new this.model(model);
}
- if (this._clientIdMap[model.get('clientId')]) {
+ id = model.get('id');
+
+ if (this._clientIdMap[model.get('clientId')]
+ || (Lang.isValue(id) && this._idMap[id])) {
+
this.fire(EVT_ERROR, {
error: 'Model is already in the list.',
model: model,
@@ -701,6 +878,24 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
this._items = [];
},
+ /**
+ Compares the value _a_ to the value _b_ for sorting purposes. Values are
+ assumed to be the result of calling a model's `comparator()` method. You can
+ override this method to implement custom sorting logic, such as a descending
+ sort or multi-field sorting.
+
+ @method _compare
+ @param {Mixed} a First value to compare.
+ @param {Mixed} b Second value to compare.
+ @return {Number} `-1` if _a_ should come before _b_, `0` if they're
+ equivalent, `1` if _a_ should come after _b_.
+ @protected
+ @since 3.5.0
+ **/
+ _compare: function (a, b) {
+ return a < b ? -1 : (a > b ? 1 : 0);
+ },
+
/**
Removes this list as a bubble target for the specified model's events.
@@ -727,15 +922,16 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@protected
**/
_findIndex: function (model) {
- var comparator = this.comparator,
- items = this._items,
- max = items.length,
- min = 0,
+ var items = this._items,
+ max = items.length,
+ min = 0,
item, middle, needle;
- if (!comparator || !items.length) { return items.length; }
+ if (!this.comparator || !max) {
+ return max;
+ }
- needle = comparator(model);
+ needle = this.comparator(model);
// Perform an iterative binary search to determine the correct position
// based on the return value of the `comparator` function.
@@ -743,7 +939,7 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
middle = (min + max) >> 1; // Divide by two and discard remainder.
item = items[middle];
- if (comparator(item) < needle) {
+ if (this._compare(this.comparator(item), needle) < 0) {
min = middle + 1;
} else {
max = middle;
@@ -802,10 +998,7 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@protected
**/
_sort: function (a, b) {
- var aValue = this.comparator(a),
- bValue = this.comparator(b);
-
- return aValue < bValue ? -1 : (aValue > bValue ? 1 : 0);
+ return this._compare(this.comparator(a), this.comparator(b));
},
// -- Event Handlers -------------------------------------------------------
@@ -894,4 +1087,4 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
Y.augment(ModelList, Y.ArrayList);
-}, '3.4.1' ,{requires:['array-extras', 'array-invoke', 'arraylist', 'base-build', 'escape', 'json-parse', 'model']});
+}, '3.5.0' ,{requires:['array-extras', 'array-invoke', 'arraylist', 'base-build', 'escape', 'json-parse', 'model']});
diff --git a/lib/yui/3.5.0/build/model-list/model-list-min.js b/lib/yui/3.5.0/build/model-list/model-list-min.js
new file mode 100644
index 00000000000..72c9b93ccfa
--- /dev/null
+++ b/lib/yui/3.5.0/build/model-list/model-list-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("model-list",function(b){var g=b.Attribute.prototype,j=b.Lang,k=b.Array,c="add",e="create",h="error",i="load",d="remove",f="reset";function a(){a.superclass.constructor.apply(this,arguments);}b.ModelList=b.extend(a,b.Base,{model:b.Model,_isYUIModelList:true,initializer:function(m){m||(m={});var l=this.model=m.model||this.model;if(typeof l==="string"){this.model=b.Object.getValue(b,l.split("."));if(!this.model){b.error("ModelList: Model class not found: "+l);}}this.publish(c,{defaultFn:this._defAddFn});this.publish(f,{defaultFn:this._defResetFn});this.publish(d,{defaultFn:this._defRemoveFn});this.after("*:idChange",this._afterIdChange);this._clear();},destructor:function(){k.each(this._items,this._detachList,this);},add:function(n,l){var m=n._isYUIModelList;if(m||j.isArray(n)){return k.map(m?n.toArray():n,function(o){return this._add(o,l);},this);}else{return this._add(n,l);}},create:function(n,m,o){var l=this;if(typeof m==="function"){o=m;m={};}m||(m={});if(!n._isYUIModel){n=new this.model(n);}l.fire(e,b.merge(m,{model:n}));return n.save(m,function(p){if(!p){l.add(n,m);}o&&o.apply(null,arguments);});},filter:function(o,s){var n=[],m=this._items,p,q,l,r;if(typeof o==="function"){s=o;o={};}for(p=0,l=m.length;pl?1:0);},_detachList:function(m){var l=k.indexOf(m.lists,this);if(l>-1){m.lists.splice(l,1);m.removeTarget(this);}},_findIndex:function(o){var m=this._items,l=m.length,p=0,q,n,r;if(!this.comparator||!l){return l;}r=this.comparator(o);while(p>1;q=m[n];if(this._compare(this.comparator(q),r)<0){p=n+1;}else{l=n;}}return p;},_remove:function(n,m){var l=this.indexOf(n),o;m||(m={});if(l===-1){this.fire(h,{error:"Model is not in the list.",model:n,src:"remove"});return;}o=b.merge(m,{index:l,model:n});m.silent?this._defRemoveFn(o):this.fire(d,o);return n;},_sort:function(m,l){return this._compare(this.comparator(m),this.comparator(l));},_afterIdChange:function(l){j.isValue(l.prevVal)&&delete this._idMap[l.prevVal];j.isValue(l.newVal)&&(this._idMap[l.newVal]=l.target);},_defAddFn:function(m){var l=m.model,n=l.get("id");this._clientIdMap[l.get("clientId")]=l;if(j.isValue(n)){this._idMap[n]=l;}this._attachList(l);this._items.splice(m.index,0,l);},_defRemoveFn:function(m){var l=m.model,n=l.get("id");this._detachList(l);delete this._clientIdMap[l.get("clientId")];if(j.isValue(n)){delete this._idMap[n];}this._items.splice(m.index,1);},_defResetFn:function(l){if(l.src==="sort"){this._items=l.models.concat();return;}this._clear();if(l.models.length){this.add(l.models,{silent:true});}}},{NAME:"modelList"});b.augment(a,b.ArrayList);},"3.5.0",{requires:["array-extras","array-invoke","arraylist","base-build","escape","json-parse","model"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/model-list/model-list.js b/lib/yui/3.5.0/build/model-list/model-list.js
similarity index 72%
rename from lib/yui/3.4.1/build/model-list/model-list.js
rename to lib/yui/3.5.0/build/model-list/model-list.js
index 3dc1aad10ab..6635aac0c9b 100644
--- a/lib/yui/3.4.1/build/model-list/model-list.js
+++ b/lib/yui/3.5.0/build/model-list/model-list.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -9,6 +9,7 @@ YUI.add('model-list', function(Y) {
/**
Provides an API for managing an ordered list of Model instances.
+@module app
@submodule model-list
@since 3.4.0
**/
@@ -54,6 +55,17 @@ var AttrProto = Y.Attribute.prototype,
**/
EVT_ADD = 'add',
+ /**
+ Fired when a model is created or updated via the `create()` method, but
+ before the model is actually saved or added to the list. The `add` event
+ will be fired after the model has been saved and added to the list.
+
+ @event create
+ @param {Model} model The model being created/updated.
+ @since 3.5.0
+ **/
+ EVT_CREATE = 'create',
+
/**
Fired when an error occurs, such as when an attempt is made to add a
duplicate model to the list, or when a sync layer response can't be parsed.
@@ -76,6 +88,35 @@ var AttrProto = Y.Attribute.prototype,
**/
EVT_ERROR = 'error',
+ /**
+ Fired after models are loaded from a sync layer.
+
+ @event load
+ @param {Object} parsed The parsed version of the sync layer's response to
+ the load request.
+ @param {Mixed} response The sync layer's raw, unparsed response to the load
+ request.
+ @since 3.5.0
+ **/
+ EVT_LOAD = 'load',
+
+ /**
+ Fired when a model is removed from the list.
+
+ Listen to the `on` phase of this event to be notified before a model is
+ removed from the list. Calling `e.preventDefault()` during the `on` phase
+ will prevent the model from being removed.
+
+ Listen to the `after` phase of this event to be notified after a model has
+ been removed from the list.
+
+ @event remove
+ @param {Model} model The model being removed.
+ @param {Number} index The index of the model being removed.
+ @preventable _defRemoveFn
+ **/
+ EVT_REMOVE = 'remove',
+
/**
Fired when the list is completely reset via the `reset()` method or sorted
via the `sort()` method.
@@ -93,24 +134,7 @@ var AttrProto = Y.Attribute.prototype,
`'sort'`.
@preventable _defResetFn
**/
- EVT_RESET = 'reset',
-
- /**
- Fired when a model is removed from the list.
-
- Listen to the `on` phase of this event to be notified before a model is
- removed from the list. Calling `e.preventDefault()` during the `on` phase
- will prevent the model from being removed.
-
- Listen to the `after` phase of this event to be notified after a model has
- been removed from the list.
-
- @event remove
- @param {Model} model The model being removed.
- @param {int} index The index of the model being removed.
- @preventable _defRemoveFn
- **/
- EVT_REMOVE = 'remove';
+ EVT_RESET = 'reset';
function ModelList() {
ModelList.superclass.constructor.apply(this, arguments);
@@ -122,16 +146,34 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
/**
The `Model` class or subclass of the models in this list.
- This property is `null` by default, and is intended to be overridden in a
- subclass or specified as a config property at instantiation time. It will be
- used to create model instances automatically based on attribute hashes
- passed to the `add()`, `create()`, and `reset()` methods.
+ The class specified here will be used to create model instances
+ automatically based on attribute hashes passed to the `add()`, `create()`,
+ and `reset()` methods.
+
+ You may specify the class as an actual class reference or as a string that
+ resolves to a class reference at runtime (the latter can be useful if the
+ specified class will be loaded lazily).
@property model
- @type Model
- @default `null`
+ @type Model|String
+ @default Y.Model
**/
- model: null,
+ model: Y.Model,
+
+ // -- Protected Properties -------------------------------------------------
+
+ /**
+ Total hack to allow us to identify ModelList instances without using
+ `instanceof`, which won't work when the instance was created in another
+ window or YUI sandbox.
+
+ @property _isYUIModelList
+ @type Boolean
+ @default true
+ @protected
+ @since 3.5.0
+ **/
+ _isYUIModelList: true,
// -- Lifecycle Methods ----------------------------------------------------
initializer: function (config) {
@@ -139,14 +181,20 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
var model = this.model = config.model || this.model;
+ if (typeof model === 'string') {
+ // Look for a namespaced Model class on `Y`.
+ this.model = Y.Object.getValue(Y, model.split('.'));
+
+ if (!this.model) {
+ Y.error('ModelList: Model class not found: ' + model);
+ }
+ }
+
this.publish(EVT_ADD, {defaultFn: this._defAddFn});
this.publish(EVT_RESET, {defaultFn: this._defResetFn});
this.publish(EVT_REMOVE, {defaultFn: this._defRemoveFn});
- if (model) {
- this.after('*:idChange', this._afterIdChange);
- } else {
- }
+ this.after('*:idChange', this._afterIdChange);
this._clear();
},
@@ -158,9 +206,12 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
// -- Public Methods -------------------------------------------------------
/**
- Adds the specified model or array of models to this list.
+ Adds the specified model or array of models to this list. You may also pass
+ another ModelList instance, in which case all the models in that list will
+ be added to this one as well.
@example
+
// Add a single model instance.
list.add(new Model({foo: 'bar'}));
@@ -173,19 +224,28 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
{baz: 'quux'}
]);
+ // Add all the models in another ModelList instance.
+ list.add(otherList);
+
@method add
- @param {Model|Model[]|Object|Object[]} models Models to add. May be existing
- model instances or hashes of model attributes, in which case new model
- instances will be created from the hashes.
+ @param {Model|Model[]|ModelList|Object|Object[]} models Model or array of
+ models to add. May be existing model instances or hashes of model
+ attributes, in which case new model instances will be created from the
+ hashes. You may also pass a ModelList instance to add all the models it
+ contains.
@param {Object} [options] Data to be mixed into the event facade of the
`add` event(s) for the added models.
- @param {Boolean} [options.silent=false] If `true`, no `add` event(s) will
- be fired.
+
+ @param {Boolean} [options.silent=false] If `true`, no `add` event(s)
+ will be fired.
+
@return {Model|Model[]} Added model or array of added models.
**/
add: function (models, options) {
- if (Lang.isArray(models)) {
- return YArray.map(models, function (model) {
+ var isList = models._isYUIModelList;
+
+ if (isList || Lang.isArray(models)) {
+ return YArray.map(isList ? models.toArray() : models, function (model) {
return this._add(model, options);
}, this);
} else {
@@ -225,15 +285,14 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
instance or a hash of model attributes, in which case a new model instance
will be created from the hash.
@param {Object} [options] Options to be passed to the model's `sync()` and
- `set()` methods and mixed into the `add` event when the model is added
- to the list.
+ `set()` methods and mixed into the `create` and `add` event facades.
@param {Boolean} [options.silent=false] If `true`, no `add` event(s) will
be fired.
- @param {callback} [callback] Called when the sync operation finishes.
+ @param {Function} [callback] Called when the sync operation finishes.
@param {Error} callback.err If an error occurred, this parameter will
contain the error. If the sync operation succeeded, _err_ will be
falsy.
- @param {mixed} callback.response The server's response.
+ @param {Any} callback.response The server's response.
@return {Model} Created model.
**/
create: function (model, options, callback) {
@@ -245,10 +304,16 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
options = {};
}
- if (!(model instanceof Y.Model)) {
+ options || (options = {});
+
+ if (!model._isYUIModel) {
model = new this.model(model);
}
+ self.fire(EVT_CREATE, Y.merge(options, {
+ model: model
+ }));
+
return model.save(options, function (err) {
if (!err) {
self.add(model, options);
@@ -258,6 +323,72 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
});
},
+ /**
+ Executes the supplied function on each model in this list. Returns an array
+ containing the models for which the supplied function returned a truthy
+ value.
+
+ The callback function's `this` object will refer to this ModelList. Use
+ `Y.bind()` to bind the `this` object to another object if desired.
+
+ @example
+
+ // Get an array containing only the models whose "enabled" attribute is
+ // truthy.
+ var filtered = list.filter(function (model) {
+ return model.get('enabled');
+ });
+
+ // Get a new ModelList containing only the models whose "enabled"
+ // attribute is truthy.
+ var filteredList = list.filter({asList: true}, function (model) {
+ return model.get('enabled');
+ });
+
+ @method filter
+ @param {Object} [options] Filter options.
+ @param {Boolean} [options.asList=false] If truthy, results will be
+ returned as a new ModelList instance rather than as an array.
+
+ @param {Function} callback Function to execute on each model.
+ @param {Model} callback.model Model instance.
+ @param {Number} callback.index Index of the current model.
+ @param {ModelList} callback.list The ModelList being filtered.
+
+ @return {Array|ModelList} Array of models for which the callback function
+ returned a truthy value (empty if it never returned a truthy value). If
+ the `options.asList` option is truthy, a new ModelList instance will be
+ returned instead of an array.
+ @since 3.5.0
+ */
+ filter: function (options, callback) {
+ var filtered = [],
+ items = this._items,
+ i, item, len, list;
+
+ // Allow options as first arg.
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ for (i = 0, len = items.length; i < len; ++i) {
+ item = items[i];
+
+ if (callback.call(this, item, i, this)) {
+ filtered.push(item);
+ }
+ }
+
+ if (options.asList) {
+ list = new Y.ModelList({model: this.model});
+ filtered.length && list.add(filtered, {silent: true});
+ return list;
+ } else {
+ return filtered;
+ }
+ },
+
/**
If _name_ refers to an attribute on this ModelList instance, returns the
value of that attribute. Otherwise, returns an array containing the values
@@ -298,7 +429,6 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
return this.invoke('getAsHTML', name);
},
-
/**
If _name_ refers to an attribute on this ModelList instance, returns the
URL-encoded value of that attribute. Otherwise, returns an array containing
@@ -403,9 +533,33 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
options = {};
}
+ options || (options = {});
+
this.sync('read', options, function (err, response) {
- if (!err) {
- self.reset(self.parse(response), options);
+ var facade = {
+ options : options,
+ response: response
+ },
+
+ parsed;
+
+ if (err) {
+ facade.error = err;
+ facade.src = 'load';
+
+ self.fire(EVT_ERROR, facade);
+ } else {
+ // Lazy publish.
+ if (!self._loadEvent) {
+ self._loadEvent = self.publish(EVT_LOAD, {
+ preventable: false
+ });
+ }
+
+ parsed = facade.parsed = self.parse(response);
+
+ self.reset(parsed, options);
+ self.fire(EVT_LOAD, facade);
}
callback && callback.apply(null, arguments);
@@ -467,19 +621,25 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
},
/**
- Removes the specified model or array of models from this list.
+ Removes the specified model or array of models from this list. You may also
+ pass another ModelList instance to remove all the models that are in both
+ that instance and this instance.
@method remove
- @param {Model|Model[]} models Models to remove.
+ @param {Model|Model[]|ModelList} models Models to remove.
@param {Object} [options] Data to be mixed into the event facade of the
`remove` event(s) for the removed models.
- @param {Boolean} [options.silent=false] If `true`, no `remove` event(s)
- will be fired.
+
+ @param {Boolean} [options.silent=false] If `true`, no `remove` event(s)
+ will be fired.
+
@return {Model|Model[]} Removed model or array of removed models.
**/
remove: function (models, options) {
- if (Lang.isArray(models)) {
- return YArray.map(models, function (model) {
+ var isList = models._isYUIModelList;
+
+ if (isList || Lang.isArray(models)) {
+ return YArray.map(isList ? models.toArray() : models, function (model) {
return this._remove(model, options);
}, this);
} else {
@@ -492,38 +652,49 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
single `reset` event.
Use `reset` when you want to add or remove a large number of items at once
- without firing `add` or `remove` events for each one.
+ with less overhead, and without firing `add` or `remove` events for each
+ one.
@method reset
- @param {Model[]|Object[]} [models] Models to add. May be existing model
- instances or hashes of model attributes, in which case new model instances
- will be created from the hashes. Calling `reset()` without passing in any
- models will clear the list.
+ @param {Model[]|ModelList|Object[]} [models] Models to add. May be existing
+ model instances or hashes of model attributes, in which case new model
+ instances will be created from the hashes. If a ModelList is passed, all
+ the models in that list will be added to this list. Calling `reset()`
+ without passing in any models will clear the list.
@param {Object} [options] Data to be mixed into the event facade of the
`reset` event.
- @param {Boolean} [options.silent=false] If `true`, no `reset` event will
- be fired.
+
+ @param {Boolean} [options.silent=false] If `true`, no `reset` event will
+ be fired.
+
@chainable
**/
reset: function (models, options) {
models || (models = []);
options || (options = {});
- var facade = Y.merge(options, {
- src : 'reset',
- models: YArray.map(models, function (model) {
- return model instanceof Y.Model ? model :
- new this.model(model);
- }, this)
- });
+ var facade = Y.merge({src: 'reset'}, options);
- // Sort the models in the facade before firing the reset event.
- if (this.comparator) {
- facade.models.sort(Y.bind(this._sort, this));
+ if (models._isYUIModelList) {
+ models = models.toArray();
+ } else {
+ models = YArray.map(models, function (model) {
+ return model._isYUIModel ? model : new this.model(model);
+ }, this);
}
- options.silent ? this._defResetFn(facade) :
+ facade.models = models;
+
+ if (options.silent) {
+ this._defResetFn(facade);
+ } else {
+ // Sort the models before firing the reset event.
+ if (this.comparator) {
+ models.sort(Y.bind(this._sort, this));
+ }
+
this.fire(EVT_RESET, facade);
+ }
return this;
},
@@ -544,13 +715,13 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@chainable
**/
sort: function (options) {
- var models = this._items.concat(),
- facade;
-
if (!this.comparator) {
return this;
}
+ var models = this._items.concat(),
+ facade;
+
options || (options = {});
models.sort(Y.bind(this._sort, this));
@@ -634,6 +805,9 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
/**
Adds the specified _model_ if it isn't already in this list.
+ If the model's `clientId` or `id` matches that of a model that's already in
+ the list, an `error` event will be fired and the model will not be added.
+
@method _add
@param {Model|Object} model Model or object to add.
@param {Object} [options] Data to be mixed into the event facade of the
@@ -644,15 +818,19 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@protected
**/
_add: function (model, options) {
- var facade;
+ var facade, id;
options || (options = {});
- if (!(model instanceof Y.Model)) {
+ if (!model._isYUIModel) {
model = new this.model(model);
}
- if (this._clientIdMap[model.get('clientId')]) {
+ id = model.get('id');
+
+ if (this._clientIdMap[model.get('clientId')]
+ || (Lang.isValue(id) && this._idMap[id])) {
+
this.fire(EVT_ERROR, {
error: 'Model is already in the list.',
model: model,
@@ -700,6 +878,24 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
this._items = [];
},
+ /**
+ Compares the value _a_ to the value _b_ for sorting purposes. Values are
+ assumed to be the result of calling a model's `comparator()` method. You can
+ override this method to implement custom sorting logic, such as a descending
+ sort or multi-field sorting.
+
+ @method _compare
+ @param {Mixed} a First value to compare.
+ @param {Mixed} b Second value to compare.
+ @return {Number} `-1` if _a_ should come before _b_, `0` if they're
+ equivalent, `1` if _a_ should come after _b_.
+ @protected
+ @since 3.5.0
+ **/
+ _compare: function (a, b) {
+ return a < b ? -1 : (a > b ? 1 : 0);
+ },
+
/**
Removes this list as a bubble target for the specified model's events.
@@ -726,15 +922,16 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@protected
**/
_findIndex: function (model) {
- var comparator = this.comparator,
- items = this._items,
- max = items.length,
- min = 0,
+ var items = this._items,
+ max = items.length,
+ min = 0,
item, middle, needle;
- if (!comparator || !items.length) { return items.length; }
+ if (!this.comparator || !max) {
+ return max;
+ }
- needle = comparator(model);
+ needle = this.comparator(model);
// Perform an iterative binary search to determine the correct position
// based on the return value of the `comparator` function.
@@ -742,7 +939,7 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
middle = (min + max) >> 1; // Divide by two and discard remainder.
item = items[middle];
- if (comparator(item) < needle) {
+ if (this._compare(this.comparator(item), needle) < 0) {
min = middle + 1;
} else {
max = middle;
@@ -801,10 +998,7 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
@protected
**/
_sort: function (a, b) {
- var aValue = this.comparator(a),
- bValue = this.comparator(b);
-
- return aValue < bValue ? -1 : (aValue > bValue ? 1 : 0);
+ return this._compare(this.comparator(a), this.comparator(b));
},
// -- Event Handlers -------------------------------------------------------
@@ -893,4 +1087,4 @@ Y.ModelList = Y.extend(ModelList, Y.Base, {
Y.augment(ModelList, Y.ArrayList);
-}, '3.4.1' ,{requires:['array-extras', 'array-invoke', 'arraylist', 'base-build', 'escape', 'json-parse', 'model']});
+}, '3.5.0' ,{requires:['array-extras', 'array-invoke', 'arraylist', 'base-build', 'escape', 'json-parse', 'model']});
diff --git a/lib/yui/3.4.1/build/model/model-debug.js b/lib/yui/3.5.0/build/model/model-debug.js
similarity index 73%
rename from lib/yui/3.4.1/build/model/model-debug.js
rename to lib/yui/3.5.0/build/model/model-debug.js
index f2df72efba4..508338e9d21 100644
--- a/lib/yui/3.4.1/build/model/model-debug.js
+++ b/lib/yui/3.5.0/build/model/model-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -10,6 +10,7 @@ YUI.add('model', function(Y) {
Attribute-based data model with APIs for getting, setting, validating, and
syncing attribute values, as well as events for being notified of model changes.
+@module app
@submodule model
@since 3.4.0
**/
@@ -57,12 +58,45 @@ var GlobalEnv = YUI.namespace('Env.Model'),
@param {String} src Source of the error. May be one of the following (or any
custom error source defined by a Model subclass):
+ * `load`: An error loading the model from a sync layer. The sync layer's
+ response (if any) will be provided as the `response` property on the
+ event facade.
+
* `parse`: An error parsing a JSON response. The response in question will
be provided as the `response` property on the event facade.
+
+ * `save`: An error saving the model to a sync layer. The sync layer's
+ response (if any) will be provided as the `response` property on the
+ event facade.
+
* `validate`: The model failed to validate. The attributes being validated
will be provided as the `attributes` property on the event facade.
**/
- EVT_ERROR = 'error';
+ EVT_ERROR = 'error',
+
+ /**
+ Fired after model attributes are loaded from a sync layer.
+
+ @event load
+ @param {Object} parsed The parsed version of the sync layer's response to
+ the load request.
+ @param {any} response The sync layer's raw, unparsed response to the load
+ request.
+ @since 3.5.0
+ **/
+ EVT_LOAD = 'load',
+
+ /**
+ Fired after model attributes are saved to a sync layer.
+
+ @event save
+ @param {Object} [parsed] The parsed version of the sync layer's response to
+ the save request, if there was a response.
+ @param {any} [response] The sync layer's raw, unparsed response to the save
+ request, if there was one.
+ @since 3.5.0
+ **/
+ EVT_SAVE = 'save';
function Model() {
Model.superclass.constructor.apply(this, arguments);
@@ -138,6 +172,35 @@ Y.Model = Y.extend(Model, Y.Base, {
@default `[]`
**/
+ // -- Protected Properties -------------------------------------------------
+
+ /**
+ This tells `Y.Base` that it should create ad-hoc attributes for config
+ properties passed to Model's constructor. This makes it possible to
+ instantiate a model and set a bunch of attributes without having to subclass
+ `Y.Model` and declare all those attributes first.
+
+ @property _allowAdHocAttrs
+ @type Boolean
+ @default true
+ @protected
+ @since 3.5.0
+ **/
+ _allowAdHocAttrs: true,
+
+ /**
+ Total hack to allow us to identify Model instances without using
+ `instanceof`, which won't work when the instance was created in another
+ window or YUI sandbox.
+
+ @property _isYUIModel
+ @type Boolean
+ @default true
+ @protected
+ @since 3.5.0
+ **/
+ _isYUIModel: true,
+
// -- Lifecycle Methods ----------------------------------------------------
initializer: function (config) {
this.changed = {};
@@ -151,21 +214,25 @@ Y.Model = Y.extend(Model, Y.Base, {
Destroys this model instance and removes it from its containing lists, if
any.
- If `options['delete']` is `true`, then this method also delegates to the
- `sync()` method to delete the model from the persistence layer, which is an
- asynchronous action. Provide a _callback_ function to be notified of success
- or failure.
+ The _callback_, if one is provided, will be called after the model is
+ destroyed.
+
+ If `options.remove` is `true`, then this method delegates to the `sync()`
+ method to delete the model from the persistence layer, which is an
+ asynchronous action. In this case, the _callback_ (if provided) will be
+ called after the sync layer indicates success or failure of the delete
+ operation.
@method destroy
@param {Object} [options] Sync options. It's up to the custom sync
implementation to determine what options it supports or requires, if
any.
- @param {Boolean} [options.delete=false] If `true`, the model will be
+ @param {Boolean} [options.remove=false] If `true`, the model will be
deleted via the sync layer in addition to the instance being destroyed.
- @param {callback} [callback] Called when the sync operation finishes.
+ @param {callback} [callback] Called after the model has been destroyed (and
+ deleted via the sync layer if `options.remove` is `true`).
@param {Error|null} callback.err If an error occurred, this parameter will
- contain the error. If the sync operation succeeded, _err_ will be
- `null`.
+ contain the error. Otherwise _err_ will be `null`.
@chainable
**/
destroy: function (options, callback) {
@@ -174,28 +241,28 @@ Y.Model = Y.extend(Model, Y.Base, {
// Allow callback as only arg.
if (typeof options === 'function') {
callback = options;
- options = {};
+ options = null;
}
- function finish(err) {
- if (!err) {
- YArray.each(self.lists.concat(), function (list) {
- list.remove(self, options);
- });
+ self.onceAfter('destroy', function () {
+ function finish(err) {
+ if (!err) {
+ YArray.each(self.lists.concat(), function (list) {
+ list.remove(self, options);
+ });
+ }
- Model.superclass.destroy.call(self);
+ callback && callback.apply(null, arguments);
}
- callback && callback.apply(null, arguments);
- }
+ if (options && (options.remove || options['delete'])) {
+ self.sync('delete', options, finish);
+ } else {
+ finish();
+ }
+ });
- if (options && options['delete']) {
- this.sync('delete', options, finish);
- } else {
- finish();
- }
-
- return this;
+ return Model.superclass.destroy.call(self);
},
/**
@@ -307,6 +374,9 @@ Y.Model = Y.extend(Model, Y.Base, {
operation, which is an asynchronous action. Specify a _callback_ function to
be notified of success or failure.
+ A successful load operation will fire a `load` event, while an unsuccessful
+ load operation will fire an `error` event with the `src` value "load".
+
If the load operation succeeds and one or more of the loaded attributes
differ from this model's current attributes, a `change` event will be fired.
@@ -332,16 +402,41 @@ Y.Model = Y.extend(Model, Y.Base, {
options = {};
}
- this.sync('read', options, function (err, response) {
- if (!err) {
- self.setAttrs(self.parse(response), options);
+ options || (options = {});
+
+ self.sync('read', options, function (err, response) {
+ var facade = {
+ options : options,
+ response: response
+ },
+
+ parsed;
+
+ if (err) {
+ facade.error = err;
+ facade.src = 'load';
+
+ self.fire(EVT_ERROR, facade);
+ } else {
+ // Lazy publish.
+ if (!self._loadEvent) {
+ self._loadEvent = self.publish(EVT_LOAD, {
+ preventable: false
+ });
+ }
+
+ parsed = facade.parsed = self.parse(response);
+
+ self.setAttrs(parsed, options);
self.changed = {};
+
+ self.fire(EVT_LOAD, facade);
}
callback && callback.apply(null, arguments);
});
- return this;
+ return self;
},
/**
@@ -386,6 +481,9 @@ Y.Model = Y.extend(Model, Y.Base, {
operation, which is an asynchronous action. Specify a _callback_ function to
be notified of success or failure.
+ A successful save operation will fire a `save` event, while an unsuccessful
+ save operation will fire an `error` event with the `src` value "save".
+
If the save operation succeeds and one or more of the attributes returned in
the server's response differ from this model's current attributes, a
`change` event will be fired.
@@ -404,8 +502,7 @@ Y.Model = Y.extend(Model, Y.Base, {
@chainable
**/
save: function (options, callback) {
- var self = this,
- validation = self._validate(self.toJSON());
+ var self = this;
// Allow callback as only arg.
if (typeof options === 'function') {
@@ -413,21 +510,46 @@ Y.Model = Y.extend(Model, Y.Base, {
options = {};
}
- if (!validation.valid) {
- callback && callback.call(null, validation.error);
- return self;
- }
+ options || (options = {});
- self.sync(self.isNew() ? 'create' : 'update', options, function (err, response) {
- if (!err) {
- if (response) {
- self.setAttrs(self.parse(response), options);
- }
-
- self.changed = {};
+ self._validate(self.toJSON(), function (err) {
+ if (err) {
+ callback && callback.call(null, err);
+ return;
}
- callback && callback.apply(null, arguments);
+ self.sync(self.isNew() ? 'create' : 'update', options, function (err, response) {
+ var facade = {
+ options : options,
+ response: response
+ },
+
+ parsed;
+
+ if (err) {
+ facade.error = err;
+ facade.src = 'save';
+
+ self.fire(EVT_ERROR, facade);
+ } else {
+ // Lazy publish.
+ if (!self._saveEvent) {
+ self._saveEvent = self.publish(EVT_SAVE, {
+ preventable: false
+ });
+ }
+
+ if (response) {
+ parsed = facade.parsed = self.parse(response);
+ self.setAttrs(parsed, options);
+ }
+
+ self.changed = {};
+ self.fire(EVT_SAVE, facade);
+ }
+
+ callback && callback.apply(null, arguments);
+ });
});
return self;
@@ -528,7 +650,7 @@ Y.Model = Y.extend(Model, Y.Base, {
});
}
- this.fire(EVT_CHANGE, {changed: lastChange});
+ this.fire(EVT_CHANGE, Y.merge(options, {changed: lastChange}));
}
}
@@ -551,13 +673,11 @@ Y.Model = Y.extend(Model, Y.Base, {
@param {Object} [options] Sync options. It's up to the custom sync
implementation to determine what options it supports or requires, if any.
- @param {callback} [callback] Called when the sync operation finishes.
+ @param {Function} [callback] Called when the sync operation finishes.
@param {Error|null} callback.err If an error occurred, this parameter will
contain the error. If the sync operation succeeded, _err_ will be
falsy.
- @param {Any} [callback.response] The server's response. This value will
- be passed to the `parse()` method, which is expected to parse it and
- return an attribute hash.
+ @param {Any} [callback.response] The server's response.
**/
sync: function (/* action, options, callback */) {
var callback = YArray(arguments, 0, true).pop();
@@ -576,6 +696,14 @@ Y.Model = Y.extend(Model, Y.Base, {
If you've specified a custom attribute name in the `idAttribute` property,
the default `id` attribute will not be included in the returned object.
+ Note: The ECMAScript 5 specification states that objects may implement a
+ `toJSON` method to provide an alternate object representation to serialize
+ when passed to `JSON.stringify(obj)`. This allows class instances to be
+ serialized as if they were plain objects. This is why Model's `toJSON`
+ returns an object, not a JSON string.
+
+ See for details.
+
@method toJSON
@return {Object} Copy of this model's attributes.
**/
@@ -638,25 +766,47 @@ Y.Model = Y.extend(Model, Y.Base, {
/**
Override this method to provide custom validation logic for this model.
+
While attribute-specific validators can be used to validate individual
attributes, this method gives you a hook to validate a hash of all
attributes before the model is saved. This method is called automatically
before `save()` takes any action. If validation fails, the `save()` call
will be aborted.
- A call to `validate` that doesn't return anything (or that returns `null`)
- will be treated as a success. If the `validate` method returns a value, it
- will be treated as a failure, and the returned value (which may be a string
- or an object containing information about the failure) will be passed along
- to the `error` event.
+ In your validation method, call the provided `callback` function with no
+ arguments to indicate success. To indicate failure, pass a single argument,
+ which may contain an error message, an array of error messages, or any other
+ value. This value will be passed along to the `error` event.
+
+ @example
+
+ model.validate = function (attrs, callback) {
+ if (attrs.pie !== true) {
+ // No pie?! Invalid!
+ callback('Must provide pie.');
+ return;
+ }
+
+ // Success!
+ callback();
+ };
@method validate
- @param {Object} attributes Attribute hash containing all model attributes to
- be validated.
- @return {Any} Any return value other than `undefined` or `null` will be
- treated as a validation failure.
+ @param {Object} attrs Attribute hash containing all model attributes to
+ be validated.
+ @param {Function} callback Validation callback. Call this function when your
+ validation logic finishes. To trigger a validation failure, pass any
+ value as the first argument to the callback (ideally a meaningful
+ validation error of some kind).
+
+ @param {Any} [callback.err] Validation error. Don't provide this
+ argument if validation succeeds. If validation fails, set this to an
+ error message or some other meaningful value. It will be passed
+ along to the resulting `error` event.
**/
- validate: function (/* attributes */) {},
+ validate: function (attrs, callback) {
+ callback && callback();
+ },
// -- Protected Methods ----------------------------------------------------
@@ -672,7 +822,7 @@ Y.Model = Y.extend(Model, Y.Base, {
@param {String} name The name of the attribute.
@param {Object} config An object with attribute configuration property/value
pairs, specifying the configuration for the attribute.
- @param {boolean} lazy (optional) Whether or not to add this attribute lazily
+ @param {Boolean} lazy (optional) Whether or not to add this attribute lazily
(on the first call to get/set).
@return {Object} A reference to the host object.
@chainable
@@ -721,24 +871,37 @@ Y.Model = Y.extend(Model, Y.Base, {
@method _validate
@param {Object} attributes Attribute hash.
- @return {Object} Validation results.
+ @param {Function} callback Validation callback.
+ @param {Any} [callback.err] Value on failure, non-value on success.
@protected
**/
- _validate: function (attributes) {
- var error = this.validate(attributes);
+ _validate: function (attributes, callback) {
+ var self = this;
- if (Lang.isValue(error)) {
- // Validation failed. Fire an error.
- this.fire(EVT_ERROR, {
- attributes: attributes,
- error : error,
- src : 'validate'
- });
+ function handler(err) {
+ if (Lang.isValue(err)) {
+ // Validation failed. Fire an error.
+ self.fire(EVT_ERROR, {
+ attributes: attributes,
+ error : err,
+ src : 'validate'
+ });
- return {valid: false, error: error};
+ callback(err);
+ return;
+ }
+
+ callback();
}
- return {valid: true};
+ if (self.validate.length === 1) {
+ // Backcompat for 3.4.x-style synchronous validate() functions that
+ // don't take a callback argument.
+ Y.log('Synchronous validate() methods are deprecated since YUI 3.5.0.', 'warn', 'Model');
+ handler(self.validate(attributes, handler));
+ } else {
+ self.validate(attributes, handler);
+ }
},
// -- Protected Event Handlers ---------------------------------------------
@@ -809,4 +972,4 @@ Y.Model = Y.extend(Model, Y.Base, {
});
-}, '3.4.1' ,{requires:['base-build', 'escape', 'json-parse']});
+}, '3.5.0' ,{requires:['base-build', 'escape', 'json-parse']});
diff --git a/lib/yui/3.5.0/build/model/model-min.js b/lib/yui/3.5.0/build/model/model-min.js
new file mode 100644
index 00000000000..7154ccbbc4e
--- /dev/null
+++ b/lib/yui/3.5.0/build/model/model-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("model",function(a){var i=YUI.namespace("Env.Model"),f=a.Lang,j=a.Array,h=a.Object,g="change",d="error",e="load",c="save";function b(){b.superclass.constructor.apply(this,arguments);}a.Model=a.extend(b,a.Base,{idAttribute:"id",_allowAdHocAttrs:true,_isYUIModel:true,initializer:function(k){this.changed={};this.lastChange={};this.lists=[];},destroy:function(l,m){var k=this;if(typeof l==="function"){m=l;l=null;}k.onceAfter("destroy",function(){function n(o){if(!o){j.each(k.lists.concat(),function(p){p.remove(k,l);});}m&&m.apply(null,arguments);}if(l&&(l.remove||l["delete"])){k.sync("delete",l,n);}else{n();}});return b.superclass.destroy.call(k);},generateClientId:function(){i.lastId||(i.lastId=0);return this.constructor.NAME+"_"+(i.lastId+=1);},getAsHTML:function(k){var l=this.get(k);return a.Escape.html(f.isValue(l)?String(l):"");},getAsURL:function(k){var l=this.get(k);return encodeURIComponent(f.isValue(l)?String(l):"");},isModified:function(){return this.isNew()||!h.isEmpty(this.changed);},isNew:function(){return !f.isValue(this.get("id"));},load:function(l,m){var k=this;if(typeof l==="function"){m=l;l={};}l||(l={});k.sync("read",l,function(q,o){var p={options:l,response:o},n;if(q){p.error=q;p.src="load";k.fire(d,p);}else{if(!k._loadEvent){k._loadEvent=k.publish(e,{preventable:false});}n=p.parsed=k.parse(o);k.setAttrs(n,l);k.changed={};k.fire(e,p);}m&&m.apply(null,arguments);});return k;},parse:function(k){if(typeof k==="string"){try{return a.JSON.parse(k);}catch(l){this.fire(d,{error:l,response:k,src:"parse"});return null;}}return k;},save:function(l,m){var k=this;if(typeof l==="function"){m=l;l={};}l||(l={});k._validate(k.toJSON(),function(n){if(n){m&&m.call(null,n);return;}k.sync(k.isNew()?"create":"update",l,function(r,p){var q={options:l,response:p},o;if(r){q.error=r;q.src="save";k.fire(d,q);}else{if(!k._saveEvent){k._saveEvent=k.publish(c,{preventable:false});}if(p){o=q.parsed=k.parse(p);k.setAttrs(o,l);}k.changed={};k.fire(c,q);}m&&m.apply(null,arguments);});});return k;},set:function(m,n,l){var k={};k[m]=n;return this.setAttrs(k,l);},setAttrs:function(k,l){var o=this.idAttribute,r,p,m,n,q;l||(l={});q=l._transaction={};if(o!=="id"){k=a.merge(k);if(h.owns(k,o)){k.id=k[o];}else{if(h.owns(k,"id")){k[o]=k.id;}}}for(m in k){if(h.owns(k,m)){this._setAttr(m,k[m],l);}}if(!h.isEmpty(q)){r=this.changed;n=this.lastChange={};for(m in q){if(h.owns(q,m)){p=q[m];r[m]=p.newVal;n[m]={newVal:p.newVal,prevVal:p.prevVal,src:p.src||null};}}if(!l.silent){if(!this._changeEvent){this._changeEvent=this.publish(g,{preventable:false});}this.fire(g,a.merge(l,{changed:n}));}}return this;},sync:function(){var k=j(arguments,0,true).pop();if(typeof k==="function"){k();}},toJSON:function(){var k=this.getAttrs();delete k.clientId;delete k.destroyed;delete k.initialized;if(this.idAttribute!=="id"){delete k.id;}return k;},undo:function(p,l){var o=this.lastChange,n=this.idAttribute,k={},m;p||(p=h.keys(o));j.each(p,function(q){if(h.owns(o,q)){q=q===n?"id":q;m=true;k[q]=o[q].prevVal;}});return m?this.setAttrs(k,l):this;},validate:function(k,l){l&&l();},addAttr:function(l,k,n){var o=this.idAttribute,m,p;if(o&&l===o){m=this._isLazyAttr("id")||this._getAttrCfg("id");p=k.value===k.defaultValue?null:k.value;if(!f.isValue(p)){p=m.value===m.defaultValue?null:m.value;if(!f.isValue(p)){p=f.isValue(k.defaultValue)?k.defaultValue:m.defaultValue;}}k.value=p;if(m.value!==p){m.value=p;if(this._isLazyAttr("id")){this._state.add("id","lazy",m);}else{this._state.add("id","value",p);}}}return b.superclass.addAttr.apply(this,arguments);},_validate:function(l,n){var k=this;function m(o){if(f.isValue(o)){k.fire(d,{attributes:l,error:o,src:"validate"});n(o);return;}n();}if(k.validate.length===1){m(k.validate(l,m));}else{k.validate(l,m);}},_defAttrChangeFn:function(l){var k=l.attrName;if(!this._setAttrVal(k,l.subAttrName,l.prevVal,l.newVal)){l.stopImmediatePropagation();}else{l.newVal=this.get(k);if(l._transaction){l._transaction[k]=l;}}}},{NAME:"model",ATTRS:{clientId:{valueFn:"generateClientId",readOnly:true},id:{value:null}}});},"3.5.0",{requires:["base-build","escape","json-parse"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/model/model.js b/lib/yui/3.5.0/build/model/model.js
similarity index 73%
rename from lib/yui/3.4.1/build/model/model.js
rename to lib/yui/3.5.0/build/model/model.js
index c9ada439797..cb8a2fc9d9f 100644
--- a/lib/yui/3.4.1/build/model/model.js
+++ b/lib/yui/3.5.0/build/model/model.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -10,6 +10,7 @@ YUI.add('model', function(Y) {
Attribute-based data model with APIs for getting, setting, validating, and
syncing attribute values, as well as events for being notified of model changes.
+@module app
@submodule model
@since 3.4.0
**/
@@ -57,12 +58,45 @@ var GlobalEnv = YUI.namespace('Env.Model'),
@param {String} src Source of the error. May be one of the following (or any
custom error source defined by a Model subclass):
+ * `load`: An error loading the model from a sync layer. The sync layer's
+ response (if any) will be provided as the `response` property on the
+ event facade.
+
* `parse`: An error parsing a JSON response. The response in question will
be provided as the `response` property on the event facade.
+
+ * `save`: An error saving the model to a sync layer. The sync layer's
+ response (if any) will be provided as the `response` property on the
+ event facade.
+
* `validate`: The model failed to validate. The attributes being validated
will be provided as the `attributes` property on the event facade.
**/
- EVT_ERROR = 'error';
+ EVT_ERROR = 'error',
+
+ /**
+ Fired after model attributes are loaded from a sync layer.
+
+ @event load
+ @param {Object} parsed The parsed version of the sync layer's response to
+ the load request.
+ @param {any} response The sync layer's raw, unparsed response to the load
+ request.
+ @since 3.5.0
+ **/
+ EVT_LOAD = 'load',
+
+ /**
+ Fired after model attributes are saved to a sync layer.
+
+ @event save
+ @param {Object} [parsed] The parsed version of the sync layer's response to
+ the save request, if there was a response.
+ @param {any} [response] The sync layer's raw, unparsed response to the save
+ request, if there was one.
+ @since 3.5.0
+ **/
+ EVT_SAVE = 'save';
function Model() {
Model.superclass.constructor.apply(this, arguments);
@@ -138,6 +172,35 @@ Y.Model = Y.extend(Model, Y.Base, {
@default `[]`
**/
+ // -- Protected Properties -------------------------------------------------
+
+ /**
+ This tells `Y.Base` that it should create ad-hoc attributes for config
+ properties passed to Model's constructor. This makes it possible to
+ instantiate a model and set a bunch of attributes without having to subclass
+ `Y.Model` and declare all those attributes first.
+
+ @property _allowAdHocAttrs
+ @type Boolean
+ @default true
+ @protected
+ @since 3.5.0
+ **/
+ _allowAdHocAttrs: true,
+
+ /**
+ Total hack to allow us to identify Model instances without using
+ `instanceof`, which won't work when the instance was created in another
+ window or YUI sandbox.
+
+ @property _isYUIModel
+ @type Boolean
+ @default true
+ @protected
+ @since 3.5.0
+ **/
+ _isYUIModel: true,
+
// -- Lifecycle Methods ----------------------------------------------------
initializer: function (config) {
this.changed = {};
@@ -151,21 +214,25 @@ Y.Model = Y.extend(Model, Y.Base, {
Destroys this model instance and removes it from its containing lists, if
any.
- If `options['delete']` is `true`, then this method also delegates to the
- `sync()` method to delete the model from the persistence layer, which is an
- asynchronous action. Provide a _callback_ function to be notified of success
- or failure.
+ The _callback_, if one is provided, will be called after the model is
+ destroyed.
+
+ If `options.remove` is `true`, then this method delegates to the `sync()`
+ method to delete the model from the persistence layer, which is an
+ asynchronous action. In this case, the _callback_ (if provided) will be
+ called after the sync layer indicates success or failure of the delete
+ operation.
@method destroy
@param {Object} [options] Sync options. It's up to the custom sync
implementation to determine what options it supports or requires, if
any.
- @param {Boolean} [options.delete=false] If `true`, the model will be
+ @param {Boolean} [options.remove=false] If `true`, the model will be
deleted via the sync layer in addition to the instance being destroyed.
- @param {callback} [callback] Called when the sync operation finishes.
+ @param {callback} [callback] Called after the model has been destroyed (and
+ deleted via the sync layer if `options.remove` is `true`).
@param {Error|null} callback.err If an error occurred, this parameter will
- contain the error. If the sync operation succeeded, _err_ will be
- `null`.
+ contain the error. Otherwise _err_ will be `null`.
@chainable
**/
destroy: function (options, callback) {
@@ -174,28 +241,28 @@ Y.Model = Y.extend(Model, Y.Base, {
// Allow callback as only arg.
if (typeof options === 'function') {
callback = options;
- options = {};
+ options = null;
}
- function finish(err) {
- if (!err) {
- YArray.each(self.lists.concat(), function (list) {
- list.remove(self, options);
- });
+ self.onceAfter('destroy', function () {
+ function finish(err) {
+ if (!err) {
+ YArray.each(self.lists.concat(), function (list) {
+ list.remove(self, options);
+ });
+ }
- Model.superclass.destroy.call(self);
+ callback && callback.apply(null, arguments);
}
- callback && callback.apply(null, arguments);
- }
+ if (options && (options.remove || options['delete'])) {
+ self.sync('delete', options, finish);
+ } else {
+ finish();
+ }
+ });
- if (options && options['delete']) {
- this.sync('delete', options, finish);
- } else {
- finish();
- }
-
- return this;
+ return Model.superclass.destroy.call(self);
},
/**
@@ -307,6 +374,9 @@ Y.Model = Y.extend(Model, Y.Base, {
operation, which is an asynchronous action. Specify a _callback_ function to
be notified of success or failure.
+ A successful load operation will fire a `load` event, while an unsuccessful
+ load operation will fire an `error` event with the `src` value "load".
+
If the load operation succeeds and one or more of the loaded attributes
differ from this model's current attributes, a `change` event will be fired.
@@ -332,16 +402,41 @@ Y.Model = Y.extend(Model, Y.Base, {
options = {};
}
- this.sync('read', options, function (err, response) {
- if (!err) {
- self.setAttrs(self.parse(response), options);
+ options || (options = {});
+
+ self.sync('read', options, function (err, response) {
+ var facade = {
+ options : options,
+ response: response
+ },
+
+ parsed;
+
+ if (err) {
+ facade.error = err;
+ facade.src = 'load';
+
+ self.fire(EVT_ERROR, facade);
+ } else {
+ // Lazy publish.
+ if (!self._loadEvent) {
+ self._loadEvent = self.publish(EVT_LOAD, {
+ preventable: false
+ });
+ }
+
+ parsed = facade.parsed = self.parse(response);
+
+ self.setAttrs(parsed, options);
self.changed = {};
+
+ self.fire(EVT_LOAD, facade);
}
callback && callback.apply(null, arguments);
});
- return this;
+ return self;
},
/**
@@ -386,6 +481,9 @@ Y.Model = Y.extend(Model, Y.Base, {
operation, which is an asynchronous action. Specify a _callback_ function to
be notified of success or failure.
+ A successful save operation will fire a `save` event, while an unsuccessful
+ save operation will fire an `error` event with the `src` value "save".
+
If the save operation succeeds and one or more of the attributes returned in
the server's response differ from this model's current attributes, a
`change` event will be fired.
@@ -404,8 +502,7 @@ Y.Model = Y.extend(Model, Y.Base, {
@chainable
**/
save: function (options, callback) {
- var self = this,
- validation = self._validate(self.toJSON());
+ var self = this;
// Allow callback as only arg.
if (typeof options === 'function') {
@@ -413,21 +510,46 @@ Y.Model = Y.extend(Model, Y.Base, {
options = {};
}
- if (!validation.valid) {
- callback && callback.call(null, validation.error);
- return self;
- }
+ options || (options = {});
- self.sync(self.isNew() ? 'create' : 'update', options, function (err, response) {
- if (!err) {
- if (response) {
- self.setAttrs(self.parse(response), options);
- }
-
- self.changed = {};
+ self._validate(self.toJSON(), function (err) {
+ if (err) {
+ callback && callback.call(null, err);
+ return;
}
- callback && callback.apply(null, arguments);
+ self.sync(self.isNew() ? 'create' : 'update', options, function (err, response) {
+ var facade = {
+ options : options,
+ response: response
+ },
+
+ parsed;
+
+ if (err) {
+ facade.error = err;
+ facade.src = 'save';
+
+ self.fire(EVT_ERROR, facade);
+ } else {
+ // Lazy publish.
+ if (!self._saveEvent) {
+ self._saveEvent = self.publish(EVT_SAVE, {
+ preventable: false
+ });
+ }
+
+ if (response) {
+ parsed = facade.parsed = self.parse(response);
+ self.setAttrs(parsed, options);
+ }
+
+ self.changed = {};
+ self.fire(EVT_SAVE, facade);
+ }
+
+ callback && callback.apply(null, arguments);
+ });
});
return self;
@@ -528,7 +650,7 @@ Y.Model = Y.extend(Model, Y.Base, {
});
}
- this.fire(EVT_CHANGE, {changed: lastChange});
+ this.fire(EVT_CHANGE, Y.merge(options, {changed: lastChange}));
}
}
@@ -551,13 +673,11 @@ Y.Model = Y.extend(Model, Y.Base, {
@param {Object} [options] Sync options. It's up to the custom sync
implementation to determine what options it supports or requires, if any.
- @param {callback} [callback] Called when the sync operation finishes.
+ @param {Function} [callback] Called when the sync operation finishes.
@param {Error|null} callback.err If an error occurred, this parameter will
contain the error. If the sync operation succeeded, _err_ will be
falsy.
- @param {Any} [callback.response] The server's response. This value will
- be passed to the `parse()` method, which is expected to parse it and
- return an attribute hash.
+ @param {Any} [callback.response] The server's response.
**/
sync: function (/* action, options, callback */) {
var callback = YArray(arguments, 0, true).pop();
@@ -576,6 +696,14 @@ Y.Model = Y.extend(Model, Y.Base, {
If you've specified a custom attribute name in the `idAttribute` property,
the default `id` attribute will not be included in the returned object.
+ Note: The ECMAScript 5 specification states that objects may implement a
+ `toJSON` method to provide an alternate object representation to serialize
+ when passed to `JSON.stringify(obj)`. This allows class instances to be
+ serialized as if they were plain objects. This is why Model's `toJSON`
+ returns an object, not a JSON string.
+
+ See for details.
+
@method toJSON
@return {Object} Copy of this model's attributes.
**/
@@ -638,25 +766,47 @@ Y.Model = Y.extend(Model, Y.Base, {
/**
Override this method to provide custom validation logic for this model.
+
While attribute-specific validators can be used to validate individual
attributes, this method gives you a hook to validate a hash of all
attributes before the model is saved. This method is called automatically
before `save()` takes any action. If validation fails, the `save()` call
will be aborted.
- A call to `validate` that doesn't return anything (or that returns `null`)
- will be treated as a success. If the `validate` method returns a value, it
- will be treated as a failure, and the returned value (which may be a string
- or an object containing information about the failure) will be passed along
- to the `error` event.
+ In your validation method, call the provided `callback` function with no
+ arguments to indicate success. To indicate failure, pass a single argument,
+ which may contain an error message, an array of error messages, or any other
+ value. This value will be passed along to the `error` event.
+
+ @example
+
+ model.validate = function (attrs, callback) {
+ if (attrs.pie !== true) {
+ // No pie?! Invalid!
+ callback('Must provide pie.');
+ return;
+ }
+
+ // Success!
+ callback();
+ };
@method validate
- @param {Object} attributes Attribute hash containing all model attributes to
- be validated.
- @return {Any} Any return value other than `undefined` or `null` will be
- treated as a validation failure.
+ @param {Object} attrs Attribute hash containing all model attributes to
+ be validated.
+ @param {Function} callback Validation callback. Call this function when your
+ validation logic finishes. To trigger a validation failure, pass any
+ value as the first argument to the callback (ideally a meaningful
+ validation error of some kind).
+
+ @param {Any} [callback.err] Validation error. Don't provide this
+ argument if validation succeeds. If validation fails, set this to an
+ error message or some other meaningful value. It will be passed
+ along to the resulting `error` event.
**/
- validate: function (/* attributes */) {},
+ validate: function (attrs, callback) {
+ callback && callback();
+ },
// -- Protected Methods ----------------------------------------------------
@@ -672,7 +822,7 @@ Y.Model = Y.extend(Model, Y.Base, {
@param {String} name The name of the attribute.
@param {Object} config An object with attribute configuration property/value
pairs, specifying the configuration for the attribute.
- @param {boolean} lazy (optional) Whether or not to add this attribute lazily
+ @param {Boolean} lazy (optional) Whether or not to add this attribute lazily
(on the first call to get/set).
@return {Object} A reference to the host object.
@chainable
@@ -721,24 +871,36 @@ Y.Model = Y.extend(Model, Y.Base, {
@method _validate
@param {Object} attributes Attribute hash.
- @return {Object} Validation results.
+ @param {Function} callback Validation callback.
+ @param {Any} [callback.err] Value on failure, non-value on success.
@protected
**/
- _validate: function (attributes) {
- var error = this.validate(attributes);
+ _validate: function (attributes, callback) {
+ var self = this;
- if (Lang.isValue(error)) {
- // Validation failed. Fire an error.
- this.fire(EVT_ERROR, {
- attributes: attributes,
- error : error,
- src : 'validate'
- });
+ function handler(err) {
+ if (Lang.isValue(err)) {
+ // Validation failed. Fire an error.
+ self.fire(EVT_ERROR, {
+ attributes: attributes,
+ error : err,
+ src : 'validate'
+ });
- return {valid: false, error: error};
+ callback(err);
+ return;
+ }
+
+ callback();
}
- return {valid: true};
+ if (self.validate.length === 1) {
+ // Backcompat for 3.4.x-style synchronous validate() functions that
+ // don't take a callback argument.
+ handler(self.validate(attributes, handler));
+ } else {
+ self.validate(attributes, handler);
+ }
},
// -- Protected Event Handlers ---------------------------------------------
@@ -808,4 +970,4 @@ Y.Model = Y.extend(Model, Y.Base, {
});
-}, '3.4.1' ,{requires:['base-build', 'escape', 'json-parse']});
+}, '3.5.0' ,{requires:['base-build', 'escape', 'json-parse']});
diff --git a/lib/yui/3.4.1/build/node-base/node-base-debug.js b/lib/yui/3.5.0/build/node-base/node-base-debug.js
similarity index 77%
rename from lib/yui/3.4.1/build/node-base/node-base-debug.js
rename to lib/yui/3.5.0/build/node-base/node-base-debug.js
index e7216d09e7c..b6fa77cdb9e 100644
--- a/lib/yui/3.4.1/build/node-base/node-base-debug.js
+++ b/lib/yui/3.5.0/build/node-base/node-base-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -234,7 +234,10 @@ Y.mix(Y_Node.prototype, {
/**
* Replaces the node's current content with the content.
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
* @method setContent
+ * @deprecated Use setHTML
* @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
* @chainable
*/
@@ -246,6 +249,7 @@ Y.mix(Y_Node.prototype, {
/**
* Returns the node's current content (e.g. innerHTML)
* @method getContent
+ * @deprecated Use getHTML
* @return {String} The current content
*/
getContent: function(content) {
@@ -253,6 +257,23 @@ Y.mix(Y_Node.prototype, {
}
});
+/**
+ * Replaces the node's current html content with the content provided.
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ * @method setHTML
+ * @param {String | HTML | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
+ * @chainable
+ */
+Y.Node.prototype.setHTML = Y.Node.prototype.setContent;
+
+/**
+ * Returns the node's current html content (e.g. innerHTML)
+ * @method getHTML
+ * @return {String} The html content
+ */
+Y.Node.prototype.getHTML = Y.Node.prototype.getContent;
+
Y.NodeList.importMethod(Y.Node.prototype, [
/**
* Called on each Node instance
@@ -289,16 +310,30 @@ Y.NodeList.importMethod(Y.Node.prototype, [
'prepend',
/** Called on each Node instance
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
* @method setContent
- * @see Node.setContent
+ * @deprecated Use setHTML
*/
'setContent',
/** Called on each Node instance
* @method getContent
- * @see Node.getContent
+ * @deprecated Use getHTML
*/
- 'getContent'
+ 'getContent',
+
+ /** Called on each Node instance
+ * @method setHTML
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ */
+ 'setHTML',
+
+ /** Called on each Node instance
+ * @method getHTML
+ */
+ 'getHTML'
]);
/**
* @module node
@@ -372,7 +407,7 @@ Y_Node.ATTRS = {
children = [];
for (i = 0, len = childNodes.length; i < len; ++i) {
- if (childNodes[i][TAG_NAME]) {
+ if (childNodes[i].tagName) {
children[children.length] = childNodes[i];
}
}
@@ -754,8 +789,20 @@ Y.mix(Y_Node.prototype, {
return Y.DOM.getStyle(this._node, 'display') === 'none';
},
+ /**
+ * Displays or hides the node.
+ * If the "transition" module is loaded, toggleView optionally
+ * animates the toggling of the node using either the default
+ * transition effect ('fadeIn'), or the given named effect.
+ * @method toggleView
+ * @for Node
+ * @param {Boolean} [on] An optional boolean value to force the node to be shown or hidden
+ * @param {Function} [callback] An optional function to run after the transition completes.
+ * @chainable
+ */
toggleView: function(on, callback) {
this._toggleView.apply(this, arguments);
+ return this;
},
_toggleView: function(on, callback) {
@@ -836,6 +883,16 @@ Y.NodeList.importMethod(Y.Node.prototype, [
*/
'hide',
+ /**
+ * Displays or hides each node.
+ * If the "transition" module is loaded, toggleView optionally
+ * animates the toggling of the nodes using either the default
+ * transition effect ('fadeIn'), or the given named effect.
+ * @method toggleView
+ * @param {Boolean} [on] An optional boolean value to force the nodes to be shown or hidden
+ * @param {Function} [callback] An optional function to run after the transition completes.
+ * @chainable
+ */
'toggleView'
]);
@@ -900,6 +957,171 @@ if (Y.config.doc.createElement('form').elements.nodeType) {
};
}
+/**
+ * Provides methods for managing custom Node data.
+ *
+ * @module node
+ * @main node
+ * @submodule node-data
+ */
+
+Y.mix(Y.Node.prototype, {
+ _initData: function() {
+ if (! ('_data' in this)) {
+ this._data = {};
+ }
+ },
+
+ /**
+ * @method getData
+ * @description Retrieves arbitrary data stored on a Node instance.
+ * If no data is associated with the Node, it will attempt to retrieve
+ * a value from the corresponding HTML data attribute. (e.g. node.getData('foo')
+ * will check node.getAttribute('data-foo')).
+ * @param {string} name Optional name of the data field to retrieve.
+ * If no name is given, all data is returned.
+ * @return {any | Object} Whatever is stored at the given field,
+ * or an object hash of all fields.
+ */
+ getData: function(name) {
+ this._initData();
+ var data = this._data,
+ ret = data;
+
+ if (arguments.length) { // single field
+ if (name in data) {
+ ret = data[name];
+ } else { // initialize from HTML attribute
+ ret = this._getDataAttribute(name);
+ }
+ } else if (typeof data == 'object' && data !== null) { // all fields
+ ret = {};
+ Y.Object.each(data, function(v, n) {
+ ret[n] = v;
+ });
+
+ ret = this._getDataAttributes(ret);
+ }
+
+ return ret;
+
+ },
+
+ _getDataAttributes: function(ret) {
+ ret = ret || {};
+ var i = 0,
+ attrs = this._node.attributes,
+ len = attrs.length,
+ prefix = this.DATA_PREFIX,
+ prefixLength = prefix.length,
+ name;
+
+ while (i < len) {
+ name = attrs[i].name;
+ if (name.indexOf(prefix) === 0) {
+ name = name.substr(prefixLength);
+ if (!(name in ret)) { // only merge if not already stored
+ ret[name] = this._getDataAttribute(name);
+ }
+ }
+
+ i += 1;
+ }
+
+ return ret;
+ },
+
+ _getDataAttribute: function(name) {
+ var name = this.DATA_PREFIX + name,
+ node = this._node,
+ attrs = node.attributes,
+ data = attrs && attrs[name] && attrs[name].value;
+
+ return data;
+ },
+
+ /**
+ * @method setData
+ * @description Stores arbitrary data on a Node instance.
+ * This is not stored with the DOM node.
+ * @param {string} name The name of the field to set. If no name
+ * is given, name is treated as the data and overrides any existing data.
+ * @param {any} val The value to be assigned to the field.
+ * @chainable
+ */
+ setData: function(name, val) {
+ this._initData();
+ if (arguments.length > 1) {
+ this._data[name] = val;
+ } else {
+ this._data = name;
+ }
+
+ return this;
+ },
+
+ /**
+ * @method clearData
+ * @description Clears internally stored data.
+ * @param {string} name The name of the field to clear. If no name
+ * is given, all data is cleared.
+ * @chainable
+ */
+ clearData: function(name) {
+ if ('_data' in this) {
+ if (typeof name != 'undefined') {
+ delete this._data[name];
+ } else {
+ delete this._data;
+ }
+ }
+
+ return this;
+ }
+});
+
+Y.mix(Y.NodeList.prototype, {
+ /**
+ * @method getData
+ * @description Retrieves arbitrary data stored on each Node instance
+ * bound to the NodeList.
+ * @see Node
+ * @param {string} name Optional name of the data field to retrieve.
+ * If no name is given, all data is returned.
+ * @return {Array} An array containing all of the data for each Node instance.
+ * or an object hash of all fields.
+ */
+ getData: function(name) {
+ var args = (arguments.length) ? [name] : [];
+ return this._invoke('getData', args, true);
+ },
+
+ /**
+ * @method setData
+ * @description Stores arbitrary data on each Node instance bound to the
+ * NodeList. This is not stored with the DOM node.
+ * @param {string} name The name of the field to set. If no name
+ * is given, name is treated as the data and overrides any existing data.
+ * @param {any} val The value to be assigned to the field.
+ * @chainable
+ */
+ setData: function(name, val) {
+ var args = (arguments.length > 1) ? [name, val] : [name];
+ return this._invoke('setData', args);
+ },
+
+ /**
+ * @method clearData
+ * @description Clears data on all Node instances bound to the NodeList.
+ * @param {string} name The name of the field to clear. If no name
+ * is given, all data is cleared.
+ * @chainable
+ */
+ clearData: function(name) {
+ var args = (arguments.length) ? [name] : [];
+ return this._invoke('clearData', [name]);
+ }
+});
-}, '3.4.1' ,{requires:['dom-base', 'node-core', 'event-base']});
+}, '3.5.0' ,{requires:['dom-base', 'node-core', 'event-base']});
diff --git a/lib/yui/3.5.0/build/node-base/node-base-min.js b/lib/yui/3.5.0/build/node-base/node-base-min.js
new file mode 100644
index 00000000000..f81f2105f1b
--- /dev/null
+++ b/lib/yui/3.5.0/build/node-base/node-base-min.js
@@ -0,0 +1,8 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("node-base",function(e){var d=["hasClass","addClass","removeClass","replaceClass","toggleClass"];e.Node.importMethod(e.DOM,d);e.NodeList.importMethod(e.Node.prototype,d);var c=e.Node,b=e.DOM;c.create=function(f,g){if(g&&g._node){g=g._node;}return e.one(b.create(f,g));};e.mix(c.prototype,{create:c.create,insert:function(g,f){this._insert(g,f);return this;},_insert:function(i,g){var h=this._node,f=null;if(typeof g=="number"){g=this._node.childNodes[g];}else{if(g&&g._node){g=g._node;}}if(i&&typeof i!="string"){i=i._node||i._nodes||i;}f=b.addHTML(h,i,g);return f;},prepend:function(f){return this.insert(f,0);},append:function(f){return this.insert(f,null);},appendChild:function(f){return c.scrubVal(this._insert(f));},insertBefore:function(g,f){return e.Node.scrubVal(this._insert(g,f));},appendTo:function(f){e.one(f).append(this);return this;},setContent:function(f){this._insert(f,"replace");return this;},getContent:function(f){return this.get("innerHTML");}});e.Node.prototype.setHTML=e.Node.prototype.setContent;e.Node.prototype.getHTML=e.Node.prototype.getContent;e.NodeList.importMethod(e.Node.prototype,["append","insert","appendChild","insertBefore","prepend","setContent","getContent","setHTML","getHTML"]);var c=e.Node,b=e.DOM;c.ATTRS={text:{getter:function(){return b.getText(this._node);},setter:function(f){b.setText(this._node,f);return f;}},"for":{getter:function(){return b.getAttribute(this._node,"for");},setter:function(f){b.setAttribute(this._node,"for",f);return f;}},"options":{getter:function(){return this._node.getElementsByTagName("option");}},"children":{getter:function(){var j=this._node,h=j.children,k,g,f;if(!h){k=j.childNodes;h=[];for(g=0,f=k.length;g1){this._data[f]=g;}else{this._data=f;}return this;},clearData:function(f){if("_data" in this){if(typeof f!="undefined"){delete this._data[f];
+}else{delete this._data;}}return this;}});e.mix(e.NodeList.prototype,{getData:function(g){var f=(arguments.length)?[g]:[];return this._invoke("getData",f,true);},setData:function(g,h){var f=(arguments.length>1)?[g,h]:[g];return this._invoke("setData",f);},clearData:function(g){var f=(arguments.length)?[g]:[];return this._invoke("clearData",[g]);}});},"3.5.0",{requires:["dom-base","node-core","event-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-base/node-base.js b/lib/yui/3.5.0/build/node-base/node-base.js
similarity index 77%
rename from lib/yui/3.4.1/build/node-base/node-base.js
rename to lib/yui/3.5.0/build/node-base/node-base.js
index 29a809e2c4f..40b93c6315d 100644
--- a/lib/yui/3.4.1/build/node-base/node-base.js
+++ b/lib/yui/3.5.0/build/node-base/node-base.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -234,7 +234,10 @@ Y.mix(Y_Node.prototype, {
/**
* Replaces the node's current content with the content.
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
* @method setContent
+ * @deprecated Use setHTML
* @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
* @chainable
*/
@@ -246,6 +249,7 @@ Y.mix(Y_Node.prototype, {
/**
* Returns the node's current content (e.g. innerHTML)
* @method getContent
+ * @deprecated Use getHTML
* @return {String} The current content
*/
getContent: function(content) {
@@ -253,6 +257,23 @@ Y.mix(Y_Node.prototype, {
}
});
+/**
+ * Replaces the node's current html content with the content provided.
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ * @method setHTML
+ * @param {String | HTML | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
+ * @chainable
+ */
+Y.Node.prototype.setHTML = Y.Node.prototype.setContent;
+
+/**
+ * Returns the node's current html content (e.g. innerHTML)
+ * @method getHTML
+ * @return {String} The html content
+ */
+Y.Node.prototype.getHTML = Y.Node.prototype.getContent;
+
Y.NodeList.importMethod(Y.Node.prototype, [
/**
* Called on each Node instance
@@ -289,16 +310,30 @@ Y.NodeList.importMethod(Y.Node.prototype, [
'prepend',
/** Called on each Node instance
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
* @method setContent
- * @see Node.setContent
+ * @deprecated Use setHTML
*/
'setContent',
/** Called on each Node instance
* @method getContent
- * @see Node.getContent
+ * @deprecated Use getHTML
*/
- 'getContent'
+ 'getContent',
+
+ /** Called on each Node instance
+ * @method setHTML
+ * Note that this passes to innerHTML and is not escaped.
+ * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
+ */
+ 'setHTML',
+
+ /** Called on each Node instance
+ * @method getHTML
+ */
+ 'getHTML'
]);
/**
* @module node
@@ -372,7 +407,7 @@ Y_Node.ATTRS = {
children = [];
for (i = 0, len = childNodes.length; i < len; ++i) {
- if (childNodes[i][TAG_NAME]) {
+ if (childNodes[i].tagName) {
children[children.length] = childNodes[i];
}
}
@@ -754,8 +789,20 @@ Y.mix(Y_Node.prototype, {
return Y.DOM.getStyle(this._node, 'display') === 'none';
},
+ /**
+ * Displays or hides the node.
+ * If the "transition" module is loaded, toggleView optionally
+ * animates the toggling of the node using either the default
+ * transition effect ('fadeIn'), or the given named effect.
+ * @method toggleView
+ * @for Node
+ * @param {Boolean} [on] An optional boolean value to force the node to be shown or hidden
+ * @param {Function} [callback] An optional function to run after the transition completes.
+ * @chainable
+ */
toggleView: function(on, callback) {
this._toggleView.apply(this, arguments);
+ return this;
},
_toggleView: function(on, callback) {
@@ -836,6 +883,16 @@ Y.NodeList.importMethod(Y.Node.prototype, [
*/
'hide',
+ /**
+ * Displays or hides each node.
+ * If the "transition" module is loaded, toggleView optionally
+ * animates the toggling of the nodes using either the default
+ * transition effect ('fadeIn'), or the given named effect.
+ * @method toggleView
+ * @param {Boolean} [on] An optional boolean value to force the nodes to be shown or hidden
+ * @param {Function} [callback] An optional function to run after the transition completes.
+ * @chainable
+ */
'toggleView'
]);
@@ -898,6 +955,171 @@ if (Y.config.doc.createElement('form').elements.nodeType) {
};
}
+/**
+ * Provides methods for managing custom Node data.
+ *
+ * @module node
+ * @main node
+ * @submodule node-data
+ */
+
+Y.mix(Y.Node.prototype, {
+ _initData: function() {
+ if (! ('_data' in this)) {
+ this._data = {};
+ }
+ },
+
+ /**
+ * @method getData
+ * @description Retrieves arbitrary data stored on a Node instance.
+ * If no data is associated with the Node, it will attempt to retrieve
+ * a value from the corresponding HTML data attribute. (e.g. node.getData('foo')
+ * will check node.getAttribute('data-foo')).
+ * @param {string} name Optional name of the data field to retrieve.
+ * If no name is given, all data is returned.
+ * @return {any | Object} Whatever is stored at the given field,
+ * or an object hash of all fields.
+ */
+ getData: function(name) {
+ this._initData();
+ var data = this._data,
+ ret = data;
+
+ if (arguments.length) { // single field
+ if (name in data) {
+ ret = data[name];
+ } else { // initialize from HTML attribute
+ ret = this._getDataAttribute(name);
+ }
+ } else if (typeof data == 'object' && data !== null) { // all fields
+ ret = {};
+ Y.Object.each(data, function(v, n) {
+ ret[n] = v;
+ });
+
+ ret = this._getDataAttributes(ret);
+ }
+
+ return ret;
+
+ },
+
+ _getDataAttributes: function(ret) {
+ ret = ret || {};
+ var i = 0,
+ attrs = this._node.attributes,
+ len = attrs.length,
+ prefix = this.DATA_PREFIX,
+ prefixLength = prefix.length,
+ name;
+
+ while (i < len) {
+ name = attrs[i].name;
+ if (name.indexOf(prefix) === 0) {
+ name = name.substr(prefixLength);
+ if (!(name in ret)) { // only merge if not already stored
+ ret[name] = this._getDataAttribute(name);
+ }
+ }
+
+ i += 1;
+ }
+
+ return ret;
+ },
+
+ _getDataAttribute: function(name) {
+ var name = this.DATA_PREFIX + name,
+ node = this._node,
+ attrs = node.attributes,
+ data = attrs && attrs[name] && attrs[name].value;
+
+ return data;
+ },
+
+ /**
+ * @method setData
+ * @description Stores arbitrary data on a Node instance.
+ * This is not stored with the DOM node.
+ * @param {string} name The name of the field to set. If no name
+ * is given, name is treated as the data and overrides any existing data.
+ * @param {any} val The value to be assigned to the field.
+ * @chainable
+ */
+ setData: function(name, val) {
+ this._initData();
+ if (arguments.length > 1) {
+ this._data[name] = val;
+ } else {
+ this._data = name;
+ }
+
+ return this;
+ },
+
+ /**
+ * @method clearData
+ * @description Clears internally stored data.
+ * @param {string} name The name of the field to clear. If no name
+ * is given, all data is cleared.
+ * @chainable
+ */
+ clearData: function(name) {
+ if ('_data' in this) {
+ if (typeof name != 'undefined') {
+ delete this._data[name];
+ } else {
+ delete this._data;
+ }
+ }
+
+ return this;
+ }
+});
+
+Y.mix(Y.NodeList.prototype, {
+ /**
+ * @method getData
+ * @description Retrieves arbitrary data stored on each Node instance
+ * bound to the NodeList.
+ * @see Node
+ * @param {string} name Optional name of the data field to retrieve.
+ * If no name is given, all data is returned.
+ * @return {Array} An array containing all of the data for each Node instance.
+ * or an object hash of all fields.
+ */
+ getData: function(name) {
+ var args = (arguments.length) ? [name] : [];
+ return this._invoke('getData', args, true);
+ },
+
+ /**
+ * @method setData
+ * @description Stores arbitrary data on each Node instance bound to the
+ * NodeList. This is not stored with the DOM node.
+ * @param {string} name The name of the field to set. If no name
+ * is given, name is treated as the data and overrides any existing data.
+ * @param {any} val The value to be assigned to the field.
+ * @chainable
+ */
+ setData: function(name, val) {
+ var args = (arguments.length > 1) ? [name, val] : [name];
+ return this._invoke('setData', args);
+ },
+
+ /**
+ * @method clearData
+ * @description Clears data on all Node instances bound to the NodeList.
+ * @param {string} name The name of the field to clear. If no name
+ * is given, all data is cleared.
+ * @chainable
+ */
+ clearData: function(name) {
+ var args = (arguments.length) ? [name] : [];
+ return this._invoke('clearData', [name]);
+ }
+});
-}, '3.4.1' ,{requires:['dom-base', 'node-core', 'event-base']});
+}, '3.5.0' ,{requires:['dom-base', 'node-core', 'event-base']});
diff --git a/lib/yui/3.4.1/build/node-core/node-core-debug.js b/lib/yui/3.5.0/build/node-core/node-core-debug.js
similarity index 91%
rename from lib/yui/3.4.1/build/node-core/node-core-debug.js
rename to lib/yui/3.5.0/build/node-core/node-core-debug.js
index f69491e3f53..340bd09c630 100644
--- a/lib/yui/3.4.1/build/node-core/node-core-debug.js
+++ b/lib/yui/3.5.0/build/node-core/node-core-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -201,11 +201,11 @@ Y_Node.addMethod = function(name, fn, context) {
node = this,
ret;
- if (args[0] && Y.instanceOf(args[0], Y_Node)) {
+ if (args[0] && args[0]._node) {
args[0] = args[0]._node;
}
- if (args[1] && Y.instanceOf(args[1], Y_Node)) {
+ if (args[1] && args[1]._node) {
args[1] = args[1]._node;
}
args.unshift(node._node);
@@ -354,6 +354,8 @@ Y_Node.DEFAULT_GETTER = function(name) {
};
Y.mix(Y_Node.prototype, {
+ DATA_PREFIX: 'data-',
+
/**
* The method called when outputting Node instances as strings
* @method toString
@@ -508,7 +510,7 @@ Y.mix(Y_Node.prototype, {
compareTo: function(refNode) {
var node = this._node;
- if (Y.instanceOf(refNode, Y_Node)) {
+ if (refNode && refNode._node) {
refNode = refNode._node;
}
return node === refNode;
@@ -755,11 +757,11 @@ Y.mix(Y_Node.prototype, {
var node = this._node,
ret;
- if (a && Y.instanceOf(a, Y_Node)) {
+ if (a && a._node) {
a = a._node;
}
- if (b && Y.instanceOf(b, Y_Node)) {
+ if (b && b._node) {
b = b._node;
}
@@ -796,67 +798,6 @@ Y.mix(Y_Node.prototype, {
},
- /**
- * @method getData
- * @description Retrieves arbitrary data stored on a Node instance.
- * This is not stored with the DOM node.
- * @param {string} name Optional name of the data field to retrieve.
- * If no name is given, all data is returned.
- * @return {any | Object} Whatever is stored at the given field,
- * or an object hash of all fields.
- */
- getData: function(name) {
- var ret;
- this._data = this._data || {};
- if (arguments.length) {
- ret = this._data[name];
- } else {
- ret = this._data;
- }
-
- return ret;
-
- },
-
- /**
- * @method setData
- * @description Stores arbitrary data on a Node instance.
- * This is not stored with the DOM node.
- * @param {string} name The name of the field to set. If no name
- * is given, name is treated as the data and overrides any existing data.
- * @param {any} val The value to be assigned to the field.
- * @chainable
- */
- setData: function(name, val) {
- this._data = this._data || {};
- if (arguments.length > 1) {
- this._data[name] = val;
- } else {
- this._data = name;
- }
-
- return this;
- },
-
- /**
- * @method clearData
- * @description Clears stored data.
- * @param {string} name The name of the field to clear. If no name
- * is given, all data is cleared.
- * @chainable
- */
- clearData: function(name) {
- if ('_data' in this) {
- if (name) {
- delete this._data[name];
- } else {
- delete this._data;
- }
- }
-
- return this;
- },
-
hasMethod: function(method) {
var node = this._node;
return !!(node && method in node &&
@@ -1014,6 +955,19 @@ NodeList._getTempNode = function(node) {
};
Y.mix(NodeList.prototype, {
+ _invoke: function(method, args, getter) {
+ var ret = (getter) ? [] : this;
+
+ this.each(function(node) {
+ var val = node[method].apply(node, args);
+ if (getter) {
+ ret.push(val);
+ }
+ });
+
+ return ret;
+ },
+
/**
* Retrieves the Node instance at the given index.
* @method item
@@ -1175,68 +1129,6 @@ Y.mix(NodeList.prototype, {
return this;
},
- _prepEvtArgs: function(type, fn, context) {
- // map to Y.on/after signature (type, fn, nodes, context, arg1, arg2, etc)
- var args = Y.Array(arguments, 0, true);
-
- if (args.length < 2) { // type only (event hash) just add nodes
- args[2] = this._nodes;
- } else {
- args.splice(2, 0, this._nodes);
- }
-
- args[3] = context || this; // default to NodeList instance as context
-
- return args;
- },
-
- /**
- * Applies an event listener to each Node bound to the NodeList.
- * @method on
- * @param {String} type The event being listened for
- * @param {Function} fn The handler to call when the event fires
- * @param {Object} context The context to call the handler with.
- * Default is the NodeList instance.
- * @param {Object} context The context to call the handler with.
- * param {mixed} arg* 0..n additional arguments to supply to the subscriber
- * when the event fires.
- * @return {Object} Returns an event handle that can later be use to detach().
- * @see Event.on
- */
- on: function(type, fn, context) {
- return Y.on.apply(Y, this._prepEvtArgs.apply(this, arguments));
- },
-
- /**
- * Applies an one-time event listener to each Node bound to the NodeList.
- * @method once
- * @param {String} type The event being listened for
- * @param {Function} fn The handler to call when the event fires
- * @param {Object} context The context to call the handler with.
- * Default is the NodeList instance.
- * @return {Object} Returns an event handle that can later be use to detach().
- * @see Event.on
- */
- once: function(type, fn, context) {
- return Y.once.apply(Y, this._prepEvtArgs.apply(this, arguments));
- },
-
- /**
- * Applies an event listener to each Node bound to the NodeList.
- * The handler is called only after all on() handlers are called
- * and the event is not prevented.
- * @method after
- * @param {String} type The event being listened for
- * @param {Function} fn The handler to call when the event fires
- * @param {Object} context The context to call the handler with.
- * Default is the NodeList instance.
- * @return {Object} Returns an event handle that can later be use to detach().
- * @see Event.on
- */
- after: function(type, fn, context) {
- return Y.after.apply(Y, this._prepEvtArgs.apply(this, arguments));
- },
-
/**
* Returns the current number of items in the NodeList.
* @method size
@@ -1586,7 +1478,6 @@ Y.Node.importMethod(Y.DOM, [
* This passes through to the DOM node, allowing for custom attributes.
* @method setAttribute
* @for Node
- * @for NodeList
* @chainable
* @param {string} name The attribute name
* @param {string} value The value to set
@@ -1597,7 +1488,6 @@ Y.Node.importMethod(Y.DOM, [
* This passes through to the DOM node, allowing for custom attributes.
* @method getAttribute
* @for Node
- * @for NodeList
* @param {string} name The attribute name
* @return {string} The attribute value
*/
@@ -1683,4 +1573,4 @@ Y.NodeList.importMethod(Y.Node.prototype, [
]);
-}, '3.4.1' ,{requires:['dom-core', 'selector']});
+}, '3.5.0' ,{requires:['dom-core', 'selector']});
diff --git a/lib/yui/3.5.0/build/node-core/node-core-min.js b/lib/yui/3.5.0/build/node-core/node-core-min.js
new file mode 100644
index 00000000000..c0130582a35
--- /dev/null
+++ b/lib/yui/3.5.0/build/node-core/node-core-min.js
@@ -0,0 +1,8 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("node-core",function(c){var j=".",e="nodeName",n="nodeType",b="ownerDocument",m="tagName",d="_yuid",i={},p=Array.prototype.slice,f=c.DOM,k=function(r){if(!this.getDOMNode){return new k(r);}if(typeof r=="string"){r=k._fromString(r);if(!r){return null;}}var q=(r.nodeType!==9)?r.uniqueID:r[d];if(q&&k._instances[q]&&k._instances[q]._node!==r){r[d]=null;}q=q||c.stamp(r);if(!q){q=c.guid();}this[d]=q;this._node=r;this._stateProxy=r;if(this._initPlugins){this._initPlugins();}},o=function(r){var q=null;if(r){q=(typeof r=="string")?function(s){return c.Selector.test(s,r);}:function(s){return r(c.one(s));};}return q;};k.ATTRS={};k.DOM_EVENTS={};k._fromString=function(q){if(q){if(q.indexOf("doc")===0){q=c.config.doc;}else{if(q.indexOf("win")===0){q=c.config.win;}else{q=c.Selector.query(q,null,true);}}}return q||null;};k.NAME="node";k.re_aria=/^(?:role$|aria-)/;k.SHOW_TRANSITION="fadeIn";k.HIDE_TRANSITION="fadeOut";k._instances={};k.getDOMNode=function(q){if(q){return(q.nodeType)?q:q._node||null;}return null;};k.scrubVal=function(r,q){if(r){if(typeof r=="object"||typeof r=="function"){if(n in r||f.isWindow(r)){r=c.one(r);}else{if((r.item&&!r._nodes)||(r[0]&&r[0][n])){r=c.all(r);}}}}else{if(typeof r==="undefined"){r=q;}else{if(r===null){r=null;}}}return r;};k.addMethod=function(q,s,r){if(q&&s&&typeof s=="function"){k.prototype[q]=function(){var u=p.call(arguments),v=this,t;if(u[0]&&u[0]._node){u[0]=u[0]._node;}if(u[1]&&u[1]._node){u[1]=u[1]._node;}u.unshift(v._node);t=s.apply(v,u);if(t){t=k.scrubVal(t,v);}(typeof t!="undefined")||(t=v);return t;};}else{}};k.importMethod=function(s,q,r){if(typeof q=="string"){r=r||q;k.addMethod(r,s[q],s);}else{c.Array.each(q,function(t){k.importMethod(s,t);});}};k.one=function(t){var q=null,s,r;if(t){if(typeof t=="string"){t=k._fromString(t);if(!t){return null;}}else{if(t.getDOMNode){return t;}}if(t.nodeType||c.DOM.isWindow(t)){r=(t.uniqueID&&t.nodeType!==9)?t.uniqueID:t._yuid;q=k._instances[r];s=q?q._node:null;if(!q||(s&&t!==s)){q=new k(t);if(t.nodeType!=11){k._instances[q[d]]=q;}}}}return q;};k.DEFAULT_SETTER=function(q,s){var r=this._stateProxy,t;if(q.indexOf(j)>-1){t=q;q=q.split(j);c.Object.setValue(r,q,s);}else{if(typeof r[q]!="undefined"){r[q]=s;}}return s;};k.DEFAULT_GETTER=function(q){var r=this._stateProxy,s;if(q.indexOf&&q.indexOf(j)>-1){s=c.Object.getValue(r,q.split(j));}else{if(typeof r[q]!="undefined"){s=r[q];}}return s;};c.mix(k.prototype,{DATA_PREFIX:"data-",toString:function(){var t=this[d]+": not bound to a node",s=this._node,q,u,r;if(s){q=s.attributes;u=(q&&q.id)?s.getAttribute("id"):null;r=(q&&q.className)?s.getAttribute("className"):null;t=s[e];if(u){t+="#"+u;}if(r){t+="."+r.replace(" ",".");}t+=" "+this[d];}return t;},get:function(q){var r;if(this._getAttr){r=this._getAttr(q);}else{r=this._get(q);}if(r){r=k.scrubVal(r,this);}else{if(r===null){r=null;}}return r;},_get:function(q){var r=k.ATTRS[q],s;if(r&&r.getter){s=r.getter.call(this);}else{if(k.re_aria.test(q)){s=this._node.getAttribute(q,2);}else{s=k.DEFAULT_GETTER.apply(this,arguments);}}return s;},set:function(q,s){var r=k.ATTRS[q];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(r&&r.setter){r.setter.call(this,s,q);}else{if(k.re_aria.test(q)){this._node.setAttribute(q,s);}else{k.DEFAULT_SETTER.apply(this,arguments);}}}return this;},setAttrs:function(q){if(this._setAttrs){this._setAttrs(q);}else{c.Object.each(q,function(r,s){this.set(s,r);},this);}return this;},getAttrs:function(r){var q={};if(this._getAttrs){this._getAttrs(r);}else{c.Array.each(r,function(s,t){q[s]=this.get(s);},this);}return q;},compareTo:function(q){var r=this._node;if(q&&q._node){q=q._node;}return r===q;},inDoc:function(r){var q=this._node;r=(r)?r._node||r:q[b];if(r.documentElement){return f.contains(r.documentElement,q);}},getById:function(s){var r=this._node,q=f.byId(s,r[b]);if(q&&f.contains(r,q)){q=c.one(q);}else{q=null;}return q;},ancestor:function(q,s,r){if(arguments.length===2&&(typeof s=="string"||typeof s=="function")){r=s;}return c.one(f.ancestor(this._node,o(q),s,o(r)));},ancestors:function(q,s,r){if(arguments.length===2&&(typeof s=="string"||typeof s=="function")){r=s;}return c.all(f.ancestors(this._node,o(q),s,o(r)));},previous:function(r,q){return c.one(f.elementByAxis(this._node,"previousSibling",o(r),q));},next:function(r,q){return c.one(f.elementByAxis(this._node,"nextSibling",o(r),q));},siblings:function(q){return c.all(f.siblings(this._node,o(q)));},one:function(q){return c.one(c.Selector.query(q,this._node,true));},all:function(q){var r=c.all(c.Selector.query(q,this._node));r._query=q;r._queryRoot=this._node;return r;},test:function(q){return c.Selector.test(this._node,q);},remove:function(q){var r=this._node;if(r&&r.parentNode){r.parentNode.removeChild(r);}if(q){this.destroy();}return this;},replace:function(q){var r=this._node;if(typeof q=="string"){q=k.create(q);}r.parentNode.replaceChild(k.getDOMNode(q),r);return this;},replaceChild:function(r,q){if(typeof r=="string"){r=f.create(r);}return c.one(this._node.replaceChild(k.getDOMNode(r),k.getDOMNode(q)));},destroy:function(s){var r=c.config.doc.uniqueID?"uniqueID":"_yuid",q;this.purge();if(this.unplug){this.unplug();}this.clearData();if(s){c.NodeList.each(this.all("*"),function(t){q=k._instances[t[r]];if(q){q.destroy();}});}this._node=null;this._stateProxy=null;delete k._instances[this._yuid];},invoke:function(x,r,q,w,v,u){var t=this._node,s;if(r&&r._node){r=r._node;}if(q&&q._node){q=q._node;}s=t[x](r,q,w,v,u);return k.scrubVal(s,this);},swap:c.config.doc.documentElement.swapNode?function(q){this._node.swapNode(k.getDOMNode(q));}:function(q){q=k.getDOMNode(q);var s=this._node,r=q.parentNode,t=q.nextSibling;if(t===s){r.insertBefore(s,q);}else{if(q===s.nextSibling){r.insertBefore(q,s);}else{s.parentNode.replaceChild(q,s);f.addHTML(r,s,t);}}return this;},hasMethod:function(r){var q=this._node;return !!(q&&r in q&&typeof q[r]!="unknown"&&(typeof q[r]=="function"||String(q[r]).indexOf("function")===1));},isFragment:function(){return(this.get("nodeType")===11);
+},empty:function(){this.get("childNodes").remove().destroy(true);return this;},getDOMNode:function(){return this._node;}},true);c.Node=k;c.one=k.one;var a=function(q){var r=[];if(q){if(typeof q==="string"){this._query=q;q=c.Selector.query(q);}else{if(q.nodeType||f.isWindow(q)){q=[q];}else{if(q._node){q=[q._node];}else{if(q[0]&&q[0]._node){c.Array.each(q,function(s){if(s._node){r.push(s._node);}});q=r;}else{q=c.Array(q,0,true);}}}}}this._nodes=q||[];};a.NAME="NodeList";a.getDOMNodes=function(q){return(q&&q._nodes)?q._nodes:q;};a.each=function(q,t,s){var r=q._nodes;if(r&&r.length){c.Array.each(r,t,s||q);}else{}};a.addMethod=function(q,s,r){if(q&&s){a.prototype[q]=function(){var u=[],t=arguments;c.Array.each(this._nodes,function(z){var y=(z.uniqueID&&z.nodeType!==9)?"uniqueID":"_yuid",w=c.Node._instances[z[y]],x,v;if(!w){w=a._getTempNode(z);}x=r||w;v=s.apply(x,t);if(v!==undefined&&v!==w){u[u.length]=v;}});return u.length?u:this;};}else{}};a.importMethod=function(s,q,r){if(typeof q==="string"){r=r||q;a.addMethod(q,s[q]);}else{c.Array.each(q,function(t){a.importMethod(s,t);});}};a._getTempNode=function(r){var q=a._tempNode;if(!q){q=c.Node.create("");a._tempNode=q;}q._node=r;q._stateProxy=r;return q;};c.mix(a.prototype,{_invoke:function(t,s,q){var r=(q)?[]:this;this.each(function(u){var v=u[t].apply(u,s);if(q){r.push(v);}});return r;},item:function(q){return c.one((this._nodes||[])[q]);},each:function(s,r){var q=this;c.Array.each(this._nodes,function(u,t){u=c.one(u);return s.call(r||u,u,t,q);});return q;},batch:function(r,q){var s=this;c.Array.each(this._nodes,function(v,u){var t=c.Node._instances[v[d]];if(!t){t=a._getTempNode(v);}return r.call(q||t,t,u,s);});return s;},some:function(s,r){var q=this;return c.Array.some(this._nodes,function(u,t){u=c.one(u);r=r||u;return s.call(r,u,t,q);});},toFrag:function(){return c.one(c.DOM._nl2frag(this._nodes));},indexOf:function(q){return c.Array.indexOf(this._nodes,c.Node.getDOMNode(q));},filter:function(q){return c.all(c.Selector.filter(this._nodes,q));},modulus:function(t,s){s=s||0;var q=[];a.each(this,function(u,r){if(r%t===s){q.push(u);}});return c.all(q);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){},refresh:function(){var t,r=this._nodes,s=this._query,q=this._queryRoot;if(s){if(!q){if(r&&r[0]&&r[0].ownerDocument){q=r[0].ownerDocument;}}this._nodes=c.Selector.query(s,q);}return this;},size:function(){return this._nodes.length;},isEmpty:function(){return this._nodes.length<1;},toString:function(){var t="",s=this[d]+": not bound to any nodes",q=this._nodes,r;if(q&&q[0]){r=q[0];t+=r[e];if(r.id){t+="#"+r.id;}if(r.className){t+="."+r.className.replace(" ",".");}if(q.length>1){t+="...["+q.length+" items]";}}return t||s;},getDOMNodes:function(){return this._nodes;}},true);a.importMethod(c.Node.prototype,["destroy","empty","remove","set"]);a.prototype.get=function(r){var u=[],t=this._nodes,s=false,v=a._getTempNode,q,w;if(t[0]){q=c.Node._instances[t[0]._yuid]||v(t[0]);w=q._get(r);if(w&&w.nodeType){s=true;}}c.Array.each(t,function(x){q=c.Node._instances[x._yuid];if(!q){q=v(x);}w=q._get(r);if(!s){w=c.Node.scrubVal(w,q);}u.push(w);});return(s)?c.all(u):u;};c.NodeList=a;c.all=function(q){return new a(q);};c.Node.all=c.all;var l=c.NodeList,h=Array.prototype,g={"concat":1,"pop":0,"push":0,"shift":0,"slice":1,"splice":1,"unshift":0};c.Object.each(g,function(r,q){l.prototype[q]=function(){var u=[],v=0,s,t;while(typeof(s=arguments[v++])!="undefined"){u.push(s._node||s._nodes||s);}t=h[q].apply(this._nodes,u);if(r){t=c.all(t);}else{t=c.Node.scrubVal(t);}return t;};});c.Array.each(["removeChild","hasChildNodes","cloneNode","hasAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select","createCaption"],function(q){c.Node.prototype[q]=function(u,s,r){var t=this.invoke(q,u,s,r);return t;};});c.Node.prototype.removeAttribute=function(q){var r=this._node;if(r){r.removeAttribute(q);}return this;};c.Node.importMethod(c.DOM,["contains","setAttribute","getAttribute","wrap","unwrap","generateID"]);c.NodeList.importMethod(c.Node.prototype,["getAttribute","setAttribute","removeAttribute","unwrap","wrap","generateID"]);},"3.5.0",{requires:["dom-core","selector"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-core/node-core.js b/lib/yui/3.5.0/build/node-core/node-core.js
similarity index 91%
rename from lib/yui/3.4.1/build/node-core/node-core.js
rename to lib/yui/3.5.0/build/node-core/node-core.js
index 768a64eb28c..e83de4fbf00 100644
--- a/lib/yui/3.4.1/build/node-core/node-core.js
+++ b/lib/yui/3.5.0/build/node-core/node-core.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -201,11 +201,11 @@ Y_Node.addMethod = function(name, fn, context) {
node = this,
ret;
- if (args[0] && Y.instanceOf(args[0], Y_Node)) {
+ if (args[0] && args[0]._node) {
args[0] = args[0]._node;
}
- if (args[1] && Y.instanceOf(args[1], Y_Node)) {
+ if (args[1] && args[1]._node) {
args[1] = args[1]._node;
}
args.unshift(node._node);
@@ -353,6 +353,8 @@ Y_Node.DEFAULT_GETTER = function(name) {
};
Y.mix(Y_Node.prototype, {
+ DATA_PREFIX: 'data-',
+
/**
* The method called when outputting Node instances as strings
* @method toString
@@ -507,7 +509,7 @@ Y.mix(Y_Node.prototype, {
compareTo: function(refNode) {
var node = this._node;
- if (Y.instanceOf(refNode, Y_Node)) {
+ if (refNode && refNode._node) {
refNode = refNode._node;
}
return node === refNode;
@@ -754,11 +756,11 @@ Y.mix(Y_Node.prototype, {
var node = this._node,
ret;
- if (a && Y.instanceOf(a, Y_Node)) {
+ if (a && a._node) {
a = a._node;
}
- if (b && Y.instanceOf(b, Y_Node)) {
+ if (b && b._node) {
b = b._node;
}
@@ -795,67 +797,6 @@ Y.mix(Y_Node.prototype, {
},
- /**
- * @method getData
- * @description Retrieves arbitrary data stored on a Node instance.
- * This is not stored with the DOM node.
- * @param {string} name Optional name of the data field to retrieve.
- * If no name is given, all data is returned.
- * @return {any | Object} Whatever is stored at the given field,
- * or an object hash of all fields.
- */
- getData: function(name) {
- var ret;
- this._data = this._data || {};
- if (arguments.length) {
- ret = this._data[name];
- } else {
- ret = this._data;
- }
-
- return ret;
-
- },
-
- /**
- * @method setData
- * @description Stores arbitrary data on a Node instance.
- * This is not stored with the DOM node.
- * @param {string} name The name of the field to set. If no name
- * is given, name is treated as the data and overrides any existing data.
- * @param {any} val The value to be assigned to the field.
- * @chainable
- */
- setData: function(name, val) {
- this._data = this._data || {};
- if (arguments.length > 1) {
- this._data[name] = val;
- } else {
- this._data = name;
- }
-
- return this;
- },
-
- /**
- * @method clearData
- * @description Clears stored data.
- * @param {string} name The name of the field to clear. If no name
- * is given, all data is cleared.
- * @chainable
- */
- clearData: function(name) {
- if ('_data' in this) {
- if (name) {
- delete this._data[name];
- } else {
- delete this._data;
- }
- }
-
- return this;
- },
-
hasMethod: function(method) {
var node = this._node;
return !!(node && method in node &&
@@ -1011,6 +952,19 @@ NodeList._getTempNode = function(node) {
};
Y.mix(NodeList.prototype, {
+ _invoke: function(method, args, getter) {
+ var ret = (getter) ? [] : this;
+
+ this.each(function(node) {
+ var val = node[method].apply(node, args);
+ if (getter) {
+ ret.push(val);
+ }
+ });
+
+ return ret;
+ },
+
/**
* Retrieves the Node instance at the given index.
* @method item
@@ -1172,68 +1126,6 @@ Y.mix(NodeList.prototype, {
return this;
},
- _prepEvtArgs: function(type, fn, context) {
- // map to Y.on/after signature (type, fn, nodes, context, arg1, arg2, etc)
- var args = Y.Array(arguments, 0, true);
-
- if (args.length < 2) { // type only (event hash) just add nodes
- args[2] = this._nodes;
- } else {
- args.splice(2, 0, this._nodes);
- }
-
- args[3] = context || this; // default to NodeList instance as context
-
- return args;
- },
-
- /**
- * Applies an event listener to each Node bound to the NodeList.
- * @method on
- * @param {String} type The event being listened for
- * @param {Function} fn The handler to call when the event fires
- * @param {Object} context The context to call the handler with.
- * Default is the NodeList instance.
- * @param {Object} context The context to call the handler with.
- * param {mixed} arg* 0..n additional arguments to supply to the subscriber
- * when the event fires.
- * @return {Object} Returns an event handle that can later be use to detach().
- * @see Event.on
- */
- on: function(type, fn, context) {
- return Y.on.apply(Y, this._prepEvtArgs.apply(this, arguments));
- },
-
- /**
- * Applies an one-time event listener to each Node bound to the NodeList.
- * @method once
- * @param {String} type The event being listened for
- * @param {Function} fn The handler to call when the event fires
- * @param {Object} context The context to call the handler with.
- * Default is the NodeList instance.
- * @return {Object} Returns an event handle that can later be use to detach().
- * @see Event.on
- */
- once: function(type, fn, context) {
- return Y.once.apply(Y, this._prepEvtArgs.apply(this, arguments));
- },
-
- /**
- * Applies an event listener to each Node bound to the NodeList.
- * The handler is called only after all on() handlers are called
- * and the event is not prevented.
- * @method after
- * @param {String} type The event being listened for
- * @param {Function} fn The handler to call when the event fires
- * @param {Object} context The context to call the handler with.
- * Default is the NodeList instance.
- * @return {Object} Returns an event handle that can later be use to detach().
- * @see Event.on
- */
- after: function(type, fn, context) {
- return Y.after.apply(Y, this._prepEvtArgs.apply(this, arguments));
- },
-
/**
* Returns the current number of items in the NodeList.
* @method size
@@ -1582,7 +1474,6 @@ Y.Node.importMethod(Y.DOM, [
* This passes through to the DOM node, allowing for custom attributes.
* @method setAttribute
* @for Node
- * @for NodeList
* @chainable
* @param {string} name The attribute name
* @param {string} value The value to set
@@ -1593,7 +1484,6 @@ Y.Node.importMethod(Y.DOM, [
* This passes through to the DOM node, allowing for custom attributes.
* @method getAttribute
* @for Node
- * @for NodeList
* @param {string} name The attribute name
* @return {string} The attribute value
*/
@@ -1679,4 +1569,4 @@ Y.NodeList.importMethod(Y.Node.prototype, [
]);
-}, '3.4.1' ,{requires:['dom-core', 'selector']});
+}, '3.5.0' ,{requires:['dom-core', 'selector']});
diff --git a/lib/yui/3.4.1/build/node-deprecated/node-deprecated-debug.js b/lib/yui/3.5.0/build/node-deprecated/node-deprecated-debug.js
similarity index 96%
rename from lib/yui/3.4.1/build/node-deprecated/node-deprecated-debug.js
rename to lib/yui/3.5.0/build/node-deprecated/node-deprecated-debug.js
index d8d38dbbceb..b5988a8499e 100644
--- a/lib/yui/3.4.1/build/node-deprecated/node-deprecated-debug.js
+++ b/lib/yui/3.5.0/build/node-deprecated/node-deprecated-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -128,4 +128,4 @@ Y.mix(Y_Node.prototype, {
-}, '3.4.1' ,{requires:['node-base']});
+}, '3.5.0' ,{requires:['node-base']});
diff --git a/lib/yui/3.4.1/build/node-deprecated/node-deprecated-min.js b/lib/yui/3.5.0/build/node-deprecated/node-deprecated-min.js
similarity index 82%
rename from lib/yui/3.4.1/build/node-deprecated/node-deprecated-min.js
rename to lib/yui/3.5.0/build/node-deprecated/node-deprecated-min.js
index 54c8dc3c412..9df0b2efaee 100644
--- a/lib/yui/3.4.1/build/node-deprecated/node-deprecated-min.js
+++ b/lib/yui/3.5.0/build/node-deprecated/node-deprecated-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("node-deprecated",function(b){var a=b.Node;a.ATTRS.data={getter:function(){return this._dataVal;},setter:function(c){this._dataVal=c;return c;},value:null};b.get=a.get=function(){return a.one.apply(a,arguments);};b.mix(a.prototype,{query:function(c){return this.one(c);},queryAll:function(c){return this.all(c);},each:function(d,c){c=c||this;return d.call(c,this);},item:function(c){return this;},size:function(){return this._node?1:0;}});},"3.4.1",{requires:["node-base"]});
\ No newline at end of file
+YUI.add("node-deprecated",function(b){var a=b.Node;a.ATTRS.data={getter:function(){return this._dataVal;},setter:function(c){this._dataVal=c;return c;},value:null};b.get=a.get=function(){return a.one.apply(a,arguments);};b.mix(a.prototype,{query:function(c){return this.one(c);},queryAll:function(c){return this.all(c);},each:function(d,c){c=c||this;return d.call(c,this);},item:function(c){return this;},size:function(){return this._node?1:0;}});},"3.5.0",{requires:["node-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-deprecated/node-deprecated.js b/lib/yui/3.5.0/build/node-deprecated/node-deprecated.js
similarity index 96%
rename from lib/yui/3.4.1/build/node-deprecated/node-deprecated.js
rename to lib/yui/3.5.0/build/node-deprecated/node-deprecated.js
index 3272af015fa..f07063938dc 100644
--- a/lib/yui/3.4.1/build/node-deprecated/node-deprecated.js
+++ b/lib/yui/3.5.0/build/node-deprecated/node-deprecated.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -122,4 +122,4 @@ Y.mix(Y_Node.prototype, {
-}, '3.4.1' ,{requires:['node-base']});
+}, '3.5.0' ,{requires:['node-base']});
diff --git a/lib/yui/3.4.1/build/node-event-delegate/node-event-delegate-debug.js b/lib/yui/3.5.0/build/node-event-delegate/node-event-delegate-debug.js
similarity index 95%
rename from lib/yui/3.4.1/build/node-event-delegate/node-event-delegate-debug.js
rename to lib/yui/3.5.0/build/node-event-delegate/node-event-delegate-debug.js
index 30fc1e8df00..60c9d31a83f 100644
--- a/lib/yui/3.4.1/build/node-event-delegate/node-event-delegate-debug.js
+++ b/lib/yui/3.5.0/build/node-event-delegate/node-event-delegate-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -57,4 +57,4 @@ Y.Node.prototype.delegate = function(type) {
};
-}, '3.4.1' ,{requires:['node-base', 'event-delegate']});
+}, '3.5.0' ,{requires:['node-base', 'event-delegate']});
diff --git a/lib/yui/3.4.1/build/node-event-delegate/node-event-delegate-min.js b/lib/yui/3.5.0/build/node-event-delegate/node-event-delegate-min.js
similarity index 66%
rename from lib/yui/3.4.1/build/node-event-delegate/node-event-delegate-min.js
rename to lib/yui/3.5.0/build/node-event-delegate/node-event-delegate-min.js
index fee606388c4..6f30874e2f8 100644
--- a/lib/yui/3.4.1/build/node-event-delegate/node-event-delegate-min.js
+++ b/lib/yui/3.5.0/build/node-event-delegate/node-event-delegate-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("node-event-delegate",function(a){a.Node.prototype.delegate=function(d){var c=a.Array(arguments,0,true),b=(a.Lang.isObject(d)&&!a.Lang.isArray(d))?1:2;c.splice(b,0,this._node);return a.delegate.apply(a,c);};},"3.4.1",{requires:["node-base","event-delegate"]});
\ No newline at end of file
+YUI.add("node-event-delegate",function(a){a.Node.prototype.delegate=function(d){var c=a.Array(arguments,0,true),b=(a.Lang.isObject(d)&&!a.Lang.isArray(d))?1:2;c.splice(b,0,this._node);return a.delegate.apply(a,c);};},"3.5.0",{requires:["node-base","event-delegate"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-event-delegate/node-event-delegate.js b/lib/yui/3.5.0/build/node-event-delegate/node-event-delegate.js
similarity index 95%
rename from lib/yui/3.4.1/build/node-event-delegate/node-event-delegate.js
rename to lib/yui/3.5.0/build/node-event-delegate/node-event-delegate.js
index 30fc1e8df00..60c9d31a83f 100644
--- a/lib/yui/3.4.1/build/node-event-delegate/node-event-delegate.js
+++ b/lib/yui/3.5.0/build/node-event-delegate/node-event-delegate.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -57,4 +57,4 @@ Y.Node.prototype.delegate = function(type) {
};
-}, '3.4.1' ,{requires:['node-base', 'event-delegate']});
+}, '3.5.0' ,{requires:['node-base', 'event-delegate']});
diff --git a/lib/yui/3.4.1/build/node-event-html5/node-event-html5-debug.js b/lib/yui/3.5.0/build/node-event-html5/node-event-html5-debug.js
similarity index 78%
rename from lib/yui/3.4.1/build/node-event-html5/node-event-html5-debug.js
rename to lib/yui/3.5.0/build/node-event-html5/node-event-html5-debug.js
index f56d73325c6..4e89e0ec902 100644
--- a/lib/yui/3.4.1/build/node-event-html5/node-event-html5-debug.js
+++ b/lib/yui/3.5.0/build/node-event-html5/node-event-html5-debug.js
@@ -1,11 +1,18 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('node-event-html5', function(Y) {
+/**
+ * Adds HTML5 event support to Node.
+ *
+ * @module node
+ * @submodule node-event-html5
+ **/
+
Y.mix(Y.Node.DOM_EVENTS, {
DOMActivate: 1,
DOMContentLoaded: 1,
@@ -42,10 +49,10 @@ Y.mix(Y.Node.DOM_EVENTS, {
stalled: 1,
suspend: 1,
timeupdate: 1,
- undeo: 1,
+ undo: 1,
volumechange: 1,
waiting: 1
});
-}, '3.4.1' ,{requires:['node-base']});
+}, '3.5.0' ,{requires:['node-base']});
diff --git a/lib/yui/3.4.1/build/node-event-html5/node-event-html5-min.js b/lib/yui/3.5.0/build/node-event-html5/node-event-html5-min.js
similarity index 75%
rename from lib/yui/3.4.1/build/node-event-html5/node-event-html5-min.js
rename to lib/yui/3.5.0/build/node-event-html5/node-event-html5-min.js
index 9797e00cefd..d91f9320849 100644
--- a/lib/yui/3.4.1/build/node-event-html5/node-event-html5-min.js
+++ b/lib/yui/3.5.0/build/node-event-html5/node-event-html5-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("node-event-html5",function(a){a.mix(a.Node.DOM_EVENTS,{DOMActivate:1,DOMContentLoaded:1,afterprint:1,beforeprint:1,canplay:1,canplaythrough:1,durationchange:1,emptied:1,ended:1,formchange:1,forminput:1,hashchange:1,input:1,invalid:1,loadedmetadata:1,loadeddata:1,loadstart:1,offline:1,online:1,pagehide:1,pageshow:1,pause:1,play:1,playing:1,popstate:1,progress:1,ratechange:1,readystatechange:1,redo:1,seeking:1,seeked:1,show:1,stalled:1,suspend:1,timeupdate:1,undeo:1,volumechange:1,waiting:1});},"3.4.1",{requires:["node-base"]});
\ No newline at end of file
+YUI.add("node-event-html5",function(a){a.mix(a.Node.DOM_EVENTS,{DOMActivate:1,DOMContentLoaded:1,afterprint:1,beforeprint:1,canplay:1,canplaythrough:1,durationchange:1,emptied:1,ended:1,formchange:1,forminput:1,hashchange:1,input:1,invalid:1,loadedmetadata:1,loadeddata:1,loadstart:1,offline:1,online:1,pagehide:1,pageshow:1,pause:1,play:1,playing:1,popstate:1,progress:1,ratechange:1,readystatechange:1,redo:1,seeking:1,seeked:1,show:1,stalled:1,suspend:1,timeupdate:1,undo:1,volumechange:1,waiting:1});},"3.5.0",{requires:["node-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-event-html5/node-event-html5.js b/lib/yui/3.5.0/build/node-event-html5/node-event-html5.js
similarity index 78%
rename from lib/yui/3.4.1/build/node-event-html5/node-event-html5.js
rename to lib/yui/3.5.0/build/node-event-html5/node-event-html5.js
index f56d73325c6..4e89e0ec902 100644
--- a/lib/yui/3.4.1/build/node-event-html5/node-event-html5.js
+++ b/lib/yui/3.5.0/build/node-event-html5/node-event-html5.js
@@ -1,11 +1,18 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('node-event-html5', function(Y) {
+/**
+ * Adds HTML5 event support to Node.
+ *
+ * @module node
+ * @submodule node-event-html5
+ **/
+
Y.mix(Y.Node.DOM_EVENTS, {
DOMActivate: 1,
DOMContentLoaded: 1,
@@ -42,10 +49,10 @@ Y.mix(Y.Node.DOM_EVENTS, {
stalled: 1,
suspend: 1,
timeupdate: 1,
- undeo: 1,
+ undo: 1,
volumechange: 1,
waiting: 1
});
-}, '3.4.1' ,{requires:['node-base']});
+}, '3.5.0' ,{requires:['node-base']});
diff --git a/lib/yui/3.4.1/build/node-event-simulate/node-event-simulate-debug.js b/lib/yui/3.5.0/build/node-event-simulate/node-event-simulate-debug.js
similarity index 83%
rename from lib/yui/3.4.1/build/node-event-simulate/node-event-simulate-debug.js
rename to lib/yui/3.5.0/build/node-event-simulate/node-event-simulate-debug.js
index aae8f779a33..5a6b948b815 100644
--- a/lib/yui/3.4.1/build/node-event-simulate/node-event-simulate-debug.js
+++ b/lib/yui/3.5.0/build/node-event-simulate/node-event-simulate-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -26,4 +26,4 @@ YUI.add('node-event-simulate', function(Y) {
-}, '3.4.1' ,{requires:['node-base', 'event-simulate']});
+}, '3.5.0' ,{requires:['node-base', 'event-simulate']});
diff --git a/lib/yui/3.4.1/build/node-event-simulate/node-event-simulate-min.js b/lib/yui/3.5.0/build/node-event-simulate/node-event-simulate-min.js
similarity index 60%
rename from lib/yui/3.4.1/build/node-event-simulate/node-event-simulate-min.js
rename to lib/yui/3.5.0/build/node-event-simulate/node-event-simulate-min.js
index 157329b8dbb..c8558c8e022 100644
--- a/lib/yui/3.4.1/build/node-event-simulate/node-event-simulate-min.js
+++ b/lib/yui/3.5.0/build/node-event-simulate/node-event-simulate-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("node-event-simulate",function(a){a.Node.prototype.simulate=function(c,b){a.Event.simulate(a.Node.getDOMNode(this),c,b);};},"3.4.1",{requires:["node-base","event-simulate"]});
\ No newline at end of file
+YUI.add("node-event-simulate",function(a){a.Node.prototype.simulate=function(c,b){a.Event.simulate(a.Node.getDOMNode(this),c,b);};},"3.5.0",{requires:["node-base","event-simulate"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-event-simulate/node-event-simulate.js b/lib/yui/3.5.0/build/node-event-simulate/node-event-simulate.js
similarity index 83%
rename from lib/yui/3.4.1/build/node-event-simulate/node-event-simulate.js
rename to lib/yui/3.5.0/build/node-event-simulate/node-event-simulate.js
index aae8f779a33..5a6b948b815 100644
--- a/lib/yui/3.4.1/build/node-event-simulate/node-event-simulate.js
+++ b/lib/yui/3.5.0/build/node-event-simulate/node-event-simulate.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -26,4 +26,4 @@ YUI.add('node-event-simulate', function(Y) {
-}, '3.4.1' ,{requires:['node-base', 'event-simulate']});
+}, '3.5.0' ,{requires:['node-base', 'event-simulate']});
diff --git a/lib/yui/3.4.1/build/node-flick/assets/node-flick-core.css b/lib/yui/3.5.0/build/node-flick/assets/node-flick-core.css
similarity index 71%
rename from lib/yui/3.4.1/build/node-flick/assets/node-flick-core.css
rename to lib/yui/3.5.0/build/node-flick/assets/node-flick-core.css
index 729542c8fc7..68e5b160700 100644
--- a/lib/yui/3.4.1/build/node-flick/assets/node-flick-core.css
+++ b/lib/yui/3.5.0/build/node-flick/assets/node-flick-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/node-flick/assets/skins/sam/node-flick-skin.css b/lib/yui/3.5.0/build/node-flick/assets/skins/sam/node-flick-skin.css
similarity index 53%
rename from lib/yui/3.4.1/build/node-flick/assets/skins/sam/node-flick-skin.css
rename to lib/yui/3.5.0/build/node-flick/assets/skins/sam/node-flick-skin.css
index f0bc7d180ae..1432d42997b 100644
--- a/lib/yui/3.4.1/build/node-flick/assets/skins/sam/node-flick-skin.css
+++ b/lib/yui/3.5.0/build/node-flick/assets/skins/sam/node-flick-skin.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.5.0/build/node-flick/assets/skins/sam/node-flick.css b/lib/yui/3.5.0/build/node-flick/assets/skins/sam/node-flick.css
new file mode 100644
index 00000000000..179c92cb09f
--- /dev/null
+++ b/lib/yui/3.5.0/build/node-flick/assets/skins/sam/node-flick.css
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+.yui3-flick{position:relative;overflow:hidden}.yui3-flick-content{position:relative}#yui3-css-stamp.skin-sam-node-flick{display:none}
diff --git a/lib/yui/3.4.1/build/node-flick/node-flick-debug.js b/lib/yui/3.5.0/build/node-flick/node-flick-debug.js
similarity index 99%
rename from lib/yui/3.4.1/build/node-flick/node-flick-debug.js
rename to lib/yui/3.5.0/build/node-flick/node-flick-debug.js
index ba2baaf8d8d..aa1946798a6 100644
--- a/lib/yui/3.4.1/build/node-flick/node-flick-debug.js
+++ b/lib/yui/3.5.0/build/node-flick/node-flick-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -527,4 +527,4 @@ YUI.add('node-flick', function(Y) {
Y.Plugin.Flick = Flick;
-}, '3.4.1' ,{requires:['classnamemanager', 'transition', 'event-flick', 'plugin']});
+}, '3.5.0' ,{requires:['classnamemanager', 'transition', 'event-flick', 'plugin']});
diff --git a/lib/yui/3.4.1/build/node-flick/node-flick-min.js b/lib/yui/3.5.0/build/node-flick/node-flick-min.js
similarity index 95%
rename from lib/yui/3.4.1/build/node-flick/node-flick-min.js
rename to lib/yui/3.5.0/build/node-flick/node-flick-min.js
index bc842e29eea..ecb0ed3dd83 100644
--- a/lib/yui/3.4.1/build/node-flick/node-flick-min.js
+++ b/lib/yui/3.5.0/build/node-flick/node-flick-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("node-flick",function(c){var r="host",i="parentNode",s="boundingBox",a="offsetHeight",j="offsetWidth",e="scrollHeight",k="scrollWidth",g="bounce",o="minDistance",f="minVelocity",l="bounceDistance",d="deceleration",m="step",n="duration",p="easing",b="flick",h=c.ClassNameManager.getClassName;function q(t){q.superclass.constructor.apply(this,arguments);}q.ATTRS={deceleration:{value:0.98},bounce:{value:0.7},bounceDistance:{value:150},minVelocity:{value:0},minDistance:{value:10},boundingBox:{valueFn:function(){return this.get(r).get(i);}},step:{value:10},duration:{value:null},easing:{value:null}};q.NAME="pluginFlick";q.NS="flick";c.extend(q,c.Plugin.Base,{initializer:function(t){this._node=this.get(r);this._renderClasses();this.setBounds();this._node.on(b,c.bind(this._onFlick,this),{minDistance:this.get(o),minVelocity:this.get(f)});},setBounds:function(){var x=this.get(s),w=this._node,y=x.get(a),v=x.get(j),u=w.get(e),t=w.get(k);if(u>y){this._maxY=u-y;this._minY=0;this._scrollY=true;}if(t>v){this._maxX=t-v;this._minX=0;this._scrollX=true;}this._x=this._y=0;w.set("top",this._y+"px");w.set("left",this._x+"px");},_renderClasses:function(){this.get(s).addClass(q.CLASS_NAMES.box);this._node.addClass(q.CLASS_NAMES.content);},_onFlick:function(t){this._v=t.flick.velocity;this._flick=true;this._flickAnim();},_flickAnim:function(){var C=this._y,D=this._x,t=this._maxY,w=this._minY,u=this._maxX,z=this._minX,A=this._v,v=this.get(m),B=this.get(d),E=this.get(g);this._v=(A*B);this._snapToEdge=false;if(this._scrollX){D=D-(A*v);}if(this._scrollY){C=C-(A*v);}if(Math.abs(A).toFixed(4)<=q.VELOCITY_THRESHOLD){this._flick=false;this._killTimer(!(this._exceededYBoundary||this._exceededXBoundary));if(this._scrollX){if(Du){this._snapToEdge=true;this._setX(u);}}}if(this._scrollY){if(Ct){this._snapToEdge=true;this._setY(t);}}}}else{if(this._scrollX&&(Du)){this._exceededXBoundary=true;this._v*=E;}if(this._scrollY&&(Ct)){this._exceededYBoundary=true;this._v*=E;}if(this._scrollX){this._setX(D);}if(this._scrollY){this._setY(C);}this._flickTimer=c.later(v,this,this._flickAnim);}},_setX:function(t){this._move(t,null,this.get(n),this.get(p));},_setY:function(t){this._move(null,t,this.get(n),this.get(p));},_move:function(t,w,u,v){if(t!==null){t=this._bounce(t);}else{t=this._x;}if(w!==null){w=this._bounce(w);}else{w=this._y;}u=u||this._snapToEdge?q.SNAP_DURATION:0;v=v||this._snapToEdge?q.SNAP_EASING:q.EASING;this._x=t;this._y=w;this._anim(t,w,u,v);},_anim:function(t,B,v,A){var u=t*-1,z=B*-1,w={duration:v/1000,easing:A};if(c.Transition.useNative){w.transform="translate("+(u)+"px,"+(z)+"px)";}else{w.left=u+"px";w.top=z+"px";}this._node.transition(w);},_bounce:function(x,t){var v=this.get(g),w=this.get(l),u=v?-w:0;t=v?t+w:t;if(!v){if(xt){x=t;}}}return x;},_killTimer:function(){if(this._flickTimer){this._flickTimer.cancel();}}},{VELOCITY_THRESHOLD:0.015,SNAP_DURATION:400,EASING:"cubic-bezier(0, 0.1, 0, 1.0)",SNAP_EASING:"ease-out",CLASS_NAMES:{box:h(q.NS),content:h(q.NS,"content")}});c.Plugin.Flick=q;},"3.4.1",{requires:["classnamemanager","transition","event-flick","plugin"]});
\ No newline at end of file
+YUI.add("node-flick",function(c){var r="host",i="parentNode",s="boundingBox",a="offsetHeight",j="offsetWidth",e="scrollHeight",k="scrollWidth",g="bounce",o="minDistance",f="minVelocity",l="bounceDistance",d="deceleration",m="step",n="duration",p="easing",b="flick",h=c.ClassNameManager.getClassName;function q(t){q.superclass.constructor.apply(this,arguments);}q.ATTRS={deceleration:{value:0.98},bounce:{value:0.7},bounceDistance:{value:150},minVelocity:{value:0},minDistance:{value:10},boundingBox:{valueFn:function(){return this.get(r).get(i);}},step:{value:10},duration:{value:null},easing:{value:null}};q.NAME="pluginFlick";q.NS="flick";c.extend(q,c.Plugin.Base,{initializer:function(t){this._node=this.get(r);this._renderClasses();this.setBounds();this._node.on(b,c.bind(this._onFlick,this),{minDistance:this.get(o),minVelocity:this.get(f)});},setBounds:function(){var x=this.get(s),w=this._node,y=x.get(a),v=x.get(j),u=w.get(e),t=w.get(k);if(u>y){this._maxY=u-y;this._minY=0;this._scrollY=true;}if(t>v){this._maxX=t-v;this._minX=0;this._scrollX=true;}this._x=this._y=0;w.set("top",this._y+"px");w.set("left",this._x+"px");},_renderClasses:function(){this.get(s).addClass(q.CLASS_NAMES.box);this._node.addClass(q.CLASS_NAMES.content);},_onFlick:function(t){this._v=t.flick.velocity;this._flick=true;this._flickAnim();},_flickAnim:function(){var C=this._y,D=this._x,t=this._maxY,w=this._minY,u=this._maxX,z=this._minX,A=this._v,v=this.get(m),B=this.get(d),E=this.get(g);this._v=(A*B);this._snapToEdge=false;if(this._scrollX){D=D-(A*v);}if(this._scrollY){C=C-(A*v);}if(Math.abs(A).toFixed(4)<=q.VELOCITY_THRESHOLD){this._flick=false;this._killTimer(!(this._exceededYBoundary||this._exceededXBoundary));if(this._scrollX){if(Du){this._snapToEdge=true;this._setX(u);}}}if(this._scrollY){if(Ct){this._snapToEdge=true;this._setY(t);}}}}else{if(this._scrollX&&(Du)){this._exceededXBoundary=true;this._v*=E;}if(this._scrollY&&(Ct)){this._exceededYBoundary=true;this._v*=E;}if(this._scrollX){this._setX(D);}if(this._scrollY){this._setY(C);}this._flickTimer=c.later(v,this,this._flickAnim);}},_setX:function(t){this._move(t,null,this.get(n),this.get(p));},_setY:function(t){this._move(null,t,this.get(n),this.get(p));},_move:function(t,w,u,v){if(t!==null){t=this._bounce(t);}else{t=this._x;}if(w!==null){w=this._bounce(w);}else{w=this._y;}u=u||this._snapToEdge?q.SNAP_DURATION:0;v=v||this._snapToEdge?q.SNAP_EASING:q.EASING;this._x=t;this._y=w;this._anim(t,w,u,v);},_anim:function(t,B,v,A){var u=t*-1,z=B*-1,w={duration:v/1000,easing:A};if(c.Transition.useNative){w.transform="translate("+(u)+"px,"+(z)+"px)";}else{w.left=u+"px";w.top=z+"px";}this._node.transition(w);},_bounce:function(x,t){var v=this.get(g),w=this.get(l),u=v?-w:0;t=v?t+w:t;if(!v){if(xt){x=t;}}}return x;},_killTimer:function(){if(this._flickTimer){this._flickTimer.cancel();}}},{VELOCITY_THRESHOLD:0.015,SNAP_DURATION:400,EASING:"cubic-bezier(0, 0.1, 0, 1.0)",SNAP_EASING:"ease-out",CLASS_NAMES:{box:h(q.NS),content:h(q.NS,"content")}});c.Plugin.Flick=q;},"3.5.0",{requires:["classnamemanager","transition","event-flick","plugin"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-flick/node-flick.js b/lib/yui/3.5.0/build/node-flick/node-flick.js
similarity index 99%
rename from lib/yui/3.4.1/build/node-flick/node-flick.js
rename to lib/yui/3.5.0/build/node-flick/node-flick.js
index 0ef7e9e55bf..2f2bf6604b3 100644
--- a/lib/yui/3.4.1/build/node-flick/node-flick.js
+++ b/lib/yui/3.5.0/build/node-flick/node-flick.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -526,4 +526,4 @@ YUI.add('node-flick', function(Y) {
Y.Plugin.Flick = Flick;
-}, '3.4.1' ,{requires:['classnamemanager', 'transition', 'event-flick', 'plugin']});
+}, '3.5.0' ,{requires:['classnamemanager', 'transition', 'event-flick', 'plugin']});
diff --git a/lib/yui/3.4.1/build/node-focusmanager/node-focusmanager-debug.js b/lib/yui/3.5.0/build/node-focusmanager/node-focusmanager-debug.js
similarity index 99%
rename from lib/yui/3.4.1/build/node-focusmanager/node-focusmanager-debug.js
rename to lib/yui/3.5.0/build/node-focusmanager/node-focusmanager-debug.js
index 68b413c7392..0e1c5e34692 100644
--- a/lib/yui/3.4.1/build/node-focusmanager/node-focusmanager-debug.js
+++ b/lib/yui/3.5.0/build/node-focusmanager/node-focusmanager-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -1072,4 +1072,4 @@ Y.namespace("Plugin");
Y.Plugin.NodeFocusManager = NodeFocusManager;
-}, '3.4.1' ,{requires:['attribute', 'node', 'plugin', 'node-event-simulate', 'event-key', 'event-focus']});
+}, '3.5.0' ,{requires:['attribute', 'node', 'plugin', 'node-event-simulate', 'event-key', 'event-focus']});
diff --git a/lib/yui/3.4.1/build/node-focusmanager/node-focusmanager-min.js b/lib/yui/3.5.0/build/node-focusmanager/node-focusmanager-min.js
similarity index 97%
rename from lib/yui/3.4.1/build/node-focusmanager/node-focusmanager-min.js
rename to lib/yui/3.5.0/build/node-focusmanager/node-focusmanager-min.js
index 5e1ba1802fb..b81db58d30b 100644
--- a/lib/yui/3.4.1/build/node-focusmanager/node-focusmanager-min.js
+++ b/lib/yui/3.5.0/build/node-focusmanager/node-focusmanager-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("node-focusmanager",function(b){var j="activeDescendant",l="id",i="disabled",n="tabIndex",e="focused",a="focusClass",q="circular",c="UI",f="key",g=j+"Change",o="host",p={37:true,38:true,39:true,40:true},m={"a":true,"button":true,"input":true,"object":true},h=b.Lang,k=b.UA,d=function(){d.superclass.constructor.apply(this,arguments);};d.ATTRS={focused:{value:false,readOnly:true},descendants:{getter:function(r){return this.get(o).all(r);}},activeDescendant:{setter:function(v){var t=h.isNumber,s=b.Attribute.INVALID_VALUE,r=this._descendantsMap,y=this._descendants,x,u,w;if(t(v)){x=v;u=x;}else{if((v instanceof b.Node)&&r){x=r[v.get(l)];if(t(x)){u=x;}else{u=s;}}else{u=s;}}if(y){w=y.item(x);if(w&&w.get("disabled")){u=s;}}return u;}},keys:{value:{next:null,previous:null}},focusClass:{},circular:{value:true}};b.extend(d,b.Plugin.Base,{_stopped:true,_descendants:null,_descendantsMap:null,_focusedNode:null,_lastNodeIndex:0,_eventHandlers:null,_initDescendants:function(){var y=this.get("descendants"),r={},w=-1,v,u=this.get(j),x,s,t=0;if(h.isUndefined(u)){u=-1;}if(y){v=y.size();for(t=0;t=0){r=r-1;if(r===-1&&this.get(q)){r=this._lastNodeIndex;}u=this._descendants.item(r);if(u){if(u.get("disabled")){this._focusPrevious(s,r);}else{this.focus(r);}}}this._preventScroll(s);},_afterActiveDescendantChange:function(r){var s=this._descendants.item(r.prevVal);if(s){s.set(n,-1);}s=this._descendants.item(r.newVal);if(s){s.set(n,0);}},initializer:function(r){this.start();},destructor:function(){this.stop();this.get(o).focusManager=null;},focus:function(r){if(h.isUndefined(r)){r=this.get(j);}this.set(j,r,{src:c});var s=this._descendants.item(this.get(j));if(s){s.focus();if(k.opera&&s.get("nodeName").toLowerCase()==="button"){this._focusTarget=s;}}},blur:function(){var r;if(this.get(e)){r=this._descendants.item(this.get(j));if(r){r.blur();this._removeFocusClass();}this._set(e,false,{src:c});}},start:function(){if(this._stopped){this._initDescendants();this._attachEventHandlers();this._stopped=false;}},stop:function(){if(!this._stopped){this._detachEventHandlers();this._descendants=null;this._focusedNode=null;this._lastNodeIndex=0;this._stopped=true;}},refresh:function(){this._initDescendants();if(!this._eventHandlers){this._attachEventHandlers();}}});d.NAME="nodeFocusManager";d.NS="focusManager";b.namespace("Plugin");b.Plugin.NodeFocusManager=d;},"3.4.1",{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]});
\ No newline at end of file
+YUI.add("node-focusmanager",function(b){var j="activeDescendant",l="id",i="disabled",n="tabIndex",e="focused",a="focusClass",q="circular",c="UI",f="key",g=j+"Change",o="host",p={37:true,38:true,39:true,40:true},m={"a":true,"button":true,"input":true,"object":true},h=b.Lang,k=b.UA,d=function(){d.superclass.constructor.apply(this,arguments);};d.ATTRS={focused:{value:false,readOnly:true},descendants:{getter:function(r){return this.get(o).all(r);}},activeDescendant:{setter:function(v){var t=h.isNumber,s=b.Attribute.INVALID_VALUE,r=this._descendantsMap,y=this._descendants,x,u,w;if(t(v)){x=v;u=x;}else{if((v instanceof b.Node)&&r){x=r[v.get(l)];if(t(x)){u=x;}else{u=s;}}else{u=s;}}if(y){w=y.item(x);if(w&&w.get("disabled")){u=s;}}return u;}},keys:{value:{next:null,previous:null}},focusClass:{},circular:{value:true}};b.extend(d,b.Plugin.Base,{_stopped:true,_descendants:null,_descendantsMap:null,_focusedNode:null,_lastNodeIndex:0,_eventHandlers:null,_initDescendants:function(){var y=this.get("descendants"),r={},w=-1,v,u=this.get(j),x,s,t=0;if(h.isUndefined(u)){u=-1;}if(y){v=y.size();for(t=0;t=0){r=r-1;if(r===-1&&this.get(q)){r=this._lastNodeIndex;}u=this._descendants.item(r);if(u){if(u.get("disabled")){this._focusPrevious(s,r);}else{this.focus(r);}}}this._preventScroll(s);},_afterActiveDescendantChange:function(r){var s=this._descendants.item(r.prevVal);if(s){s.set(n,-1);}s=this._descendants.item(r.newVal);if(s){s.set(n,0);}},initializer:function(r){this.start();},destructor:function(){this.stop();this.get(o).focusManager=null;},focus:function(r){if(h.isUndefined(r)){r=this.get(j);}this.set(j,r,{src:c});var s=this._descendants.item(this.get(j));if(s){s.focus();if(k.opera&&s.get("nodeName").toLowerCase()==="button"){this._focusTarget=s;}}},blur:function(){var r;if(this.get(e)){r=this._descendants.item(this.get(j));if(r){r.blur();this._removeFocusClass();}this._set(e,false,{src:c});}},start:function(){if(this._stopped){this._initDescendants();this._attachEventHandlers();this._stopped=false;}},stop:function(){if(!this._stopped){this._detachEventHandlers();this._descendants=null;this._focusedNode=null;this._lastNodeIndex=0;this._stopped=true;}},refresh:function(){this._initDescendants();if(!this._eventHandlers){this._attachEventHandlers();}}});d.NAME="nodeFocusManager";d.NS="focusManager";b.namespace("Plugin");b.Plugin.NodeFocusManager=d;},"3.5.0",{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-focusmanager/node-focusmanager.js b/lib/yui/3.5.0/build/node-focusmanager/node-focusmanager.js
similarity index 99%
rename from lib/yui/3.4.1/build/node-focusmanager/node-focusmanager.js
rename to lib/yui/3.5.0/build/node-focusmanager/node-focusmanager.js
index 4161fffc40b..3e0e18e3c1b 100644
--- a/lib/yui/3.4.1/build/node-focusmanager/node-focusmanager.js
+++ b/lib/yui/3.5.0/build/node-focusmanager/node-focusmanager.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -1069,4 +1069,4 @@ Y.namespace("Plugin");
Y.Plugin.NodeFocusManager = NodeFocusManager;
-}, '3.4.1' ,{requires:['attribute', 'node', 'plugin', 'node-event-simulate', 'event-key', 'event-focus']});
+}, '3.5.0' ,{requires:['attribute', 'node', 'plugin', 'node-event-simulate', 'event-key', 'event-focus']});
diff --git a/lib/yui/3.4.1/build/node-load/node-load-debug.js b/lib/yui/3.5.0/build/node-load/node-load-debug.js
similarity index 93%
rename from lib/yui/3.4.1/build/node-load/node-load-debug.js
rename to lib/yui/3.5.0/build/node-load/node-load-debug.js
index 2eea96e6893..13d84eedf64 100644
--- a/lib/yui/3.4.1/build/node-load/node-load-debug.js
+++ b/lib/yui/3.5.0/build/node-load/node-load-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -68,4 +68,4 @@ Y.Node.prototype.load = function(url, selector, callback) {
}
-}, '3.4.1' ,{requires:['node-base', 'io-base']});
+}, '3.5.0' ,{requires:['node-base', 'io-base']});
diff --git a/lib/yui/3.4.1/build/node-load/node-load-min.js b/lib/yui/3.5.0/build/node-load/node-load-min.js
similarity index 77%
rename from lib/yui/3.4.1/build/node-load/node-load-min.js
rename to lib/yui/3.5.0/build/node-load/node-load-min.js
index 6758bf26075..5328ed7ad0f 100644
--- a/lib/yui/3.4.1/build/node-load/node-load-min.js
+++ b/lib/yui/3.5.0/build/node-load/node-load-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("node-load",function(a){a.Node.prototype._ioComplete=function(g,c,d){var b=d[0],h=d[1],e,f;if(c&&c.responseText){f=c.responseText;if(b){e=a.DOM.create(f);f=a.Selector.query(b,e);}this.setContent(f);}if(h){h.call(this,g,c);}};a.Node.prototype.load=function(d,b,e){if(typeof b=="function"){e=b;b=null;}var c={context:this,on:{complete:this._ioComplete},arguments:[b,e]};a.io(d,c);return this;};},"3.4.1",{requires:["node-base","io-base"]});
\ No newline at end of file
+YUI.add("node-load",function(a){a.Node.prototype._ioComplete=function(g,c,d){var b=d[0],h=d[1],e,f;if(c&&c.responseText){f=c.responseText;if(b){e=a.DOM.create(f);f=a.Selector.query(b,e);}this.setContent(f);}if(h){h.call(this,g,c);}};a.Node.prototype.load=function(d,b,e){if(typeof b=="function"){e=b;b=null;}var c={context:this,on:{complete:this._ioComplete},arguments:[b,e]};a.io(d,c);return this;};},"3.5.0",{requires:["node-base","io-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/node-load/node-load.js b/lib/yui/3.5.0/build/node-load/node-load.js
similarity index 93%
rename from lib/yui/3.4.1/build/node-load/node-load.js
rename to lib/yui/3.5.0/build/node-load/node-load.js
index 2eea96e6893..13d84eedf64 100644
--- a/lib/yui/3.4.1/build/node-load/node-load.js
+++ b/lib/yui/3.5.0/build/node-load/node-load.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -68,4 +68,4 @@ Y.Node.prototype.load = function(url, selector, callback) {
}
-}, '3.4.1' ,{requires:['node-base', 'io-base']});
+}, '3.5.0' ,{requires:['node-base', 'io-base']});
diff --git a/lib/yui/3.4.1/build/node-menunav/assets/node-menunav-core.css b/lib/yui/3.5.0/build/node-menunav/assets/node-menunav-core.css
similarity index 97%
rename from lib/yui/3.4.1/build/node-menunav/assets/node-menunav-core.css
rename to lib/yui/3.5.0/build/node-menunav/assets/node-menunav-core.css
index 6d4960f2b9c..5b35273f28c 100644
--- a/lib/yui/3.4.1/build/node-menunav/assets/node-menunav-core.css
+++ b/lib/yui/3.5.0/build/node-menunav/assets/node-menunav-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.5.0/build/node-menunav/assets/skins/night/horizontal-menu-submenu-indicator.png b/lib/yui/3.5.0/build/node-menunav/assets/skins/night/horizontal-menu-submenu-indicator.png
new file mode 100644
index 00000000000..7940437b771
Binary files /dev/null and b/lib/yui/3.5.0/build/node-menunav/assets/skins/night/horizontal-menu-submenu-indicator.png differ
diff --git a/lib/yui/3.5.0/build/node-menunav/assets/skins/night/node-menunav-skin.css b/lib/yui/3.5.0/build/node-menunav/assets/skins/night/node-menunav-skin.css
new file mode 100644
index 00000000000..1a03ec70bbe
--- /dev/null
+++ b/lib/yui/3.5.0/build/node-menunav/assets/skins/night/node-menunav-skin.css
@@ -0,0 +1,318 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+/* Vertical menus and submenus */
+
+.yui3-skin-night .yui3-menu-content,
+.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-content {
+
+ font-size: 100%;
+ line-height: 2.25; /* 18px 1.5*/
+ *line-height: 1.45; /* For IE */
+ border: solid 1px #303030;
+ background: #151515;
+ /*padding: 3px 0;*/
+
+}
+
+.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-content {
+
+ font-size: 100%;
+
+}
+
+
+/* Horizontal menus */
+.yui3-skin-night .yui3-menu-horizontal .yui3-menu-content {
+
+ line-height: 2; /* ~24px */
+ *line-height: 1.9; /* For IE */
+ background-color:#3b3c3d;
+ background: -moz-linear-gradient(
+ 0% 100% 90deg,
+ #242526 0%,
+ #3b3c3d 96%,
+ #2C2D2F 100%
+ );
+ background: -webkit-gradient(
+ linear,
+ left bottom,
+ left top,
+ from(#242526),
+ color-stop(0.96, #3b3c3d),
+ to(#2C2D2F)
+ );
+ padding: 0;
+
+}
+
+
+.yui3-skin-night .yui3-menu ul,
+.yui3-skin-night .yui3-menu ul ul {
+
+ margin-top: 3px;
+ padding-top: 3px;
+ border-top: solid 1px #303030;
+
+}
+
+.yui3-skin-night .yui3-menu ul.first-of-type {
+
+ border: 0;
+ margin: 0;
+ padding: 0;
+
+}
+
+.yui3-skin-night .yui3-menu-horizontal ul {
+
+ padding: 0;
+ margin: 0;
+ border: 0;
+
+}
+
+
+.yui3-skin-night .yui3-menu li,
+.yui3-skin-night .yui3-menu .yui3-menu li {
+
+ /*
+ For and IE 6 (Strict Mode and Quirks Mode) and IE 7 (Quirks Mode only):
+ Used to collapse superfluous white space between
`, or from
+ any other element, if that's more appropriate for the content you're
+ loading.
+
+ @attribute titleSelector
+ @type String
+ @default "title"
+ @since 3.5.0
+ **/
+ titleSelector: {
+ value: 'title'
+ },
+
+ /**
+ Time in milliseconds after which an Ajax request should time out. When a
+ timeout occurs, the `error` event will be fired.
+
+ @attribute timeout
+ @type Number
+ @default 30000
+ @since 3.5.0
+ **/
+ timeout: {
+ value: 30000
+ }
+ }
+});
+
+
+}, '3.5.0' ,{requires:['pjax-base', 'io-base']});
diff --git a/lib/yui/3.5.0/build/pjax/pjax-min.js b/lib/yui/3.5.0/build/pjax/pjax-min.js
new file mode 100644
index 00000000000..1e6c25b7c40
--- /dev/null
+++ b/lib/yui/3.5.0/build/pjax/pjax-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("pjax",function(c){var b="error",a="load";c.Pjax=c.Base.create("pjax",c.Router,[c.PjaxBase],{initializer:function(){this.publish(b,{defaultFn:this._defCompleteFn});this.publish(a,{defaultFn:this._defCompleteFn});},getContent:function(g){var f={},d=this.get("contentSelector"),i=c.Node.create(g||""),e=this.get("titleSelector"),h;if(d){f.node=c.one(i.all(d).toFrag());}else{f.node=i;}if(e){h=i.one(e);if(h){f.title=h.get("text");}}return f;},_defaultRoute:function(e){var d=e.url;this._request&&this._request.abort();if(this.get("addPjaxParam")){d=d.replace(/([^#]*)(#.*)?$/,function(f,h,g){h+=(h.indexOf("?")>-1?"&":"?")+"pjax=1";return h+(g||"");});}this._request=c.io(d,{arguments:{url:d},context:this,headers:{"X-PJAX":"true"},timeout:this.get("timeout"),on:{end:this._onPjaxIOEnd,failure:this._onPjaxIOFailure,success:this._onPjaxIOSuccess}});},_defCompleteFn:function(g){var d=this.get("container"),f=g.content;if(d&&f.node){d.setContent(f.node);}if(f.title&&c.config.doc){c.config.doc.title=f.title;}},_onPjaxIOEnd:function(){this._request=null;},_onPjaxIOFailure:function(g,e,d){var f=this.getContent(e.responseText);this.fire(b,{content:f,responseText:e.responseText,status:e.status,url:d.url});},_onPjaxIOSuccess:function(g,e,d){var f=this.getContent(e.responseText);this.fire(a,{content:f,responseText:e.responseText,status:e.status,url:d.url});}},{ATTRS:{addPjaxParam:{value:true},container:{value:null,setter:function(d){return d?c.one(d):null;}},contentSelector:{value:null},routes:{value:[{path:"*",callback:"_defaultRoute"}]},titleSelector:{value:"title"},timeout:{value:30000}}});},"3.5.0",{requires:["pjax-base","io-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.5.0/build/pjax/pjax.js b/lib/yui/3.5.0/build/pjax/pjax.js
new file mode 100644
index 00000000000..baabf4a5ae7
--- /dev/null
+++ b/lib/yui/3.5.0/build/pjax/pjax.js
@@ -0,0 +1,340 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add('pjax', function(Y) {
+
+/**
+Provides seamless, gracefully degrading Pjax (pushState + Ajax) functionality,
+which makes it easy to progressively enhance standard links on the page so that
+they can be loaded normally in old browsers, or via Ajax (with HTML5 history
+support) in newer browsers.
+
+@module pjax
+@main
+@since 3.5.0
+**/
+
+/**
+Provides seamless, gracefully degrading Pjax (pushState + Ajax) functionality,
+which makes it easy to progressively enhance standard links on the page so that
+they can be loaded normally in old browsers, or via Ajax (with HTML5 history
+support) in newer browsers.
+
+@class Pjax
+@extends Router
+@uses PjaxBase
+@constructor
+@param {Object} [config] Config attributes.
+@since 3.5.0
+**/
+
+/**
+Fired when an error occurs while attempting to load a URL via Ajax.
+
+@event error
+@param {Object} content Content extracted from the response, if any.
+ @param {Node} content.node A `Y.Node` instance for a document fragment
+ containing the extracted HTML content.
+ @param {String} [content.title] The title of the HTML page, if any,
+ extracted using the `titleSelector` attribute. If `titleSelector` is not
+ set or if a title could not be found, this property will be `undefined`.
+@param {String} responseText Raw Ajax response text.
+@param {Number} status HTTP status code for the Ajax response.
+@param {String} url The absolute URL that failed to load.
+@since 3.5.0
+**/
+var EVT_ERROR = 'error',
+
+/**
+Fired when a URL is successfully loaded via Ajax.
+
+@event load
+@param {Object} content Content extracted from the response, if any.
+ @param {Node} content.node A `Y.Node` instance for a document fragment
+ containing the extracted HTML content.
+ @param {String} [content.title] The title of the HTML page, if any,
+ extracted using the `titleSelector` attribute. If `titleSelector` is not
+ set or if a title could not be found, this property will be `undefined`.
+@param {String} responseText Raw Ajax response text.
+@param {Number} status HTTP status code for the Ajax response.
+@param {String} url The absolute URL that was loaded.
+@since 3.5.0
+**/
+EVT_LOAD = 'load';
+
+Y.Pjax = Y.Base.create('pjax', Y.Router, [Y.PjaxBase], {
+ // -- Lifecycle Methods ----------------------------------------------------
+ initializer: function () {
+ this.publish(EVT_ERROR, {defaultFn: this._defCompleteFn});
+ this.publish(EVT_LOAD, {defaultFn: this._defCompleteFn});
+ },
+
+ // -- Public Methods -------------------------------------------------------
+
+ /**
+ Extracts and returns the relevant HTML content from an Ajax response. The
+ content is extracted using the `contentSelector` attribute as a CSS
+ selector. If `contentSelector` is `null`, the entire response will be
+ returned.
+
+ The return value is an object containing two properties:
+
+ - **node**: A `Y.Node` instance for a document fragment containing the
+ extracted HTML content.
+
+ - **title**: The title of the HTML page, if any, extracted using the
+ `titleSelector` attribute (which defaults to looking for a ``
+ element). If `titleSelector` is not set or if a title could not be
+ found, this property will be `undefined`.
+
+ @method getContent
+ @param {String} responseText Raw Ajax response text.
+ @return {Object} Content object with the properties described above.
+ @since 3.5.0
+ **/
+ getContent: function (responseText) {
+ var content = {},
+ contentSelector = this.get('contentSelector'),
+ frag = Y.Node.create(responseText || ''),
+ titleSelector = this.get('titleSelector'),
+ titleNode;
+
+ if (contentSelector) {
+ content.node = Y.one(frag.all(contentSelector).toFrag());
+ } else {
+ content.node = frag;
+ }
+
+ if (titleSelector) {
+ titleNode = frag.one(titleSelector);
+
+ if (titleNode) {
+ content.title = titleNode.get('text');
+ }
+ }
+
+ return content;
+ },
+
+ // -- Protected Methods ----------------------------------------------------
+
+ /**
+ Default Pjax route handler. Makes an Ajax request for the requested URL.
+
+ @method _defaultRoute
+ @param {Object} req Request object.
+ @protected
+ @since 3.5.0
+ **/
+ _defaultRoute: function (req) {
+ var url = req.url;
+
+ // If there's an outstanding request, abort it.
+ this._request && this._request.abort();
+
+ // Add a 'pjax=1' query parameter if enabled.
+ if (this.get('addPjaxParam')) {
+ // Captures the path with query, and hash parts of the URL. Then
+ // properly injects the "pjax=1" query param in the right place,
+ // before any hash fragment, and returns the updated URL.
+ url = url.replace(/([^#]*)(#.*)?$/, function (match, path, hash) {
+ path += (path.indexOf('?') > -1 ? '&' : '?') + 'pjax=1';
+ return path + (hash || '');
+ });
+ }
+
+ // Send a request.
+ this._request = Y.io(url, {
+ arguments: {url: url},
+ context : this,
+ headers : {'X-PJAX': 'true'},
+ timeout : this.get('timeout'),
+
+ on: {
+ end : this._onPjaxIOEnd,
+ failure: this._onPjaxIOFailure,
+ success: this._onPjaxIOSuccess
+ }
+ });
+ },
+
+ // -- Event Handlers -------------------------------------------------------
+
+ /**
+ Default event handler for both the `error` and `load` events. Attempts to
+ insert the loaded content into the `container` node and update the page's
+ title.
+
+ @method _defCompleteFn
+ @param {EventFacade} e
+ @protected
+ @since 3.5.0
+ **/
+ _defCompleteFn: function (e) {
+ var container = this.get('container'),
+ content = e.content;
+
+ if (container && content.node) {
+ container.setContent(content.node);
+ }
+
+ if (content.title && Y.config.doc) {
+ Y.config.doc.title = content.title;
+ }
+ },
+
+ /**
+ Handles IO end events.
+
+ @method _onPjaxIOEnd
+ @protected
+ @since 3.5.0
+ **/
+ _onPjaxIOEnd: function () {
+ this._request = null;
+ },
+
+ /**
+ Handles IO failure events and fires our own `error` event.
+
+ @method _onPjaxIOFailure
+ @protected
+ @since 3.5.0
+ **/
+ _onPjaxIOFailure: function (id, res, details) {
+ var content = this.getContent(res.responseText);
+
+ this.fire(EVT_ERROR, {
+ content : content,
+ responseText: res.responseText,
+ status : res.status,
+ url : details.url
+ });
+ },
+
+ /**
+ Handles IO success events and fires our own 'load' event.
+
+ @method _onPjaxIOSuccess
+ @protected
+ @since 3.5.0
+ **/
+ _onPjaxIOSuccess: function (id, res, details) {
+ var content = this.getContent(res.responseText);
+
+ this.fire(EVT_LOAD, {
+ content : content,
+ responseText: res.responseText,
+ status : res.status,
+ url : details.url
+ });
+ }
+}, {
+ ATTRS: {
+ /**
+ If `true`, a "pjax=1" query parameter will be appended to all URLs
+ requested via Pjax.
+
+ Browsers ignore HTTP request headers when caching content, so if the
+ same URL is used to request a partial Pjax page and a full page, the
+ browser will cache them under the same key and may later load the
+ cached partial page when the user actually requests a full page (or vice
+ versa).
+
+ To prevent this, we can add a bogus query parameter to the URL so that
+ Pjax URLs will always be cached separately from non-Pjax URLs.
+
+ @attribute addPjaxParam
+ @type Boolean
+ @default true
+ @since 3.5.0
+ **/
+ addPjaxParam: {
+ value: true
+ },
+
+ /**
+ Node into which content should be inserted when a page is loaded via
+ Pjax. This node's existing contents will be removed to make way for the
+ new content.
+
+ If not set, loaded content will not be automatically inserted into the
+ page.
+
+ @attribute container
+ @type Node
+ @default null
+ @since 3.5.0
+ **/
+ container: {
+ value: null,
+
+ setter: function (node) {
+ return node ? Y.one(node) : null;
+ }
+ },
+
+ /**
+ CSS selector used to extract a specific portion of the content of a page
+ loaded via Pjax.
+
+ For example, if you wanted to load the page `example.html` but only use
+ the content within an element with the id "pjax-content", you'd set
+ `contentSelector` to "#pjax-content".
+
+ If not set, the entire page will be used.
+
+ @attribute contentSelector
+ @type String
+ @default null
+ @since 3.5.0
+ **/
+ contentSelector: {
+ value: null
+ },
+
+ // Inherited from Router and already documented there.
+ routes: {
+ value: [
+ {path: '*', callback: '_defaultRoute'}
+ ]
+ },
+
+ /**
+ CSS selector used to extract a page title from the content of a page
+ loaded via Pjax.
+
+ By default this is set to extract the title from the `` element,
+ but you could customize it to extract the title from an `
`, or from
+ any other element, if that's more appropriate for the content you're
+ loading.
+
+ @attribute titleSelector
+ @type String
+ @default "title"
+ @since 3.5.0
+ **/
+ titleSelector: {
+ value: 'title'
+ },
+
+ /**
+ Time in milliseconds after which an Ajax request should time out. When a
+ timeout occurs, the `error` event will be fired.
+
+ @attribute timeout
+ @type Number
+ @default 30000
+ @since 3.5.0
+ **/
+ timeout: {
+ value: 30000
+ }
+ }
+});
+
+
+}, '3.5.0' ,{requires:['pjax-base', 'io-base']});
diff --git a/lib/yui/3.4.1/build/plugin/plugin-debug.js b/lib/yui/3.5.0/build/plugin/plugin-debug.js
similarity index 98%
rename from lib/yui/3.4.1/build/plugin/plugin-debug.js
rename to lib/yui/3.5.0/build/plugin/plugin-debug.js
index 065a542affa..ce23a78fd5c 100644
--- a/lib/yui/3.4.1/build/plugin/plugin-debug.js
+++ b/lib/yui/3.5.0/build/plugin/plugin-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -232,4 +232,4 @@ YUI.add('plugin', function(Y) {
Y.namespace("Plugin").Base = Plugin;
-}, '3.4.1' ,{requires:['base-base']});
+}, '3.5.0' ,{requires:['base-base']});
diff --git a/lib/yui/3.4.1/build/plugin/plugin-min.js b/lib/yui/3.5.0/build/plugin/plugin-min.js
similarity index 92%
rename from lib/yui/3.4.1/build/plugin/plugin-min.js
rename to lib/yui/3.5.0/build/plugin/plugin-min.js
index b2f02a26f6d..e31a3b98251 100644
--- a/lib/yui/3.4.1/build/plugin/plugin-min.js
+++ b/lib/yui/3.5.0/build/plugin/plugin-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("plugin",function(b){function a(c){if(!(this.hasImpl&&this.hasImpl(b.Plugin.Base))){a.superclass.constructor.apply(this,arguments);}else{a.prototype.initializer.apply(this,arguments);}}a.ATTRS={host:{writeOnce:true}};a.NAME="plugin";a.NS="plugin";b.extend(a,b.Base,{_handles:null,initializer:function(c){this._handles=[];},destructor:function(){if(this._handles){for(var d=0,c=this._handles.length;d=0;j--){f=g[j];m=f._UNPLUG;if(m){c.mix(h,m,true);}l=f._PLUG;if(l){c.mix(d,l,true);}}for(k in d){if(d.hasOwnProperty(k)){if(!h[k]){this.plug(d[k]);}}}if(e&&e.plugins){this.plug(e.plugins);}};b.plug=function(e,j,g){var k,h,d,f;if(e!==c.Base){e._PLUG=e._PLUG||{};if(!a.isArray(j)){if(g){j={fn:j,cfg:g};}j=[j];}for(h=0,d=j.length;h=0;j--){f=g[j];m=f._UNPLUG;if(m){c.mix(h,m,true);}l=f._PLUG;if(l){c.mix(d,l,true);}}for(k in d){if(d.hasOwnProperty(k)){if(!h[k]){this.plug(d[k]);}}}if(e&&e.plugins){this.plug(e.plugins);}};b.plug=function(e,j,g){var k,h,d,f;if(e!==c.Base){e._PLUG=e._PLUG||{};if(!a.isArray(j)){if(g){j={fn:j,cfg:g};}j=[j];}for(h=0,d=j.length;h1){functionData.avg=((functionData.avg*(functionData.calls-1))+duration)/functionData.calls;functionData.min=Math.min(functionData.min,duration);functionData.max=Math.max(functionData.max,duration);}else{functionData.avg=duration;functionData.min=duration;functionData.max=duration;}}Y.Profiler={clear:function(name){if(L.isString(name)){delete report[name];delete stopwatches[name];}else{report={};stopwatches={};}},getOriginal:function(name){return container[name];},instrument:function(name,method){var newMethod=function(){var start=new Date(),retval=method.apply(this,arguments),stop=new Date();saveDataPoint(name,stop-start);return retval;};Y.mix(newMethod,method);newMethod.__yuiProfiled=true;newMethod.prototype=method.prototype;container[name]=method;container[name].__yuiFuncName=name;createReport(name);return newMethod;},pause:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch&&stopwatch.state==WATCH_STARTED){stopwatch.total+=(now-stopwatch.start);stopwatch.start=0;stopwatch.state=WATCH_PAUSED;}},start:function(name){if(container[name]){throw new Error("Cannot use '"+name+"' for profiling through start(), name is already in use.");}else{if(!report[name]){createReport(name);}if(!stopwatches[name]){stopwatches[name]={state:WATCH_STOPPED,start:0,total:0};}if(stopwatches[name].state==WATCH_STOPPED){stopwatches[name].state=WATCH_STARTED;stopwatches[name].start=new Date();}}},stop:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch){if(stopwatch.state==WATCH_STARTED){saveDataPoint(name,stopwatch.total+(now-stopwatch.start));}else{if(stopwatch.state==WATCH_PAUSED){saveDataPoint(name,stopwatch.total);}}stopwatch.start=0;stopwatch.total=0;stopwatch.state=WATCH_STOPPED;}},getAverage:function(name){return report[name].avg;},getCallCount:function(name){return report[name].calls;},getMax:function(name){return report[name].max;},getMin:function(name){return report[name].min;},getFunctionReport:function(name){return report[name];},getReport:function(name){return report[name];},getFullReport:function(filter){filter=filter||function(){return true;};if(L.isFunction(filter)){var fullReport={};for(var name in report){if(filter(report[name])){fullReport[name]=report[name];}}return fullReport;}},registerConstructor:function(name,owner){this.registerFunction(name,owner,true);},registerFunction:function(name,owner,registerPrototype){var funcName=(name.indexOf(".")>-1?name.substring(name.lastIndexOf(".")+1):name),method,prototype;if(!L.isObject(owner)){owner=eval(name.substring(0,name.lastIndexOf(".")));}method=owner[funcName];prototype=method.prototype;if(L.isFunction(method)&&!method.__yuiProfiled){owner[funcName]=this.instrument(name,method);container[name].__yuiOwner=owner;container[name].__yuiFuncName=funcName;if(registerPrototype){this.registerObject(name+".prototype",prototype);}}},registerObject:function(name,object,recurse){object=(L.isObject(object)?object:eval(name));container[name]=object;for(var prop in object){if(typeof object[prop]=="function"){if(prop!="constructor"&&prop!="superclass"){this.registerFunction(name+"."+prop,object);}}else{if(typeof object[prop]=="object"&&recurse){this.registerObject(name+"."+prop,object[prop],recurse);}}}},unregisterConstructor:function(name){if(L.isFunction(container[name])){this.unregisterFunction(name,true);}},unregisterFunction:function(name,unregisterPrototype){if(L.isFunction(container[name])){if(unregisterPrototype){this.unregisterObject(name+".prototype",container[name].prototype);}var owner=container[name].__yuiOwner,funcName=container[name].__yuiFuncName;delete container[name].__yuiOwner;delete container[name].__yuiFuncName;owner[funcName]=container[name];delete container[name];}},unregisterObject:function(name,recurse){if(L.isObject(container[name])){var object=container[name];for(var prop in object){if(typeof object[prop]=="function"){this.unregisterFunction(name+"."+prop);}else{if(typeof object[prop]=="object"&&recurse){this.unregisterObject(name+"."+prop,recurse);}}}delete container[name];}}};},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
+YUI.add("profiler",function(Y){var container={},report={},stopwatches={},WATCH_STARTED=0,WATCH_STOPPED=1,WATCH_PAUSED=2,L=Y.Lang;function createReport(name){report[name]={calls:0,max:0,min:0,avg:0,points:[]};return report[name];}function saveDataPoint(name,duration){var functionData=report[name];if(!functionData){functionData=createReport(name);}functionData.calls++;functionData.points.push(duration);if(functionData.calls>1){functionData.avg=((functionData.avg*(functionData.calls-1))+duration)/functionData.calls;functionData.min=Math.min(functionData.min,duration);functionData.max=Math.max(functionData.max,duration);}else{functionData.avg=duration;functionData.min=duration;functionData.max=duration;}}Y.Profiler={clear:function(name){if(L.isString(name)){delete report[name];delete stopwatches[name];}else{report={};stopwatches={};}},getOriginal:function(name){return container[name];},instrument:function(name,method){var newMethod=function(){var start=new Date(),retval=method.apply(this,arguments),stop=new Date();saveDataPoint(name,stop-start);return retval;};Y.mix(newMethod,method);newMethod.__yuiProfiled=true;newMethod.prototype=method.prototype;container[name]=method;container[name].__yuiFuncName=name;createReport(name);return newMethod;},pause:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch&&stopwatch.state==WATCH_STARTED){stopwatch.total+=(now-stopwatch.start);stopwatch.start=0;stopwatch.state=WATCH_PAUSED;}},start:function(name){if(container[name]){throw new Error("Cannot use '"+name+"' for profiling through start(), name is already in use.");}else{if(!report[name]){createReport(name);}if(!stopwatches[name]){stopwatches[name]={state:WATCH_STOPPED,start:0,total:0};}if(stopwatches[name].state==WATCH_STOPPED){stopwatches[name].state=WATCH_STARTED;stopwatches[name].start=new Date();}}},stop:function(name){var now=new Date(),stopwatch=stopwatches[name];if(stopwatch){if(stopwatch.state==WATCH_STARTED){saveDataPoint(name,stopwatch.total+(now-stopwatch.start));}else{if(stopwatch.state==WATCH_PAUSED){saveDataPoint(name,stopwatch.total);}}stopwatch.start=0;stopwatch.total=0;stopwatch.state=WATCH_STOPPED;}},getAverage:function(name){return report[name].avg;},getCallCount:function(name){return report[name].calls;},getMax:function(name){return report[name].max;},getMin:function(name){return report[name].min;},getFunctionReport:function(name){return report[name];},getReport:function(name){return report[name];},getFullReport:function(filter){filter=filter||function(){return true;};if(L.isFunction(filter)){var fullReport={};for(var name in report){if(filter(report[name])){fullReport[name]=report[name];}}return fullReport;}},registerConstructor:function(name,owner){this.registerFunction(name,owner,true);},registerFunction:function(name,owner,registerPrototype){var funcName=(name.indexOf(".")>-1?name.substring(name.lastIndexOf(".")+1):name),method,prototype;if(!L.isObject(owner)){owner=eval(name.substring(0,name.lastIndexOf(".")));}method=owner[funcName];prototype=method.prototype;if(L.isFunction(method)&&!method.__yuiProfiled){owner[funcName]=this.instrument(name,method);container[name].__yuiOwner=owner;container[name].__yuiFuncName=funcName;if(registerPrototype){this.registerObject(name+".prototype",prototype);}}},registerObject:function(name,object,recurse){object=(L.isObject(object)?object:eval(name));container[name]=object;for(var prop in object){if(typeof object[prop]=="function"){if(prop!="constructor"&&prop!="superclass"){this.registerFunction(name+"."+prop,object);}}else{if(typeof object[prop]=="object"&&recurse){this.registerObject(name+"."+prop,object[prop],recurse);}}}},unregisterConstructor:function(name){if(L.isFunction(container[name])){this.unregisterFunction(name,true);}},unregisterFunction:function(name,unregisterPrototype){if(L.isFunction(container[name])){if(unregisterPrototype){this.unregisterObject(name+".prototype",container[name].prototype);}var owner=container[name].__yuiOwner,funcName=container[name].__yuiFuncName;delete container[name].__yuiOwner;delete container[name].__yuiFuncName;owner[funcName]=container[name];delete container[name];}},unregisterObject:function(name,recurse){if(L.isObject(container[name])){var object=container[name];for(var prop in object){if(typeof object[prop]=="function"){this.unregisterFunction(name+"."+prop);}else{if(typeof object[prop]=="object"&&recurse){this.unregisterObject(name+"."+prop,recurse);}}}delete container[name];}}};},"3.5.0",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/profiler/profiler.js b/lib/yui/3.5.0/build/profiler/profiler.js
similarity index 99%
rename from lib/yui/3.4.1/build/profiler/profiler.js
rename to lib/yui/3.5.0/build/profiler/profiler.js
index eb5ffb8fb7b..de69eb6c98e 100644
--- a/lib/yui/3.4.1/build/profiler/profiler.js
+++ b/lib/yui/3.5.0/build/profiler/profiler.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -550,4 +550,4 @@ YUI.add('profiler', function(Y) {
};
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple-debug.js b/lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple-debug.js
similarity index 96%
rename from lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple-debug.js
rename to lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple-debug.js
index 0630f54339b..6648952695f 100644
--- a/lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple-debug.js
+++ b/lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -82,4 +82,4 @@ QueryString.unescape = function (s) {
};
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple-min.js b/lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple-min.js
similarity index 75%
rename from lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple-min.js
rename to lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple-min.js
index 26725240f44..45574daa221 100644
--- a/lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple-min.js
+++ b/lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("querystring-parse-simple",function(b){var a=b.namespace("QueryString");a.parse=function(e,g,d){g=g||"&";d=d||"=";for(var k={},h=0,j=e.split(g),f=j.length,c;h0){k[a.unescape(c.shift())]=a.unescape(c.join(d));}}return k;};a.unescape=function(c){return decodeURIComponent(c.replace(/\+/g," "));};},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
+YUI.add("querystring-parse-simple",function(b){var a=b.namespace("QueryString");a.parse=function(e,g,d){g=g||"&";d=d||"=";for(var k={},h=0,j=e.split(g),f=j.length,c;h0){k[a.unescape(c.shift())]=a.unescape(c.join(d));}}return k;};a.unescape=function(c){return decodeURIComponent(c.replace(/\+/g," "));};},"3.5.0",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple.js b/lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple.js
similarity index 96%
rename from lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple.js
rename to lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple.js
index 0630f54339b..6648952695f 100644
--- a/lib/yui/3.4.1/build/querystring-parse-simple/querystring-parse-simple.js
+++ b/lib/yui/3.5.0/build/querystring-parse-simple/querystring-parse-simple.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -82,4 +82,4 @@ QueryString.unescape = function (s) {
};
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/querystring-parse/querystring-parse-debug.js b/lib/yui/3.5.0/build/querystring-parse/querystring-parse-debug.js
similarity index 81%
rename from lib/yui/3.4.1/build/querystring-parse/querystring-parse-debug.js
rename to lib/yui/3.5.0/build/querystring-parse/querystring-parse-debug.js
index 0d567ff0e3d..8ff546f1b09 100644
--- a/lib/yui/3.4.1/build/querystring-parse/querystring-parse-debug.js
+++ b/lib/yui/3.5.0/build/querystring-parse/querystring-parse-debug.js
@@ -1,29 +1,33 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('querystring-parse', function(Y) {
/**
- *
The QueryString module adds support for serializing JavaScript objects into
- * query strings and parsing JavaScript objects from query strings format.
+ * The QueryString module adds support for serializing JavaScript objects into
+ * query strings and parsing JavaScript objects from query strings format.
*
- *
The QueryString namespace is added to your YUI instance including static methods
- * Y.QueryString.parse(..) and Y.QueryString.stringify(..).
+ * The QueryString namespace is added to your YUI instance including static methods
+ * `Y.QueryString.parse(..)` and `Y.QueryString.stringify(..)`.
*
- *
The querystring module is a rollup of querystring-parse and
- * querystring-stringify.
+ * The `querystring` module is a alias for `querystring-parse` and
+ * `querystring-stringify`.
*
- *
As their names suggest, querystring-parse adds support for parsing
- * Query String data (Y.QueryString.parse) and querystring-stringify for serializing
- * JavaScript data into Query Strings (Y.QueryString.stringify). You may choose to
+ * As their names suggest, `querystring-parse` adds support for parsing
+ * Query String data (`Y.QueryString.parse`) and `querystring-stringify` for serializing
+ * JavaScript data into Query Strings (`Y.QueryString.stringify`). You may choose to
* include either of the submodules individually if you don't need the
- * complementary functionality, or include the rollup for both.
+ * complementary functionality, or include the rollup for both.
*
* @module querystring
* @main querystring
+*/
+/**
+ * The QueryString module adds support for serializing JavaScript objects into
+ * query strings and parsing JavaScript objects from query strings format.
* @class QueryString
* @static
*/
@@ -158,4 +162,4 @@ QueryString.unescape = function (s) {
-}, '3.4.1' ,{requires:['array-extras', 'yui-base']});
+}, '3.5.0' ,{requires:['array-extras', 'yui-base'], supersedes:['querystring-parse-simple']});
diff --git a/lib/yui/3.4.1/build/querystring-parse/querystring-parse-min.js b/lib/yui/3.5.0/build/querystring-parse/querystring-parse-min.js
similarity index 82%
rename from lib/yui/3.4.1/build/querystring-parse/querystring-parse-min.js
rename to lib/yui/3.5.0/build/querystring-parse/querystring-parse-min.js
index f5a05d1d8f5..13f5ad82e04 100644
--- a/lib/yui/3.4.1/build/querystring-parse/querystring-parse-min.js
+++ b/lib/yui/3.5.0/build/querystring-parse/querystring-parse-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("querystring-parse",function(e){var b=e.namespace("QueryString"),d=function(f){return function g(l,n){var h,m,k,j,i;if(arguments.length!==2){l=l.split(f);return g(b.unescape(l.shift()),b.unescape(l.join(f)));}l=l.replace(/^\s+|\s+$/g,"");if(e.Lang.isString(n)){n=n.replace(/^\s+|\s+$/g,"");if(!isNaN(n)){m=+n;if(n===m.toString(10)){n=m;}}}h=/(.*)\[([^\]]*)\]$/.exec(l);if(!h){i={};if(l){i[l]=n;}return i;}j=h[2];k=h[1];if(!j){return g(k,[n]);}i={};i[j]=n;return g(k,i);};},c=function(g,f){return((!g)?f:(e.Lang.isArray(g))?g.concat(f):(!e.Lang.isObject(g)||!e.Lang.isObject(f))?[g].concat(f):a(g,f));},a=function(h,f){for(var g in f){if(g&&f.hasOwnProperty(g)){h[g]=c(h[g],f[g]);}}return h;};b.parse=function(g,h,f){return e.Array.reduce(e.Array.map(g.split(h||"&"),d(f||"=")),{},c);};b.unescape=function(f){return decodeURIComponent(f.replace(/\+/g," "));};},"3.4.1",{requires:["array-extras","yui-base"]});
\ No newline at end of file
+YUI.add("querystring-parse",function(e){var b=e.namespace("QueryString"),d=function(f){return function g(l,n){var h,m,k,j,i;if(arguments.length!==2){l=l.split(f);return g(b.unescape(l.shift()),b.unescape(l.join(f)));}l=l.replace(/^\s+|\s+$/g,"");if(e.Lang.isString(n)){n=n.replace(/^\s+|\s+$/g,"");if(!isNaN(n)){m=+n;if(n===m.toString(10)){n=m;}}}h=/(.*)\[([^\]]*)\]$/.exec(l);if(!h){i={};if(l){i[l]=n;}return i;}j=h[2];k=h[1];if(!j){return g(k,[n]);}i={};i[j]=n;return g(k,i);};},c=function(g,f){return((!g)?f:(e.Lang.isArray(g))?g.concat(f):(!e.Lang.isObject(g)||!e.Lang.isObject(f))?[g].concat(f):a(g,f));},a=function(h,f){for(var g in f){if(g&&f.hasOwnProperty(g)){h[g]=c(h[g],f[g]);}}return h;};b.parse=function(g,h,f){return e.Array.reduce(e.Array.map(g.split(h||"&"),d(f||"=")),{},c);};b.unescape=function(f){return decodeURIComponent(f.replace(/\+/g," "));};},"3.5.0",{requires:["array-extras","yui-base"],supersedes:["querystring-parse-simple"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/querystring-parse/querystring-parse.js b/lib/yui/3.5.0/build/querystring-parse/querystring-parse.js
similarity index 81%
rename from lib/yui/3.4.1/build/querystring-parse/querystring-parse.js
rename to lib/yui/3.5.0/build/querystring-parse/querystring-parse.js
index 0d567ff0e3d..8ff546f1b09 100644
--- a/lib/yui/3.4.1/build/querystring-parse/querystring-parse.js
+++ b/lib/yui/3.5.0/build/querystring-parse/querystring-parse.js
@@ -1,29 +1,33 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('querystring-parse', function(Y) {
/**
- *
The QueryString module adds support for serializing JavaScript objects into
- * query strings and parsing JavaScript objects from query strings format.
+ * The QueryString module adds support for serializing JavaScript objects into
+ * query strings and parsing JavaScript objects from query strings format.
*
- *
The QueryString namespace is added to your YUI instance including static methods
- * Y.QueryString.parse(..) and Y.QueryString.stringify(..).
+ * The QueryString namespace is added to your YUI instance including static methods
+ * `Y.QueryString.parse(..)` and `Y.QueryString.stringify(..)`.
*
- *
The querystring module is a rollup of querystring-parse and
- * querystring-stringify.
+ * The `querystring` module is a alias for `querystring-parse` and
+ * `querystring-stringify`.
*
- *
As their names suggest, querystring-parse adds support for parsing
- * Query String data (Y.QueryString.parse) and querystring-stringify for serializing
- * JavaScript data into Query Strings (Y.QueryString.stringify). You may choose to
+ * As their names suggest, `querystring-parse` adds support for parsing
+ * Query String data (`Y.QueryString.parse`) and `querystring-stringify` for serializing
+ * JavaScript data into Query Strings (`Y.QueryString.stringify`). You may choose to
* include either of the submodules individually if you don't need the
- * complementary functionality, or include the rollup for both.
+ * complementary functionality, or include the rollup for both.
*
* @module querystring
* @main querystring
+*/
+/**
+ * The QueryString module adds support for serializing JavaScript objects into
+ * query strings and parsing JavaScript objects from query strings format.
* @class QueryString
* @static
*/
@@ -158,4 +162,4 @@ QueryString.unescape = function (s) {
-}, '3.4.1' ,{requires:['array-extras', 'yui-base']});
+}, '3.5.0' ,{requires:['array-extras', 'yui-base'], supersedes:['querystring-parse-simple']});
diff --git a/lib/yui/3.4.1/build/querystring-stringify-simple/querystring-stringify-simple-debug.js b/lib/yui/3.5.0/build/querystring-stringify-simple/querystring-stringify-simple-debug.js
similarity index 95%
rename from lib/yui/3.4.1/build/querystring-stringify-simple/querystring-stringify-simple-debug.js
rename to lib/yui/3.5.0/build/querystring-stringify-simple/querystring-stringify-simple-debug.js
index 6beba15491b..706efe2ba61 100644
--- a/lib/yui/3.4.1/build/querystring-stringify-simple/querystring-stringify-simple-debug.js
+++ b/lib/yui/3.5.0/build/querystring-stringify-simple/querystring-stringify-simple-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -64,4 +64,4 @@ QueryString.stringify = function (obj, c) {
};
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/querystring-stringify-simple/querystring-stringify-simple-min.js b/lib/yui/3.5.0/build/querystring-stringify-simple/querystring-stringify-simple-min.js
similarity index 74%
rename from lib/yui/3.4.1/build/querystring-stringify-simple/querystring-stringify-simple-min.js
rename to lib/yui/3.5.0/build/querystring-stringify-simple/querystring-stringify-simple-min.js
index b15e22a3e8f..92c2d50b49b 100644
--- a/lib/yui/3.4.1/build/querystring-stringify-simple/querystring-stringify-simple-min.js
+++ b/lib/yui/3.5.0/build/querystring-stringify-simple/querystring-stringify-simple-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("querystring-stringify-simple",function(c){var b=c.namespace("QueryString"),a=encodeURIComponent;b.stringify=function(j,k){var d=[],h=k&&k.arrayKey?true:false,g,f,e;for(g in j){if(j.hasOwnProperty(g)){if(c.Lang.isArray(j[g])){for(f=0,e=j[g].length;f=0;--m){if(b[m]===k){throw new Error("QueryString.stringify. Cyclical reference");}}b.push(k);t=[];g=e?e+"[":"";j=e?"]":"";for(m in k){if(k.hasOwnProperty(m)){f=g+m+j;t.push(c.stringify(k[m],o,f));}}b.pop();t=t.join(r);if(!t&&e){return e+"=";}return t;};},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
+YUI.add("querystring-stringify",function(d){var c=d.namespace("QueryString"),b=[],a=d.Lang;c.escape=encodeURIComponent;c.stringify=function(k,o,e){var g,j,m,h,f,t,r=o&&o.sep?o.sep:"&",p=o&&o.eq?o.eq:"=",q=o&&o.arrayKey?o.arrayKey:false;if(a.isNull(k)||a.isUndefined(k)||a.isFunction(k)){return e?c.escape(e)+p:"";}if(a.isBoolean(k)||Object.prototype.toString.call(k)==="[object Boolean]"){k=+k;}if(a.isNumber(k)||a.isString(k)){return c.escape(e)+p+c.escape(k);}if(a.isArray(k)){t=[];e=q?e+"[]":e;h=k.length;for(m=0;m=0;--m){if(b[m]===k){throw new Error("QueryString.stringify. Cyclical reference");}}b.push(k);t=[];g=e?e+"[":"";j=e?"]":"";for(m in k){if(k.hasOwnProperty(m)){f=g+m+j;t.push(c.stringify(k[m],o,f));}}b.pop();t=t.join(r);if(!t&&e){return e+"=";}return t;};},"3.5.0",{requires:["yui-base"],supersedes:["querystring-stringify-simple"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/querystring-stringify/querystring-stringify.js b/lib/yui/3.5.0/build/querystring-stringify/querystring-stringify.js
similarity index 95%
rename from lib/yui/3.4.1/build/querystring-stringify/querystring-stringify.js
rename to lib/yui/3.5.0/build/querystring-stringify/querystring-stringify.js
index 09e2dd75eb7..ee22c23ff3f 100644
--- a/lib/yui/3.4.1/build/querystring-stringify/querystring-stringify.js
+++ b/lib/yui/3.5.0/build/querystring-stringify/querystring-stringify.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -110,4 +110,4 @@ QueryString.stringify = function (obj, c, name) {
};
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base'], supersedes:['querystring-stringify-simple']});
diff --git a/lib/yui/3.4.1/build/queue-promote/queue-promote-debug.js b/lib/yui/3.5.0/build/queue-promote/queue-promote-debug.js
similarity index 91%
rename from lib/yui/3.4.1/build/queue-promote/queue-promote-debug.js
rename to lib/yui/3.5.0/build/queue-promote/queue-promote-debug.js
index be347fa2812..c42517becff 100644
--- a/lib/yui/3.4.1/build/queue-promote/queue-promote-debug.js
+++ b/lib/yui/3.5.0/build/queue-promote/queue-promote-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -56,4 +56,4 @@ Y.mix(Y.Queue.prototype, {
});
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/queue-promote/queue-promote-min.js b/lib/yui/3.5.0/build/queue-promote/queue-promote-min.js
similarity index 70%
rename from lib/yui/3.4.1/build/queue-promote/queue-promote-min.js
rename to lib/yui/3.5.0/build/queue-promote/queue-promote-min.js
index 8511b05e4f7..9f13abb61fc 100644
--- a/lib/yui/3.4.1/build/queue-promote/queue-promote-min.js
+++ b/lib/yui/3.5.0/build/queue-promote/queue-promote-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("queue-promote",function(a){a.mix(a.Queue.prototype,{indexOf:function(b){return a.Array.indexOf(this._q,b);},promote:function(c){var b=this.indexOf(c);if(b>-1){this._q.unshift(this._q.splice(b,1)[0]);}},remove:function(c){var b=this.indexOf(c);if(b>-1){this._q.splice(b,1);}}});},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
+YUI.add("queue-promote",function(a){a.mix(a.Queue.prototype,{indexOf:function(b){return a.Array.indexOf(this._q,b);},promote:function(c){var b=this.indexOf(c);if(b>-1){this._q.unshift(this._q.splice(b,1)[0]);}},remove:function(c){var b=this.indexOf(c);if(b>-1){this._q.splice(b,1);}}});},"3.5.0",{requires:["yui-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/queue-promote/queue-promote.js b/lib/yui/3.5.0/build/queue-promote/queue-promote.js
similarity index 91%
rename from lib/yui/3.4.1/build/queue-promote/queue-promote.js
rename to lib/yui/3.5.0/build/queue-promote/queue-promote.js
index be347fa2812..c42517becff 100644
--- a/lib/yui/3.4.1/build/queue-promote/queue-promote.js
+++ b/lib/yui/3.5.0/build/queue-promote/queue-promote.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -56,4 +56,4 @@ Y.mix(Y.Queue.prototype, {
});
-}, '3.4.1' ,{requires:['yui-base']});
+}, '3.5.0' ,{requires:['yui-base']});
diff --git a/lib/yui/3.4.1/build/clickable-rail/assets/slider-base-core.css b/lib/yui/3.5.0/build/range-slider/assets/slider-base-core.css
similarity index 90%
rename from lib/yui/3.4.1/build/clickable-rail/assets/slider-base-core.css
rename to lib/yui/3.5.0/build/range-slider/assets/slider-base-core.css
index f974610a6ba..c4725aabdcc 100644
--- a/lib/yui/3.4.1/build/clickable-rail/assets/slider-base-core.css
+++ b/lib/yui/3.5.0/build/range-slider/assets/slider-base-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/slider-base/assets/slider-core.css b/lib/yui/3.5.0/build/range-slider/assets/slider-core.css
similarity index 90%
rename from lib/yui/3.4.1/build/slider-base/assets/slider-core.css
rename to lib/yui/3.5.0/build/range-slider/assets/slider-core.css
index f974610a6ba..c4725aabdcc 100644
--- a/lib/yui/3.4.1/build/slider-base/assets/slider-core.css
+++ b/lib/yui/3.5.0/build/range-slider/assets/slider-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong-dark.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong-dark.png
new file mode 100644
index 00000000000..bc0aa14ce4d
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong-dark.png differ
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong.png
new file mode 100644
index 00000000000..670ba1ea15c
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong.png differ
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong2-dark.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong2-dark.png
new file mode 100644
index 00000000000..20f126029f1
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong2-dark.png differ
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong2.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong2.png
new file mode 100644
index 00000000000..76e34e60ae9
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-x-oblong2.png differ
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong-dark.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong-dark.png
new file mode 100644
index 00000000000..a0eed7087f4
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong-dark.png differ
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong.png
new file mode 100644
index 00000000000..e63c8d7d867
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong.png differ
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong2-dark.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong2-dark.png
new file mode 100644
index 00000000000..e91ffb7b3e4
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong2-dark.png differ
diff --git a/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong2.png b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong2.png
new file mode 100644
index 00000000000..89a46672709
Binary files /dev/null and b/lib/yui/3.5.0/build/range-slider/assets/thumb-y-oblong2.png differ
diff --git a/lib/yui/3.4.1/build/range-slider/range-slider-debug.js b/lib/yui/3.5.0/build/range-slider/range-slider-debug.js
similarity index 84%
rename from lib/yui/3.4.1/build/range-slider/range-slider-debug.js
rename to lib/yui/3.5.0/build/range-slider/range-slider-debug.js
index a9ac7fbfaa9..f1bd1b75387 100644
--- a/lib/yui/3.4.1/build/range-slider/range-slider-debug.js
+++ b/lib/yui/3.5.0/build/range-slider/range-slider-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -31,4 +31,5 @@ Y.Slider = Y.Base.build( 'slider', Y.SliderBase,
[ Y.SliderValueRange, Y.ClickableRail ] );
-}, '3.4.1' ,{requires:['slider-base', 'clickable-rail', 'slider-value-range']});
+
+}, '3.5.0' ,{requires:['slider-base', 'clickable-rail', 'slider-value-range']});
diff --git a/lib/yui/3.4.1/build/range-slider/range-slider-min.js b/lib/yui/3.5.0/build/range-slider/range-slider-min.js
similarity index 59%
rename from lib/yui/3.4.1/build/range-slider/range-slider-min.js
rename to lib/yui/3.5.0/build/range-slider/range-slider-min.js
index c4e75d6462e..6d97d1aee2a 100644
--- a/lib/yui/3.4.1/build/range-slider/range-slider-min.js
+++ b/lib/yui/3.5.0/build/range-slider/range-slider-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("range-slider",function(a){a.Slider=a.Base.build("slider",a.SliderBase,[a.SliderValueRange,a.ClickableRail]);},"3.4.1",{requires:["slider-base","clickable-rail","slider-value-range"]});
\ No newline at end of file
+YUI.add("range-slider",function(a){a.Slider=a.Base.build("slider",a.SliderBase,[a.SliderValueRange,a.ClickableRail]);},"3.5.0",{requires:["slider-base","clickable-rail","slider-value-range"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/range-slider/range-slider.js b/lib/yui/3.5.0/build/range-slider/range-slider.js
similarity index 84%
rename from lib/yui/3.4.1/build/range-slider/range-slider.js
rename to lib/yui/3.5.0/build/range-slider/range-slider.js
index a9ac7fbfaa9..f1bd1b75387 100644
--- a/lib/yui/3.4.1/build/range-slider/range-slider.js
+++ b/lib/yui/3.5.0/build/range-slider/range-slider.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -31,4 +31,5 @@ Y.Slider = Y.Base.build( 'slider', Y.SliderBase,
[ Y.SliderValueRange, Y.ClickableRail ] );
-}, '3.4.1' ,{requires:['slider-base', 'clickable-rail', 'slider-value-range']});
+
+}, '3.5.0' ,{requires:['slider-base', 'clickable-rail', 'slider-value-range']});
diff --git a/lib/yui/3.4.1/build/recordset-base/recordset-base-debug.js b/lib/yui/3.5.0/build/recordset-base/recordset-base-debug.js
similarity index 99%
rename from lib/yui/3.4.1/build/recordset-base/recordset-base-debug.js
rename to lib/yui/3.5.0/build/recordset-base/recordset-base-debug.js
index ad7436c5ce0..626e67e8b20 100644
--- a/lib/yui/3.4.1/build/recordset-base/recordset-base-debug.js
+++ b/lib/yui/3.5.0/build/recordset-base/recordset-base-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -654,4 +654,4 @@ Y.Recordset = Recordset;
-}, '3.4.1' ,{requires:['base','arraylist']});
+}, '3.5.0' ,{requires:['base','arraylist']});
diff --git a/lib/yui/3.4.1/build/recordset-base/recordset-base-min.js b/lib/yui/3.5.0/build/recordset-base/recordset-base-min.js
similarity index 96%
rename from lib/yui/3.4.1/build/recordset-base/recordset-base-min.js
rename to lib/yui/3.5.0/build/recordset-base/recordset-base-min.js
index 915700e793b..f0670908370 100644
--- a/lib/yui/3.4.1/build/recordset-base/recordset-base-min.js
+++ b/lib/yui/3.5.0/build/recordset-base/recordset-base-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("recordset-base",function(e){var a=e.Base.create("record",e.Base,[],{_setId:function(){return e.guid();},initializer:function(){},destructor:function(){},getValue:function(f){if(f===undefined){return this.get("data");}else{return this.get("data")[f];}return null;}},{ATTRS:{id:{valueFn:"_setId"},data:{value:null}}});e.Record=a;var b=e.ArrayList,c=e.Lang,d=e.Base.create("recordset",e.Base,[],{initializer:function(){if(!this._items){this._items=[];}this.publish({add:{defaultFn:this._defAddFn},remove:{defaultFn:this._defRemoveFn},empty:{defaultFn:this._defEmptyFn},update:{defaultFn:this._defUpdateFn}});this._buildHashTable(this.get("key"));this.after(["recordsChange","add","remove","update","empty"],this._updateHash);},getRecord:function(f){if(c.isString(f)){return this.get("table")[f];}else{if(c.isNumber(f)){return this._items[f];}}return null;},getRecordByIndex:function(f){return this._items[f];},getRecordsByIndex:function(h,g){var j=0,f=[];g=(c.isNumber(g)&&(g>0))?g:1;for(;j-1))?g:this._items.length;if(c.isArray(k)){for(;h-1)?g:(this._items.length-1);f=(f>0)?f:1;h=this._items.slice(g,(g+f));this.fire("remove",{removed:h,range:f,index:g});return this;},empty:function(){this.fire("empty",{});return this;},update:function(j,g){var k,f,h=0;f=(!(c.isArray(j)))?[j]:j;k=this._items.slice(g,g+f.length);for(;h=0;--f){delete j[h.removed[f].get(g)];}return j;},_hashUpdate:function(h,f,g){if(g.overwritten&&g.overwritten.length){h=this._hashRemove(h,f,{removed:g.overwritten});}return this._hashAdd(h,f,{added:g.updated});},_hashEmpty:function(){return{};},_initHashTable:function(){return this._hashAdd({},this.get("key"),{added:this._items||[]});},_changeToRecord:function(f){return(f instanceof e.Record)?f:new e.Record({data:f});},_setRecords:function(h){if(!e.Lang.isArray(h)){return e.Attribute.INVALID_VALUE;}var g=[],j,f;for(j=0,f=h.length;j0))?g:1;for(;j-1))?g:this._items.length;if(c.isArray(k)){for(;h-1)?g:(this._items.length-1);f=(f>0)?f:1;h=this._items.slice(g,(g+f));this.fire("remove",{removed:h,range:f,index:g});return this;},empty:function(){this.fire("empty",{});return this;},update:function(j,g){var k,f,h=0;f=(!(c.isArray(j)))?[j]:j;k=this._items.slice(g,g+f.length);for(;h=0;--f){delete j[h.removed[f].get(g)];}return j;},_hashUpdate:function(h,f,g){if(g.overwritten&&g.overwritten.length){h=this._hashRemove(h,f,{removed:g.overwritten});}return this._hashAdd(h,f,{added:g.updated});},_hashEmpty:function(){return{};},_initHashTable:function(){return this._hashAdd({},this.get("key"),{added:this._items||[]});},_changeToRecord:function(f){return(f instanceof e.Record)?f:new e.Record({data:f});},_setRecords:function(h){if(!e.Lang.isArray(h)){return e.Attribute.INVALID_VALUE;}var g=[],j,f;for(j=0,f=h.length;j0){R=P(R);}L.push(R);});return L.join(p);}),x=S.ClassNameManager.getClassName,at=x(aj),an=x(aj,v),ab=x(aj,v,o),e=x(aj,v,t),C=x(aj,v,t,H),aJ=x(aj,v,H),c=x(aj,ac,J),V=x(aj,J,aC),ay=x(aj,aC);function h(){h.superclass.constructor.apply(this,arguments);}S.mix(h,{NAME:aj,ATTRS:{activeHandle:{value:null,validator:function(B){return S.Lang.isString(B)||S.Lang.isNull(B);}},activeHandleNode:{value:null,validator:O},autoHide:{value:false,validator:aw},defMinHeight:{value:15,validator:M},defMinWidth:{value:15,validator:M},handles:{setter:"_setHandles",value:u},handlesWrapper:{readOnly:true,setter:S.one,valueFn:"_valueHandlesWrapper"},node:{setter:S.one},resizing:{value:false,validator:aw},wrap:{setter:"_setWrap",value:false,validator:aw},wrapTypes:{readOnly:true,value:/^canvas|textarea|input|select|button|img|iframe|table|embed$/i},wrapper:{readOnly:true,valueFn:"_valueWrapper",writeOnce:true}},RULES:{b:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.offsetHeight=T.offsetHeight+L;},l:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.left=T.left+R;Y.offsetWidth=T.offsetWidth-R;},r:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.offsetWidth=T.offsetWidth+R;},t:function(B,R,L){var Y=B.info,T=B.originalInfo;Y.top=T.top+L;Y.offsetHeight=T.offsetHeight-L;},tr:function(B,R,L){this.t.apply(this,arguments);this.r.apply(this,arguments);},bl:function(B,R,L){this.b.apply(this,arguments);this.l.apply(this,arguments);},br:function(B,R,L){this.b.apply(this,arguments);this.r.apply(this,arguments);},tl:function(B,R,L){this.t.apply(this,arguments);this.l.apply(this,arguments);}},capitalize:z});S.Resize=S.extend(h,S.Base,{ALL_HANDLES:[X,aE,Z,av,ai,ax,af,aH],REGEX_CHANGE_HEIGHT:/^(t|tr|b|bl|br|tl)$/i,REGEX_CHANGE_LEFT:/^(tl|l|bl)$/i,REGEX_CHANGE_TOP:/^(tl|t|tr)$/i,REGEX_CHANGE_WIDTH:/^(bl|br|l|r|tl|tr)$/i,HANDLES_WRAP_TEMPLATE:'',WRAP_TEMPLATE:'',HANDLE_TEMPLATE:'
'+'
'+"
",totalHSurrounding:0,totalVSurrounding:0,nodeSurrounding:null,wrapperSurrounding:null,changeHeightHandles:false,changeLeftHandles:false,changeTopHandles:false,changeWidthHandles:false,delegate:null,info:null,lastInfo:null,originalInfo:null,initializer:function(){this.renderer();},renderUI:function(){var B=this;B._renderHandles();},bindUI:function(){var B=this;B._createEvents();B._bindDD();B._bindHandle();},syncUI:function(){var B=this;this.get(n).addClass(at);B._setHideHandlesUI(B.get(ak));},destructor:function(){var B=this,R=B.get(n),T=B.get(aC),L=T.get(d);S.Event.purgeElement(T,true);B.eachHandle(function(Y){B.delegate.dd.destroy();Y.remove(true);});if(B.get(am)){B._copyStyles(T,R);if(L){L.insertBefore(R,T);}T.remove(true);}R.removeClass(at);R.removeClass(c);},renderer:function(){this.renderUI();this.bindUI();this.syncUI();},eachHandle:function(L){var B=this;S.each(B.get(J),function(Y,R){var T=B.get(aI(Y));L.apply(B,[T,Y,R]);});},_bindDD:function(){var B=this;B.delegate=new S.DD.Delegate({bubbleTargets:B,container:B.get(N),dragConfig:{clickPixelThresh:0,clickTimeThresh:0,useShim:true,move:false},nodes:ae+an,target:false});B.on("drag:drag",B._handleResizeEvent);B.on("drag:dropmiss",B._handleMouseUpEvent);B.on("drag:end",B._handleResizeEndEvent);B.on("drag:start",B._handleResizeStartEvent);},_bindHandle:function(){var B=this,L=B.get(aC);L.on("mouseenter",S.bind(B._onWrapperMouseEnter,B));L.on("mouseleave",S.bind(B._onWrapperMouseLeave,B));L.delegate("mouseenter",S.bind(B._onHandleMouseEnter,B),ae+an);L.delegate("mouseleave",S.bind(B._onHandleMouseLeave,B),ae+an);},_createEvents:function(){var B=this,L=function(R,T){B.publish(R,{defaultFn:T,queuable:false,emitFacade:true,bubbles:true,prefix:aj});};L(Q,this._defResizeStartFn);L(s,this._defResizeFn);L(w,this._defResizeAlignFn);L(G,this._defResizeEndFn);L(E,this._defMouseUpFn);},_renderHandles:function(){var B=this,R=B.get(aC),L=B.get(N);B.eachHandle(function(T){L.append(T);});R.append(L);},_buildHandle:function(L){var B=this;return S.Node.create(S.substitute(B.HANDLE_TEMPLATE,{handle:L}));},_calcResize:function(){var B=this,T=B.handle,aK=B.info,Y=B.originalInfo,R=aK.actXY[0]-Y.actXY[0],L=aK.actXY[1]-Y.actXY[1];if(T&&S.Resize.RULES[T]){S.Resize.RULES[T](B,R,L);}else{}},_checkSize:function(aK,L){var B=this,Y=B.info,T=B.originalInfo,R=(aK==D)?i:a;Y[aK]=L;if(((R==a)&&B.changeLeftHandles)||((R==i)&&B.changeTopHandles)){Y[R]=T[R]+T[aK]-L;}},_copyStyles:function(R,Y){var B=R.getStyle(l).toLowerCase(),T=this._getBoxSurroundingInfo(R),L;if(B==aG){B=j;}L={position:B,left:ad(R,a),top:ad(R,i)};S.mix(L,T.margin);S.mix(L,T.border);Y.setStyles(L);R.setStyles({border:0,margin:0});Y.sizeTo(R.get(az)+T.totalHBorder,R.get(D)+T.totalVBorder);},_extractHandleName:S.cached(function(R){var L=R.get(al),B=L.match(new RegExp(x(aj,v,"(\\w{1,2})\\b")));
-return B?B[1]:null;}),_getInfo:function(Y,B){var aK=[0,0],aM=B.dragEvent.target,aL=Y.getXY(),T=aL[0],R=aL[1],L=Y.get(D),aN=Y.get(az);if(B){aK=(aM.actXY.length?aM.actXY:aM.lastXY);}return{actXY:aK,bottom:(R+L),left:T,offsetHeight:L,offsetWidth:aN,right:(T+aN),top:R};},_getBoxSurroundingInfo:function(B){var L={padding:{},margin:{},border:{}};if(O(B)){S.each([i,g,ap,a],function(aK){var T=z(aa,aK),Y=z(I,aK),R=z(au,aK,F),aL=z(au,aK,ao),aM=z(au,aK,f);L.border[aL]=ad(B,aL);L.border[aM]=ad(B,aM);L.border[R]=ad(B,R);L.margin[Y]=ad(B,Y);L.padding[T]=ad(B,T);});}L.totalHBorder=(aq(L.border.borderLeftWidth)+aq(L.border.borderRightWidth));L.totalHPadding=(aq(L.padding.paddingLeft)+aq(L.padding.paddingRight));L.totalVBorder=(aq(L.border.borderBottomWidth)+aq(L.border.borderTopWidth));L.totalVPadding=(aq(L.padding.paddingBottom)+aq(L.padding.paddingTop));return L;},_syncUI:function(){var B=this,T=B.info,R=B.wrapperSurrounding,Y=B.get(aC),L=B.get(n);Y.sizeTo(T.offsetWidth,T.offsetHeight);if(B.changeLeftHandles||B.changeTopHandles){Y.setXY([T.left,T.top]);}if(!Y.compareTo(L)){L.sizeTo(T.offsetWidth-R.totalHBorder,T.offsetHeight-R.totalVBorder);}if(S.UA.webkit){L.setStyle(aj,U);}},_updateChangeHandleInfo:function(L){var B=this;B.changeHeightHandles=B.REGEX_CHANGE_HEIGHT.test(L);B.changeLeftHandles=B.REGEX_CHANGE_LEFT.test(L);B.changeTopHandles=B.REGEX_CHANGE_TOP.test(L);B.changeWidthHandles=B.REGEX_CHANGE_WIDTH.test(L);},_updateInfo:function(L){var B=this;B.info=B._getInfo(B.get(aC),L);},_updateSurroundingInfo:function(){var B=this,T=B.get(n),Y=B.get(aC),L=B._getBoxSurroundingInfo(T),R=B._getBoxSurroundingInfo(Y);B.nodeSurrounding=L;B.wrapperSurrounding=R;B.totalVSurrounding=(L.totalVPadding+R.totalVBorder);B.totalHSurrounding=(L.totalHPadding+R.totalHBorder);},_setActiveHandlesUI:function(R){var B=this,L=B.get(A);if(L){if(R){B.eachHandle(function(T){T.removeClass(ab);});L.addClass(ab);}else{L.removeClass(ab);}}},_setHandles:function(R){var B=this,L=[];if(b(R)){L=R;}else{if(aB(R)){if(R.toLowerCase()==u){L=B.ALL_HANDLES;}else{S.each(R.split(r),function(Y,T){var aK=ar(Y);if(k(B.ALL_HANDLES,aK)>-1){L.push(aK);}});}}}return L;},_setHideHandlesUI:function(L){var B=this,R=B.get(aC);if(!B.get(m)){if(L){R.addClass(c);}else{R.removeClass(c);}}},_setWrap:function(T){var B=this,R=B.get(n),Y=R.get(y),L=B.get(ah);if(L.test(Y)){T=true;}return T;},_defMouseUpFn:function(L){var B=this;B.set(m,false);},_defResizeFn:function(L){var B=this;B._resize(L);},_resize:function(L){var B=this;B._handleResizeAlignEvent(L.dragEvent);B._syncUI();},_defResizeAlignFn:function(L){var B=this;B._resizeAlign(L);},_resizeAlign:function(R){var B=this,T,L,Y;B.lastInfo=B.info;B._updateInfo(R);T=B.info;B._calcResize();if(!B.con){L=(B.get(aA)+B.totalVSurrounding);Y=(B.get(aF)+B.totalHSurrounding);if(T.offsetHeight<=L){B._checkSize(D,L);}if(T.offsetWidth<=Y){B._checkSize(az,Y);}}},_defResizeEndFn:function(L){var B=this;B._resizeEnd(L);},_resizeEnd:function(R){var B=this,L=R.dragEvent.target;L.actXY=[];B._syncUI();B._setActiveHandlesUI(false);B.set(K,null);B.set(A,null);B.handle=null;},_defResizeStartFn:function(L){var B=this;B._resizeStart(L);},_resizeStart:function(L){var B=this,R=B.get(aC);B.handle=B.get(K);B.set(m,true);B._updateSurroundingInfo();B.originalInfo=B._getInfo(R,L);B._updateInfo(L);},_handleMouseUpEvent:function(B){this.fire(E,{dragEvent:B,info:this.info});},_handleResizeEvent:function(B){this.fire(s,{dragEvent:B,info:this.info});},_handleResizeAlignEvent:function(B){this.fire(w,{dragEvent:B,info:this.info});},_handleResizeEndEvent:function(B){this.fire(G,{dragEvent:B,info:this.info});},_handleResizeStartEvent:function(B){if(!this.get(K)){this._setHandleFromNode(B.target.get("node"));}this.fire(Q,{dragEvent:B,info:this.info});},_onWrapperMouseEnter:function(L){var B=this;if(B.get(ak)){B._setHideHandlesUI(false);}},_onWrapperMouseLeave:function(L){var B=this;if(B.get(ak)){B._setHideHandlesUI(true);}},_setHandleFromNode:function(L){var B=this,R=B._extractHandleName(L);if(!B.get(m)){B.set(K,R);B.set(A,L);B._setActiveHandlesUI(true);B._updateChangeHandleInfo(R);}},_onHandleMouseEnter:function(B){this._setHandleFromNode(B.currentTarget);},_onHandleMouseLeave:function(L){var B=this;if(!B.get(m)){B._setActiveHandlesUI(false);}},_valueHandlesWrapper:function(){return S.Node.create(this.HANDLES_WRAP_TEMPLATE);},_valueWrapper:function(){var B=this,R=B.get(n),L=R.get(d),T=R;if(B.get(am)){T=S.Node.create(B.WRAP_TEMPLATE);if(L){L.insertBefore(T,R);}T.append(R);B._copyStyles(R,T);R.setStyles({position:aG,left:0,top:0});}return T;}});S.each(S.Resize.prototype.ALL_HANDLES,function(L,B){S.Resize.ATTRS[aI(L)]={setter:function(){return this._buildHandle(L);},value:null,writeOnce:true};});},"3.4.1",{requires:["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],skinnable:true});
\ No newline at end of file
+return B?B[1]:null;}),_getInfo:function(Y,B){var aK=[0,0],aM=B.dragEvent.target,aL=Y.getXY(),T=aL[0],R=aL[1],L=Y.get(D),aN=Y.get(az);if(B){aK=(aM.actXY.length?aM.actXY:aM.lastXY);}return{actXY:aK,bottom:(R+L),left:T,offsetHeight:L,offsetWidth:aN,right:(T+aN),top:R};},_getBoxSurroundingInfo:function(B){var L={padding:{},margin:{},border:{}};if(O(B)){S.each([i,g,ap,a],function(aK){var T=z(aa,aK),Y=z(I,aK),R=z(au,aK,F),aL=z(au,aK,ao),aM=z(au,aK,f);L.border[aL]=ad(B,aL);L.border[aM]=ad(B,aM);L.border[R]=ad(B,R);L.margin[Y]=ad(B,Y);L.padding[T]=ad(B,T);});}L.totalHBorder=(aq(L.border.borderLeftWidth)+aq(L.border.borderRightWidth));L.totalHPadding=(aq(L.padding.paddingLeft)+aq(L.padding.paddingRight));L.totalVBorder=(aq(L.border.borderBottomWidth)+aq(L.border.borderTopWidth));L.totalVPadding=(aq(L.padding.paddingBottom)+aq(L.padding.paddingTop));return L;},_syncUI:function(){var B=this,T=B.info,R=B.wrapperSurrounding,Y=B.get(aC),L=B.get(n);Y.sizeTo(T.offsetWidth,T.offsetHeight);if(B.changeLeftHandles||B.changeTopHandles){Y.setXY([T.left,T.top]);}if(!Y.compareTo(L)){L.sizeTo(T.offsetWidth-R.totalHBorder,T.offsetHeight-R.totalVBorder);}if(S.UA.webkit){L.setStyle(aj,U);}},_updateChangeHandleInfo:function(L){var B=this;B.changeHeightHandles=B.REGEX_CHANGE_HEIGHT.test(L);B.changeLeftHandles=B.REGEX_CHANGE_LEFT.test(L);B.changeTopHandles=B.REGEX_CHANGE_TOP.test(L);B.changeWidthHandles=B.REGEX_CHANGE_WIDTH.test(L);},_updateInfo:function(L){var B=this;B.info=B._getInfo(B.get(aC),L);},_updateSurroundingInfo:function(){var B=this,T=B.get(n),Y=B.get(aC),L=B._getBoxSurroundingInfo(T),R=B._getBoxSurroundingInfo(Y);B.nodeSurrounding=L;B.wrapperSurrounding=R;B.totalVSurrounding=(L.totalVPadding+R.totalVBorder);B.totalHSurrounding=(L.totalHPadding+R.totalHBorder);},_setActiveHandlesUI:function(R){var B=this,L=B.get(A);if(L){if(R){B.eachHandle(function(T){T.removeClass(ab);});L.addClass(ab);}else{L.removeClass(ab);}}},_setHandles:function(R){var B=this,L=[];if(b(R)){L=R;}else{if(aB(R)){if(R.toLowerCase()==u){L=B.ALL_HANDLES;}else{S.each(R.split(r),function(Y,T){var aK=ar(Y);if(k(B.ALL_HANDLES,aK)>-1){L.push(aK);}});}}}return L;},_setHideHandlesUI:function(L){var B=this,R=B.get(aC);if(!B.get(m)){if(L){R.addClass(c);}else{R.removeClass(c);}}},_setWrap:function(T){var B=this,R=B.get(n),Y=R.get(y),L=B.get(ah);if(L.test(Y)){T=true;}return T;},_defMouseUpFn:function(L){var B=this;B.set(m,false);},_defResizeFn:function(L){var B=this;B._resize(L);},_resize:function(L){var B=this;B._handleResizeAlignEvent(L.dragEvent);B._syncUI();},_defResizeAlignFn:function(L){var B=this;B._resizeAlign(L);},_resizeAlign:function(R){var B=this,T,L,Y;B.lastInfo=B.info;B._updateInfo(R);T=B.info;B._calcResize();if(!B.con){L=(B.get(aA)+B.totalVSurrounding);Y=(B.get(aF)+B.totalHSurrounding);if(T.offsetHeight<=L){B._checkSize(D,L);}if(T.offsetWidth<=Y){B._checkSize(az,Y);}}},_defResizeEndFn:function(L){var B=this;B._resizeEnd(L);},_resizeEnd:function(R){var B=this,L=R.dragEvent.target;L.actXY=[];B._syncUI();B._setActiveHandlesUI(false);B.set(K,null);B.set(A,null);B.handle=null;},_defResizeStartFn:function(L){var B=this;B._resizeStart(L);},_resizeStart:function(L){var B=this,R=B.get(aC);B.handle=B.get(K);B.set(m,true);B._updateSurroundingInfo();B.originalInfo=B._getInfo(R,L);B._updateInfo(L);},_handleMouseUpEvent:function(B){this.fire(E,{dragEvent:B,info:this.info});},_handleResizeEvent:function(B){this.fire(s,{dragEvent:B,info:this.info});},_handleResizeAlignEvent:function(B){this.fire(w,{dragEvent:B,info:this.info});},_handleResizeEndEvent:function(B){this.fire(G,{dragEvent:B,info:this.info});},_handleResizeStartEvent:function(B){if(!this.get(K)){this._setHandleFromNode(B.target.get("node"));}this.fire(Q,{dragEvent:B,info:this.info});},_onWrapperMouseEnter:function(L){var B=this;if(B.get(ak)){B._setHideHandlesUI(false);}},_onWrapperMouseLeave:function(L){var B=this;if(B.get(ak)){B._setHideHandlesUI(true);}},_setHandleFromNode:function(L){var B=this,R=B._extractHandleName(L);if(!B.get(m)){B.set(K,R);B.set(A,L);B._setActiveHandlesUI(true);B._updateChangeHandleInfo(R);}},_onHandleMouseEnter:function(B){this._setHandleFromNode(B.currentTarget);},_onHandleMouseLeave:function(L){var B=this;if(!B.get(m)){B._setActiveHandlesUI(false);}},_valueHandlesWrapper:function(){return S.Node.create(this.HANDLES_WRAP_TEMPLATE);},_valueWrapper:function(){var B=this,R=B.get(n),L=R.get(d),T=R;if(B.get(am)){T=S.Node.create(B.WRAP_TEMPLATE);if(L){L.insertBefore(T,R);}T.append(R);B._copyStyles(R,T);R.setStyles({position:aG,left:0,top:0});}return T;}});S.each(S.Resize.prototype.ALL_HANDLES,function(L,B){S.Resize.ATTRS[aI(L)]={setter:function(){return this._buildHandle(L);},value:null,writeOnce:true};});},"3.5.0",{requires:["base","widget","substitute","event","oop","dd-drag","dd-delegate","dd-drop"],skinnable:true});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/resize-base/resize-base.js b/lib/yui/3.5.0/build/resize-base/resize-base.js
similarity index 99%
rename from lib/yui/3.4.1/build/resize-base/resize-base.js
rename to lib/yui/3.5.0/build/resize-base/resize-base.js
index 36e707a20cc..5ce872aa101 100644
--- a/lib/yui/3.4.1/build/resize-base/resize-base.js
+++ b/lib/yui/3.5.0/build/resize-base/resize-base.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -1636,4 +1636,4 @@ Y.each(Y.Resize.prototype.ALL_HANDLES, function(handle, i) {
});
-}, '3.4.1' ,{requires:['base', 'widget', 'substitute', 'event', 'oop', 'dd-drag', 'dd-delegate', 'dd-drop'], skinnable:true});
+}, '3.5.0' ,{requires:['base', 'widget', 'substitute', 'event', 'oop', 'dd-drag', 'dd-delegate', 'dd-drop'], skinnable:true});
diff --git a/lib/yui/3.4.1/build/resize-proxy/assets/resize-base-core.css b/lib/yui/3.5.0/build/resize-constrain/assets/resize-base-core.css
similarity index 95%
rename from lib/yui/3.4.1/build/resize-proxy/assets/resize-base-core.css
rename to lib/yui/3.5.0/build/resize-constrain/assets/resize-base-core.css
index aac1fee4f7a..47a5862d169 100644
--- a/lib/yui/3.4.1/build/resize-proxy/assets/resize-base-core.css
+++ b/lib/yui/3.5.0/build/resize-constrain/assets/resize-base-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/resize-constrain/resize-constrain-debug.js b/lib/yui/3.5.0/build/resize-constrain/resize-constrain-debug.js
similarity index 98%
rename from lib/yui/3.4.1/build/resize-constrain/resize-constrain-debug.js
rename to lib/yui/3.5.0/build/resize-constrain/resize-constrain-debug.js
index f591b39a94a..06bd2ec128e 100644
--- a/lib/yui/3.4.1/build/resize-constrain/resize-constrain-debug.js
+++ b/lib/yui/3.5.0/build/resize-constrain/resize-constrain-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -458,4 +458,4 @@ Y.namespace('Plugin');
Y.Plugin.ResizeConstrained = ResizeConstrained;
-}, '3.4.1' ,{requires:['resize-base', 'plugin'], skinnable:false});
+}, '3.5.0' ,{requires:['resize-base', 'plugin'], skinnable:false});
diff --git a/lib/yui/3.4.1/build/resize-constrain/resize-constrain-min.js b/lib/yui/3.5.0/build/resize-constrain/resize-constrain-min.js
similarity index 96%
rename from lib/yui/3.4.1/build/resize-constrain/resize-constrain-min.js
rename to lib/yui/3.5.0/build/resize-constrain/resize-constrain-min.js
index 0259d100394..537aefe9f65 100644
--- a/lib/yui/3.4.1/build/resize-constrain/resize-constrain-min.js
+++ b/lib/yui/3.5.0/build/resize-constrain/resize-constrain-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("resize-constrain",function(a){var J=a.Lang,s=J.isBoolean,I=J.isNumber,g=J.isString,q=a.Resize.capitalize,e=function(K){return(K instanceof a.Node);},E=function(K){return parseFloat(K)||0;},b="borderBottomWidth",y="borderLeftWidth",A="borderRightWidth",f="borderTopWidth",C="border",r="bottom",t="con",j="constrain",n="host",o="left",m="maxHeight",h="maxWidth",c="minHeight",F="minWidth",H="node",x="offsetHeight",z="offsetWidth",B="preserveRatio",p="region",D="resizeConstrained",G="right",k="tickX",i="tickY",u="top",d="width",l="view",w="viewportRegion";function v(){v.superclass.constructor.apply(this,arguments);}a.mix(v,{NAME:D,NS:t,ATTRS:{constrain:{setter:function(K){if(K&&(e(K)||g(K)||K.nodeType)){K=a.one(K);}return K;}},minHeight:{value:15,validator:I},minWidth:{value:15,validator:I},maxHeight:{value:Infinity,validator:I},maxWidth:{value:Infinity,validator:I},preserveRatio:{value:false,validator:s},tickX:{value:false},tickY:{value:false}}});a.extend(v,a.Plugin.Base,{constrainSurrounding:null,initializer:function(){var K=this,L=K.get(n);L.delegate.dd.plug(a.Plugin.DDConstrained,{tickX:K.get(k),tickY:K.get(i)});L.after("resize:align",a.bind(K._handleResizeAlignEvent,K));L.on("resize:start",a.bind(K._handleResizeStartEvent,K));},_checkConstrain:function(M,V,N){var S=this,R,O,P,U,T=S.get(n),K=T.info,L=S.constrainSurrounding.border,Q=S._getConstrainRegion();if(Q){R=K[M]+K[N];O=Q[V]-E(L[q(C,V,d)]);if(R>=O){K[N]-=(R-O);}P=K[M];U=Q[M]+E(L[q(C,M,d)]);if(P<=U){K[M]+=(U-P);K[N]-=(U-P);}}},_checkHeight:function(){var K=this,M=K.get(n),O=M.info,L=(K.get(m)+M.totalVSurrounding),N=(K.get(c)+M.totalVSurrounding);K._checkConstrain(u,r,x);if(O.offsetHeight>L){M._checkSize(x,L);}if(O.offsetHeightM){N._checkSize(z,M);}},_getConstrainRegion:function(){var K=this,M=K.get(n),L=M.get(H),O=K.get(j),N=null;if(O){if(O==l){N=L.get(w);}else{if(e(O)){N=O.get(p);}else{N=O;}}}return N;},_handleResizeAlignEvent:function(M){var K=this,L=K.get(n);K._checkHeight();K._checkWidth();if(K.get(B)){K._checkRatio();}if(K.get(j)&&!K._checkRegion()){L.info=L.lastInfo;}},_handleResizeStartEvent:function(M){var K=this,N=K.get(j),L=K.get(n);K.constrainSurrounding=L._getBoxSurroundingInfo(N);}});a.namespace("Plugin");a.Plugin.ResizeConstrained=v;},"3.4.1",{requires:["resize-base","plugin"],skinnable:false});
\ No newline at end of file
+YUI.add("resize-constrain",function(a){var J=a.Lang,s=J.isBoolean,I=J.isNumber,g=J.isString,q=a.Resize.capitalize,e=function(K){return(K instanceof a.Node);},E=function(K){return parseFloat(K)||0;},b="borderBottomWidth",y="borderLeftWidth",A="borderRightWidth",f="borderTopWidth",C="border",r="bottom",t="con",j="constrain",n="host",o="left",m="maxHeight",h="maxWidth",c="minHeight",F="minWidth",H="node",x="offsetHeight",z="offsetWidth",B="preserveRatio",p="region",D="resizeConstrained",G="right",k="tickX",i="tickY",u="top",d="width",l="view",w="viewportRegion";function v(){v.superclass.constructor.apply(this,arguments);}a.mix(v,{NAME:D,NS:t,ATTRS:{constrain:{setter:function(K){if(K&&(e(K)||g(K)||K.nodeType)){K=a.one(K);}return K;}},minHeight:{value:15,validator:I},minWidth:{value:15,validator:I},maxHeight:{value:Infinity,validator:I},maxWidth:{value:Infinity,validator:I},preserveRatio:{value:false,validator:s},tickX:{value:false},tickY:{value:false}}});a.extend(v,a.Plugin.Base,{constrainSurrounding:null,initializer:function(){var K=this,L=K.get(n);L.delegate.dd.plug(a.Plugin.DDConstrained,{tickX:K.get(k),tickY:K.get(i)});L.after("resize:align",a.bind(K._handleResizeAlignEvent,K));L.on("resize:start",a.bind(K._handleResizeStartEvent,K));},_checkConstrain:function(M,V,N){var S=this,R,O,P,U,T=S.get(n),K=T.info,L=S.constrainSurrounding.border,Q=S._getConstrainRegion();if(Q){R=K[M]+K[N];O=Q[V]-E(L[q(C,V,d)]);if(R>=O){K[N]-=(R-O);}P=K[M];U=Q[M]+E(L[q(C,M,d)]);if(P<=U){K[M]+=(U-P);K[N]-=(U-P);}}},_checkHeight:function(){var K=this,M=K.get(n),O=M.info,L=(K.get(m)+M.totalVSurrounding),N=(K.get(c)+M.totalVSurrounding);K._checkConstrain(u,r,x);if(O.offsetHeight>L){M._checkSize(x,L);}if(O.offsetHeightM){N._checkSize(z,M);}},_getConstrainRegion:function(){var K=this,M=K.get(n),L=M.get(H),O=K.get(j),N=null;if(O){if(O==l){N=L.get(w);}else{if(e(O)){N=O.get(p);}else{N=O;}}}return N;},_handleResizeAlignEvent:function(M){var K=this,L=K.get(n);K._checkHeight();K._checkWidth();if(K.get(B)){K._checkRatio();}if(K.get(j)&&!K._checkRegion()){L.info=L.lastInfo;}},_handleResizeStartEvent:function(M){var K=this,N=K.get(j),L=K.get(n);K.constrainSurrounding=L._getBoxSurroundingInfo(N);}});a.namespace("Plugin");a.Plugin.ResizeConstrained=v;},"3.5.0",{requires:["resize-base","plugin"],skinnable:false});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/resize-constrain/resize-constrain.js b/lib/yui/3.5.0/build/resize-constrain/resize-constrain.js
similarity index 98%
rename from lib/yui/3.4.1/build/resize-constrain/resize-constrain.js
rename to lib/yui/3.5.0/build/resize-constrain/resize-constrain.js
index f591b39a94a..06bd2ec128e 100644
--- a/lib/yui/3.4.1/build/resize-constrain/resize-constrain.js
+++ b/lib/yui/3.5.0/build/resize-constrain/resize-constrain.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -458,4 +458,4 @@ Y.namespace('Plugin');
Y.Plugin.ResizeConstrained = ResizeConstrained;
-}, '3.4.1' ,{requires:['resize-base', 'plugin'], skinnable:false});
+}, '3.5.0' ,{requires:['resize-base', 'plugin'], skinnable:false});
diff --git a/lib/yui/3.4.1/build/resize-constrain/assets/resize-base-core.css b/lib/yui/3.5.0/build/resize-plugin/assets/resize-base-core.css
similarity index 95%
rename from lib/yui/3.4.1/build/resize-constrain/assets/resize-base-core.css
rename to lib/yui/3.5.0/build/resize-plugin/assets/resize-base-core.css
index aac1fee4f7a..47a5862d169 100644
--- a/lib/yui/3.4.1/build/resize-constrain/assets/resize-base-core.css
+++ b/lib/yui/3.5.0/build/resize-plugin/assets/resize-base-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/resize-plugin/resize-plugin-debug.js b/lib/yui/3.5.0/build/resize-plugin/resize-plugin-debug.js
similarity index 98%
rename from lib/yui/3.4.1/build/resize-plugin/resize-plugin-debug.js
rename to lib/yui/3.5.0/build/resize-plugin/resize-plugin-debug.js
index c618bad0950..df7808160ff 100644
--- a/lib/yui/3.4.1/build/resize-plugin/resize-plugin-debug.js
+++ b/lib/yui/3.5.0/build/resize-plugin/resize-plugin-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -211,4 +211,4 @@ var ResizePlugin = function(config) {
Y.Plugin.Resize = ResizePlugin;
-}, '3.4.1' ,{skinnable:false, requires:['resize-base', 'plugin'], optional:['resize-constrain']});
+}, '3.5.0' ,{skinnable:false, requires:['resize-base', 'plugin'], optional:['resize-constrain']});
diff --git a/lib/yui/3.4.1/build/resize-plugin/resize-plugin-min.js b/lib/yui/3.5.0/build/resize-plugin/resize-plugin-min.js
similarity index 91%
rename from lib/yui/3.4.1/build/resize-plugin/resize-plugin-min.js
rename to lib/yui/3.5.0/build/resize-plugin/resize-plugin-min.js
index 76a5fdec248..bcd222f246c 100644
--- a/lib/yui/3.4.1/build/resize-plugin/resize-plugin-min.js
+++ b/lib/yui/3.5.0/build/resize-plugin/resize-plugin-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("resize-plugin",function(b){var a=function(c){c.node=((b.Widget&&c.host instanceof b.Widget)?c.host.get("boundingBox"):c.host);if(c.host instanceof b.Widget){c.widget=c.host;}else{c.widget=false;}a.superclass.constructor.call(this,c);};a.NAME="resize-plugin";a.NS="resize";a.ATTRS={node:{value:undefined},widget:{value:undefined}};b.extend(a,b.Resize,{initializer:function(c){this.set("node",c.node);this.set("widget",c.widget);this.on("resize:resize",function(d){this._correctDimensions(d);});},_correctDimensions:function(f){var d=this.get("node"),c={old:d.getX(),cur:f.currentTarget.info.left},g={old:d.getY(),cur:f.currentTarget.info.top};if(this.get("widget")){this._setWidgetProperties(f,c,g);}if(this._isDifferent(c.old,c.cur)){d.set("x",c.cur);}if(this._isDifferent(g.old,g.cur)){d.set("y",g.cur);}},_setWidgetProperties:function(h,c,k){var g=this.get("widget"),j=g.get("height"),d=g.get("width"),f=h.currentTarget.info.offsetWidth-h.currentTarget.totalHSurrounding,i=h.currentTarget.info.offsetHeight-h.currentTarget.totalVSurrounding;if(this._isDifferent(j,i)){g.set("height",i);}if(this._isDifferent(d,f)){g.set("width",f);}if(g.hasImpl&&g.hasImpl(b.WidgetPosition)){if(this._isDifferent(g.get("x"),c.cur)){g.set("x",c.cur);}if(this._isDifferent(g.get("y"),k.cur)){g.set("y",k.cur);}}},_isDifferent:function(c,d){if(c!==d){return d;}else{return false;}}});b.namespace("Plugin");b.Plugin.Resize=a;},"3.4.1",{skinnable:false,requires:["resize-base","plugin"],optional:["resize-constrain"]});
\ No newline at end of file
+YUI.add("resize-plugin",function(b){var a=function(c){c.node=((b.Widget&&c.host instanceof b.Widget)?c.host.get("boundingBox"):c.host);if(c.host instanceof b.Widget){c.widget=c.host;}else{c.widget=false;}a.superclass.constructor.call(this,c);};a.NAME="resize-plugin";a.NS="resize";a.ATTRS={node:{value:undefined},widget:{value:undefined}};b.extend(a,b.Resize,{initializer:function(c){this.set("node",c.node);this.set("widget",c.widget);this.on("resize:resize",function(d){this._correctDimensions(d);});},_correctDimensions:function(f){var d=this.get("node"),c={old:d.getX(),cur:f.currentTarget.info.left},g={old:d.getY(),cur:f.currentTarget.info.top};if(this.get("widget")){this._setWidgetProperties(f,c,g);}if(this._isDifferent(c.old,c.cur)){d.set("x",c.cur);}if(this._isDifferent(g.old,g.cur)){d.set("y",g.cur);}},_setWidgetProperties:function(h,c,k){var g=this.get("widget"),j=g.get("height"),d=g.get("width"),f=h.currentTarget.info.offsetWidth-h.currentTarget.totalHSurrounding,i=h.currentTarget.info.offsetHeight-h.currentTarget.totalVSurrounding;if(this._isDifferent(j,i)){g.set("height",i);}if(this._isDifferent(d,f)){g.set("width",f);}if(g.hasImpl&&g.hasImpl(b.WidgetPosition)){if(this._isDifferent(g.get("x"),c.cur)){g.set("x",c.cur);}if(this._isDifferent(g.get("y"),k.cur)){g.set("y",k.cur);}}},_isDifferent:function(c,d){if(c!==d){return d;}else{return false;}}});b.namespace("Plugin");b.Plugin.Resize=a;},"3.5.0",{skinnable:false,requires:["resize-base","plugin"],optional:["resize-constrain"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/resize-plugin/resize-plugin.js b/lib/yui/3.5.0/build/resize-plugin/resize-plugin.js
similarity index 98%
rename from lib/yui/3.4.1/build/resize-plugin/resize-plugin.js
rename to lib/yui/3.5.0/build/resize-plugin/resize-plugin.js
index c618bad0950..df7808160ff 100644
--- a/lib/yui/3.4.1/build/resize-plugin/resize-plugin.js
+++ b/lib/yui/3.5.0/build/resize-plugin/resize-plugin.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -211,4 +211,4 @@ var ResizePlugin = function(config) {
Y.Plugin.Resize = ResizePlugin;
-}, '3.4.1' ,{skinnable:false, requires:['resize-base', 'plugin'], optional:['resize-constrain']});
+}, '3.5.0' ,{skinnable:false, requires:['resize-base', 'plugin'], optional:['resize-constrain']});
diff --git a/lib/yui/3.4.1/build/resize-plugin/assets/resize-base-core.css b/lib/yui/3.5.0/build/resize-proxy/assets/resize-base-core.css
similarity index 95%
rename from lib/yui/3.4.1/build/resize-plugin/assets/resize-base-core.css
rename to lib/yui/3.5.0/build/resize-proxy/assets/resize-base-core.css
index aac1fee4f7a..47a5862d169 100644
--- a/lib/yui/3.4.1/build/resize-plugin/assets/resize-base-core.css
+++ b/lib/yui/3.5.0/build/resize-proxy/assets/resize-base-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/resize-proxy/resize-proxy-debug.js b/lib/yui/3.5.0/build/resize-proxy/resize-proxy-debug.js
similarity index 96%
rename from lib/yui/3.4.1/build/resize-proxy/resize-proxy-debug.js
rename to lib/yui/3.5.0/build/resize-proxy/resize-proxy-debug.js
index f93aa9d47c8..dd96f94e05e 100644
--- a/lib/yui/3.4.1/build/resize-proxy/resize-proxy-debug.js
+++ b/lib/yui/3.5.0/build/resize-proxy/resize-proxy-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -169,4 +169,4 @@ Y.namespace('Plugin');
Y.Plugin.ResizeProxy = ResizeProxy;
-}, '3.4.1' ,{requires:['resize-base', 'plugin'], skinnable:false});
+}, '3.5.0' ,{requires:['resize-base', 'plugin'], skinnable:false});
diff --git a/lib/yui/3.4.1/build/resize-proxy/resize-proxy-min.js b/lib/yui/3.5.0/build/resize-proxy/resize-proxy-min.js
similarity index 91%
rename from lib/yui/3.4.1/build/resize-proxy/resize-proxy-min.js
rename to lib/yui/3.5.0/build/resize-proxy/resize-proxy-min.js
index 8c6b5b14766..e776974178c 100644
--- a/lib/yui/3.4.1/build/resize-proxy/resize-proxy-min.js
+++ b/lib/yui/3.5.0/build/resize-proxy/resize-proxy-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("resize-proxy",function(c){var n="activeHandleNode",i="cursor",g="dragCursor",l="host",k="parentNode",f="proxy",d="proxyNode",b="resize",a="resize-proxy",j="wrapper",e=c.ClassNameManager.getClassName,m=e(b,f);function h(){h.superclass.constructor.apply(this,arguments);}c.mix(h,{NAME:a,NS:f,ATTRS:{proxyNode:{setter:c.one,valueFn:function(){return c.Node.create(this.PROXY_TEMPLATE);}}}});c.extend(h,c.Plugin.Base,{PROXY_TEMPLATE:'',initializer:function(){var o=this;o.afterHostEvent("resize:start",o._afterResizeStart);o.beforeHostMethod("_resize",o._beforeHostResize);o.afterHostMethod("_resizeEnd",o._afterHostResizeEnd);},destructor:function(){var o=this;o.get(d).remove(true);},_afterHostResizeEnd:function(q){var o=this,p=q.dragEvent.target;p.actXY=[];o._syncProxyUI();o.get(d).hide();},_afterResizeStart:function(p){var o=this;o._renderProxy();},_beforeHostResize:function(q){var o=this,p=this.get(l);p._handleResizeAlignEvent(q.dragEvent);o._syncProxyUI();return new c.Do.Prevent();},_renderProxy:function(){var o=this,q=this.get(l),p=o.get(d);if(!p.inDoc()){q.get(j).get(k).append(p.hide());}},_syncProxyUI:function(){var o=this,q=this.get(l),s=q.info,r=q.get(n),p=o.get(d),t=r.getStyle(i);p.show().setStyle(i,t);q.delegate.dd.set(g,t);p.sizeTo(s.offsetWidth,s.offsetHeight);p.setXY([s.left,s.top]);}});c.namespace("Plugin");c.Plugin.ResizeProxy=h;},"3.4.1",{requires:["resize-base","plugin"],skinnable:false});
\ No newline at end of file
+YUI.add("resize-proxy",function(c){var n="activeHandleNode",i="cursor",g="dragCursor",l="host",k="parentNode",f="proxy",d="proxyNode",b="resize",a="resize-proxy",j="wrapper",e=c.ClassNameManager.getClassName,m=e(b,f);function h(){h.superclass.constructor.apply(this,arguments);}c.mix(h,{NAME:a,NS:f,ATTRS:{proxyNode:{setter:c.one,valueFn:function(){return c.Node.create(this.PROXY_TEMPLATE);}}}});c.extend(h,c.Plugin.Base,{PROXY_TEMPLATE:'',initializer:function(){var o=this;o.afterHostEvent("resize:start",o._afterResizeStart);o.beforeHostMethod("_resize",o._beforeHostResize);o.afterHostMethod("_resizeEnd",o._afterHostResizeEnd);},destructor:function(){var o=this;o.get(d).remove(true);},_afterHostResizeEnd:function(q){var o=this,p=q.dragEvent.target;p.actXY=[];o._syncProxyUI();o.get(d).hide();},_afterResizeStart:function(p){var o=this;o._renderProxy();},_beforeHostResize:function(q){var o=this,p=this.get(l);p._handleResizeAlignEvent(q.dragEvent);o._syncProxyUI();return new c.Do.Prevent();},_renderProxy:function(){var o=this,q=this.get(l),p=o.get(d);if(!p.inDoc()){q.get(j).get(k).append(p.hide());}},_syncProxyUI:function(){var o=this,q=this.get(l),s=q.info,r=q.get(n),p=o.get(d),t=r.getStyle(i);p.show().setStyle(i,t);q.delegate.dd.set(g,t);p.sizeTo(s.offsetWidth,s.offsetHeight);p.setXY([s.left,s.top]);}});c.namespace("Plugin");c.Plugin.ResizeProxy=h;},"3.5.0",{requires:["resize-base","plugin"],skinnable:false});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/resize-proxy/resize-proxy.js b/lib/yui/3.5.0/build/resize-proxy/resize-proxy.js
similarity index 96%
rename from lib/yui/3.4.1/build/resize-proxy/resize-proxy.js
rename to lib/yui/3.5.0/build/resize-proxy/resize-proxy.js
index f93aa9d47c8..dd96f94e05e 100644
--- a/lib/yui/3.4.1/build/resize-proxy/resize-proxy.js
+++ b/lib/yui/3.5.0/build/resize-proxy/resize-proxy.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -169,4 +169,4 @@ Y.namespace('Plugin');
Y.Plugin.ResizeProxy = ResizeProxy;
-}, '3.4.1' ,{requires:['resize-base', 'plugin'], skinnable:false});
+}, '3.5.0' ,{requires:['resize-base', 'plugin'], skinnable:false});
diff --git a/lib/yui/3.4.1/build/controller/controller-debug.js b/lib/yui/3.5.0/build/router/router-debug.js
similarity index 59%
rename from lib/yui/3.4.1/build/controller/controller-debug.js
rename to lib/yui/3.5.0/build/router/router-debug.js
index b67b76cf2c7..0111251f870 100644
--- a/lib/yui/3.4.1/build/controller/controller-debug.js
+++ b/lib/yui/3.5.0/build/router/router-debug.js
@@ -1,53 +1,24 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add('controller', function(Y) {
+YUI.add('router', function(Y) {
/**
-The app framework provides simple MVC-like building blocks (models, model lists,
-views, and controllers) for writing single-page JavaScript applications.
+Provides URL-based routing using HTML5 `pushState()` or the location hash.
-@main app
@module app
-@since 3.4.0
-**/
-
-/**
-Provides URL-based routing using HTML5 `pushState()` or the location hash.
-
-@submodule controller
-@since 3.4.0
-**/
-
-/**
-Provides URL-based routing using HTML5 `pushState()` or the location hash.
-
-This makes it easy to wire up route handlers for different application states
-while providing full back/forward navigation support and bookmarkable, shareable
-URLs.
-
-@class Controller
-@constructor
-@extends Base
+@submodule router
@since 3.4.0
**/
var HistoryHash = Y.HistoryHash,
- Lang = Y.Lang,
QS = Y.QueryString,
YArray = Y.Array,
- // Android versions lower than 3.0 are buggy and don't update
- // window.location after a pushState() call, so we fall back to hash-based
- // history for them.
- //
- // See http://code.google.com/p/android/issues/detail?id=17471
- html5 = Y.HistoryBase.html5 && (!Y.UA.android || Y.UA.android >= 3),
- win = Y.config.win,
- location = win.location,
+ win = Y.config.win,
// We have to queue up pushState calls to avoid race conditions, since the
// popstate event doesn't actually provide any info on what URL it's
@@ -55,7 +26,7 @@ var HistoryHash = Y.HistoryHash,
saveQueue = [],
/**
- Fired when the controller is ready to begin dispatching to route handlers.
+ Fired when the router is ready to begin dispatching to route handlers.
You shouldn't need to wait for this event unless you plan to implement some
kind of custom dispatching logic. It's used internally in order to avoid
@@ -68,73 +39,34 @@ var HistoryHash = Y.HistoryHash,
**/
EVT_READY = 'ready';
-function Controller() {
- Controller.superclass.constructor.apply(this, arguments);
+/**
+Provides URL-based routing using HTML5 `pushState()` or the location hash.
+
+This makes it easy to wire up route handlers for different application states
+while providing full back/forward navigation support and bookmarkable, shareable
+URLs.
+
+@class Router
+@param {Object} [config] Config properties.
+ @param {Boolean} [config.html5] Overrides the default capability detection
+ and forces this router to use (`true`) or not use (`false`) HTML5
+ history.
+ @param {String} [config.root=''] Root path from which all routes should be
+ evaluated.
+ @param {Array} [config.routes=[]] Array of route definition objects.
+@constructor
+@extends Base
+@since 3.4.0
+**/
+function Router() {
+ Router.superclass.constructor.apply(this, arguments);
}
-Y.Controller = Y.extend(Controller, Y.Base, {
- // -- Public Properties ----------------------------------------------------
-
- /**
- Whether or not this browser is capable of using HTML5 history.
-
- This property is for informational purposes only. It's not configurable, and
- changing it will have no effect.
-
- @property html5
- @type Boolean
- **/
- html5: html5,
-
- /**
- Absolute root path from which all routes should be evaluated.
-
- For example, if your controller is running on a page at
- `http://example.com/myapp/` and you add a route with the path `/`, your
- route will never execute, because the path will always be preceded by
- `/myapp`. Setting `root` to `/myapp` would cause all routes to be evaluated
- relative to that root URL, so the `/` route would then execute when the
- user browses to `http://example.com/myapp/`.
-
- This property may be overridden in a subclass, set after instantiation, or
- passed as a config attribute when instantiating a `Y.Controller`-based
- class.
-
- @property root
- @type String
- @default `''`
- **/
- root: '',
-
- /**
- Array of route objects specifying routes to be created at instantiation
- time.
-
- Each item in the array must be an object with the following properties:
-
- * `path`: String or regex representing the path to match. See the docs for
- the `route()` method for more details.
- * `callback`: Function or a string representing the name of a function on
- this controller instance that should be called when the route is
- triggered. See the docs for the `route()` method for more details.
-
- This property may be overridden in a subclass or passed as a config
- attribute when instantiating a `Y.Controller`-based class, but setting it
- after instantiation will have no effect (use the `route()` method instead).
-
- If routes are passed at instantiation time, they will override any routes
- set on the prototype.
-
- @property routes
- @type Object[]
- @default `[]`
- **/
- routes: [],
-
+Y.Router = Y.extend(Router, Y.Base, {
// -- Protected Properties -------------------------------------------------
/**
- Whether or not `_dispatch()` has been called since this controller was
+ Whether or not `_dispatch()` has been called since this router was
instantiated.
@property _dispatched
@@ -152,6 +84,14 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@protected
**/
+ /**
+ Cached copy of the `html5` attribute for internal use.
+
+ @property _html5
+ @type Boolean
+ @protected
+ **/
+
/**
Whether or not the `ready` event has fired yet.
@@ -169,13 +109,14 @@ Y.Controller = Y.extend(Controller, Y.Base, {
1. Parameter prefix character. Either a `:` for subpath parameters that
should only match a single level of a path, or `*` for splat parameters
that should match any number of path levels.
- 2. Parameter name.
+
+ 2. Parameter name, if specified, otherwise it is a wildcard match.
@property _regexPathParam
@type RegExp
@protected
**/
- _regexPathParam: /([:*])([\w-]+)/g,
+ _regexPathParam: /([:*])([\w\-]+)?/g,
/**
Regex that matches and captures the query portion of a URL, minus the
@@ -188,42 +129,37 @@ Y.Controller = Y.extend(Controller, Y.Base, {
_regexUrlQuery: /\?([^#]*).*$/,
/**
- Regex that matches everything before the path portion of an HTTP or HTTPS
- URL. This will be used to strip this part of the URL from a string when we
+ Regex that matches everything before the path portion of a URL (the origin).
+ This will be used to strip this part of the URL from a string when we
only want the path.
- @property _regexUrlStrip
+ @property _regexUrlOrigin
@type RegExp
@protected
**/
- _regexUrlStrip: /^https?:\/\/[^\/]*/i,
+ _regexUrlOrigin: /^(?:[^\/#?:]+:\/\/|\/\/)[^\/]*/,
// -- Lifecycle Methods ----------------------------------------------------
initializer: function (config) {
var self = this;
- // Set config properties.
- config || (config = {});
-
- config.routes && (self.routes = config.routes);
- Lang.isValue(config.root) && (self.root = config.root);
-
- // Create routes.
+ self._html5 = self.get('html5');
self._routes = [];
+ self._url = self._getURL();
- YArray.each(self.routes, function (route) {
- self.route(route.path, route.callback);
- });
+ // Necessary because setters don't run on init.
+ self._setRoutes(config && config.routes ? config.routes :
+ self.get('routes'));
// Set up a history instance or hashchange listener.
- if (html5) {
+ if (self._html5) {
self._history = new Y.HistoryHTML5({force: true});
- self._history.after('change', self._afterHistoryChange, self);
+ Y.after('history:change', self._afterHistoryChange, self);
} else {
Y.on('hashchange', self._afterHistoryChange, win, self);
}
- // Fire a 'ready' event once we're ready to route. We wait first for all
+ // Fire a `ready` event once we're ready to route. We wait first for all
// subclass initializers to finish, then for window.onload, and then an
// additional 20ms to allow the browser to fire a useless initial
// `popstate` event if it wants to (and Chrome always wants to).
@@ -243,8 +179,8 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
destructor: function () {
- if (html5) {
- this._history.detachAll();
+ if (this._html5) {
+ Y.detach('history:change', this._afterHistoryChange, this);
} else {
Y.detach('hashchange', this._afterHistoryChange, win);
}
@@ -266,10 +202,10 @@ Y.Controller = Y.extend(Controller, Y.Base, {
this.once(EVT_READY, function () {
this._ready = true;
- if (html5 && this.upgrade()) {
+ if (this._html5 && this.upgrade()) {
return;
} else {
- this._dispatch(this._getPath());
+ this._dispatch(this._getPath(), this._getURL());
}
});
@@ -287,16 +223,24 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
/**
- Returns `true` if this controller has at least one route that matches the
- specified URL path, `false` otherwise.
+ Returns `true` if this router has at least one route that matches the
+ specified URL, `false` otherwise.
+
+ This method enforces the same-origin security constraint on the specified
+ `url`; any URL which is not from the same origin as the current URL will
+ always return `false`.
@method hasRoute
- @param {String} path URL path to match.
+ @param {String} url URL to match.
@return {Boolean} `true` if there's at least one matching route, `false`
otherwise.
**/
- hasRoute: function (path) {
- return !!this.match(path).length;
+ hasRoute: function (url) {
+ if (!this._hasSameOrigin(url)) {
+ return false;
+ }
+
+ return !!this.match(this.removeRoot(url)).length;
},
/**
@@ -309,7 +253,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
Each returned route object has the following properties:
* `callback`: A function or a string representing the name of a function
- this controller that should be executed when the route is triggered.
+ this router that should be executed when the route is triggered.
* `keys`: An array of strings representing the named parameters defined in
the route's path specification, if any.
* `path`: The route's path specification, which may be either a string or
@@ -318,8 +262,8 @@ Y.Controller = Y.extend(Controller, Y.Base, {
This regex is used to determine whether the route matches a given path.
@example
- controller.route('/foo', function () {});
- controller.match('/foo');
+ router.route('/foo', function () {});
+ router.match('/foo');
// => [{callback: ..., keys: [], path: '/foo', regex: ...}]
@method match
@@ -333,25 +277,25 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
/**
- Removes the `root` URL from the from of _path_ (if it's there) and returns
+ Removes the `root` URL from the front of _url_ (if it's there) and returns
the result. The returned path will always have a leading `/`.
@method removeRoot
- @param {String} path URL path.
+ @param {String} url URL.
@return {String} Rootless path.
**/
- removeRoot: function (path) {
- var root = this.root;
+ removeRoot: function (url) {
+ var root = this.get('root');
// Strip out the non-path part of the URL, if any (e.g.
// "http://foo.com"), so that we're left with just the path.
- path = path.replace(this._regexUrlStrip, '');
+ url = url.replace(this._regexUrlOrigin, '');
- if (root && path.indexOf(root) === 0) {
- path = path.substring(root.length);
+ if (root && url.indexOf(root) === 0) {
+ url = url.substring(root.length);
}
- return path.charAt(0) === '/' ? path : '/' + path;
+ return url.charAt(0) === '/' ? url : '/' + url;
},
/**
@@ -368,19 +312,19 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@example
// Starting URL: http://example.com/
- controller.replace('/path/');
+ router.replace('/path/');
// New URL: http://example.com/path/
- controller.replace('/path?foo=bar');
+ router.replace('/path?foo=bar');
// New URL: http://example.com/path?foo=bar
- controller.replace('/');
+ router.replace('/');
// New URL: http://example.com/
@method replace
- @param {String} [url] URL to set. Should be a relative URL. If this
- controller's `root` property is set, this URL must be relative to the
- root URL. If no URL is specified, the page's current URL will be used.
+ @param {String} [url] URL to set. This URL needs to be of the same origin as
+ the current URL. This can be a URL relative to the router's `root`
+ attribute. If no URL is specified, the page's current URL will be used.
@chainable
@see save()
**/
@@ -417,7 +361,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
be executed.
@example
- controller.route('/photos/:tag/:page', function (req, next) {
+ router.route('/photos/:tag/:page', function (req, res, next) {
Y.log('Current tag: ' + req.params.tag);
Y.log('Current page number: ' + req.params.page);
});
@@ -427,7 +371,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
expression.
@param {Function|String} callback Callback function to call whenever this
route is triggered. If specified as a string, the named function will be
- called on this controller instance.
+ called on this router instance.
@param {Object} callback.req Request object containing information about
the request. It contains the following properties.
@param {Array|Object} callback.req.params Captured parameters matched by
@@ -440,6 +384,14 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@param {Object} callback.req.query Query hash representing the URL query
string, if any. Parameter names are keys, and are mapped to parameter
values.
+ @param {String} callback.req.url The full URL.
+ @param {String} callback.req.src What initiated the dispatch. In an
+ HTML5 browser, when the back/forward buttons are used, this property
+ will have a value of "popstate".
+ @param {Object} callback.res Response object containing methods and
+ information that relate to responding to a request. It contains the
+ following properties.
+ @param {Object} callback.res.req Reference to the request object.
@param {Function} callback.next Callback to pass control to the next
matching route. If you don't call this function, then no further route
handlers will be executed, even if there are more that match. If you do
@@ -476,19 +428,19 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@example
// Starting URL: http://example.com/
- controller.save('/path/');
+ router.save('/path/');
// New URL: http://example.com/path/
- controller.save('/path?foo=bar');
+ router.save('/path?foo=bar');
// New URL: http://example.com/path?foo=bar
- controller.save('/');
+ router.save('/');
// New URL: http://example.com/
@method save
- @param {String} [url] URL to set. Should be a relative URL. If this
- controller's `root` property is set, this URL must be relative to the
- root URL. If no URL is specified, the page's current URL will be used.
+ @param {String} [url] URL to set. This URL needs to be of the same origin as
+ the current URL. This can be a URL relative to the router's `root`
+ attribute. If no URL is specified, the page's current URL will be used.
@chainable
@see replace()
**/
@@ -503,8 +455,13 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@method upgrade
@return {Boolean} `true` if the URL was upgraded, `false` otherwise.
**/
- upgrade: html5 ? function () {
- var hash = this._getHashPath();
+ upgrade: function () {
+ if (!this._html5) {
+ return false;
+ }
+
+ // Get the full hash in all its glory!
+ var hash = HistoryHash.getHash();
if (hash && hash.charAt(0) === '/') {
// This is an HTML5 browser and we have a hash-based path in the
@@ -519,7 +476,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
}
return false;
- } : function () { return false; },
+ },
// -- Protected Methods ----------------------------------------------------
@@ -573,13 +530,15 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@method _dispatch
@param {String} path URL path.
+ @param {String} url Full URL.
+ @param {String} src What initiated the dispatch.
@chainable
@protected
**/
- _dispatch: function (path) {
+ _dispatch: function (path, url, src) {
var self = this,
routes = self.match(path),
- req;
+ req, res;
self._dispatching = self._dispatched = true;
@@ -588,7 +547,8 @@ Y.Controller = Y.extend(Controller, Y.Base, {
return self;
}
- req = self._getRequest(path);
+ req = self._getRequest(path, url, src);
+ res = self._getResponse(req);
req.next = function (err) {
var callback, matches, route;
@@ -608,7 +568,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
req.params = matches.concat();
}
- callback.call(self, req, req.next);
+ callback.call(self, req, res, req.next);
}
};
@@ -631,16 +591,32 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
/**
- Gets the current route path.
+ Gets the location origin (i.e., protocol, host, and port) as a URL.
+
+ @example
+ http://example.com
+
+ @method _getOrigin
+ @return {String} Location origin (i.e., protocol, host, and port).
+ @protected
+ **/
+ _getOrigin: function () {
+ var location = Y.getLocation();
+ return location.origin || (location.protocol + '//' + location.host);
+ },
+
+ /**
+ Gets the current route path, relative to the `root` (if any).
@method _getPath
@return {String} Current route path.
@protected
**/
- _getPath: html5 ? function () {
- return this.removeRoot(location.pathname);
- } : function () {
- return this._getHashPath() || this.removeRoot(location.pathname);
+ _getPath: function () {
+ var path = (!this._html5 && this._getHashPath()) ||
+ Y.getLocation().pathname;
+
+ return this.removeRoot(path);
},
/**
@@ -650,11 +626,16 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@return {String} Current route query string.
@protected
**/
- _getQuery: html5 ? function () {
- return location.search.substring(1);
- } : function () {
- var hash = HistoryHash.getHash(),
- matches = hash.match(this._regexUrlQuery);
+ _getQuery: function () {
+ var location = Y.getLocation(),
+ hash, matches;
+
+ if (this._html5) {
+ return location.search.substring(1);
+ }
+
+ hash = HistoryHash.getHash();
+ matches = hash.match(this._regexUrlQuery);
return hash && matches ? matches[1] : location.search.substring(1);
},
@@ -675,7 +656,18 @@ Y.Controller = Y.extend(Controller, Y.Base, {
return path;
}
+ // Special case for catchall paths.
+ if (path === '*') {
+ return (/.*/);
+ }
+
path = path.replace(this._regexPathParam, function (match, operator, key) {
+ // Only `*` operators are supported for key-less matches to allowing
+ // in-path wildcards like: '/foo/*'.
+ if (!key) {
+ return operator === '*' ? '.*' : match;
+ }
+
keys.push(key);
return operator === '*' ? '(.*?)' : '([^/]*)';
});
@@ -688,28 +680,96 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@method _getRequest
@param {String} path Current path being dispatched.
+ @param {String} url Current full URL being dispatched.
+ @param {String} src What initiated the dispatch.
@return {Object} Request object.
@protected
**/
- _getRequest: function (path) {
+ _getRequest: function (path, url, src) {
return {
path : path,
- query: this._parseQuery(this._getQuery())
+ query: this._parseQuery(this._getQuery()),
+ url : url,
+ src : src
};
},
+ /**
+ Gets a response object that can be passed to a route handler.
+
+ @method _getResponse
+ @param {Object} req Request object.
+ @return {Object} Response Object.
+ @protected
+ **/
+ _getResponse: function (req) {
+ // For backwards compatibility, the response object is a function that
+ // calls `next()` on the request object and returns the result.
+ var res = function () {
+ return req.next.apply(this, arguments);
+ };
+
+ res.req = req;
+ return res;
+ },
+
+ /**
+ Getter for the `routes` attribute.
+
+ @method _getRoutes
+ @return {Object[]} Array of route objects.
+ @protected
+ **/
+ _getRoutes: function () {
+ return this._routes.concat();
+ },
+
+ /**
+ Gets the current full URL.
+
+ @method _getURL
+ @return {String} URL.
+ @protected
+ **/
+ _getURL: function () {
+ return Y.getLocation().toString();
+ },
+
+ /**
+ Returns `true` when the specified `url` is from the same origin as the
+ current URL; i.e., the protocol, host, and port of the URLs are the same.
+
+ All host or path relative URLs are of the same origin. A scheme-relative URL
+ is first prefixed with the current scheme before being evaluated.
+
+ @method _hasSameOrigin
+ @param {String} url URL to compare origin with the current URL.
+ @return {Boolean} Whether the URL has the same origin of the current URL.
+ @protected
+ **/
+ _hasSameOrigin: function (url) {
+ var origin = ((url && url.match(this._regexUrlOrigin)) || [])[0];
+
+ // Prepend current scheme to scheme-relative URLs.
+ if (origin && origin.indexOf('//') === 0) {
+ origin = Y.getLocation().protocol + origin;
+ }
+
+ return !origin || origin === this._getOrigin();
+ },
+
/**
Joins the `root` URL to the specified _url_, normalizing leading/trailing
`/` characters.
@example
- controller.root = '/foo'
- controller._joinURL('bar'); // => '/foo/bar'
- controller._joinURL('/bar'); // => '/foo/bar'
+ router.set('root', '/foo');
+ router._joinURL('bar'); // => '/foo/bar'
+ router._joinURL('/bar'); // => '/foo/bar'
- controller.root = '/foo/'
- controller._joinURL('bar'); // => '/foo/bar'
- controller._joinURL('/bar'); // => '/foo/bar'
+ router.set('root', '/foo/');
+ router._joinURL('bar'); // => '/foo/bar'
+ router._joinURL('/bar'); // => '/foo/bar'
@method _joinURL
@param {String} url URL to append to the `root` URL.
@@ -717,7 +777,9 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@protected
**/
_joinURL: function (url) {
- var root = this.root;
+ var root = this.get('root');
+
+ url = this.removeRoot(url);
if (url.charAt(0) === '/') {
url = url.substring(1);
@@ -777,7 +839,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
self = this;
saveQueue.push(function () {
- if (html5) {
+ if (self._html5) {
if (Y.UA.ios && Y.UA.ios < 5) {
// iOS <5 has buggy HTML5 history support, and needs to be
// synchronous.
@@ -804,6 +866,10 @@ Y.Controller = Y.extend(Controller, Y.Base, {
/**
Saves a history entry using either `pushState()` or the location hash.
+ This method enforces the same-origin security constraint; attempting to save
+ a `url` that is not from the same origin as the current URL will result in
+ an error.
+
@method _save
@param {String} [url] URL for the history entry.
@param {Boolean} [replace=false] If `true`, the current history entry will
@@ -811,27 +877,58 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@chainable
@protected
**/
- _save: html5 ? function (url, replace) {
+ _save: function (url, replace) {
+ var urlIsString = typeof url === 'string';
+
+ // Perform same-origin check on the specified URL.
+ if (urlIsString && !this._hasSameOrigin(url)) {
+ Y.error('Security error: The new URL must be of the same origin as the current URL.');
+ return this;
+ }
+
// Force _ready to true to ensure that the history change is handled
// even if _save is called before the `ready` event fires.
this._ready = true;
- this._history[replace ? 'replace' : 'add'](null, {
- url: typeof url === 'string' ? this._joinURL(url) : url
- });
+ if (this._html5) {
+ this._history[replace ? 'replace' : 'add'](null, {
+ url: urlIsString ? this._joinURL(url) : url
+ });
+ } else {
+ // Remove the root from the URL before it's set as the hash.
+ urlIsString && (url = this.removeRoot(url));
- return this;
- } : function (url, replace) {
- this._ready = true;
-
- if (typeof url === 'string' && url.charAt(0) !== '/') {
- url = '/' + url;
+ // The `hashchange` event only fires when the new hash is actually
+ // different. This makes sure we'll always dequeue and dispatch,
+ // mimicking the HTML5 behavior.
+ if (url === HistoryHash.getHash()) {
+ this._dispatch(this._getPath(), this._getURL());
+ } else {
+ HistoryHash[replace ? 'replaceHash' : 'setHash'](url);
+ }
}
- HistoryHash[replace ? 'replaceHash' : 'setHash'](url);
return this;
},
+ /**
+ Setter for the `routes` attribute.
+
+ @method _setRoutes
+ @param {Object[]} routes Array of route objects.
+ @return {Object[]} Array of route objects.
+ @protected
+ **/
+ _setRoutes: function (routes) {
+ this._routes = [];
+
+ YArray.each(routes, function (route) {
+ this.route(route.path, route.callback);
+ }, this);
+
+ return this._routes.concat();
+ },
+
// -- Protected Event Handlers ---------------------------------------------
/**
@@ -842,11 +939,25 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@protected
**/
_afterHistoryChange: function (e) {
- var self = this;
+ var self = this,
+ src = e.src,
+ prevURL = self._url,
+ currentURL = self._getURL();
- if (self._ready) {
- self._dispatch(self._getPath());
+ self._url = currentURL;
+
+ // Handles the awkwardness that is the `popstate` event. HTML5 browsers
+ // fire `popstate` right before they fire `hashchange`, and Chrome fires
+ // `popstate` on page load. If this router is not ready or the previous
+ // and current URLs only differ by their hash, then we want to ignore
+ // this `popstate` event.
+ if (src === 'popstate' &&
+ (!self._ready || prevURL.replace(/#.*$/, '') === currentURL.replace(/#.*$/, ''))) {
+
+ return;
}
+
+ self._dispatch(self._getPath(), currentURL, src);
},
// -- Default Event Handlers -----------------------------------------------
@@ -862,8 +973,93 @@ Y.Controller = Y.extend(Controller, Y.Base, {
this._ready = true;
}
}, {
- NAME: 'controller'
+ // -- Static Properties ----------------------------------------------------
+ NAME: 'router',
+
+ ATTRS: {
+ /**
+ Whether or not this browser is capable of using HTML5 history.
+
+ Setting this to `false` will force the use of hash-based history even on
+ HTML5 browsers, but please don't do this unless you understand the
+ consequences.
+
+ @attribute html5
+ @type Boolean
+ @initOnly
+ **/
+ html5: {
+ // Android versions lower than 3.0 are buggy and don't update
+ // window.location after a pushState() call, so we fall back to
+ // hash-based history for them.
+ //
+ // See http://code.google.com/p/android/issues/detail?id=17471
+ valueFn: function () { return Y.Router.html5; },
+ writeOnce: 'initOnly'
+ },
+
+ /**
+ Absolute root path from which all routes should be evaluated.
+
+ For example, if your router is running on a page at
+ `http://example.com/myapp/` and you add a route with the path `/`, your
+ route will never execute, because the path will always be preceded by
+ `/myapp`. Setting `root` to `/myapp` would cause all routes to be
+ evaluated relative to that root URL, so the `/` route would then execute
+ when the user browses to `http://example.com/myapp/`.
+
+ @attribute root
+ @type String
+ @default `''`
+ **/
+ root: {
+ value: ''
+ },
+
+ /**
+ Array of route objects.
+
+ Each item in the array must be an object with the following properties:
+
+ * `path`: String or regex representing the path to match. See the docs
+ for the `route()` method for more details.
+
+ * `callback`: Function or a string representing the name of a function
+ on this router instance that should be called when the route is
+ triggered. See the docs for the `route()` method for more details.
+
+ This attribute is intended to be used to set routes at init time, or to
+ completely reset all routes after init. To add routes after init without
+ resetting all existing routes, use the `route()` method.
+
+ @attribute routes
+ @type Object[]
+ @default `[]`
+ @see route
+ **/
+ routes: {
+ value : [],
+ getter: '_getRoutes',
+ setter: '_setRoutes'
+ }
+ },
+
+ // Used as the default value for the `html5` attribute, and for testing.
+ html5: Y.HistoryBase.html5 && (!Y.UA.android || Y.UA.android >= 3)
});
+/**
+The `Controller` class was deprecated in YUI 3.5.0 and is now an alias for the
+`Router` class. Use that class instead. This alias will be removed in a future
+version of YUI.
-}, '3.4.1' ,{optional:['querystring-parse'], requires:['array-extras', 'base-build', 'history']});
+@class Controller
+@constructor
+@extends Base
+@deprecated Use `Router` instead.
+@see Router
+**/
+Y.Controller = Y.Router;
+
+
+}, '3.5.0' ,{optional:['querystring-parse'], requires:['array-extras', 'base-build', 'history']});
diff --git a/lib/yui/3.5.0/build/router/router-min.js b/lib/yui/3.5.0/build/router/router-min.js
new file mode 100644
index 00000000000..02ea38d669c
--- /dev/null
+++ b/lib/yui/3.5.0/build/router/router-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("router",function(h){var c=h.HistoryHash,b=h.QueryString,f=h.Array,g=h.config.win,e=[],d="ready";function a(){a.superclass.constructor.apply(this,arguments);}h.Router=h.extend(a,h.Base,{_regexPathParam:/([:*])([\w\-]+)?/g,_regexUrlQuery:/\?([^#]*).*$/,_regexUrlOrigin:/^(?:[^\/#?:]+:\/\/|\/\/)[^\/]*/,initializer:function(j){var i=this;i._html5=i.get("html5");i._routes=[];i._url=i._getURL();i._setRoutes(j&&j.routes?j.routes:i.get("routes"));if(i._html5){i._history=new h.HistoryHTML5({force:true});h.after("history:change",i._afterHistoryChange,i);}else{h.on("hashchange",i._afterHistoryChange,g,i);}i.publish(d,{defaultFn:i._defReadyFn,fireOnce:true,preventable:false});i.once("initializedChange",function(){h.once("load",function(){setTimeout(function(){i.fire(d,{dispatched:!!i._dispatched});},20);});});},destructor:function(){if(this._html5){h.detach("history:change",this._afterHistoryChange,this);}else{h.detach("hashchange",this._afterHistoryChange,g);}},dispatch:function(){this.once(d,function(){this._ready=true;if(this._html5&&this.upgrade()){return;}else{this._dispatch(this._getPath(),this._getURL());}});return this;},getPath:function(){return this._getPath();},hasRoute:function(i){if(!this._hasSameOrigin(i)){return false;}return !!this.match(this.removeRoot(i)).length;},match:function(i){return f.filter(this._routes,function(j){return i.search(j.regex)>-1;});},removeRoot:function(j){var i=this.get("root");j=j.replace(this._regexUrlOrigin,"");if(i&&j.indexOf(i)===0){j=j.substring(i.length);}return j.charAt(0)==="/"?j:"/"+j;},replace:function(i){return this._queue(i,true);},route:function(j,k){var i=[];this._routes.push({callback:k,keys:i,path:j,regex:this._getRegex(j,i)});return this;},save:function(i){return this._queue(i);},upgrade:function(){if(!this._html5){return false;}var i=c.getHash();if(i&&i.charAt(0)==="/"){this.once(d,function(){this.replace(i);});return true;}return false;},_decode:function(i){return decodeURIComponent(i.replace(/\+/g," "));},_dequeue:function(){var i=this,j;if(!YUI.Env.windowLoaded){h.once("load",function(){i._dequeue();});return this;}j=e.shift();return j?j():this;},_dispatch:function(n,k,o){var j=this,i=j.match(n),m,l;j._dispatching=j._dispatched=true;if(!i||!i.length){j._dispatching=false;return j;}m=j._getRequest(n,k,o);l=j._getResponse(m);m.next=function(q){var s,r,p;if(q){h.error(q);}else{if((p=i.shift())){r=p.regex.exec(n);s=typeof p.callback==="string"?j[p.callback]:p.callback;if(r.length===p.keys.length+1){m.params=f.hash(p.keys,r.slice(1));}else{m.params=r.concat();}s.call(j,m,l,m.next);}}};m.next();j._dispatching=false;return j._dequeue();},_getHashPath:function(){return c.getHash().replace(this._regexUrlQuery,"");},_getOrigin:function(){var i=h.getLocation();return i.origin||(i.protocol+"//"+i.host);},_getPath:function(){var i=(!this._html5&&this._getHashPath())||h.getLocation().pathname;return this.removeRoot(i);},_getQuery:function(){var i=h.getLocation(),k,j;if(this._html5){return i.search.substring(1);}k=c.getHash();j=k.match(this._regexUrlQuery);return k&&j?j[1]:i.search.substring(1);},_getRegex:function(j,i){if(j instanceof RegExp){return j;}if(j==="*"){return(/.*/);}j=j.replace(this._regexPathParam,function(l,k,m){if(!m){return k==="*"?".*":l;}i.push(m);return k==="*"?"(.*?)":"([^/]*)";});return new RegExp("^"+j+"$");},_getRequest:function(j,i,k){return{path:j,query:this._parseQuery(this._getQuery()),url:i,src:k};},_getResponse:function(j){var i=function(){return j.next.apply(this,arguments);};i.req=j;return i;},_getRoutes:function(){return this._routes.concat();},_getURL:function(){return h.getLocation().toString();},_hasSameOrigin:function(j){var i=((j&&j.match(this._regexUrlOrigin))||[])[0];if(i&&i.indexOf("//")===0){i=h.getLocation().protocol+i;}return !i||i===this._getOrigin();},_joinURL:function(j){var i=this.get("root");j=this.removeRoot(j);if(j.charAt(0)==="/"){j=j.substring(1);}return i&&i.charAt(i.length-1)==="/"?i+j:i+"/"+j;},_parseQuery:b&&b.parse?b.parse:function(m){var n=this._decode,p=m.split("&"),l=0,k=p.length,j={},o;for(;l=3)});h.Controller=h.Router;},"3.5.0",{optional:["querystring-parse"],requires:["array-extras","base-build","history"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/controller/controller.js b/lib/yui/3.5.0/build/router/router.js
similarity index 59%
rename from lib/yui/3.4.1/build/controller/controller.js
rename to lib/yui/3.5.0/build/router/router.js
index d86e38b0adf..d2b640d0a25 100644
--- a/lib/yui/3.4.1/build/controller/controller.js
+++ b/lib/yui/3.5.0/build/router/router.js
@@ -1,53 +1,24 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add('controller', function(Y) {
+YUI.add('router', function(Y) {
/**
-The app framework provides simple MVC-like building blocks (models, model lists,
-views, and controllers) for writing single-page JavaScript applications.
+Provides URL-based routing using HTML5 `pushState()` or the location hash.
-@main app
@module app
-@since 3.4.0
-**/
-
-/**
-Provides URL-based routing using HTML5 `pushState()` or the location hash.
-
-@submodule controller
-@since 3.4.0
-**/
-
-/**
-Provides URL-based routing using HTML5 `pushState()` or the location hash.
-
-This makes it easy to wire up route handlers for different application states
-while providing full back/forward navigation support and bookmarkable, shareable
-URLs.
-
-@class Controller
-@constructor
-@extends Base
+@submodule router
@since 3.4.0
**/
var HistoryHash = Y.HistoryHash,
- Lang = Y.Lang,
QS = Y.QueryString,
YArray = Y.Array,
- // Android versions lower than 3.0 are buggy and don't update
- // window.location after a pushState() call, so we fall back to hash-based
- // history for them.
- //
- // See http://code.google.com/p/android/issues/detail?id=17471
- html5 = Y.HistoryBase.html5 && (!Y.UA.android || Y.UA.android >= 3),
- win = Y.config.win,
- location = win.location,
+ win = Y.config.win,
// We have to queue up pushState calls to avoid race conditions, since the
// popstate event doesn't actually provide any info on what URL it's
@@ -55,7 +26,7 @@ var HistoryHash = Y.HistoryHash,
saveQueue = [],
/**
- Fired when the controller is ready to begin dispatching to route handlers.
+ Fired when the router is ready to begin dispatching to route handlers.
You shouldn't need to wait for this event unless you plan to implement some
kind of custom dispatching logic. It's used internally in order to avoid
@@ -68,73 +39,34 @@ var HistoryHash = Y.HistoryHash,
**/
EVT_READY = 'ready';
-function Controller() {
- Controller.superclass.constructor.apply(this, arguments);
+/**
+Provides URL-based routing using HTML5 `pushState()` or the location hash.
+
+This makes it easy to wire up route handlers for different application states
+while providing full back/forward navigation support and bookmarkable, shareable
+URLs.
+
+@class Router
+@param {Object} [config] Config properties.
+ @param {Boolean} [config.html5] Overrides the default capability detection
+ and forces this router to use (`true`) or not use (`false`) HTML5
+ history.
+ @param {String} [config.root=''] Root path from which all routes should be
+ evaluated.
+ @param {Array} [config.routes=[]] Array of route definition objects.
+@constructor
+@extends Base
+@since 3.4.0
+**/
+function Router() {
+ Router.superclass.constructor.apply(this, arguments);
}
-Y.Controller = Y.extend(Controller, Y.Base, {
- // -- Public Properties ----------------------------------------------------
-
- /**
- Whether or not this browser is capable of using HTML5 history.
-
- This property is for informational purposes only. It's not configurable, and
- changing it will have no effect.
-
- @property html5
- @type Boolean
- **/
- html5: html5,
-
- /**
- Absolute root path from which all routes should be evaluated.
-
- For example, if your controller is running on a page at
- `http://example.com/myapp/` and you add a route with the path `/`, your
- route will never execute, because the path will always be preceded by
- `/myapp`. Setting `root` to `/myapp` would cause all routes to be evaluated
- relative to that root URL, so the `/` route would then execute when the
- user browses to `http://example.com/myapp/`.
-
- This property may be overridden in a subclass, set after instantiation, or
- passed as a config attribute when instantiating a `Y.Controller`-based
- class.
-
- @property root
- @type String
- @default `''`
- **/
- root: '',
-
- /**
- Array of route objects specifying routes to be created at instantiation
- time.
-
- Each item in the array must be an object with the following properties:
-
- * `path`: String or regex representing the path to match. See the docs for
- the `route()` method for more details.
- * `callback`: Function or a string representing the name of a function on
- this controller instance that should be called when the route is
- triggered. See the docs for the `route()` method for more details.
-
- This property may be overridden in a subclass or passed as a config
- attribute when instantiating a `Y.Controller`-based class, but setting it
- after instantiation will have no effect (use the `route()` method instead).
-
- If routes are passed at instantiation time, they will override any routes
- set on the prototype.
-
- @property routes
- @type Object[]
- @default `[]`
- **/
- routes: [],
-
+Y.Router = Y.extend(Router, Y.Base, {
// -- Protected Properties -------------------------------------------------
/**
- Whether or not `_dispatch()` has been called since this controller was
+ Whether or not `_dispatch()` has been called since this router was
instantiated.
@property _dispatched
@@ -152,6 +84,14 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@protected
**/
+ /**
+ Cached copy of the `html5` attribute for internal use.
+
+ @property _html5
+ @type Boolean
+ @protected
+ **/
+
/**
Whether or not the `ready` event has fired yet.
@@ -169,13 +109,14 @@ Y.Controller = Y.extend(Controller, Y.Base, {
1. Parameter prefix character. Either a `:` for subpath parameters that
should only match a single level of a path, or `*` for splat parameters
that should match any number of path levels.
- 2. Parameter name.
+
+ 2. Parameter name, if specified, otherwise it is a wildcard match.
@property _regexPathParam
@type RegExp
@protected
**/
- _regexPathParam: /([:*])([\w-]+)/g,
+ _regexPathParam: /([:*])([\w\-]+)?/g,
/**
Regex that matches and captures the query portion of a URL, minus the
@@ -188,42 +129,37 @@ Y.Controller = Y.extend(Controller, Y.Base, {
_regexUrlQuery: /\?([^#]*).*$/,
/**
- Regex that matches everything before the path portion of an HTTP or HTTPS
- URL. This will be used to strip this part of the URL from a string when we
+ Regex that matches everything before the path portion of a URL (the origin).
+ This will be used to strip this part of the URL from a string when we
only want the path.
- @property _regexUrlStrip
+ @property _regexUrlOrigin
@type RegExp
@protected
**/
- _regexUrlStrip: /^https?:\/\/[^\/]*/i,
+ _regexUrlOrigin: /^(?:[^\/#?:]+:\/\/|\/\/)[^\/]*/,
// -- Lifecycle Methods ----------------------------------------------------
initializer: function (config) {
var self = this;
- // Set config properties.
- config || (config = {});
-
- config.routes && (self.routes = config.routes);
- Lang.isValue(config.root) && (self.root = config.root);
-
- // Create routes.
+ self._html5 = self.get('html5');
self._routes = [];
+ self._url = self._getURL();
- YArray.each(self.routes, function (route) {
- self.route(route.path, route.callback);
- });
+ // Necessary because setters don't run on init.
+ self._setRoutes(config && config.routes ? config.routes :
+ self.get('routes'));
// Set up a history instance or hashchange listener.
- if (html5) {
+ if (self._html5) {
self._history = new Y.HistoryHTML5({force: true});
- self._history.after('change', self._afterHistoryChange, self);
+ Y.after('history:change', self._afterHistoryChange, self);
} else {
Y.on('hashchange', self._afterHistoryChange, win, self);
}
- // Fire a 'ready' event once we're ready to route. We wait first for all
+ // Fire a `ready` event once we're ready to route. We wait first for all
// subclass initializers to finish, then for window.onload, and then an
// additional 20ms to allow the browser to fire a useless initial
// `popstate` event if it wants to (and Chrome always wants to).
@@ -243,8 +179,8 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
destructor: function () {
- if (html5) {
- this._history.detachAll();
+ if (this._html5) {
+ Y.detach('history:change', this._afterHistoryChange, this);
} else {
Y.detach('hashchange', this._afterHistoryChange, win);
}
@@ -266,10 +202,10 @@ Y.Controller = Y.extend(Controller, Y.Base, {
this.once(EVT_READY, function () {
this._ready = true;
- if (html5 && this.upgrade()) {
+ if (this._html5 && this.upgrade()) {
return;
} else {
- this._dispatch(this._getPath());
+ this._dispatch(this._getPath(), this._getURL());
}
});
@@ -287,16 +223,24 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
/**
- Returns `true` if this controller has at least one route that matches the
- specified URL path, `false` otherwise.
+ Returns `true` if this router has at least one route that matches the
+ specified URL, `false` otherwise.
+
+ This method enforces the same-origin security constraint on the specified
+ `url`; any URL which is not from the same origin as the current URL will
+ always return `false`.
@method hasRoute
- @param {String} path URL path to match.
+ @param {String} url URL to match.
@return {Boolean} `true` if there's at least one matching route, `false`
otherwise.
**/
- hasRoute: function (path) {
- return !!this.match(path).length;
+ hasRoute: function (url) {
+ if (!this._hasSameOrigin(url)) {
+ return false;
+ }
+
+ return !!this.match(this.removeRoot(url)).length;
},
/**
@@ -309,7 +253,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
Each returned route object has the following properties:
* `callback`: A function or a string representing the name of a function
- this controller that should be executed when the route is triggered.
+ this router that should be executed when the route is triggered.
* `keys`: An array of strings representing the named parameters defined in
the route's path specification, if any.
* `path`: The route's path specification, which may be either a string or
@@ -318,8 +262,8 @@ Y.Controller = Y.extend(Controller, Y.Base, {
This regex is used to determine whether the route matches a given path.
@example
- controller.route('/foo', function () {});
- controller.match('/foo');
+ router.route('/foo', function () {});
+ router.match('/foo');
// => [{callback: ..., keys: [], path: '/foo', regex: ...}]
@method match
@@ -333,25 +277,25 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
/**
- Removes the `root` URL from the from of _path_ (if it's there) and returns
+ Removes the `root` URL from the front of _url_ (if it's there) and returns
the result. The returned path will always have a leading `/`.
@method removeRoot
- @param {String} path URL path.
+ @param {String} url URL.
@return {String} Rootless path.
**/
- removeRoot: function (path) {
- var root = this.root;
+ removeRoot: function (url) {
+ var root = this.get('root');
// Strip out the non-path part of the URL, if any (e.g.
// "http://foo.com"), so that we're left with just the path.
- path = path.replace(this._regexUrlStrip, '');
+ url = url.replace(this._regexUrlOrigin, '');
- if (root && path.indexOf(root) === 0) {
- path = path.substring(root.length);
+ if (root && url.indexOf(root) === 0) {
+ url = url.substring(root.length);
}
- return path.charAt(0) === '/' ? path : '/' + path;
+ return url.charAt(0) === '/' ? url : '/' + url;
},
/**
@@ -368,19 +312,19 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@example
// Starting URL: http://example.com/
- controller.replace('/path/');
+ router.replace('/path/');
// New URL: http://example.com/path/
- controller.replace('/path?foo=bar');
+ router.replace('/path?foo=bar');
// New URL: http://example.com/path?foo=bar
- controller.replace('/');
+ router.replace('/');
// New URL: http://example.com/
@method replace
- @param {String} [url] URL to set. Should be a relative URL. If this
- controller's `root` property is set, this URL must be relative to the
- root URL. If no URL is specified, the page's current URL will be used.
+ @param {String} [url] URL to set. This URL needs to be of the same origin as
+ the current URL. This can be a URL relative to the router's `root`
+ attribute. If no URL is specified, the page's current URL will be used.
@chainable
@see save()
**/
@@ -417,7 +361,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
be executed.
@example
- controller.route('/photos/:tag/:page', function (req, next) {
+ router.route('/photos/:tag/:page', function (req, res, next) {
});
@method route
@@ -425,7 +369,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
expression.
@param {Function|String} callback Callback function to call whenever this
route is triggered. If specified as a string, the named function will be
- called on this controller instance.
+ called on this router instance.
@param {Object} callback.req Request object containing information about
the request. It contains the following properties.
@param {Array|Object} callback.req.params Captured parameters matched by
@@ -438,6 +382,14 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@param {Object} callback.req.query Query hash representing the URL query
string, if any. Parameter names are keys, and are mapped to parameter
values.
+ @param {String} callback.req.url The full URL.
+ @param {String} callback.req.src What initiated the dispatch. In an
+ HTML5 browser, when the back/forward buttons are used, this property
+ will have a value of "popstate".
+ @param {Object} callback.res Response object containing methods and
+ information that relate to responding to a request. It contains the
+ following properties.
+ @param {Object} callback.res.req Reference to the request object.
@param {Function} callback.next Callback to pass control to the next
matching route. If you don't call this function, then no further route
handlers will be executed, even if there are more that match. If you do
@@ -474,19 +426,19 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@example
// Starting URL: http://example.com/
- controller.save('/path/');
+ router.save('/path/');
// New URL: http://example.com/path/
- controller.save('/path?foo=bar');
+ router.save('/path?foo=bar');
// New URL: http://example.com/path?foo=bar
- controller.save('/');
+ router.save('/');
// New URL: http://example.com/
@method save
- @param {String} [url] URL to set. Should be a relative URL. If this
- controller's `root` property is set, this URL must be relative to the
- root URL. If no URL is specified, the page's current URL will be used.
+ @param {String} [url] URL to set. This URL needs to be of the same origin as
+ the current URL. This can be a URL relative to the router's `root`
+ attribute. If no URL is specified, the page's current URL will be used.
@chainable
@see replace()
**/
@@ -501,8 +453,13 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@method upgrade
@return {Boolean} `true` if the URL was upgraded, `false` otherwise.
**/
- upgrade: html5 ? function () {
- var hash = this._getHashPath();
+ upgrade: function () {
+ if (!this._html5) {
+ return false;
+ }
+
+ // Get the full hash in all its glory!
+ var hash = HistoryHash.getHash();
if (hash && hash.charAt(0) === '/') {
// This is an HTML5 browser and we have a hash-based path in the
@@ -517,7 +474,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
}
return false;
- } : function () { return false; },
+ },
// -- Protected Methods ----------------------------------------------------
@@ -571,13 +528,15 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@method _dispatch
@param {String} path URL path.
+ @param {String} url Full URL.
+ @param {String} src What initiated the dispatch.
@chainable
@protected
**/
- _dispatch: function (path) {
+ _dispatch: function (path, url, src) {
var self = this,
routes = self.match(path),
- req;
+ req, res;
self._dispatching = self._dispatched = true;
@@ -586,7 +545,8 @@ Y.Controller = Y.extend(Controller, Y.Base, {
return self;
}
- req = self._getRequest(path);
+ req = self._getRequest(path, url, src);
+ res = self._getResponse(req);
req.next = function (err) {
var callback, matches, route;
@@ -606,7 +566,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
req.params = matches.concat();
}
- callback.call(self, req, req.next);
+ callback.call(self, req, res, req.next);
}
};
@@ -629,16 +589,32 @@ Y.Controller = Y.extend(Controller, Y.Base, {
},
/**
- Gets the current route path.
+ Gets the location origin (i.e., protocol, host, and port) as a URL.
+
+ @example
+ http://example.com
+
+ @method _getOrigin
+ @return {String} Location origin (i.e., protocol, host, and port).
+ @protected
+ **/
+ _getOrigin: function () {
+ var location = Y.getLocation();
+ return location.origin || (location.protocol + '//' + location.host);
+ },
+
+ /**
+ Gets the current route path, relative to the `root` (if any).
@method _getPath
@return {String} Current route path.
@protected
**/
- _getPath: html5 ? function () {
- return this.removeRoot(location.pathname);
- } : function () {
- return this._getHashPath() || this.removeRoot(location.pathname);
+ _getPath: function () {
+ var path = (!this._html5 && this._getHashPath()) ||
+ Y.getLocation().pathname;
+
+ return this.removeRoot(path);
},
/**
@@ -648,11 +624,16 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@return {String} Current route query string.
@protected
**/
- _getQuery: html5 ? function () {
- return location.search.substring(1);
- } : function () {
- var hash = HistoryHash.getHash(),
- matches = hash.match(this._regexUrlQuery);
+ _getQuery: function () {
+ var location = Y.getLocation(),
+ hash, matches;
+
+ if (this._html5) {
+ return location.search.substring(1);
+ }
+
+ hash = HistoryHash.getHash();
+ matches = hash.match(this._regexUrlQuery);
return hash && matches ? matches[1] : location.search.substring(1);
},
@@ -673,7 +654,18 @@ Y.Controller = Y.extend(Controller, Y.Base, {
return path;
}
+ // Special case for catchall paths.
+ if (path === '*') {
+ return (/.*/);
+ }
+
path = path.replace(this._regexPathParam, function (match, operator, key) {
+ // Only `*` operators are supported for key-less matches to allowing
+ // in-path wildcards like: '/foo/*'.
+ if (!key) {
+ return operator === '*' ? '.*' : match;
+ }
+
keys.push(key);
return operator === '*' ? '(.*?)' : '([^/]*)';
});
@@ -686,28 +678,96 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@method _getRequest
@param {String} path Current path being dispatched.
+ @param {String} url Current full URL being dispatched.
+ @param {String} src What initiated the dispatch.
@return {Object} Request object.
@protected
**/
- _getRequest: function (path) {
+ _getRequest: function (path, url, src) {
return {
path : path,
- query: this._parseQuery(this._getQuery())
+ query: this._parseQuery(this._getQuery()),
+ url : url,
+ src : src
};
},
+ /**
+ Gets a response object that can be passed to a route handler.
+
+ @method _getResponse
+ @param {Object} req Request object.
+ @return {Object} Response Object.
+ @protected
+ **/
+ _getResponse: function (req) {
+ // For backwards compatibility, the response object is a function that
+ // calls `next()` on the request object and returns the result.
+ var res = function () {
+ return req.next.apply(this, arguments);
+ };
+
+ res.req = req;
+ return res;
+ },
+
+ /**
+ Getter for the `routes` attribute.
+
+ @method _getRoutes
+ @return {Object[]} Array of route objects.
+ @protected
+ **/
+ _getRoutes: function () {
+ return this._routes.concat();
+ },
+
+ /**
+ Gets the current full URL.
+
+ @method _getURL
+ @return {String} URL.
+ @protected
+ **/
+ _getURL: function () {
+ return Y.getLocation().toString();
+ },
+
+ /**
+ Returns `true` when the specified `url` is from the same origin as the
+ current URL; i.e., the protocol, host, and port of the URLs are the same.
+
+ All host or path relative URLs are of the same origin. A scheme-relative URL
+ is first prefixed with the current scheme before being evaluated.
+
+ @method _hasSameOrigin
+ @param {String} url URL to compare origin with the current URL.
+ @return {Boolean} Whether the URL has the same origin of the current URL.
+ @protected
+ **/
+ _hasSameOrigin: function (url) {
+ var origin = ((url && url.match(this._regexUrlOrigin)) || [])[0];
+
+ // Prepend current scheme to scheme-relative URLs.
+ if (origin && origin.indexOf('//') === 0) {
+ origin = Y.getLocation().protocol + origin;
+ }
+
+ return !origin || origin === this._getOrigin();
+ },
+
/**
Joins the `root` URL to the specified _url_, normalizing leading/trailing
`/` characters.
@example
- controller.root = '/foo'
- controller._joinURL('bar'); // => '/foo/bar'
- controller._joinURL('/bar'); // => '/foo/bar'
+ router.set('root', '/foo');
+ router._joinURL('bar'); // => '/foo/bar'
+ router._joinURL('/bar'); // => '/foo/bar'
- controller.root = '/foo/'
- controller._joinURL('bar'); // => '/foo/bar'
- controller._joinURL('/bar'); // => '/foo/bar'
+ router.set('root', '/foo/');
+ router._joinURL('bar'); // => '/foo/bar'
+ router._joinURL('/bar'); // => '/foo/bar'
@method _joinURL
@param {String} url URL to append to the `root` URL.
@@ -715,7 +775,9 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@protected
**/
_joinURL: function (url) {
- var root = this.root;
+ var root = this.get('root');
+
+ url = this.removeRoot(url);
if (url.charAt(0) === '/') {
url = url.substring(1);
@@ -775,7 +837,7 @@ Y.Controller = Y.extend(Controller, Y.Base, {
self = this;
saveQueue.push(function () {
- if (html5) {
+ if (self._html5) {
if (Y.UA.ios && Y.UA.ios < 5) {
// iOS <5 has buggy HTML5 history support, and needs to be
// synchronous.
@@ -802,6 +864,10 @@ Y.Controller = Y.extend(Controller, Y.Base, {
/**
Saves a history entry using either `pushState()` or the location hash.
+ This method enforces the same-origin security constraint; attempting to save
+ a `url` that is not from the same origin as the current URL will result in
+ an error.
+
@method _save
@param {String} [url] URL for the history entry.
@param {Boolean} [replace=false] If `true`, the current history entry will
@@ -809,27 +875,58 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@chainable
@protected
**/
- _save: html5 ? function (url, replace) {
+ _save: function (url, replace) {
+ var urlIsString = typeof url === 'string';
+
+ // Perform same-origin check on the specified URL.
+ if (urlIsString && !this._hasSameOrigin(url)) {
+ Y.error('Security error: The new URL must be of the same origin as the current URL.');
+ return this;
+ }
+
// Force _ready to true to ensure that the history change is handled
// even if _save is called before the `ready` event fires.
this._ready = true;
- this._history[replace ? 'replace' : 'add'](null, {
- url: typeof url === 'string' ? this._joinURL(url) : url
- });
+ if (this._html5) {
+ this._history[replace ? 'replace' : 'add'](null, {
+ url: urlIsString ? this._joinURL(url) : url
+ });
+ } else {
+ // Remove the root from the URL before it's set as the hash.
+ urlIsString && (url = this.removeRoot(url));
- return this;
- } : function (url, replace) {
- this._ready = true;
-
- if (typeof url === 'string' && url.charAt(0) !== '/') {
- url = '/' + url;
+ // The `hashchange` event only fires when the new hash is actually
+ // different. This makes sure we'll always dequeue and dispatch,
+ // mimicking the HTML5 behavior.
+ if (url === HistoryHash.getHash()) {
+ this._dispatch(this._getPath(), this._getURL());
+ } else {
+ HistoryHash[replace ? 'replaceHash' : 'setHash'](url);
+ }
}
- HistoryHash[replace ? 'replaceHash' : 'setHash'](url);
return this;
},
+ /**
+ Setter for the `routes` attribute.
+
+ @method _setRoutes
+ @param {Object[]} routes Array of route objects.
+ @return {Object[]} Array of route objects.
+ @protected
+ **/
+ _setRoutes: function (routes) {
+ this._routes = [];
+
+ YArray.each(routes, function (route) {
+ this.route(route.path, route.callback);
+ }, this);
+
+ return this._routes.concat();
+ },
+
// -- Protected Event Handlers ---------------------------------------------
/**
@@ -840,11 +937,25 @@ Y.Controller = Y.extend(Controller, Y.Base, {
@protected
**/
_afterHistoryChange: function (e) {
- var self = this;
+ var self = this,
+ src = e.src,
+ prevURL = self._url,
+ currentURL = self._getURL();
- if (self._ready) {
- self._dispatch(self._getPath());
+ self._url = currentURL;
+
+ // Handles the awkwardness that is the `popstate` event. HTML5 browsers
+ // fire `popstate` right before they fire `hashchange`, and Chrome fires
+ // `popstate` on page load. If this router is not ready or the previous
+ // and current URLs only differ by their hash, then we want to ignore
+ // this `popstate` event.
+ if (src === 'popstate' &&
+ (!self._ready || prevURL.replace(/#.*$/, '') === currentURL.replace(/#.*$/, ''))) {
+
+ return;
}
+
+ self._dispatch(self._getPath(), currentURL, src);
},
// -- Default Event Handlers -----------------------------------------------
@@ -860,8 +971,93 @@ Y.Controller = Y.extend(Controller, Y.Base, {
this._ready = true;
}
}, {
- NAME: 'controller'
+ // -- Static Properties ----------------------------------------------------
+ NAME: 'router',
+
+ ATTRS: {
+ /**
+ Whether or not this browser is capable of using HTML5 history.
+
+ Setting this to `false` will force the use of hash-based history even on
+ HTML5 browsers, but please don't do this unless you understand the
+ consequences.
+
+ @attribute html5
+ @type Boolean
+ @initOnly
+ **/
+ html5: {
+ // Android versions lower than 3.0 are buggy and don't update
+ // window.location after a pushState() call, so we fall back to
+ // hash-based history for them.
+ //
+ // See http://code.google.com/p/android/issues/detail?id=17471
+ valueFn: function () { return Y.Router.html5; },
+ writeOnce: 'initOnly'
+ },
+
+ /**
+ Absolute root path from which all routes should be evaluated.
+
+ For example, if your router is running on a page at
+ `http://example.com/myapp/` and you add a route with the path `/`, your
+ route will never execute, because the path will always be preceded by
+ `/myapp`. Setting `root` to `/myapp` would cause all routes to be
+ evaluated relative to that root URL, so the `/` route would then execute
+ when the user browses to `http://example.com/myapp/`.
+
+ @attribute root
+ @type String
+ @default `''`
+ **/
+ root: {
+ value: ''
+ },
+
+ /**
+ Array of route objects.
+
+ Each item in the array must be an object with the following properties:
+
+ * `path`: String or regex representing the path to match. See the docs
+ for the `route()` method for more details.
+
+ * `callback`: Function or a string representing the name of a function
+ on this router instance that should be called when the route is
+ triggered. See the docs for the `route()` method for more details.
+
+ This attribute is intended to be used to set routes at init time, or to
+ completely reset all routes after init. To add routes after init without
+ resetting all existing routes, use the `route()` method.
+
+ @attribute routes
+ @type Object[]
+ @default `[]`
+ @see route
+ **/
+ routes: {
+ value : [],
+ getter: '_getRoutes',
+ setter: '_setRoutes'
+ }
+ },
+
+ // Used as the default value for the `html5` attribute, and for testing.
+ html5: Y.HistoryBase.html5 && (!Y.UA.android || Y.UA.android >= 3)
});
+/**
+The `Controller` class was deprecated in YUI 3.5.0 and is now an alias for the
+`Router` class. Use that class instead. This alias will be removed in a future
+version of YUI.
-}, '3.4.1' ,{optional:['querystring-parse'], requires:['array-extras', 'base-build', 'history']});
+@class Controller
+@constructor
+@extends Base
+@deprecated Use `Router` instead.
+@see Router
+**/
+Y.Controller = Y.Router;
+
+
+}, '3.5.0' ,{optional:['querystring-parse'], requires:['array-extras', 'base-build', 'history']});
diff --git a/lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie-debug.js b/lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie-debug.js
similarity index 92%
rename from lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie-debug.js
rename to lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie-debug.js
index 6a32e591234..b99a9b456d7 100644
--- a/lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie-debug.js
+++ b/lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -58,4 +58,4 @@ Y.mix(Y.ScrollView.prototype, {
}, true);
-}, '3.4.1' ,{requires:['scrollview-base']});
+}, '3.5.0' ,{requires:['scrollview-base']});
diff --git a/lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie-min.js b/lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie-min.js
similarity index 82%
rename from lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie-min.js
rename to lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie-min.js
index a983da9032d..0ac54bbb5a8 100644
--- a/lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie-min.js
+++ b/lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("scrollview-base-ie",function(a){a.mix(a.ScrollView.prototype,{_fixIESelect:function(c,b){this._cbDoc=b.get("ownerDocument");this._nativeBody=a.Node.getDOMNode(a.one("body",this._cbDoc));b.on("mousedown",function(){this._selectstart=this._nativeBody.onselectstart;this._nativeBody.onselectstart=this._iePreventSelect;this._cbDoc.once("mouseup",this._ieRestoreSelect,this);},this);},_iePreventSelect:function(){return false;},_ieRestoreSelect:function(){this._nativeBody.onselectstart=this._selectstart;}},true);},"3.4.1",{requires:["scrollview-base"]});
\ No newline at end of file
+YUI.add("scrollview-base-ie",function(a){a.mix(a.ScrollView.prototype,{_fixIESelect:function(c,b){this._cbDoc=b.get("ownerDocument");this._nativeBody=a.Node.getDOMNode(a.one("body",this._cbDoc));b.on("mousedown",function(){this._selectstart=this._nativeBody.onselectstart;this._nativeBody.onselectstart=this._iePreventSelect;this._cbDoc.once("mouseup",this._ieRestoreSelect,this);},this);},_iePreventSelect:function(){return false;},_ieRestoreSelect:function(){this._nativeBody.onselectstart=this._selectstart;}},true);},"3.5.0",{requires:["scrollview-base"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie.js b/lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie.js
similarity index 92%
rename from lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie.js
rename to lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie.js
index 6a32e591234..b99a9b456d7 100644
--- a/lib/yui/3.4.1/build/scrollview-base-ie/scrollview-base-ie.js
+++ b/lib/yui/3.5.0/build/scrollview-base-ie/scrollview-base-ie.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -58,4 +58,4 @@ Y.mix(Y.ScrollView.prototype, {
}, true);
-}, '3.4.1' ,{requires:['scrollview-base']});
+}, '3.5.0' ,{requires:['scrollview-base']});
diff --git a/lib/yui/3.4.1/build/scrollview-base/assets/scrollview-base-core.css b/lib/yui/3.5.0/build/scrollview-base/assets/scrollview-base-core.css
similarity index 80%
rename from lib/yui/3.4.1/build/scrollview-base/assets/scrollview-base-core.css
rename to lib/yui/3.5.0/build/scrollview-base/assets/scrollview-base-core.css
index 3f0d9b62ac2..331ead9afb4 100644
--- a/lib/yui/3.4.1/build/scrollview-base/assets/scrollview-base-core.css
+++ b/lib/yui/3.5.0/build/scrollview-base/assets/scrollview-base-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.5.0/build/scrollview-base/assets/skins/night/scrollview-base-skin.css b/lib/yui/3.5.0/build/scrollview-base/assets/skins/night/scrollview-base-skin.css
new file mode 100644
index 00000000000..7cef9228d45
--- /dev/null
+++ b/lib/yui/3.5.0/build/scrollview-base/assets/skins/night/scrollview-base-skin.css
@@ -0,0 +1,6 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
diff --git a/lib/yui/3.4.1/build/scrollview-base/assets/skins/night/scrollview-base.css b/lib/yui/3.5.0/build/scrollview-base/assets/skins/night/scrollview-base.css
similarity index 52%
rename from lib/yui/3.4.1/build/scrollview-base/assets/skins/night/scrollview-base.css
rename to lib/yui/3.5.0/build/scrollview-base/assets/skins/night/scrollview-base.css
index 6e185e8f026..91fefac78de 100644
--- a/lib/yui/3.4.1/build/scrollview-base/assets/skins/night/scrollview-base.css
+++ b/lib/yui/3.5.0/build/scrollview-base/assets/skins/night/scrollview-base.css
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-.yui3-scrollview{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none}.yui3-scrollview-hidden{display:none}.yui3-scrollview-content{position:relative}
+.yui3-scrollview{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none}.yui3-scrollview-hidden{display:none}.yui3-scrollview-content{position:relative}#yui3-css-stamp.skin-night-scrollview-base{display:none}
diff --git a/lib/yui/3.4.1/build/scrollview-base/assets/skins/sam/scrollview-base-skin.css b/lib/yui/3.5.0/build/scrollview-base/assets/skins/sam/scrollview-base-skin.css
similarity index 69%
rename from lib/yui/3.4.1/build/scrollview-base/assets/skins/sam/scrollview-base-skin.css
rename to lib/yui/3.5.0/build/scrollview-base/assets/skins/sam/scrollview-base-skin.css
index ff410cf4f00..d666aea93bd 100644
--- a/lib/yui/3.4.1/build/scrollview-base/assets/skins/sam/scrollview-base-skin.css
+++ b/lib/yui/3.5.0/build/scrollview-base/assets/skins/sam/scrollview-base-skin.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/scrollview-base/assets/skins/sam/scrollview-base.css b/lib/yui/3.5.0/build/scrollview-base/assets/skins/sam/scrollview-base.css
similarity index 71%
rename from lib/yui/3.4.1/build/scrollview-base/assets/skins/sam/scrollview-base.css
rename to lib/yui/3.5.0/build/scrollview-base/assets/skins/sam/scrollview-base.css
index 95edb86039e..173086d9d10 100644
--- a/lib/yui/3.4.1/build/scrollview-base/assets/skins/sam/scrollview-base.css
+++ b/lib/yui/3.5.0/build/scrollview-base/assets/skins/sam/scrollview-base.css
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-.yui3-scrollview{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none}.yui3-scrollview-hidden{display:none}.yui3-scrollview-content{position:relative}.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}
+.yui3-scrollview{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none}.yui3-scrollview-hidden{display:none}.yui3-scrollview-content{position:relative}.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}#yui3-css-stamp.skin-sam-scrollview-base{display:none}
diff --git a/lib/yui/3.4.1/build/scrollview-base/scrollview-base-debug.js b/lib/yui/3.5.0/build/scrollview-base/scrollview-base-debug.js
similarity index 93%
rename from lib/yui/3.4.1/build/scrollview-base/scrollview-base-debug.js
rename to lib/yui/3.5.0/build/scrollview-base/scrollview-base-debug.js
index bab784ec29c..7b05d791e8b 100644
--- a/lib/yui/3.4.1/build/scrollview-base/scrollview-base-debug.js
+++ b/lib/yui/3.5.0/build/scrollview-base/scrollview-base-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -23,6 +23,8 @@ var getClassName = Y.ClassNameManager.getClassName,
FLICK = EV_SCROLL_FLICK,
DRAG = "drag",
+
+ MOUSEWHEEL_ENABLED = true,
UI = 'ui',
@@ -128,6 +130,8 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
sv._bindDrag(sv.get(DRAG));
sv._bindFlick(sv.get(FLICK));
+ // Note: You can find _bindMousewheel() inside syncUI(), becuase it depends on UI details
+
sv._bindAttrs();
// IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release.
@@ -161,9 +165,10 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
// Without a _uiDimensionChange() call, the scrollview only
// scrolls partially due to the fact that styles added in the CSS
// altered the height/width of the bounding box.
+ // TODO: Remove?
if (!IE) {
this.after('renderedChange', function(e) {
- this._uiDimensionsChange();
+ //this._uiDimensionsChange();
});
}
},
@@ -201,6 +206,26 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
cb.detach('flick|*');
}
},
+
+ /**
+ * Bind (or unbind) mousewheel listeners.
+ *
+ * @method _bindMousewheel
+ * @param mousewheel {Object|boolean} If truthy, the method binds listeners for mousewheel support. If false, the method unbinds mousewheel listeners.
+ * @private
+ */
+ _bindMousewheel : function(mousewheel) {
+ var cb = this._cb;
+
+ // Only enable for vertical scrollviews
+ if (this._scrollsVertical) {
+ if (mousewheel) {
+ cb.on("mousewheel", Y.bind(this._mousewheel, this), mousewheel);
+ } else {
+ cb.detach('mousewheel|*');
+ }
+ }
+ },
/**
* syncUI implementation.
@@ -212,6 +237,7 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
syncUI: function() {
this._cDisabled = this.get(DISABLED);
this._uiDimensionsChange();
+ this._bindMousewheel(MOUSEWHEEL_ENABLED);
this.scrollTo(this.get(SCROLL_X), this.get(SCROLL_Y));
},
@@ -225,7 +251,17 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
* @param easing {String} An easing equation if duration is set
*/
scrollTo: function(x, y, duration, easing) {
-
+
+ // TODO: Figure out a better way to detect mousewheel events
+ if (easing === undefined) {
+ if ( y < this._minScrollY) {
+ y = this._minScrollY;
+ }
+ else if ( y > this._maxScrollY) {
+ y = this._maxScrollY;
+ }
+ }
+
if (!this._cDisabled) {
var cb = this._cb,
xSet = (x !== null),
@@ -325,7 +361,7 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
* @type boolean
* @protected
*/
- _forceHWTransforms: Y.UA.webkit,
+ _forceHWTransforms: Y.UA.webkit ? true : false,
/**
*
Used to control whether or not ScrollView's internal
@@ -553,7 +589,6 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
var duration = e.duration,
easing = e.easing,
val = e.newVal;
-
if(e.src !== UI) {
if (e.attrName == SCROLL_X) {
this._uiScrollTo(val, null, duration, easing);
@@ -609,7 +644,6 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
*
*/
_uiScrollTo : function(x, y, duration, easing) {
-
// TODO: This doesn't seem right. This is not UI logic.
duration = duration || this._snapToEdge ? 400 : 0;
easing = easing || this._snapToEdge ? ScrollView.SNAP_EASING : null;
@@ -694,12 +728,14 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
sv._maxScrollY = scrollHeight - height;
sv._minScrollY = 0;
sv._scrollHeight = scrollHeight;
+ sv._height = height;
bb.addClass(CLASS_NAMES.vertical);
} else {
sv._scrollsVertical = false;
delete sv._maxScrollY;
delete sv._minScrollY;
delete sv._scrollHeight;
+ delete sv._height;
bb.removeClass(CLASS_NAMES.vertical);
}
@@ -708,12 +744,14 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
sv._maxScrollX = scrollWidth - width;
sv._minScrollX = 0;
sv._scrollWidth = scrollWidth;
+ sv._width = width;
bb.addClass(CLASS_NAMES.horizontal);
} else {
sv._scrollsHorizontal = false;
delete sv._maxScrollX;
delete sv._minScrollX;
delete sv._scrollWidth;
+ delete sv._width;
bb.removeClass(CLASS_NAMES.horizontal);
}
@@ -819,6 +857,27 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
}
},
+ _mousewheel: function(e) {
+ var scrollY = this.get('scrollY'),
+ contentBox = this._cb,
+ scrollOffset = 10, // 10px
+ scrollToY = scrollY - (e.wheelDelta * scrollOffset);
+
+ this.scrollTo(0, scrollToY);
+
+ // if we have scrollbars plugin, update & set the flash timer on the scrollbar
+ if (this.scrollbars) {
+ // TODO: The scrollbars should handle this themselves
+ this.scrollbars._update();
+ this.scrollbars.flash();
+ // or just this
+ // this.scrollbars._hostDimensionsChange();
+ }
+
+ // prevent browser default behavior on mouse scroll
+ e.preventDefault();
+ },
+
/**
* Execute a single frame in the flick animation
*
@@ -934,7 +993,6 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
* @return {Number} The constrained value, if it exceeds min/max range
*/
_setScroll : function(val, dim) {
-
if (this._cDisabled) {
val = Y.Attribute.INVALID_VALUE;
} else {
@@ -1159,4 +1217,4 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
});
-}, '3.4.1' ,{requires:['widget', 'event-gestures', 'transition'], skinnable:true});
+}, '3.5.0' ,{requires:['widget', 'event-gestures', 'event-mousewheel', 'transition'], skinnable:true});
diff --git a/lib/yui/3.5.0/build/scrollview-base/scrollview-base-min.js b/lib/yui/3.5.0/build/scrollview-base/scrollview-base-min.js
new file mode 100644
index 00000000000..134957080cc
--- /dev/null
+++ b/lib/yui/3.5.0/build/scrollview-base/scrollview-base-min.js
@@ -0,0 +1,8 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("scrollview-base",function(d){var i=d.ClassNameManager.getClassName,x="scrollview",w={vertical:i(x,"vert"),horizontal:i(x,"horiz")},B="scrollEnd",l="flick",b=l,c="drag",a=true,k="ui",o="left",r="top",h="px",p="scrollY",q="scrollX",f="bounce",t="disabled",v="x",u="y",y="boundingBox",n="contentBox",A="",s="0s",j=d.UA.ie,e=d.Transition,g=e.useNative,m=function(E,D,C){return Math.min(Math.max(E,D),C);};function z(){z.superclass.constructor.apply(this,arguments);}d.ScrollView=d.extend(z,d.Widget,{initializer:function(){var C=this;C._cb=C.get(n);C._bb=C.get(y);},_uiSizeCB:function(){},_onTransEnd:function(C){this.fire(B);},bindUI:function(){var C=this;C._bindDrag(C.get(c));C._bindFlick(C.get(b));C._bindAttrs();if(j){C._fixIESelect(C._bb,C._cb);}},_bindAttrs:function(){var C=this,E=C._afterScrollChange,D=C._afterDimChange;this.after({"disabledChange":C._afterDisabledChange,"flickChange":C._afterFlickChange,"dragChange":C._afterDragChange,"scrollYChange":E,"scrollXChange":E,"heightChange":D,"widthChange":D});if(!j){this.after("renderedChange",function(F){});}},_bindDrag:function(C){var D=this._bb;if(C){D.on("drag|gesturemovestart",d.bind(this._onGestureMoveStart,this));}else{D.detach("drag|*");}},_bindFlick:function(D){var C=this._cb;if(D){C.on("flick|flick",d.bind(this._flick,this),D);}else{C.detach("flick|*");}},_bindMousewheel:function(D){var C=this._cb;if(this._scrollsVertical){if(D){C.on("mousewheel",d.bind(this._mousewheel,this),D);}else{C.detach("mousewheel|*");}}},syncUI:function(){this._cDisabled=this.get(t);this._uiDimensionsChange();this._bindMousewheel(a);this.scrollTo(this.get(q),this.get(p));},scrollTo:function(M,L,G,J){if(J===undefined){if(Lthis._maxScrollY){L=this._maxScrollY;}}}if(!this._cDisabled){var F=this._cb,H=(M!==null),E=(L!==null),D=(H)?M*-1:0,C=(E)?L*-1:0,I,K=z._TRANSITION,N=this._transEndCB;G=G||0;J=J||z.EASING;if(H){this.set(q,M,{src:k});}if(E){this.set(p,L,{src:k});}if(g){F.setStyle(K.DURATION,s).setStyle(K.PROPERTY,A);}if(G!==0){I={easing:J,duration:G/1000};if(g){I.transform=this._transform(D,C);}else{if(H){I.left=D+h;}if(E){I.top=C+h;}}if(!N){N=this._transEndCB=d.bind(this._onTransEnd,this);}F.transition(I,N);}else{if(g){F.setStyle("transform",this._transform(D,C));}else{if(H){F.setStyle(o,D+h);}if(E){F.setStyle(r,C+h);}}}}},_transform:function(C,D){return(this._forceHWTransforms)?"translate("+C+"px,"+D+"px) translateZ(0px)":"translate("+C+"px,"+D+"px)";},_moveTo:function(D,C,E){if(g){D.setStyle("transform",this._transform(C,E));}else{D.setStyle(o,C+h);D.setStyle(r,E+h);}},_forceHWTransforms:d.UA.webkit?true:false,_prevent:{start:false,move:true,end:false},_onGestureMoveStart:function(D){var C=this,E=C._bb;if(!C._cDisabled){if(C._prevent.start){D.preventDefault();}C._killTimer();C._hm=E.on("drag|gesturemove",d.bind(C._onGestureMove,C));C._hme=E.on("drag|gesturemoveend",d.bind(C._onGestureMoveEnd,C));C._startY=D.clientY+C.get(p);C._startX=D.clientX+C.get(q);C._startClientY=C._endClientY=D.clientY;C._startClientX=C._endClientX=D.clientX;C._isDragging=false;C._flicking=false;C._snapToEdge=false;}},_onGestureMove:function(D){var C=this;if(C._prevent.move){D.preventDefault();}C._isDragging=true;C._endClientY=D.clientY;C._endClientX=D.clientX;if(C._scrollsVertical){C.set(p,-(D.clientY-C._startY));}if(C._scrollsHorizontal){C.set(q,-(D.clientX-C._startX));}},_onGestureMoveEnd:function(K){if(this._prevent.end){K.preventDefault();}var R=this,G=R._minScrollY,C=R._maxScrollY,H=R._minScrollX,E=R._maxScrollX,J=R._scrollsVertical,S=R._scrollsHorizontal,F=J?R._startClientY:R._startClientX,P=J?R._endClientY:R._endClientX,D=F-P,I=Math.abs(D),M=R._bb,Q,O,N,L;R._hm.detach();R._hme.detach();R._scrolledHalfway=R._snapToEdge=R._isDragging=false;R.lastScrolledAmt=D;if((S&&I>M.get("offsetWidth")/2)||(J&&I>M.get("offsetHeight")/2)){R._scrolledHalfway=true;R._scrolledForward=D>0;}if(J){L=R.get(p);O=m(L,G,C);}if(S){N=R.get(q);Q=m(N,H,E);}if(Q!==N||O!==L){this._snapToEdge=true;if(J){R.set(p,O);}if(S){R.set(q,Q);}}if(R._snapToEdge){return;}R.fire(B,{onGestureMoveEnd:true});return;},_afterScrollChange:function(D){var C=D.duration,F=D.easing,E=D.newVal;if(D.src!==k){if(D.attrName==q){this._uiScrollTo(E,null,C,F);}else{this._uiScrollTo(null,E,C,F);}}},_afterFlickChange:function(C){this._bindFlick(C.newVal);},_afterDisabledChange:function(C){this._cDisabled=C.newVal;},_afterDragChange:function(C){this._bindDrag(C.newVal);},_uiScrollTo:function(C,F,D,E){D=D||this._snapToEdge?400:0;E=E||this._snapToEdge?z.SNAP_EASING:null;this.scrollTo(C,F,D,E);},_afterDimChange:function(){this._uiDimensionsChange();},_getScrollDims:function(){var H,I=this.get(q),G=this.get(p),C=this.get(n),F=this.get(y),E,D=z._TRANSITION;if(g){C.setStyle(D.DURATION,s);C.setStyle(D.PROPERTY,A);}E=this._forceHWTransforms;this._forceHWTransforms=false;this._moveTo(C,0,0);H=[F.get("offsetWidth"),F.get("offsetHeight"),F.get("scrollWidth"),F.get("scrollHeight")];this._moveTo(C,-1*I,-1*G);this._forceHWTransforms=E;return H;},_uiDimensionsChange:function(){var D=this,I=D._bb,H=z.CLASS_NAMES,J=this._getScrollDims(),G=J[0],C=J[1],E=J[2],F=J[3];if(C&&F>C){D._scrollsVertical=true;D._maxScrollY=F-C;D._minScrollY=0;D._scrollHeight=F;D._height=C;I.addClass(H.vertical);}else{D._scrollsVertical=false;delete D._maxScrollY;delete D._minScrollY;delete D._scrollHeight;delete D._height;I.removeClass(H.vertical);}if(G&&E>G){D._scrollsHorizontal=true;D._maxScrollX=E-G;D._minScrollX=0;D._scrollWidth=E;D._width=G;I.addClass(H.horizontal);}else{D._scrollsHorizontal=false;delete D._maxScrollX;delete D._minScrollX;delete D._scrollWidth;delete D._width;I.removeClass(H.horizontal);}},_flick:function(E){var D=E.flick,C=this;if(!C._cDisabled){C._currentVelocity=D.velocity;C._flicking=true;C._cDecel=C.get("deceleration");C._cBounce=C.get("bounce");C._pastYEdge=false;C._pastXEdge=false;C._flickFrame();C.fire(l);}},_mousewheel:function(F){var E=this.get("scrollY"),C=this._cb,D=10,G=E-(F.wheelDelta*D);this.scrollTo(0,G);
+if(this.scrollbars){this.scrollbars._update();this.scrollbars.flash();}F.preventDefault();},_flickFrame:function(){var L=this,O,D,G,C,E,H,M=L._scrollsVertical,J=L._scrollsHorizontal,I=L._cDecel,N=L._cBounce,K=L._currentVelocity,F=z.FRAME_STEP;if(M){D=L._maxScrollY;G=L._minScrollY;O=L.get(p)-(K*F);}if(J){E=L._maxScrollX;H=L._minScrollX;C=L.get(q)-(K*F);}K=L._currentVelocity=(K*I);if(Math.abs(K).toFixed(4)<=0.015){L._flicking=false;L._killTimer(!(L._pastYEdge||L._pastXEdge));if(M){if(OD){L._snapToEdge=true;L.set(p,D);}}}if(J){if(CE){L._snapToEdge=true;L.set(q,E);}}}return;}if(M){if(OD){L._pastYEdge=true;L._currentVelocity*=N;}L.set(p,O);}if(J){if(CE){L._pastXEdge=true;L._currentVelocity*=N;}L.set(q,C);}if(!L._flickTimer){L._flickTimer=d.later(F,L,"_flickFrame",null,true);}},_killTimer:function(D){var C=this;if(C._flickTimer){C._flickTimer.cancel();C._flickTimer=null;}if(D){C.fire(B);}},_setScroll:function(I,H){if(this._cDisabled){I=d.Attribute.INVALID_VALUE;}else{var E=this._cachedBounce||this.get(f),D=z.BOUNCE_RANGE,G=(H==v)?this._maxScrollX:this._maxScrollY,F=E?-D:0,C=E?G+D:G;if(!E||!this._isDragging){if(IC){I=C;}}}}return I;},_setScrollX:function(C){return this._setScroll(C,v);},_setScrollY:function(C){return this._setScroll(C,u);}},{NAME:"scrollview",ATTRS:{scrollY:{value:0,setter:"_setScrollY"},scrollX:{value:0,setter:"_setScrollX"},deceleration:{value:0.93},bounce:{value:0.1},flick:{value:{minDistance:10,minVelocity:0.3}},drag:{value:true}},CLASS_NAMES:w,UI_SRC:k,BOUNCE_RANGE:150,FRAME_STEP:30,EASING:"cubic-bezier(0, 0.1, 0, 1.0)",SNAP_EASING:"ease-out",_TRANSITION:{DURATION:e._VENDOR_PREFIX+"TransitionDuration",PROPERTY:e._VENDOR_PREFIX+"TransitionProperty"}});},"3.5.0",{requires:["widget","event-gestures","event-mousewheel","transition"],skinnable:true});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/scrollview-base/scrollview-base.js b/lib/yui/3.5.0/build/scrollview-base/scrollview-base.js
similarity index 93%
rename from lib/yui/3.4.1/build/scrollview-base/scrollview-base.js
rename to lib/yui/3.5.0/build/scrollview-base/scrollview-base.js
index 34c290f5e61..c660ac1cd5e 100644
--- a/lib/yui/3.4.1/build/scrollview-base/scrollview-base.js
+++ b/lib/yui/3.5.0/build/scrollview-base/scrollview-base.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -23,6 +23,8 @@ var getClassName = Y.ClassNameManager.getClassName,
FLICK = EV_SCROLL_FLICK,
DRAG = "drag",
+
+ MOUSEWHEEL_ENABLED = true,
UI = 'ui',
@@ -128,6 +130,8 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
sv._bindDrag(sv.get(DRAG));
sv._bindFlick(sv.get(FLICK));
+ // Note: You can find _bindMousewheel() inside syncUI(), becuase it depends on UI details
+
sv._bindAttrs();
// IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release.
@@ -161,9 +165,10 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
// Without a _uiDimensionChange() call, the scrollview only
// scrolls partially due to the fact that styles added in the CSS
// altered the height/width of the bounding box.
+ // TODO: Remove?
if (!IE) {
this.after('renderedChange', function(e) {
- this._uiDimensionsChange();
+ //this._uiDimensionsChange();
});
}
},
@@ -201,6 +206,26 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
cb.detach('flick|*');
}
},
+
+ /**
+ * Bind (or unbind) mousewheel listeners.
+ *
+ * @method _bindMousewheel
+ * @param mousewheel {Object|boolean} If truthy, the method binds listeners for mousewheel support. If false, the method unbinds mousewheel listeners.
+ * @private
+ */
+ _bindMousewheel : function(mousewheel) {
+ var cb = this._cb;
+
+ // Only enable for vertical scrollviews
+ if (this._scrollsVertical) {
+ if (mousewheel) {
+ cb.on("mousewheel", Y.bind(this._mousewheel, this), mousewheel);
+ } else {
+ cb.detach('mousewheel|*');
+ }
+ }
+ },
/**
* syncUI implementation.
@@ -212,6 +237,7 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
syncUI: function() {
this._cDisabled = this.get(DISABLED);
this._uiDimensionsChange();
+ this._bindMousewheel(MOUSEWHEEL_ENABLED);
this.scrollTo(this.get(SCROLL_X), this.get(SCROLL_Y));
},
@@ -225,7 +251,17 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
* @param easing {String} An easing equation if duration is set
*/
scrollTo: function(x, y, duration, easing) {
-
+
+ // TODO: Figure out a better way to detect mousewheel events
+ if (easing === undefined) {
+ if ( y < this._minScrollY) {
+ y = this._minScrollY;
+ }
+ else if ( y > this._maxScrollY) {
+ y = this._maxScrollY;
+ }
+ }
+
if (!this._cDisabled) {
var cb = this._cb,
xSet = (x !== null),
@@ -324,7 +360,7 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
* @type boolean
* @protected
*/
- _forceHWTransforms: Y.UA.webkit,
+ _forceHWTransforms: Y.UA.webkit ? true : false,
/**
*
Used to control whether or not ScrollView's internal
@@ -551,7 +587,6 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
var duration = e.duration,
easing = e.easing,
val = e.newVal;
-
if(e.src !== UI) {
if (e.attrName == SCROLL_X) {
this._uiScrollTo(val, null, duration, easing);
@@ -607,7 +642,6 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
*
*/
_uiScrollTo : function(x, y, duration, easing) {
-
// TODO: This doesn't seem right. This is not UI logic.
duration = duration || this._snapToEdge ? 400 : 0;
easing = easing || this._snapToEdge ? ScrollView.SNAP_EASING : null;
@@ -692,12 +726,14 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
sv._maxScrollY = scrollHeight - height;
sv._minScrollY = 0;
sv._scrollHeight = scrollHeight;
+ sv._height = height;
bb.addClass(CLASS_NAMES.vertical);
} else {
sv._scrollsVertical = false;
delete sv._maxScrollY;
delete sv._minScrollY;
delete sv._scrollHeight;
+ delete sv._height;
bb.removeClass(CLASS_NAMES.vertical);
}
@@ -706,12 +742,14 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
sv._maxScrollX = scrollWidth - width;
sv._minScrollX = 0;
sv._scrollWidth = scrollWidth;
+ sv._width = width;
bb.addClass(CLASS_NAMES.horizontal);
} else {
sv._scrollsHorizontal = false;
delete sv._maxScrollX;
delete sv._minScrollX;
delete sv._scrollWidth;
+ delete sv._width;
bb.removeClass(CLASS_NAMES.horizontal);
}
@@ -817,6 +855,27 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
}
},
+ _mousewheel: function(e) {
+ var scrollY = this.get('scrollY'),
+ contentBox = this._cb,
+ scrollOffset = 10, // 10px
+ scrollToY = scrollY - (e.wheelDelta * scrollOffset);
+
+ this.scrollTo(0, scrollToY);
+
+ // if we have scrollbars plugin, update & set the flash timer on the scrollbar
+ if (this.scrollbars) {
+ // TODO: The scrollbars should handle this themselves
+ this.scrollbars._update();
+ this.scrollbars.flash();
+ // or just this
+ // this.scrollbars._hostDimensionsChange();
+ }
+
+ // prevent browser default behavior on mouse scroll
+ e.preventDefault();
+ },
+
/**
* Execute a single frame in the flick animation
*
@@ -932,7 +991,6 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
* @return {Number} The constrained value, if it exceeds min/max range
*/
_setScroll : function(val, dim) {
-
if (this._cDisabled) {
val = Y.Attribute.INVALID_VALUE;
} else {
@@ -1157,4 +1215,4 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
});
-}, '3.4.1' ,{requires:['widget', 'event-gestures', 'transition'], skinnable:true});
+}, '3.5.0' ,{requires:['widget', 'event-gestures', 'event-mousewheel', 'transition'], skinnable:true});
diff --git a/lib/yui/3.5.0/build/scrollview-list/assets/scrollview-list-core.css b/lib/yui/3.5.0/build/scrollview-list/assets/scrollview-list-core.css
new file mode 100644
index 00000000000..7cef9228d45
--- /dev/null
+++ b/lib/yui/3.5.0/build/scrollview-list/assets/scrollview-list-core.css
@@ -0,0 +1,6 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
diff --git a/lib/yui/3.4.1/build/scrollview-list/assets/skins/night/scrollview-list-skin.css b/lib/yui/3.5.0/build/scrollview-list/assets/skins/night/scrollview-list-skin.css
similarity index 96%
rename from lib/yui/3.4.1/build/scrollview-list/assets/skins/night/scrollview-list-skin.css
rename to lib/yui/3.5.0/build/scrollview-list/assets/skins/night/scrollview-list-skin.css
index 809933afd1b..21bb84bd8bd 100644
--- a/lib/yui/3.4.1/build/scrollview-list/assets/skins/night/scrollview-list-skin.css
+++ b/lib/yui/3.5.0/build/scrollview-list/assets/skins/night/scrollview-list-skin.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/scrollview-list/assets/skins/night/scrollview-list.css b/lib/yui/3.5.0/build/scrollview-list/assets/skins/night/scrollview-list.css
similarity index 89%
rename from lib/yui/3.4.1/build/scrollview-list/assets/skins/night/scrollview-list.css
rename to lib/yui/3.5.0/build/scrollview-list/assets/skins/night/scrollview-list.css
index c4afeffa77d..00c3a77becb 100644
--- a/lib/yui/3.4.1/build/scrollview-list/assets/skins/night/scrollview-list.css
+++ b/lib/yui/3.5.0/build/scrollview-list/assets/skins/night/scrollview-list.css
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-.yui3-skin-night .yui3-scrollview{-webkit-tap-highlight-color:rgba(0,0,0,0)}.yui3-skin-night .yui3-scrollview{color:#fff;background-color:#000}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content{border-top:0;background-color:#000;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;color:#fff}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{*zoom:1}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list{*zoom:1;list-style:none;padding:0;margin:0}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{border-bottom:1px solid #303030;padding:15px 20px 16px;font-size:100%;font-weight:bold;background-color:#151515;cursor:pointer}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list.selected{background-color:#2c2d2e;background:-moz-linear-gradient(0% 100% 90deg,#252626 0,#333434 100%);background:-webkit-gradient(linear,left top,left bottom,from(#333434),to(#252626));border-top:solid 1px #4b4b4b;border-bottom:solid 1px #3e3f3f;margin-top:-1px}
+.yui3-skin-night .yui3-scrollview{-webkit-tap-highlight-color:rgba(0,0,0,0)}.yui3-skin-night .yui3-scrollview{color:#fff;background-color:#000}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content{border-top:0;background-color:#000;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;color:#fff}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{*zoom:1}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list{*zoom:1;list-style:none;padding:0;margin:0}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{border-bottom:1px solid #303030;padding:15px 20px 16px;font-size:100%;font-weight:bold;background-color:#151515;cursor:pointer}.yui3-skin-night .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list.selected{background-color:#2c2d2e;background:-moz-linear-gradient(0% 100% 90deg,#252626 0,#333434 100%);background:-webkit-gradient(linear,left top,left bottom,from(#333434),to(#252626));border-top:solid 1px #4b4b4b;border-bottom:solid 1px #3e3f3f;margin-top:-1px}#yui3-css-stamp.skin-night-scrollview-list{display:none}
diff --git a/lib/yui/3.4.1/build/scrollview-list/assets/skins/sam/scrollview-list-skin.css b/lib/yui/3.5.0/build/scrollview-list/assets/skins/sam/scrollview-list-skin.css
similarity index 94%
rename from lib/yui/3.4.1/build/scrollview-list/assets/skins/sam/scrollview-list-skin.css
rename to lib/yui/3.5.0/build/scrollview-list/assets/skins/sam/scrollview-list-skin.css
index cb19bfdb8ab..27d0c398781 100644
--- a/lib/yui/3.4.1/build/scrollview-list/assets/skins/sam/scrollview-list-skin.css
+++ b/lib/yui/3.5.0/build/scrollview-list/assets/skins/sam/scrollview-list-skin.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/scrollview-list/assets/skins/sam/scrollview-list.css b/lib/yui/3.5.0/build/scrollview-list/assets/skins/sam/scrollview-list.css
similarity index 83%
rename from lib/yui/3.4.1/build/scrollview-list/assets/skins/sam/scrollview-list.css
rename to lib/yui/3.5.0/build/scrollview-list/assets/skins/sam/scrollview-list.css
index 6b06300b04d..9ea88b0d883 100644
--- a/lib/yui/3.4.1/build/scrollview-list/assets/skins/sam/scrollview-list.css
+++ b/lib/yui/3.5.0/build/scrollview-list/assets/skins/sam/scrollview-list.css
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}.yui3-skin-sam .yui3-scrollview{background-color:white}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{*zoom:1}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list{*zoom:1;list-style:none;padding:0;margin:0}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content{border-top:0;background-color:white;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;color:black}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{border-bottom:1px solid #303030;padding:15px 20px 16px;font-size:100%;font-weight:bold;background-color:white;cursor:pointer}
+.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}.yui3-skin-sam .yui3-scrollview{background-color:white}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{*zoom:1}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list{*zoom:1;list-style:none;padding:0;margin:0}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content{border-top:0;background-color:white;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;color:black}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{border-bottom:1px solid #303030;padding:15px 20px 16px;font-size:100%;font-weight:bold;background-color:white;cursor:pointer}#yui3-css-stamp.skin-sam-scrollview-list{display:none}
diff --git a/lib/yui/3.4.1/build/scrollview-list/scrollview-list-debug.js b/lib/yui/3.5.0/build/scrollview-list/scrollview-list-debug.js
similarity index 95%
rename from lib/yui/3.4.1/build/scrollview-list/scrollview-list-debug.js
rename to lib/yui/3.5.0/build/scrollview-list/scrollview-list-debug.js
index 43c71ac101d..261978801a0 100644
--- a/lib/yui/3.4.1/build/scrollview-list/scrollview-list-debug.js
+++ b/lib/yui/3.5.0/build/scrollview-list/scrollview-list-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -133,4 +133,4 @@ Y.namespace("Plugin").ScrollViewList = Y.extend(ListPlugin, Y.Plugin.Base, {
-}, '3.4.1' ,{requires:['plugin', 'classnamemanager'], skinnable:true});
+}, '3.5.0' ,{requires:['plugin', 'classnamemanager'], skinnable:true});
diff --git a/lib/yui/3.4.1/build/scrollview-list/scrollview-list-min.js b/lib/yui/3.5.0/build/scrollview-list/scrollview-list-min.js
similarity index 86%
rename from lib/yui/3.4.1/build/scrollview-list/scrollview-list-min.js
rename to lib/yui/3.5.0/build/scrollview-list/scrollview-list-min.js
index 1a4388c6bc3..ca65757b26c 100644
--- a/lib/yui/3.4.1/build/scrollview-list/scrollview-list-min.js
+++ b/lib/yui/3.5.0/build/scrollview-list/scrollview-list-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("scrollview-list",function(a){var b=a.ClassNameManager.getClassName,d="scrollview",c=b(d,"list"),g=b(d,"item"),h="contentBox",e="rendered",i="renderUI",j="host";function f(){f.superclass.constructor.apply(this,arguments);}f.NAME="pluginList";f.NS="list";f.ATTRS={isAttached:{value:false,validator:a.Lang.isBoolean}};a.namespace("Plugin").ScrollViewList=a.extend(f,a.Plugin.Base,{initializer:function(){this._host=this.get(j);this.afterHostEvent("render",this._addClassesToList);},_addClassesToList:function(){if(!this.get("isAttached")){var l=this._host.get(h),m,k;if(l.hasChildNodes()){m=l.all("> ul");k=l.all("> ul > li");m.each(function(n){n.addClass(c);});k.each(function(n){n.addClass(g);});this.set("isAttached",true);this._host.syncUI();}}}});},"3.4.1",{requires:["plugin","classnamemanager"],skinnable:true});
\ No newline at end of file
+YUI.add("scrollview-list",function(a){var b=a.ClassNameManager.getClassName,d="scrollview",c=b(d,"list"),g=b(d,"item"),h="contentBox",e="rendered",i="renderUI",j="host";function f(){f.superclass.constructor.apply(this,arguments);}f.NAME="pluginList";f.NS="list";f.ATTRS={isAttached:{value:false,validator:a.Lang.isBoolean}};a.namespace("Plugin").ScrollViewList=a.extend(f,a.Plugin.Base,{initializer:function(){this._host=this.get(j);this.afterHostEvent("render",this._addClassesToList);},_addClassesToList:function(){if(!this.get("isAttached")){var l=this._host.get(h),m,k;if(l.hasChildNodes()){m=l.all("> ul");k=l.all("> ul > li");m.each(function(n){n.addClass(c);});k.each(function(n){n.addClass(g);});this.set("isAttached",true);this._host.syncUI();}}}});},"3.5.0",{requires:["plugin","classnamemanager"],skinnable:true});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/scrollview-list/scrollview-list.js b/lib/yui/3.5.0/build/scrollview-list/scrollview-list.js
similarity index 95%
rename from lib/yui/3.4.1/build/scrollview-list/scrollview-list.js
rename to lib/yui/3.5.0/build/scrollview-list/scrollview-list.js
index 43c71ac101d..261978801a0 100644
--- a/lib/yui/3.4.1/build/scrollview-list/scrollview-list.js
+++ b/lib/yui/3.5.0/build/scrollview-list/scrollview-list.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -133,4 +133,4 @@ Y.namespace("Plugin").ScrollViewList = Y.extend(ListPlugin, Y.Plugin.Base, {
-}, '3.4.1' ,{requires:['plugin', 'classnamemanager'], skinnable:true});
+}, '3.5.0' ,{requires:['plugin', 'classnamemanager'], skinnable:true});
diff --git a/lib/yui/3.4.1/build/scrollview-paginator/scrollview-paginator-debug.js b/lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator-debug.js
similarity index 50%
rename from lib/yui/3.4.1/build/scrollview-paginator/scrollview-paginator-debug.js
rename to lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator-debug.js
index 8f773d348f7..ead5ff445f9 100644
--- a/lib/yui/3.4.1/build/scrollview-paginator/scrollview-paginator-debug.js
+++ b/lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -14,11 +14,13 @@ YUI.add('scrollview-paginator', function(Y) {
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";
+ CONTENT_BOX = "contentBox",
+ MAX_PAGE_COUNT = 3; // @TODO: Make configurable?
/**
* Scrollview plugin that adds support for paging
@@ -83,6 +85,17 @@ PaginatorPlugin.ATTRS = {
value: 0
},
+ /**
+ * The active page number for a paged scrollview
+ *
+ * @attribute index
+ * @type {Number}
+ * @default 0
+ */
+ prevIndex: {
+ value: 0
+ },
+
/**
* The total number of pages
*
@@ -96,24 +109,28 @@ PaginatorPlugin.ATTRS = {
};
Y.extend(PaginatorPlugin, Y.Plugin.Base, {
-
+
+ optimizeMemory: false,
+ _pageOffsets: null,
+ _pageNodes: null,
+
/**
* Designated initializer
*
* @method initializer
*/
- initializer: function() {
- var host,
- paginator = this; // kweight
-
- host = paginator._host = paginator.get('host');
-
+ 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();
},
/**
@@ -122,25 +139,91 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
* @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"),
- pages,
- offsets;
+ _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());
- // Pre-calculate min/max values for each page
- pages = pageSelector ? cb.all(pageSelector) : cb.get("children");
+ // Determine the offsets
+ this._pageOffsets = pages.get((vert) ? "offsetTop" : "offsetLeft");
- this.set(TOTAL, pages.size());
+ if (optimizeMemory) {
+
+ this.set(PREVINDEX, currentIndex);
- this._pgOff = offsets = pages.get((vert) ? "offsetTop" : "offsetLeft");
- offsets.push(size - bb.get((vert) ? "offsetHeight" : "offsetWidth"));
+ // 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.
@@ -151,35 +234,34 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
_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.set(INDEX, pageIndex+1);
+ this.next();
} else if (!inc && pageIndex > 0) {
- this.set(INDEX, pageIndex-1);
+ 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
*
@@ -191,15 +273,15 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
var host = this._host,
pageIndex = this.get(INDEX),
pageCount = this.get(TOTAL),
- trans = PaginatorPlugin.SNAP_TO_CURRENT;
-
-
+ trans = PaginatorPlugin.SNAP_TO_CURRENT,
+ optimizeMemory = this.optimizeMemory;
+
if(e.onGestureMoveEnd && !host._flicking) {
if(host._scrolledHalfway) {
if(host._scrolledForward && pageIndex < pageCount-1) {
- this.set(INDEX, pageIndex+1);
+ this.next();
} else if (pageIndex > 0) {
- this.set(INDEX, pageIndex-1);
+ this.prev();
} else {
this.snapToCurrent(trans.duration, trans.easing);
}
@@ -207,14 +289,68 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
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;
+ }
- host._flicking = false;
+ // 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) {
@@ -222,11 +358,12 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
this._uiIndex(e.newVal);
}
},
-
+
/**
* Update the UI based on the current page index
*
* @method _uiIndex
+ * @param index {Number}
* @protected
*/
_uiIndex: function(index) {
@@ -239,12 +376,12 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
* @method next
*/
next: function() {
- var index = this.get(INDEX);
+ 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
*
@@ -256,7 +393,7 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
this.set(INDEX, index-1);
}
},
-
+
/**
* Scroll to a given page in the scrollview, with animation.
*
@@ -269,14 +406,14 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
var host = this._host,
vert = host._scrollsVertical,
scrollAxis = (vert) ? SCROLL_Y : SCROLL_X,
- scrollVal = this._pgOff[index];
+ scrollVal = this._getTargetOffset(index);
host.set(scrollAxis, scrollVal, {
duration: duration,
easing: easing
});
},
-
+
/**
* Snaps the scrollview to the currently selected page
*
@@ -287,11 +424,10 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
snapToCurrent: function(duration, easing) {
var host = this._host,
vert = host._scrollsVertical;
-
+
host._killTimer();
-
-
- host.set((vert) ? SCROLL_Y : SCROLL_X, this._pgOff[this.get(INDEX)], {
+
+ host.set((vert) ? SCROLL_Y : SCROLL_X, this._getTargetOffset(this.get(INDEX)), {
duration: duration,
easing: easing
});
@@ -315,4 +451,4 @@ PaginatorPlugin.SNAP_TO_CURRENT = {
Y.namespace('Plugin').ScrollViewPaginator = PaginatorPlugin;
-}, '3.4.1' ,{requires:['plugin']});
+}, '3.5.0' ,{requires:['plugin']});
diff --git a/lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator-min.js b/lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator-min.js
new file mode 100644
index 00000000000..a6472fb1ca3
--- /dev/null
+++ b/lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+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;p1){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&&l0){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&&l0){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=(l0){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(l0){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.0",{requires:["plugin"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/scrollview-paginator/scrollview-paginator.js b/lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator.js
similarity index 50%
rename from lib/yui/3.4.1/build/scrollview-paginator/scrollview-paginator.js
rename to lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator.js
index 8f773d348f7..ead5ff445f9 100644
--- a/lib/yui/3.4.1/build/scrollview-paginator/scrollview-paginator.js
+++ b/lib/yui/3.5.0/build/scrollview-paginator/scrollview-paginator.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -14,11 +14,13 @@ YUI.add('scrollview-paginator', function(Y) {
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";
+ CONTENT_BOX = "contentBox",
+ MAX_PAGE_COUNT = 3; // @TODO: Make configurable?
/**
* Scrollview plugin that adds support for paging
@@ -83,6 +85,17 @@ PaginatorPlugin.ATTRS = {
value: 0
},
+ /**
+ * The active page number for a paged scrollview
+ *
+ * @attribute index
+ * @type {Number}
+ * @default 0
+ */
+ prevIndex: {
+ value: 0
+ },
+
/**
* The total number of pages
*
@@ -96,24 +109,28 @@ PaginatorPlugin.ATTRS = {
};
Y.extend(PaginatorPlugin, Y.Plugin.Base, {
-
+
+ optimizeMemory: false,
+ _pageOffsets: null,
+ _pageNodes: null,
+
/**
* Designated initializer
*
* @method initializer
*/
- initializer: function() {
- var host,
- paginator = this; // kweight
-
- host = paginator._host = paginator.get('host');
-
+ 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();
},
/**
@@ -122,25 +139,91 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
* @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"),
- pages,
- offsets;
+ _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());
- // Pre-calculate min/max values for each page
- pages = pageSelector ? cb.all(pageSelector) : cb.get("children");
+ // Determine the offsets
+ this._pageOffsets = pages.get((vert) ? "offsetTop" : "offsetLeft");
- this.set(TOTAL, pages.size());
+ if (optimizeMemory) {
+
+ this.set(PREVINDEX, currentIndex);
- this._pgOff = offsets = pages.get((vert) ? "offsetTop" : "offsetLeft");
- offsets.push(size - bb.get((vert) ? "offsetHeight" : "offsetWidth"));
+ // 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.
@@ -151,35 +234,34 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
_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.set(INDEX, pageIndex+1);
+ this.next();
} else if (!inc && pageIndex > 0) {
- this.set(INDEX, pageIndex-1);
+ 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
*
@@ -191,15 +273,15 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
var host = this._host,
pageIndex = this.get(INDEX),
pageCount = this.get(TOTAL),
- trans = PaginatorPlugin.SNAP_TO_CURRENT;
-
-
+ trans = PaginatorPlugin.SNAP_TO_CURRENT,
+ optimizeMemory = this.optimizeMemory;
+
if(e.onGestureMoveEnd && !host._flicking) {
if(host._scrolledHalfway) {
if(host._scrolledForward && pageIndex < pageCount-1) {
- this.set(INDEX, pageIndex+1);
+ this.next();
} else if (pageIndex > 0) {
- this.set(INDEX, pageIndex-1);
+ this.prev();
} else {
this.snapToCurrent(trans.duration, trans.easing);
}
@@ -207,14 +289,68 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
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;
+ }
- host._flicking = false;
+ // 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) {
@@ -222,11 +358,12 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
this._uiIndex(e.newVal);
}
},
-
+
/**
* Update the UI based on the current page index
*
* @method _uiIndex
+ * @param index {Number}
* @protected
*/
_uiIndex: function(index) {
@@ -239,12 +376,12 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
* @method next
*/
next: function() {
- var index = this.get(INDEX);
+ 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
*
@@ -256,7 +393,7 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
this.set(INDEX, index-1);
}
},
-
+
/**
* Scroll to a given page in the scrollview, with animation.
*
@@ -269,14 +406,14 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
var host = this._host,
vert = host._scrollsVertical,
scrollAxis = (vert) ? SCROLL_Y : SCROLL_X,
- scrollVal = this._pgOff[index];
+ scrollVal = this._getTargetOffset(index);
host.set(scrollAxis, scrollVal, {
duration: duration,
easing: easing
});
},
-
+
/**
* Snaps the scrollview to the currently selected page
*
@@ -287,11 +424,10 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
snapToCurrent: function(duration, easing) {
var host = this._host,
vert = host._scrollsVertical;
-
+
host._killTimer();
-
-
- host.set((vert) ? SCROLL_Y : SCROLL_X, this._pgOff[this.get(INDEX)], {
+
+ host.set((vert) ? SCROLL_Y : SCROLL_X, this._getTargetOffset(this.get(INDEX)), {
duration: duration,
easing: easing
});
@@ -315,4 +451,4 @@ PaginatorPlugin.SNAP_TO_CURRENT = {
Y.namespace('Plugin').ScrollViewPaginator = PaginatorPlugin;
-}, '3.4.1' ,{requires:['plugin']});
+}, '3.5.0' ,{requires:['plugin']});
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/scrollview-scrollbars-core.css b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/scrollview-scrollbars-core.css
similarity index 96%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/assets/scrollview-scrollbars-core.css
rename to lib/yui/3.5.0/build/scrollview-scrollbars/assets/scrollview-scrollbars-core.css
index c134ce3736c..7f5b5a2fb0d 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/scrollview-scrollbars-core.css
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/scrollview-scrollbars-core.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars-skin.css b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars-skin.css
similarity index 97%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars-skin.css
rename to lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars-skin.css
index b323c599ae3..70ccd1ae277 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars-skin.css
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars-skin.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css
similarity index 95%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css
rename to lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css
index 2578d21ec93..68bbb993e3e 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-.yui3-scrollview-scrollbar{opacity:1;position:absolute;width:6px;height:10px}.yui3-scrollview-scrollbar{top:0;right:1px}.yui3-scrollview-scrollbar-horiz{top:auto;height:8px;width:20px;bottom:1px;left:0}.yui3-scrollview-scrollbar .yui3-scrollview-child{position:absolute;right:0;display:block;width:100%;height:4px}.yui3-scrollview-scrollbar .yui3-scrollview-first{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-last{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-middle{position:absolute;top:4px;height:1px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-child{display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline;top:0;left:0;bottom:auto;right:auto}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{width:4px;height:6px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{top:0;left:4px;width:1px;height:6px}.yui3-scrollview-scrollbar-vert-basic{height:auto}.yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child{position:static;_overflow:hidden;_line-height:4px}.yui3-scrollview-scrollbar-horiz-basic{width:auto;white-space:nowrap;line-height:6px;_overflow:hidden}.yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{position:static;padding:0;margin:0;top:auto;left:auto;right:auto;bottom:auto}.yui3-skin-night .yui3-scrollview-scrollbar{-webkit-transform:translate3d(0,0,0);-moz-transform:translate(0,0)}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-middle,.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;background-color:#808080;opacity:.3;filter:alpha(opacity=30)}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-last{border-bottom-right-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-webkit-transform:translate3d(0,0,0);-moz-border-radius:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;-moz-transform:translate(0,0)}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-middle{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-transform:translate3d(0,0,0) scaleY(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleY(1);-moz-transform-origin:0 0}.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-top-right-radius:0;border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomleft:3px}.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-bottom-left-radius:0;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:3px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:3px}.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{-webkit-transform:translate3d(0,0,0) scaleX(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleX(1);-moz-transform-origin:0 0}.yui3-skin-night .yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child,.yui3-skin-night .yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{background-color:#aaa;background-image:none}
+.yui3-scrollview-scrollbar{opacity:1;position:absolute;width:6px;height:10px}.yui3-scrollview-scrollbar{top:0;right:1px}.yui3-scrollview-scrollbar-horiz{top:auto;height:8px;width:20px;bottom:1px;left:0}.yui3-scrollview-scrollbar .yui3-scrollview-child{position:absolute;right:0;display:block;width:100%;height:4px}.yui3-scrollview-scrollbar .yui3-scrollview-first{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-last{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-middle{position:absolute;top:4px;height:1px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-child{display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline;top:0;left:0;bottom:auto;right:auto}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{width:4px;height:6px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{top:0;left:4px;width:1px;height:6px}.yui3-scrollview-scrollbar-vert-basic{height:auto}.yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child{position:static;_overflow:hidden;_line-height:4px}.yui3-scrollview-scrollbar-horiz-basic{width:auto;white-space:nowrap;line-height:6px;_overflow:hidden}.yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{position:static;padding:0;margin:0;top:auto;left:auto;right:auto;bottom:auto}.yui3-skin-night .yui3-scrollview-scrollbar{-webkit-transform:translate3d(0,0,0);-moz-transform:translate(0,0)}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-middle,.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;background-color:#808080;opacity:.3;filter:alpha(opacity=30)}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-last{border-bottom-right-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-webkit-transform:translate3d(0,0,0);-moz-border-radius:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;-moz-transform:translate(0,0)}.yui3-skin-night .yui3-scrollview-scrollbar .yui3-scrollview-middle{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-transform:translate3d(0,0,0) scaleY(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleY(1);-moz-transform-origin:0 0}.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-top-right-radius:0;border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomleft:3px}.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-bottom-left-radius:0;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:3px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:3px}.yui3-skin-night .yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{-webkit-transform:translate3d(0,0,0) scaleX(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleX(1);-moz-transform-origin:0 0}.yui3-skin-night .yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child,.yui3-skin-night .yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{background-color:#aaa;background-image:none}#yui3-css-stamp.skin-night-scrollview-scrollbars{display:none}
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars-skin.css b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars-skin.css
similarity index 97%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars-skin.css
rename to lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars-skin.css
index 78bf3e84db8..3a454bf7daa 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars-skin.css
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars-skin.css
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css
similarity index 96%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css
rename to lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css
index 23231ee7c12..00c00f2c25f 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-.yui3-scrollview-scrollbar{opacity:1;position:absolute;width:6px;height:10px}.yui3-scrollview-scrollbar{top:0;right:1px}.yui3-scrollview-scrollbar-horiz{top:auto;height:8px;width:20px;bottom:1px;left:0}.yui3-scrollview-scrollbar .yui3-scrollview-child{position:absolute;right:0;display:block;width:100%;height:4px}.yui3-scrollview-scrollbar .yui3-scrollview-first{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-last{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-middle{position:absolute;top:4px;height:1px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-child{display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline;top:0;left:0;bottom:auto;right:auto}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{width:4px;height:6px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{top:0;left:4px;width:1px;height:6px}.yui3-scrollview-scrollbar-vert-basic{height:auto}.yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child{position:static;_overflow:hidden;_line-height:4px}.yui3-scrollview-scrollbar-horiz-basic{width:auto;white-space:nowrap;line-height:6px;_overflow:hidden}.yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{position:static;padding:0;margin:0;top:auto;left:auto;right:auto;bottom:auto}.yui3-skin-sam .yui3-scrollview-scrollbar{-webkit-transform:translate3d(0,0,0);-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAABCAYAAAD9yd/wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABJJREFUeNpiZGBgSGPAAgACDAAIkABoFyloZQAAAABJRU5ErkJggg==)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-bottom-right-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-webkit-transform:translate3d(0,0,0);-moz-border-radius:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-transform:translate3d(0,0,0) scaleY(1);-webkit-transform-origin-y:0;-moz-transform:translate(0,0) scaleY(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-top-right-radius:0;border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomleft:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-bottom-left-radius:0;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:3px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{-webkit-transform:translate3d(0,0,0) scaleX(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleX(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{background-color:#aaa;background-image:none}
+.yui3-scrollview-scrollbar{opacity:1;position:absolute;width:6px;height:10px}.yui3-scrollview-scrollbar{top:0;right:1px}.yui3-scrollview-scrollbar-horiz{top:auto;height:8px;width:20px;bottom:1px;left:0}.yui3-scrollview-scrollbar .yui3-scrollview-child{position:absolute;right:0;display:block;width:100%;height:4px}.yui3-scrollview-scrollbar .yui3-scrollview-first{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-last{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-middle{position:absolute;top:4px;height:1px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-child{display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline;top:0;left:0;bottom:auto;right:auto}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{width:4px;height:6px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{top:0;left:4px;width:1px;height:6px}.yui3-scrollview-scrollbar-vert-basic{height:auto}.yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child{position:static;_overflow:hidden;_line-height:4px}.yui3-scrollview-scrollbar-horiz-basic{width:auto;white-space:nowrap;line-height:6px;_overflow:hidden}.yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{position:static;padding:0;margin:0;top:auto;left:auto;right:auto;bottom:auto}.yui3-skin-sam .yui3-scrollview-scrollbar{-webkit-transform:translate3d(0,0,0);-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAABCAYAAAD9yd/wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABJJREFUeNpiZGBgSGPAAgACDAAIkABoFyloZQAAAABJRU5ErkJggg==)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-bottom-right-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-webkit-transform:translate3d(0,0,0);-moz-border-radius:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-transform:translate3d(0,0,0) scaleY(1);-webkit-transform-origin-y:0;-moz-transform:translate(0,0) scaleY(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-top-right-radius:0;border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomleft:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-bottom-left-radius:0;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:3px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{-webkit-transform:translate3d(0,0,0) scaleX(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleX(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{background-color:#aaa;background-image:none}#yui3-css-stamp.skin-sam-scrollview-scrollbars{display:none}
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars-debug.js b/lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars-debug.js
similarity index 94%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars-debug.js
rename to lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars-debug.js
index f738297751f..5d9c5e1f4bd 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars-debug.js
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -296,8 +296,8 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
dim = WIDTH;
dimOffset = LEFT;
dimCache = HORIZ_CACHE;
- widgetSize = host.get(dim);
- contentSize = host._scrollWidth || cb.get(SCROLL_WIDTH);
+ widgetSize = host._width;
+ contentSize = host._scrollWidth;
translate = TRANSLATE_X;
scale = SCALE_X;
current = (current !== undefined) ? current : host.get(SCROLL_X);
@@ -305,8 +305,8 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
dim = HEIGHT;
dimOffset = TOP;
dimCache = VERT_CACHE;
- widgetSize = host.get(dim);
- contentSize = host._scrollHeight || cb.get(SCROLL_HEIGHT);
+ widgetSize = host._height;
+ contentSize = host._scrollHeight;
translate = TRANSLATE_Y;
scale = SCALE_Y;
current = (current !== undefined) ? current : host.get(SCROLL_Y);
@@ -509,21 +509,10 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
* @method flash
*/
flash: function() {
- var shouldFlash = false,
- host = this._host;
+ var host = this._host;
- if (host._scrollsVertical && (host._scrollHeight > host.get(HEIGHT))) {
- shouldFlash = true;
- }
-
- if (host._scrollsHorizontal && (host._scrollWidth > host.get(WIDTH))) {
- shouldFlash = true;
- }
-
- if (shouldFlash) {
- this.show(true);
- this._flashTimer = Y.later(800, this, 'hide', true);
- }
+ this.show(true);
+ this._flashTimer = Y.later(800, this, 'hide', true);
},
/**
@@ -567,4 +556,4 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
});
-}, '3.4.1' ,{requires:['classnamemanager', 'transition', 'plugin'], skinnable:true});
+}, '3.5.0' ,{requires:['classnamemanager', 'transition', 'plugin'], skinnable:true});
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars-min.js b/lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars-min.js
similarity index 54%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars-min.js
rename to lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars-min.js
index e2e358b8727..5664dd345c5 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars-min.js
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("scrollview-scrollbars",function(a){var m=a.ClassNameManager.getClassName,j,h=a.Transition,k=h.useNative,A="scrollbar",D="scrollview",C="verticalNode",n="horizontalNode",v="childCache",x="top",r="left",g="width",w="height",q="scrollWidth",i="scrollHeight",B="_sbh",u="_sbv",o=h._VENDOR_PREFIX+"TransitionProperty",f="transform",e="translateX(",d="translateY(",z="scaleX(",y="scaleY(",t="scrollX",s="scrollY",l="px",c=")",p=l+c;function b(){b.superclass.constructor.apply(this,arguments);}b.CLASS_NAMES={showing:m(D,A,"showing"),scrollbar:m(D,A),scrollbarV:m(D,A,"vert"),scrollbarH:m(D,A,"horiz"),scrollbarVB:m(D,A,"vert","basic"),scrollbarHB:m(D,A,"horiz","basic"),child:m(D,"child"),first:m(D,"first"),middle:m(D,"middle"),last:m(D,"last")};j=b.CLASS_NAMES;b.NAME="pluginScrollViewScrollbars";b.NS="scrollbars";b.SCROLLBAR_TEMPLATE=["
",'','','',"
"].join("");b.ATTRS={verticalNode:{setter:"_setNode",valueFn:"_defaultNode"},horizontalNode:{setter:"_setNode",valueFn:"_defaultNode"}};a.namespace("Plugin").ScrollViewScrollbars=a.extend(b,a.Plugin.Base,{initializer:function(){this._host=this.get("host");this.afterHostEvent("scrollEnd",this._hostScrollEnd);this.afterHostMethod("_uiScrollTo",this._update);this.afterHostMethod("_uiDimensionsChange",this._hostDimensionsChange);},_hostDimensionsChange:function(){var E=this._host;this._renderBar(this.get(C),E._scrollsVertical);this._renderBar(this.get(n),E._scrollsHorizontal);this._update();a.later(500,this,"flash",true);},_hostScrollEnd:function(E){if(!this._host._flicking){this.flash();}},_renderBar:function(F,H){var G=F.inDoc(),I=this._host._bb,E=F.getData("isHoriz")?j.scrollbarHB:j.scrollbarVB;if(H&&!G){I.append(F);F.toggleClass(E,this._basic);this._setChildCache(F);}else{if(!H&&G){F.remove();this._clearChildCache(F);}}},_setChildCache:function(H){var J=H.get("children"),F=J.item(0),I=J.item(1),G=J.item(2),E=H.getData("isHoriz")?"offsetWidth":"offsetHeight";H.setStyle(o,f);I.setStyle(o,f);G.setStyle(o,f);H.setData(v,{fc:F,lc:G,mc:I,fcSize:F&&F.get(E),lcSize:G&&G.get(E)});},_clearChildCache:function(E){E.clearData(v);},_updateBar:function(E,N,G,X){var L=this._host,H=this._basic,M=L._cb,S=0,O=1,F=E.getData(v),T=F.lc,W=F.mc,ab=F.fcSize,aa=F.lcSize,P,Y,V,K,Z,R,I,U,Q,J;if(X){R=g;I=r;U=B;Q=L.get(R);J=L._scrollWidth||M.get(q);K=e;Z=z;N=(N!==undefined)?N:L.get(t);}else{R=w;I=x;U=u;Q=L.get(R);J=L._scrollHeight||M.get(i);K=d;Z=y;N=(N!==undefined)?N:L.get(s);}S=Math.floor(Q*(Q/J));O=Math.floor((N/(J-Q))*(Q-S));if(S>Q){S=1;}if(O>(Q-S)){S=S-(O-(Q-S));}else{if(O<0){S=O+S;O=0;}}P=(S-(ab+aa));if(P<0){P=0;}if(P===0&&O!==0){O=Q-(ab+aa)-1;}if(G!==0){V={duration:G};if(k){V.transform=K+O+p;}else{V[I]=O+l;}E.transition(V);}else{if(k){E.setStyle(f,K+O+p);}else{E.setStyle(I,O+l);}}if(this[U]!==P){this[U]=P;if(P>0){if(G!==0){V={duration:G};if(k){V.transform=Z+P+c;}else{V[R]=P+l;}W.transition(V);}else{if(k){W.setStyle(f,Z+P+c);}else{W.setStyle(R,P+l);}}if(!X||!H){Y=S-aa;if(G!==0){V={duration:G};if(k){V.transform=K+Y+p;}else{V[I]=Y;}T.transition(V);}else{if(k){T.setStyle(f,K+Y+p);}else{T.setStyle(I,Y+l);}}}}}},_update:function(F,K,I,J){var H=this.get(C),E=this.get(n),G=this._host;I=(I||0)/1000;if(!this._showing){this.show();}if(G._scrollsVertical&&H){this._updateBar(H,K,I,false);}if(G._scrollsHorizontal&&E){this._updateBar(E,F,I,true);}},show:function(E){this._show(true,E);},hide:function(E){this._show(false,E);},_show:function(E,H){var G=this.get(C),I=this.get(n),J=(H)?0.6:0,F=(E)?1:0,K;this._showing=E;if(this._flashTimer){this._flashTimer.cancel();}K={duration:J,opacity:F};if(G){G.transition(K);}if(I){I.transition(K);}},flash:function(){var E=false,F=this._host;if(F._scrollsVertical&&(F._scrollHeight>F.get(w))){E=true;}if(F._scrollsHorizontal&&(F._scrollWidth>F.get(g))){E=true;}if(E){this.show(true);this._flashTimer=a.later(800,this,"hide",true);}},_setNode:function(F,E){var G=(E==n);F=a.one(F);if(F){F.addClass(j.scrollbar);F.addClass((G)?j.scrollbarH:j.scrollbarV);F.setData("isHoriz",G);}return F;},_defaultNode:function(){return a.Node.create(b.SCROLLBAR_TEMPLATE);},_basic:a.UA.ie&&a.UA.ie<=8});},"3.4.1",{requires:["classnamemanager","transition","plugin"],skinnable:true});
\ No newline at end of file
+YUI.add("scrollview-scrollbars",function(a){var m=a.ClassNameManager.getClassName,j,h=a.Transition,k=h.useNative,A="scrollbar",D="scrollview",C="verticalNode",n="horizontalNode",v="childCache",x="top",r="left",g="width",w="height",q="scrollWidth",i="scrollHeight",B="_sbh",u="_sbv",o=h._VENDOR_PREFIX+"TransitionProperty",f="transform",e="translateX(",d="translateY(",z="scaleX(",y="scaleY(",t="scrollX",s="scrollY",l="px",c=")",p=l+c;function b(){b.superclass.constructor.apply(this,arguments);}b.CLASS_NAMES={showing:m(D,A,"showing"),scrollbar:m(D,A),scrollbarV:m(D,A,"vert"),scrollbarH:m(D,A,"horiz"),scrollbarVB:m(D,A,"vert","basic"),scrollbarHB:m(D,A,"horiz","basic"),child:m(D,"child"),first:m(D,"first"),middle:m(D,"middle"),last:m(D,"last")};j=b.CLASS_NAMES;b.NAME="pluginScrollViewScrollbars";b.NS="scrollbars";b.SCROLLBAR_TEMPLATE=["
",'','','',"
"].join("");b.ATTRS={verticalNode:{setter:"_setNode",valueFn:"_defaultNode"},horizontalNode:{setter:"_setNode",valueFn:"_defaultNode"}};a.namespace("Plugin").ScrollViewScrollbars=a.extend(b,a.Plugin.Base,{initializer:function(){this._host=this.get("host");this.afterHostEvent("scrollEnd",this._hostScrollEnd);this.afterHostMethod("_uiScrollTo",this._update);this.afterHostMethod("_uiDimensionsChange",this._hostDimensionsChange);},_hostDimensionsChange:function(){var E=this._host;this._renderBar(this.get(C),E._scrollsVertical);this._renderBar(this.get(n),E._scrollsHorizontal);this._update();a.later(500,this,"flash",true);},_hostScrollEnd:function(E){if(!this._host._flicking){this.flash();}},_renderBar:function(F,H){var G=F.inDoc(),I=this._host._bb,E=F.getData("isHoriz")?j.scrollbarHB:j.scrollbarVB;if(H&&!G){I.append(F);F.toggleClass(E,this._basic);this._setChildCache(F);}else{if(!H&&G){F.remove();this._clearChildCache(F);}}},_setChildCache:function(H){var J=H.get("children"),F=J.item(0),I=J.item(1),G=J.item(2),E=H.getData("isHoriz")?"offsetWidth":"offsetHeight";H.setStyle(o,f);I.setStyle(o,f);G.setStyle(o,f);H.setData(v,{fc:F,lc:G,mc:I,fcSize:F&&F.get(E),lcSize:G&&G.get(E)});},_clearChildCache:function(E){E.clearData(v);},_updateBar:function(E,N,G,X){var L=this._host,H=this._basic,M=L._cb,S=0,O=1,F=E.getData(v),T=F.lc,W=F.mc,ab=F.fcSize,aa=F.lcSize,P,Y,V,K,Z,R,I,U,Q,J;if(X){R=g;I=r;U=B;Q=L._width;J=L._scrollWidth;K=e;Z=z;N=(N!==undefined)?N:L.get(t);}else{R=w;I=x;U=u;Q=L._height;J=L._scrollHeight;K=d;Z=y;N=(N!==undefined)?N:L.get(s);}S=Math.floor(Q*(Q/J));O=Math.floor((N/(J-Q))*(Q-S));if(S>Q){S=1;}if(O>(Q-S)){S=S-(O-(Q-S));}else{if(O<0){S=O+S;O=0;}}P=(S-(ab+aa));if(P<0){P=0;}if(P===0&&O!==0){O=Q-(ab+aa)-1;}if(G!==0){V={duration:G};if(k){V.transform=K+O+p;}else{V[I]=O+l;}E.transition(V);}else{if(k){E.setStyle(f,K+O+p);}else{E.setStyle(I,O+l);}}if(this[U]!==P){this[U]=P;if(P>0){if(G!==0){V={duration:G};if(k){V.transform=Z+P+c;}else{V[R]=P+l;}W.transition(V);}else{if(k){W.setStyle(f,Z+P+c);}else{W.setStyle(R,P+l);}}if(!X||!H){Y=S-aa;if(G!==0){V={duration:G};if(k){V.transform=K+Y+p;}else{V[I]=Y;}T.transition(V);}else{if(k){T.setStyle(f,K+Y+p);}else{T.setStyle(I,Y+l);}}}}}},_update:function(F,K,I,J){var H=this.get(C),E=this.get(n),G=this._host;I=(I||0)/1000;if(!this._showing){this.show();}if(G._scrollsVertical&&H){this._updateBar(H,K,I,false);}if(G._scrollsHorizontal&&E){this._updateBar(E,F,I,true);}},show:function(E){this._show(true,E);},hide:function(E){this._show(false,E);},_show:function(E,H){var G=this.get(C),I=this.get(n),J=(H)?0.6:0,F=(E)?1:0,K;this._showing=E;if(this._flashTimer){this._flashTimer.cancel();}K={duration:J,opacity:F};if(G){G.transition(K);}if(I){I.transition(K);}},flash:function(){var E=this._host;this.show(true);this._flashTimer=a.later(800,this,"hide",true);},_setNode:function(F,E){var G=(E==n);F=a.one(F);if(F){F.addClass(j.scrollbar);F.addClass((G)?j.scrollbarH:j.scrollbarV);F.setData("isHoriz",G);}return F;},_defaultNode:function(){return a.Node.create(b.SCROLLBAR_TEMPLATE);},_basic:a.UA.ie&&a.UA.ie<=8});},"3.5.0",{requires:["classnamemanager","transition","plugin"],skinnable:true});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars.js b/lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars.js
similarity index 94%
rename from lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars.js
rename to lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars.js
index f738297751f..5d9c5e1f4bd 100644
--- a/lib/yui/3.4.1/build/scrollview-scrollbars/scrollview-scrollbars.js
+++ b/lib/yui/3.5.0/build/scrollview-scrollbars/scrollview-scrollbars.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -296,8 +296,8 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
dim = WIDTH;
dimOffset = LEFT;
dimCache = HORIZ_CACHE;
- widgetSize = host.get(dim);
- contentSize = host._scrollWidth || cb.get(SCROLL_WIDTH);
+ widgetSize = host._width;
+ contentSize = host._scrollWidth;
translate = TRANSLATE_X;
scale = SCALE_X;
current = (current !== undefined) ? current : host.get(SCROLL_X);
@@ -305,8 +305,8 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
dim = HEIGHT;
dimOffset = TOP;
dimCache = VERT_CACHE;
- widgetSize = host.get(dim);
- contentSize = host._scrollHeight || cb.get(SCROLL_HEIGHT);
+ widgetSize = host._height;
+ contentSize = host._scrollHeight;
translate = TRANSLATE_Y;
scale = SCALE_Y;
current = (current !== undefined) ? current : host.get(SCROLL_Y);
@@ -509,21 +509,10 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
* @method flash
*/
flash: function() {
- var shouldFlash = false,
- host = this._host;
+ var host = this._host;
- if (host._scrollsVertical && (host._scrollHeight > host.get(HEIGHT))) {
- shouldFlash = true;
- }
-
- if (host._scrollsHorizontal && (host._scrollWidth > host.get(WIDTH))) {
- shouldFlash = true;
- }
-
- if (shouldFlash) {
- this.show(true);
- this._flashTimer = Y.later(800, this, 'hide', true);
- }
+ this.show(true);
+ this._flashTimer = Y.later(800, this, 'hide', true);
},
/**
@@ -567,4 +556,4 @@ Y.namespace("Plugin").ScrollViewScrollbars = Y.extend(ScrollbarsPlugin, Y.Plugin
});
-}, '3.4.1' ,{requires:['classnamemanager', 'transition', 'plugin'], skinnable:true});
+}, '3.5.0' ,{requires:['classnamemanager', 'transition', 'plugin'], skinnable:true});
diff --git a/lib/yui/3.4.1/build/scrollview/scrollview-debug.js b/lib/yui/3.5.0/build/scrollview/scrollview-debug.js
similarity index 83%
rename from lib/yui/3.4.1/build/scrollview/scrollview-debug.js
rename to lib/yui/3.5.0/build/scrollview/scrollview-debug.js
index 0061cb35fec..6b6f0fdce37 100644
--- a/lib/yui/3.4.1/build/scrollview/scrollview-debug.js
+++ b/lib/yui/3.5.0/build/scrollview/scrollview-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -24,4 +24,4 @@ YUI.add('scrollview', function(Y) {
Y.Base.plug(Y.ScrollView, Y.Plugin.ScrollViewScrollbars);
-}, '3.4.1' ,{requires:['scrollview-base', 'scrollview-scrollbars']});
+}, '3.5.0' ,{requires:['scrollview-base', 'scrollview-scrollbars']});
diff --git a/lib/yui/3.4.1/build/scrollview/scrollview-min.js b/lib/yui/3.5.0/build/scrollview/scrollview-min.js
similarity index 54%
rename from lib/yui/3.4.1/build/scrollview/scrollview-min.js
rename to lib/yui/3.5.0/build/scrollview/scrollview-min.js
index efba1b6b8e1..2bef6f5e2f5 100644
--- a/lib/yui/3.4.1/build/scrollview/scrollview-min.js
+++ b/lib/yui/3.5.0/build/scrollview/scrollview-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("scrollview",function(a){a.Base.plug(a.ScrollView,a.Plugin.ScrollViewScrollbars);},"3.4.1",{requires:["scrollview-base","scrollview-scrollbars"]});
\ No newline at end of file
+YUI.add("scrollview",function(a){a.Base.plug(a.ScrollView,a.Plugin.ScrollViewScrollbars);},"3.5.0",{requires:["scrollview-base","scrollview-scrollbars"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/scrollview/scrollview.js b/lib/yui/3.5.0/build/scrollview/scrollview.js
similarity index 83%
rename from lib/yui/3.4.1/build/scrollview/scrollview.js
rename to lib/yui/3.5.0/build/scrollview/scrollview.js
index 0061cb35fec..6b6f0fdce37 100644
--- a/lib/yui/3.4.1/build/scrollview/scrollview.js
+++ b/lib/yui/3.5.0/build/scrollview/scrollview.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -24,4 +24,4 @@ YUI.add('scrollview', function(Y) {
Y.Base.plug(Y.ScrollView, Y.Plugin.ScrollViewScrollbars);
-}, '3.4.1' ,{requires:['scrollview-base', 'scrollview-scrollbars']});
+}, '3.5.0' ,{requires:['scrollview-base', 'scrollview-scrollbars']});
diff --git a/lib/yui/3.4.1/build/selector-css2/selector-css2-debug.js b/lib/yui/3.5.0/build/selector-css2/selector-css2-debug.js
similarity index 80%
rename from lib/yui/3.4.1/build/selector-css2/selector-css2-debug.js
rename to lib/yui/3.5.0/build/selector-css2/selector-css2-debug.js
index 2f11a90f49b..af0ced35a10 100644
--- a/lib/yui/3.4.1/build/selector-css2/selector-css2-debug.js
+++ b/lib/yui/3.5.0/build/selector-css2/selector-css2-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -26,37 +26,14 @@ var PARENT_NODE = 'parentNode',
Selector = Y.Selector,
SelectorCSS2 = {
- _reRegExpTokens: /([\^\$\?\[\]\*\+\-\.\(\)\|\\])/, // TODO: move?
+ _reRegExpTokens: /([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,
SORT_RESULTS: true,
- _children: function(node, tag) {
- var ret = node.children,
- i,
- children = [],
- childNodes,
- child;
- if (node.children && tag && node.children.tags) {
- children = node.children.tags(tag);
- } else if ((!ret && node[TAG_NAME]) || (ret && tag)) { // only HTMLElements have children
- childNodes = ret || node.childNodes;
- ret = [];
- for (i = 0; (child = childNodes[i++]);) {
- if (child.tagName) {
- if (!tag || tag === child.tagName) {
- ret.push(child);
- }
- }
- }
- }
-
- return ret || [];
- },
-
- _re: {
- attr: /(\[[^\]]*\])/g,
- esc: /\\[:\[\]\(\)#\.\'\>+~"]/gi,
- pseudos: /(\([^\)]*\))/g
- },
+ // TODO: better detection, document specific
+ _isXML: (function() {
+ var isXML = (Y.config.doc.createElement('div').tagName !== 'DIV');
+ return isXML;
+ }()),
/**
* Mapping of shorthand tokens to corresponding attribute selector
@@ -76,15 +53,13 @@ var PARENT_NODE = 'parentNode',
*/
operators: {
'': function(node, attr) { return Y.DOM.getAttribute(node, attr) !== ''; }, // Just test for existence of attribute
- //'': '.+',
- //'=': '^{val}$', // equality
'~=': '(?:^|\\s+){val}(?:\\s+|$)', // space-delimited
'|=': '^{val}-?' // optional hyphen-delimited
},
pseudos: {
'first-child': function(node) {
- return Y.Selector._children(node[PARENT_NODE])[0] === node;
+ return Y.DOM._children(node[PARENT_NODE])[0] === node;
}
},
@@ -99,16 +74,6 @@ var PARENT_NODE = 'parentNode',
className,
tagName;
-
- // if we have an initial ID, set to root when in document
- /*
- if (tokens[0] && rootDoc === root &&
- (id = tokens[0].id) &&
- rootDoc.getElementById(id)) {
- root = rootDoc.getElementById(id);
- }
- */
-
if (token) {
// prefilter nodes
id = token.id;
@@ -118,7 +83,6 @@ var PARENT_NODE = 'parentNode',
if (root.getElementsByTagName) { // non-IE lacks DOM api on doc frags
// try ID first, unless no root.all && root not in document
// (root.all works off document, but not getElementById)
- // TODO: move to allById?
if (id && (root.all || (root.nodeType === 9 || Y.DOM.inDoc(root)))) {
nodes = Y.DOM.allById(id, root);
// try className
@@ -128,13 +92,15 @@ var PARENT_NODE = 'parentNode',
nodes = root.getElementsByTagName(tagName);
}
- } else { // brute getElementsByTagName('*')
+ } else { // brute getElementsByTagName()
child = root.firstChild;
while (child) {
- if (child.tagName) { // only collect HTMLElements
+ // only collect HTMLElements
+ // match tag to supplement missing getElementsByTagName
+ if (child.tagName && (tagName === '*' || child.tagName === tagName)) {
nodes.push(child);
}
- child = child.nextSilbing || child.firstChild;
+ child = child.nextSibling || child.firstChild;
}
}
if (nodes.length) {
@@ -159,12 +125,10 @@ var PARENT_NODE = 'parentNode',
token,
path,
pass,
- //FUNCTION = 'function',
value,
tests,
test;
- //do {
for (i = 0; (tmpNode = node = nodes[i++]);) {
n = len - 1;
path = null;
@@ -181,9 +145,14 @@ var PARENT_NODE = 'parentNode',
value = getters[test[0]](tmpNode, test[0]);
} else {
value = tmpNode[test[0]];
- // use getAttribute for non-standard attributes
- if (value === undefined && tmpNode.getAttribute) {
- value = tmpNode.getAttribute(test[0]);
+ if (test[0] === 'tagName' && !Selector._isXML) {
+ value = value.toUpperCase();
+ }
+ if (typeof value != 'string' && value !== undefined && value.toString) {
+ value = value.toString(); // coerce for comparison
+ } else if (value === undefined && tmpNode.getAttribute) {
+ // use getAttribute for non-standard attributes
+ value = tmpNode.getAttribute(test[0], 2); // 2 === force string for IE
}
}
@@ -230,7 +199,7 @@ var PARENT_NODE = 'parentNode',
break;
}
}
- }// while (tmpNode = node = nodes[++i]);
+ }
node = tmpNode = null;
return result;
},
@@ -295,7 +264,12 @@ var PARENT_NODE = 'parentNode',
name: TAG_NAME,
re: /^((?:-?[_a-z]+[\w-]*)|\*)/i,
fn: function(match, token) {
- var tag = match[1].toUpperCase();
+ var tag = match[1];
+
+ if (!Selector._isXML) {
+ tag = tag.toUpperCase();
+ }
+
token.tagName = tag;
if (tag !== '*' && (!token.last || token.prefilter)) {
@@ -346,7 +320,7 @@ var PARENT_NODE = 'parentNode',
*/
_tokenize: function(selector) {
selector = selector || '';
- selector = Selector._replaceShorthand(Y.Lang.trim(selector));
+ selector = Selector._parseSelector(Y.Lang.trim(selector));
var token = Selector._getToken(), // one token per simple selector (left selector holds combinator)
query = selector, // original query for debug report
tokens = [], // array of tokens
@@ -407,28 +381,18 @@ var PARENT_NODE = 'parentNode',
return tokens;
},
+ _replaceMarkers: function(selector) {
+ selector = selector.replace(/\[/g, '\uE003');
+ selector = selector.replace(/\]/g, '\uE004');
+
+ selector = selector.replace(/\(/g, '\uE005');
+ selector = selector.replace(/\)/g, '\uE006');
+ return selector;
+ },
+
_replaceShorthand: function(selector) {
- var shorthand = Selector.shorthand,
- esc = selector.match(Selector._re.esc), // pull escaped colon, brackets, etc.
- attrs,
- pseudos,
- re, i, len;
-
- if (esc) {
- selector = selector.replace(Selector._re.esc, '\uE000');
- }
-
- attrs = selector.match(Selector._re.attr);
- pseudos = selector.match(Selector._re.pseudos);
-
- if (attrs) {
- selector = selector.replace(Selector._re.attr, '\uE001');
- }
-
- if (pseudos) {
- selector = selector.replace(Selector._re.pseudos, '\uE002');
- }
-
+ var shorthand = Y.Selector.shorthand,
+ re;
for (re in shorthand) {
if (shorthand.hasOwnProperty(re)) {
@@ -436,29 +400,24 @@ var PARENT_NODE = 'parentNode',
}
}
- if (attrs) {
- for (i = 0, len = attrs.length; i < len; ++i) {
- selector = selector.replace(/\uE001/, attrs[i]);
- }
- }
+ return selector;
+ },
- if (pseudos) {
- for (i = 0, len = pseudos.length; i < len; ++i) {
- selector = selector.replace(/\uE002/, pseudos[i]);
- }
- }
+ _parseSelector: function(selector) {
+ var replaced = Y.Selector._replaceSelector(selector),
+ selector = replaced.selector;
- selector = selector.replace(/\[/g, '\uE003');
- selector = selector.replace(/\]/g, '\uE004');
+ // replace shorthand (".foo, #bar") after pseudos and attrs
+ // to avoid replacing unescaped chars
+ selector = Y.Selector._replaceShorthand(selector);
- selector = selector.replace(/\(/g, '\uE005');
- selector = selector.replace(/\)/g, '\uE006');
+ selector = Y.Selector._restore('attr', selector, replaced.attrs);
+ selector = Y.Selector._restore('pseudo', selector, replaced.pseudos);
- if (esc) {
- for (i = 0, len = esc.length; i < len; ++i) {
- selector = selector.replace('\uE000', esc[i]);
- }
- }
+ // replace braces and parens before restoring escaped chars
+ // to avoid replacing ecaped markers
+ selector = Y.Selector._replaceMarkers(selector);
+ selector = Y.Selector._restore('esc', selector, replaced.esc);
return selector;
},
@@ -471,6 +430,10 @@ var PARENT_NODE = 'parentNode',
getters: {
href: function(node, attr) {
return Y.DOM.getAttribute(node, attr);
+ },
+
+ id: function(node, attr) {
+ return Y.DOM.getId(node);
}
}
};
@@ -485,4 +448,4 @@ if (Y.Selector.useNative && Y.config.doc.querySelector) {
-}, '3.4.1' ,{requires:['selector-native']});
+}, '3.5.0' ,{requires:['selector-native']});
diff --git a/lib/yui/3.5.0/build/selector-css2/selector-css2-min.js b/lib/yui/3.5.0/build/selector-css2/selector-css2-min.js
new file mode 100644
index 00000000000..6b3026d9469
--- /dev/null
+++ b/lib/yui/3.5.0/build/selector-css2/selector-css2-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("selector-css2",function(g){var h="parentNode",d="tagName",e="attributes",a="combinator",f="pseudos",c=g.Selector,b={_reRegExpTokens:/([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,SORT_RESULTS:true,_isXML:(function(){var i=(g.config.doc.createElement("div").tagName!=="DIV");return i;}()),shorthand:{"\\#(-?[_a-z0-9]+[-\\w\\uE000]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w\\uE000]*)":"[className~=$1]"},operators:{"":function(j,i){return g.DOM.getAttribute(j,i)!=="";},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(i){return g.DOM._children(i[h])[0]===i;}},_bruteQuery:function(n,r,t){var o=[],i=[],q=c._tokenize(n),m=q[q.length-1],s=g.DOM._getDoc(r),k,j,p,l;if(m){j=m.id;p=m.className;l=m.tagName||"*";if(r.getElementsByTagName){if(j&&(r.all||(r.nodeType===9||g.DOM.inDoc(r)))){i=g.DOM.allById(j,r);}else{if(p){i=r.getElementsByClassName(p);}else{i=r.getElementsByTagName(l);}}}else{k=r.firstChild;while(k){if(k.tagName&&(l==="*"||k.tagName===l)){i.push(k);}k=k.nextSibling||k.firstChild;}}if(i.length){o=c._filterNodes(i,q,t);}}return o;},_filterNodes:function(u,q,s){var z=0,y,A=q.length,t=A-1,p=[],w=u[0],D=w,B=g.Selector.getters,o,x,m,r,k,v,l,C;for(z=0;(D=w=u[z++]);){t=A-1;r=null;testLoop:while(D&&D.tagName){m=q[t];l=m.tests;y=l.length;if(y&&!k){while((C=l[--y])){o=C[1];if(B[C[0]]){v=B[C[0]](D,C[0]);}else{v=D[C[0]];if(C[0]==="tagName"&&!c._isXML){v=v.toUpperCase();}if(typeof v!="string"&&v!==undefined&&v.toString){v=v.toString();}else{if(v===undefined&&D.getAttribute){v=D.getAttribute(C[0],2);}}}if((o==="="&&v!==C[2])||(typeof o!=="string"&&o.test&&!o.test(v))||(!o.test&&typeof o==="function"&&!o(D,C[0],C[2]))){if((D=D[r])){while(D&&(!D.tagName||(m.tagName&&m.tagName!==D.tagName))){D=D[r];}}continue testLoop;}}}t--;if(!k&&(x=m.combinator)){r=x.axis;D=D[r];while(D&&!D.tagName){D=D[r];}if(x.direct){r=null;}}else{p.push(w);if(s){return p;}break;}}}w=D=null;return p;},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:true},"+":{axis:"previousSibling",direct:true}},_parsers:[{name:e,re:/^\uE003(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\uE004'"]*)['"]?\uE004/i,fn:function(l,m){var k=l[2]||"",i=c.operators,j=(l[3])?l[3].replace(/\\/g,""):"",n;if((l[1]==="id"&&k==="=")||(l[1]==="className"&&g.config.doc.documentElement.getElementsByClassName&&(k==="~="||k==="="))){m.prefilter=l[1];l[3]=j;m[l[1]]=(l[1]==="id")?l[3]:j;}if(k in i){n=i[k];if(typeof n==="string"){l[3]=j.replace(c._reRegExpTokens,"\\$1");n=new RegExp(n.replace("{val}",l[3]));}l[2]=n;}if(!m.last||m.prefilter!==l[1]){return l.slice(1);}}},{name:d,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(j,k){var i=j[1];if(!c._isXML){i=i.toUpperCase();}k.tagName=i;if(i!=="*"&&(!k.last||k.prefilter)){return[d,"=",i];}if(!k.prefilter){k.prefilter="tagName";}}},{name:a,re:/^\s*([>+~]|\s)\s*/,fn:function(i,j){}},{name:f,re:/^:([\-\w]+)(?:\uE005['"]?([^\uE005]*)['"]?\uE006)*/i,fn:function(i,j){var k=c[f][i[1]];if(k){if(i[2]){i[2]=i[2].replace(/\\/g,"");}return[i[2],k];}else{return false;}}}],_getToken:function(i){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(l){l=l||"";l=c._parseSelector(g.Lang.trim(l));var k=c._getToken(),q=l,p=[],r=false,n,o,m,j;outer:do{r=false;for(m=0;(j=c._parsers[m++]);){if((n=j.re.exec(l))){if(j.name!==a){k.selector=l;}l=l.replace(n[0],"");if(!l.length){k.last=true;}if(c._attrFilters[n[1]]){n[1]=c._attrFilters[n[1]];}o=j.fn(n,k);if(o===false){r=false;break outer;}else{if(o){k.tests.push(o);}}if(!l.length||j.name===a){p.push(k);k=c._getToken(k);if(j.name===a){k.combinator=g.Selector.combinators[n[1]];}}r=true;}}}while(r&&l.length);if(!r||l.length){p=[];}return p;},_replaceMarkers:function(i){i=i.replace(/\[/g,"\uE003");i=i.replace(/\]/g,"\uE004");i=i.replace(/\(/g,"\uE005");i=i.replace(/\)/g,"\uE006");return i;},_replaceShorthand:function(i){var j=g.Selector.shorthand,k;for(k in j){if(j.hasOwnProperty(k)){i=i.replace(new RegExp(k,"gi"),j[k]);}}return i;},_parseSelector:function(i){var j=g.Selector._replaceSelector(i),i=j.selector;i=g.Selector._replaceShorthand(i);i=g.Selector._restore("attr",i,j.attrs);i=g.Selector._restore("pseudo",i,j.pseudos);i=g.Selector._replaceMarkers(i);i=g.Selector._restore("esc",i,j.esc);return i;},_attrFilters:{"class":"className","for":"htmlFor"},getters:{href:function(j,i){return g.DOM.getAttribute(j,i);},id:function(j,i){return g.DOM.getId(j);}}};g.mix(g.Selector,b,true);g.Selector.getters.src=g.Selector.getters.rel=g.Selector.getters.href;if(g.Selector.useNative&&g.config.doc.querySelector){g.Selector.shorthand["\\.(-?[_a-z]+[-\\w]*)"]="[class~=$1]";}},"3.5.0",{requires:["selector-native"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/selector-css2/selector-css2.js b/lib/yui/3.5.0/build/selector-css2/selector-css2.js
similarity index 80%
rename from lib/yui/3.4.1/build/selector-css2/selector-css2.js
rename to lib/yui/3.5.0/build/selector-css2/selector-css2.js
index dbb5e0008fb..c105d995257 100644
--- a/lib/yui/3.4.1/build/selector-css2/selector-css2.js
+++ b/lib/yui/3.5.0/build/selector-css2/selector-css2.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -26,37 +26,14 @@ var PARENT_NODE = 'parentNode',
Selector = Y.Selector,
SelectorCSS2 = {
- _reRegExpTokens: /([\^\$\?\[\]\*\+\-\.\(\)\|\\])/, // TODO: move?
+ _reRegExpTokens: /([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,
SORT_RESULTS: true,
- _children: function(node, tag) {
- var ret = node.children,
- i,
- children = [],
- childNodes,
- child;
- if (node.children && tag && node.children.tags) {
- children = node.children.tags(tag);
- } else if ((!ret && node[TAG_NAME]) || (ret && tag)) { // only HTMLElements have children
- childNodes = ret || node.childNodes;
- ret = [];
- for (i = 0; (child = childNodes[i++]);) {
- if (child.tagName) {
- if (!tag || tag === child.tagName) {
- ret.push(child);
- }
- }
- }
- }
-
- return ret || [];
- },
-
- _re: {
- attr: /(\[[^\]]*\])/g,
- esc: /\\[:\[\]\(\)#\.\'\>+~"]/gi,
- pseudos: /(\([^\)]*\))/g
- },
+ // TODO: better detection, document specific
+ _isXML: (function() {
+ var isXML = (Y.config.doc.createElement('div').tagName !== 'DIV');
+ return isXML;
+ }()),
/**
* Mapping of shorthand tokens to corresponding attribute selector
@@ -76,15 +53,13 @@ var PARENT_NODE = 'parentNode',
*/
operators: {
'': function(node, attr) { return Y.DOM.getAttribute(node, attr) !== ''; }, // Just test for existence of attribute
- //'': '.+',
- //'=': '^{val}$', // equality
'~=': '(?:^|\\s+){val}(?:\\s+|$)', // space-delimited
'|=': '^{val}-?' // optional hyphen-delimited
},
pseudos: {
'first-child': function(node) {
- return Y.Selector._children(node[PARENT_NODE])[0] === node;
+ return Y.DOM._children(node[PARENT_NODE])[0] === node;
}
},
@@ -99,16 +74,6 @@ var PARENT_NODE = 'parentNode',
className,
tagName;
-
- // if we have an initial ID, set to root when in document
- /*
- if (tokens[0] && rootDoc === root &&
- (id = tokens[0].id) &&
- rootDoc.getElementById(id)) {
- root = rootDoc.getElementById(id);
- }
- */
-
if (token) {
// prefilter nodes
id = token.id;
@@ -118,7 +83,6 @@ var PARENT_NODE = 'parentNode',
if (root.getElementsByTagName) { // non-IE lacks DOM api on doc frags
// try ID first, unless no root.all && root not in document
// (root.all works off document, but not getElementById)
- // TODO: move to allById?
if (id && (root.all || (root.nodeType === 9 || Y.DOM.inDoc(root)))) {
nodes = Y.DOM.allById(id, root);
// try className
@@ -128,13 +92,15 @@ var PARENT_NODE = 'parentNode',
nodes = root.getElementsByTagName(tagName);
}
- } else { // brute getElementsByTagName('*')
+ } else { // brute getElementsByTagName()
child = root.firstChild;
while (child) {
- if (child.tagName) { // only collect HTMLElements
+ // only collect HTMLElements
+ // match tag to supplement missing getElementsByTagName
+ if (child.tagName && (tagName === '*' || child.tagName === tagName)) {
nodes.push(child);
}
- child = child.nextSilbing || child.firstChild;
+ child = child.nextSibling || child.firstChild;
}
}
if (nodes.length) {
@@ -159,12 +125,10 @@ var PARENT_NODE = 'parentNode',
token,
path,
pass,
- //FUNCTION = 'function',
value,
tests,
test;
- //do {
for (i = 0; (tmpNode = node = nodes[i++]);) {
n = len - 1;
path = null;
@@ -181,9 +145,14 @@ var PARENT_NODE = 'parentNode',
value = getters[test[0]](tmpNode, test[0]);
} else {
value = tmpNode[test[0]];
- // use getAttribute for non-standard attributes
- if (value === undefined && tmpNode.getAttribute) {
- value = tmpNode.getAttribute(test[0]);
+ if (test[0] === 'tagName' && !Selector._isXML) {
+ value = value.toUpperCase();
+ }
+ if (typeof value != 'string' && value !== undefined && value.toString) {
+ value = value.toString(); // coerce for comparison
+ } else if (value === undefined && tmpNode.getAttribute) {
+ // use getAttribute for non-standard attributes
+ value = tmpNode.getAttribute(test[0], 2); // 2 === force string for IE
}
}
@@ -230,7 +199,7 @@ var PARENT_NODE = 'parentNode',
break;
}
}
- }// while (tmpNode = node = nodes[++i]);
+ }
node = tmpNode = null;
return result;
},
@@ -295,7 +264,12 @@ var PARENT_NODE = 'parentNode',
name: TAG_NAME,
re: /^((?:-?[_a-z]+[\w-]*)|\*)/i,
fn: function(match, token) {
- var tag = match[1].toUpperCase();
+ var tag = match[1];
+
+ if (!Selector._isXML) {
+ tag = tag.toUpperCase();
+ }
+
token.tagName = tag;
if (tag !== '*' && (!token.last || token.prefilter)) {
@@ -346,7 +320,7 @@ var PARENT_NODE = 'parentNode',
*/
_tokenize: function(selector) {
selector = selector || '';
- selector = Selector._replaceShorthand(Y.Lang.trim(selector));
+ selector = Selector._parseSelector(Y.Lang.trim(selector));
var token = Selector._getToken(), // one token per simple selector (left selector holds combinator)
query = selector, // original query for debug report
tokens = [], // array of tokens
@@ -406,28 +380,18 @@ var PARENT_NODE = 'parentNode',
return tokens;
},
+ _replaceMarkers: function(selector) {
+ selector = selector.replace(/\[/g, '\uE003');
+ selector = selector.replace(/\]/g, '\uE004');
+
+ selector = selector.replace(/\(/g, '\uE005');
+ selector = selector.replace(/\)/g, '\uE006');
+ return selector;
+ },
+
_replaceShorthand: function(selector) {
- var shorthand = Selector.shorthand,
- esc = selector.match(Selector._re.esc), // pull escaped colon, brackets, etc.
- attrs,
- pseudos,
- re, i, len;
-
- if (esc) {
- selector = selector.replace(Selector._re.esc, '\uE000');
- }
-
- attrs = selector.match(Selector._re.attr);
- pseudos = selector.match(Selector._re.pseudos);
-
- if (attrs) {
- selector = selector.replace(Selector._re.attr, '\uE001');
- }
-
- if (pseudos) {
- selector = selector.replace(Selector._re.pseudos, '\uE002');
- }
-
+ var shorthand = Y.Selector.shorthand,
+ re;
for (re in shorthand) {
if (shorthand.hasOwnProperty(re)) {
@@ -435,29 +399,24 @@ var PARENT_NODE = 'parentNode',
}
}
- if (attrs) {
- for (i = 0, len = attrs.length; i < len; ++i) {
- selector = selector.replace(/\uE001/, attrs[i]);
- }
- }
+ return selector;
+ },
- if (pseudos) {
- for (i = 0, len = pseudos.length; i < len; ++i) {
- selector = selector.replace(/\uE002/, pseudos[i]);
- }
- }
+ _parseSelector: function(selector) {
+ var replaced = Y.Selector._replaceSelector(selector),
+ selector = replaced.selector;
- selector = selector.replace(/\[/g, '\uE003');
- selector = selector.replace(/\]/g, '\uE004');
+ // replace shorthand (".foo, #bar") after pseudos and attrs
+ // to avoid replacing unescaped chars
+ selector = Y.Selector._replaceShorthand(selector);
- selector = selector.replace(/\(/g, '\uE005');
- selector = selector.replace(/\)/g, '\uE006');
+ selector = Y.Selector._restore('attr', selector, replaced.attrs);
+ selector = Y.Selector._restore('pseudo', selector, replaced.pseudos);
- if (esc) {
- for (i = 0, len = esc.length; i < len; ++i) {
- selector = selector.replace('\uE000', esc[i]);
- }
- }
+ // replace braces and parens before restoring escaped chars
+ // to avoid replacing ecaped markers
+ selector = Y.Selector._replaceMarkers(selector);
+ selector = Y.Selector._restore('esc', selector, replaced.esc);
return selector;
},
@@ -470,6 +429,10 @@ var PARENT_NODE = 'parentNode',
getters: {
href: function(node, attr) {
return Y.DOM.getAttribute(node, attr);
+ },
+
+ id: function(node, attr) {
+ return Y.DOM.getId(node);
}
}
};
@@ -484,4 +447,4 @@ if (Y.Selector.useNative && Y.config.doc.querySelector) {
-}, '3.4.1' ,{requires:['selector-native']});
+}, '3.5.0' ,{requires:['selector-native']});
diff --git a/lib/yui/3.4.1/build/selector-css3/selector-css3-debug.js b/lib/yui/3.5.0/build/selector-css3/selector-css3-debug.js
similarity index 87%
rename from lib/yui/3.4.1/build/selector-css3/selector-css3-debug.js
rename to lib/yui/3.5.0/build/selector-css3/selector-css3-debug.js
index d4ff2aa79f0..3edf2eb766e 100644
--- a/lib/yui/3.4.1/build/selector-css3/selector-css3-debug.js
+++ b/lib/yui/3.5.0/build/selector-css3/selector-css3-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -29,7 +29,7 @@ Y.Selector._getNth = function(node, expr, tag, reverse) {
oddeven = RegExp.$3, // "odd" or "even"
b = parseInt(RegExp.$4, 10) || 0, // start scan from element _b_
result = [],
- siblings = Y.Selector._children(node.parentNode, tag),
+ siblings = Y.DOM._children(node.parentNode, tag),
op;
if (oddeven) {
@@ -95,26 +95,26 @@ Y.mix(Y.Selector.pseudos, {
},
'last-child': function(node) {
- var children = Y.Selector._children(node.parentNode);
+ var children = Y.DOM._children(node.parentNode);
return children[children.length - 1] === node;
},
'first-of-type': function(node) {
- return Y.Selector._children(node.parentNode, node.tagName)[0] === node;
+ return Y.DOM._children(node.parentNode, node.tagName)[0] === node;
},
'last-of-type': function(node) {
- var children = Y.Selector._children(node.parentNode, node.tagName);
+ var children = Y.DOM._children(node.parentNode, node.tagName);
return children[children.length - 1] === node;
},
'only-child': function(node) {
- var children = Y.Selector._children(node.parentNode);
+ var children = Y.DOM._children(node.parentNode);
return children.length === 1 && children[0] === node;
},
'only-of-type': function(node) {
- var children = Y.Selector._children(node.parentNode, node.tagName);
+ var children = Y.DOM._children(node.parentNode, node.tagName);
return children.length === 1 && children[0] === node;
},
@@ -155,4 +155,4 @@ Y.Selector.combinators['~'] = {
};
-}, '3.4.1' ,{requires:['selector-native', 'selector-css2']});
+}, '3.5.0' ,{requires:['selector-native', 'selector-css2']});
diff --git a/lib/yui/3.5.0/build/selector-css3/selector-css3-min.js b/lib/yui/3.5.0/build/selector-css3/selector-css3-min.js
new file mode 100644
index 00000000000..85313b72c0e
--- /dev/null
+++ b/lib/yui/3.5.0/build/selector-css3/selector-css3-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("selector-css3",function(a){a.Selector._reNth=/^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/;a.Selector._getNth=function(d,o,q,h){a.Selector._reNth.test(o);var m=parseInt(RegExp.$1,10),c=RegExp.$2,j=RegExp.$3,k=parseInt(RegExp.$4,10)||0,p=[],l=a.DOM._children(d.parentNode,q),f;if(j){m=2;f="+";c="n";k=(j==="odd")?1:0;}else{if(isNaN(m)){m=(c)?1:0;}}if(m===0){if(h){k=l.length-k+1;}if(l[k-1]===d){return true;}else{return false;}}else{if(m<0){h=!!h;m=Math.abs(m);}}if(!h){for(var e=k-1,g=l.length;e=0&&l[e]===d){return true;}}}else{for(var e=l.length-k,g=l.length;e>=0;e-=m){if(e-1;},"checked":function(b){return(b.checked===true||b.selected===true);},enabled:function(b){return(b.disabled!==undefined&&!b.disabled);},disabled:function(b){return(b.disabled);}});a.mix(a.Selector.operators,{"^=":"^{val}","$=":"{val}$","*=":"{val}"});a.Selector.combinators["~"]={axis:"previousSibling"};},"3.5.0",{requires:["selector-native","selector-css2"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/selector-css3/selector-css3.js b/lib/yui/3.5.0/build/selector-css3/selector-css3.js
similarity index 87%
rename from lib/yui/3.4.1/build/selector-css3/selector-css3.js
rename to lib/yui/3.5.0/build/selector-css3/selector-css3.js
index d4ff2aa79f0..3edf2eb766e 100644
--- a/lib/yui/3.4.1/build/selector-css3/selector-css3.js
+++ b/lib/yui/3.5.0/build/selector-css3/selector-css3.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -29,7 +29,7 @@ Y.Selector._getNth = function(node, expr, tag, reverse) {
oddeven = RegExp.$3, // "odd" or "even"
b = parseInt(RegExp.$4, 10) || 0, // start scan from element _b_
result = [],
- siblings = Y.Selector._children(node.parentNode, tag),
+ siblings = Y.DOM._children(node.parentNode, tag),
op;
if (oddeven) {
@@ -95,26 +95,26 @@ Y.mix(Y.Selector.pseudos, {
},
'last-child': function(node) {
- var children = Y.Selector._children(node.parentNode);
+ var children = Y.DOM._children(node.parentNode);
return children[children.length - 1] === node;
},
'first-of-type': function(node) {
- return Y.Selector._children(node.parentNode, node.tagName)[0] === node;
+ return Y.DOM._children(node.parentNode, node.tagName)[0] === node;
},
'last-of-type': function(node) {
- var children = Y.Selector._children(node.parentNode, node.tagName);
+ var children = Y.DOM._children(node.parentNode, node.tagName);
return children[children.length - 1] === node;
},
'only-child': function(node) {
- var children = Y.Selector._children(node.parentNode);
+ var children = Y.DOM._children(node.parentNode);
return children.length === 1 && children[0] === node;
},
'only-of-type': function(node) {
- var children = Y.Selector._children(node.parentNode, node.tagName);
+ var children = Y.DOM._children(node.parentNode, node.tagName);
return children.length === 1 && children[0] === node;
},
@@ -155,4 +155,4 @@ Y.Selector.combinators['~'] = {
};
-}, '3.4.1' ,{requires:['selector-native', 'selector-css2']});
+}, '3.5.0' ,{requires:['selector-native', 'selector-css2']});
diff --git a/lib/yui/3.4.1/build/selector-native/selector-native-debug.js b/lib/yui/3.5.0/build/selector-native/selector-native-debug.js
similarity index 71%
rename from lib/yui/3.4.1/build/selector-native/selector-native-debug.js
rename to lib/yui/3.5.0/build/selector-native/selector-native-debug.js
index dfa8b61975d..68b5ba2b672 100644
--- a/lib/yui/3.4.1/build/selector-native/selector-native-debug.js
+++ b/lib/yui/3.5.0/build/selector-native/selector-native-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -27,10 +27,32 @@ var COMPARE_DOCUMENT_POSITION = 'compareDocumentPosition',
OWNER_DOCUMENT = 'ownerDocument';
var Selector = {
- _foundCache: [],
+ _types: {
+ esc: {
+ token: '\uE000',
+ re: /\\[:\[\]\(\)#\.\'\>+~"]/gi
+ },
+
+ attr: {
+ token: '\uE001',
+ re: /(\[[^\]]*\])/g
+ },
+
+ pseudo: {
+ token: '\uE002',
+ re: /(\([^\)]*\))/g
+ }
+ },
useNative: true,
+ _escapeId: function(id) {
+ if (id) {
+ id = id.replace(/([:\[\]\(\)#\.'<>+~"])/g,'\\$1');
+ }
+ return id;
+ },
+
_compare: ('sourceIndex' in Y.config.doc.documentElement) ?
function(nodeA, nodeB) {
var a = nodeA.sourceIndex,
@@ -143,19 +165,74 @@ var Selector = {
},
+ _replaceSelector: function(selector) {
+ var esc = Y.Selector._parse('esc', selector), // pull escaped colon, brackets, etc.
+ attrs,
+ pseudos;
+
+ // first replace escaped chars, which could be present in attrs or pseudos
+ selector = Y.Selector._replace('esc', selector);
+
+ // then replace pseudos before attrs to avoid replacing :not([foo])
+ pseudos = Y.Selector._parse('pseudo', selector);
+ selector = Selector._replace('pseudo', selector);
+
+ attrs = Y.Selector._parse('attr', selector);
+ selector = Y.Selector._replace('attr', selector);
+
+ return {
+ esc: esc,
+ attrs: attrs,
+ pseudos: pseudos,
+ selector: selector
+ }
+ },
+
+ _restoreSelector: function(replaced) {
+ var selector = replaced.selector;
+ selector = Y.Selector._restore('attr', selector, replaced.attrs);
+ selector = Y.Selector._restore('pseudo', selector, replaced.pseudos);
+ selector = Y.Selector._restore('esc', selector, replaced.esc);
+ return selector;
+ },
+
+ _replaceCommas: function(selector) {
+ var replaced = Y.Selector._replaceSelector(selector),
+ selector = replaced.selector;
+
+ if (selector) {
+ selector = selector.replace(',', '\uE007', 'g');
+ replaced.selector = selector;
+ selector = Y.Selector._restoreSelector(replaced);
+ }
+ return selector;
+ },
+
// allows element scoped queries to begin with combinator
// e.g. query('> p', document.body) === query('body > p')
_splitQueries: function(selector, node) {
- var groups = selector.split(','),
+ if (selector.indexOf(',') > -1) {
+ selector = Y.Selector._replaceCommas(selector);
+ }
+
+ var groups = selector.split('\uE007'), // split on replaced comma token
queries = [],
prefix = '',
- i, len;
+ id,
+ i,
+ len;
if (node) {
// enforce for element scoping
- if (node.tagName) {
- node.id = node.id || Y.guid();
- prefix = '[id="' + node.id + '"] ';
+ if (node.nodeType === 1) { // Elements only
+ id = Y.Selector._escapeId(Y.DOM.getId(node));
+
+ if (!id) {
+ id = Y.guid();
+ Y.DOM.setId(node, id);
+ }
+
+ prefix = '[id="' + id + '"] ';
}
for (i = 0, len = groups.length; i < len; ++i) {
@@ -207,6 +284,7 @@ var Selector = {
item,
items,
frag,
+ id,
i, j, group;
if (node && node.tagName) { // only test HTMLElements
@@ -229,11 +307,14 @@ var Selector = {
}
root = root || node[OWNER_DOCUMENT];
- if (!node.id) {
- node.id = Y.guid();
+ id = Y.Selector._escapeId(Y.DOM.getId(node));
+ if (!id) {
+ id = Y.guid();
+ Y.DOM.setId(node, id);
}
+
for (i = 0; (group = groups[i++]);) { // TODO: off-dom test
- group += '[id="' + node.id + '"]';
+ group += '[id="' + id + '"]';
items = Y.Selector.query(group, root);
for (j = 0; item = items[j++];) {
@@ -269,6 +350,26 @@ var Selector = {
return Y.DOM.ancestor(element, function(n) {
return Y.Selector.test(n, selector);
}, testSelf);
+ },
+
+ _parse: function(name, selector) {
+ return selector.match(Y.Selector._types[name].re);
+ },
+
+ _replace: function(name, selector) {
+ var o = Y.Selector._types[name];
+ return selector.replace(o.re, o.token);
+ },
+
+ _restore: function(name, selector, items) {
+ if (items) {
+ var token = Y.Selector._types[name].token,
+ i, len;
+ for (i = 0, len = items.length; i < len; ++i) {
+ selector = selector.replace(token, items[i]);
+ }
+ }
+ return selector;
}
};
@@ -277,4 +378,4 @@ Y.mix(Y.Selector, Selector, true);
})(Y);
-}, '3.4.1' ,{requires:['dom-base']});
+}, '3.5.0' ,{requires:['dom-base']});
diff --git a/lib/yui/3.5.0/build/selector-native/selector-native-min.js b/lib/yui/3.5.0/build/selector-native/selector-native-min.js
new file mode 100644
index 00000000000..a3af50b6d4e
--- /dev/null
+++ b/lib/yui/3.5.0/build/selector-native/selector-native-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("selector-native",function(a){(function(e){e.namespace("Selector");var c="compareDocumentPosition",d="ownerDocument";var b={_types:{esc:{token:"\uE000",re:/\\[:\[\]\(\)#\.\'\>+~"]/gi},attr:{token:"\uE001",re:/(\[[^\]]*\])/g},pseudo:{token:"\uE002",re:/(\([^\)]*\))/g}},useNative:true,_escapeId:function(f){if(f){f=f.replace(/([:\[\]\(\)#\.'<>+~"])/g,"\\$1");}return f;},_compare:("sourceIndex" in e.config.doc.documentElement)?function(i,h){var g=i.sourceIndex,f=h.sourceIndex;if(g===f){return 0;}else{if(g>f){return 1;}}return -1;}:(e.config.doc.documentElement[c]?function(g,f){if(g[c](f)&4){return -1;}else{return 1;}}:function(j,i){var h,f,g;if(j&&i){h=j[d].createRange();h.setStart(j,0);f=i[d].createRange();f.setStart(i,0);g=h.compareBoundaryPoints(1,f);}return g;}),_sort:function(f){if(f){f=e.Array(f,0,true);if(f.sort){f.sort(b._compare);}}return f;},_deDupe:function(f){var g=[],h,j;for(h=0;(j=f[h++]);){if(!j._found){g[g.length]=j;j._found=true;}}for(h=0;(j=g[h++]);){j._found=null;j.removeAttribute("_found");}return g;},query:function(g,o,p,f){o=o||e.config.doc;var l=[],h=(e.Selector.useNative&&e.config.doc.querySelector&&!f),k=[[g,o]],m,q,j,n=(h)?e.Selector._nativeQuery:e.Selector._bruteQuery;if(g&&n){if(!f&&(!h||o.tagName)){k=b._splitQueries(g,o);}for(j=0;(m=k[j++]);){q=n(m[0],m[1],p);if(!p){q=e.Array(q,0,true);}if(q){l=l.concat(q);}}if(k.length>1){l=b._sort(b._deDupe(l));}}return(p)?(l[0]||null):l;},_replaceSelector:function(f){var g=e.Selector._parse("esc",f),h,i;f=e.Selector._replace("esc",f);i=e.Selector._parse("pseudo",f);f=b._replace("pseudo",f);h=e.Selector._parse("attr",f);f=e.Selector._replace("attr",f);return{esc:g,attrs:h,pseudos:i,selector:f};},_restoreSelector:function(g){var f=g.selector;f=e.Selector._restore("attr",f,g.attrs);f=e.Selector._restore("pseudo",f,g.pseudos);f=e.Selector._restore("esc",f,g.esc);return f;},_replaceCommas:function(f){var g=e.Selector._replaceSelector(f),f=g.selector;if(f){f=f.replace(",","\uE007","g");g.selector=f;f=e.Selector._restoreSelector(g);}return f;},_splitQueries:function(h,l){if(h.indexOf(",")>-1){h=e.Selector._replaceCommas(h);}var g=h.split("\uE007"),j=[],m="",n,k,f;if(l){if(l.nodeType===1){n=e.Selector._escapeId(e.DOM.getId(l));if(!n){n=e.guid();e.DOM.setId(l,n);}m='[id="'+n+'"] ';}for(k=0,f=g.length;k-1&&(e.Selector.pseudos&&e.Selector.pseudos.checked)){return e.Selector.query(f,g,h,true);}try{return g["querySelector"+(h?"":"All")](f);}catch(i){return e.Selector.query(f,g,h,true);}},filter:function(g,f){var h=[],j,k;if(g&&f){for(j=0;(k=g[j++]);){if(e.Selector.test(k,f)){h[h.length]=k;}}}else{}return h;},test:function(k,l,q){var o=false,g=false,h,r,u,p,t,f,n,m,s;if(k&&k.tagName){if(typeof l=="function"){o=l.call(k,k);}else{h=l.split(",");if(!q&&!e.DOM.inDoc(k)){r=k.parentNode;if(r){q=r;}else{t=k[d].createDocumentFragment();t.appendChild(k);q=t;g=true;}}q=q||k[d];f=e.Selector._escapeId(e.DOM.getId(k));if(!f){f=e.guid();e.DOM.setId(k,f);}for(n=0;(s=h[n++]);){s+='[id="'+f+'"]';p=e.Selector.query(s,q);for(m=0;u=p[m++];){if(u===k){o=true;break;}}if(o){break;}}if(g){t.removeChild(k);}}}return o;},ancestor:function(g,f,h){return e.DOM.ancestor(g,function(i){return e.Selector.test(i,f);},h);},_parse:function(g,f){return f.match(e.Selector._types[g].re);},_replace:function(g,f){var h=e.Selector._types[g];return f.replace(h.re,h.token);},_restore:function(j,g,h){if(h){var l=e.Selector._types[j].token,k,f;for(k=0,f=h.length;k+~"]/gi
+ },
+
+ attr: {
+ token: '\uE001',
+ re: /(\[[^\]]*\])/g
+ },
+
+ pseudo: {
+ token: '\uE002',
+ re: /(\([^\)]*\))/g
+ }
+ },
useNative: true,
+ _escapeId: function(id) {
+ if (id) {
+ id = id.replace(/([:\[\]\(\)#\.'<>+~"])/g,'\\$1');
+ }
+ return id;
+ },
+
_compare: ('sourceIndex' in Y.config.doc.documentElement) ?
function(nodeA, nodeB) {
var a = nodeA.sourceIndex,
@@ -142,19 +164,74 @@ var Selector = {
},
+ _replaceSelector: function(selector) {
+ var esc = Y.Selector._parse('esc', selector), // pull escaped colon, brackets, etc.
+ attrs,
+ pseudos;
+
+ // first replace escaped chars, which could be present in attrs or pseudos
+ selector = Y.Selector._replace('esc', selector);
+
+ // then replace pseudos before attrs to avoid replacing :not([foo])
+ pseudos = Y.Selector._parse('pseudo', selector);
+ selector = Selector._replace('pseudo', selector);
+
+ attrs = Y.Selector._parse('attr', selector);
+ selector = Y.Selector._replace('attr', selector);
+
+ return {
+ esc: esc,
+ attrs: attrs,
+ pseudos: pseudos,
+ selector: selector
+ }
+ },
+
+ _restoreSelector: function(replaced) {
+ var selector = replaced.selector;
+ selector = Y.Selector._restore('attr', selector, replaced.attrs);
+ selector = Y.Selector._restore('pseudo', selector, replaced.pseudos);
+ selector = Y.Selector._restore('esc', selector, replaced.esc);
+ return selector;
+ },
+
+ _replaceCommas: function(selector) {
+ var replaced = Y.Selector._replaceSelector(selector),
+ selector = replaced.selector;
+
+ if (selector) {
+ selector = selector.replace(',', '\uE007', 'g');
+ replaced.selector = selector;
+ selector = Y.Selector._restoreSelector(replaced);
+ }
+ return selector;
+ },
+
// allows element scoped queries to begin with combinator
// e.g. query('> p', document.body) === query('body > p')
_splitQueries: function(selector, node) {
- var groups = selector.split(','),
+ if (selector.indexOf(',') > -1) {
+ selector = Y.Selector._replaceCommas(selector);
+ }
+
+ var groups = selector.split('\uE007'), // split on replaced comma token
queries = [],
prefix = '',
- i, len;
+ id,
+ i,
+ len;
if (node) {
// enforce for element scoping
- if (node.tagName) {
- node.id = node.id || Y.guid();
- prefix = '[id="' + node.id + '"] ';
+ if (node.nodeType === 1) { // Elements only
+ id = Y.Selector._escapeId(Y.DOM.getId(node));
+
+ if (!id) {
+ id = Y.guid();
+ Y.DOM.setId(node, id);
+ }
+
+ prefix = '[id="' + id + '"] ';
}
for (i = 0, len = groups.length; i < len; ++i) {
@@ -202,6 +279,7 @@ var Selector = {
item,
items,
frag,
+ id,
i, j, group;
if (node && node.tagName) { // only test HTMLElements
@@ -224,11 +302,14 @@ var Selector = {
}
root = root || node[OWNER_DOCUMENT];
- if (!node.id) {
- node.id = Y.guid();
+ id = Y.Selector._escapeId(Y.DOM.getId(node));
+ if (!id) {
+ id = Y.guid();
+ Y.DOM.setId(node, id);
}
+
for (i = 0; (group = groups[i++]);) { // TODO: off-dom test
- group += '[id="' + node.id + '"]';
+ group += '[id="' + id + '"]';
items = Y.Selector.query(group, root);
for (j = 0; item = items[j++];) {
@@ -264,6 +345,26 @@ var Selector = {
return Y.DOM.ancestor(element, function(n) {
return Y.Selector.test(n, selector);
}, testSelf);
+ },
+
+ _parse: function(name, selector) {
+ return selector.match(Y.Selector._types[name].re);
+ },
+
+ _replace: function(name, selector) {
+ var o = Y.Selector._types[name];
+ return selector.replace(o.re, o.token);
+ },
+
+ _restore: function(name, selector, items) {
+ if (items) {
+ var token = Y.Selector._types[name].token,
+ i, len;
+ for (i = 0, len = items.length; i < len; ++i) {
+ selector = selector.replace(token, items[i]);
+ }
+ }
+ return selector;
}
};
@@ -272,4 +373,4 @@ Y.mix(Y.Selector, Selector, true);
})(Y);
-}, '3.4.1' ,{requires:['dom-base']});
+}, '3.5.0' ,{requires:['dom-base']});
diff --git a/lib/yui/3.5.0/build/selector/selector-debug.js b/lib/yui/3.5.0/build/selector/selector-debug.js
new file mode 100644
index 00000000000..26f6eb969b9
--- /dev/null
+++ b/lib/yui/3.5.0/build/selector/selector-debug.js
@@ -0,0 +1,12 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add('selector', function(Y) {
+
+
+
+
+}, '3.5.0' ,{requires:['selector-native']});
diff --git a/lib/yui/3.5.0/build/selector/selector-min.js b/lib/yui/3.5.0/build/selector/selector-min.js
new file mode 100644
index 00000000000..f5eba3c5ece
--- /dev/null
+++ b/lib/yui/3.5.0/build/selector/selector-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("selector",function(a){},"3.5.0",{requires:["selector-native"]});
\ No newline at end of file
diff --git a/lib/yui/3.5.0/build/selector/selector.js b/lib/yui/3.5.0/build/selector/selector.js
new file mode 100644
index 00000000000..26f6eb969b9
--- /dev/null
+++ b/lib/yui/3.5.0/build/selector/selector.js
@@ -0,0 +1,12 @@
+/*
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add('selector', function(Y) {
+
+
+
+
+}, '3.5.0' ,{requires:['selector-native']});
diff --git a/lib/yui/3.4.1/build/shim-plugin/shim-plugin-debug.js b/lib/yui/3.5.0/build/shim-plugin/shim-plugin-debug.js
similarity index 95%
rename from lib/yui/3.4.1/build/shim-plugin/shim-plugin-debug.js
rename to lib/yui/3.5.0/build/shim-plugin/shim-plugin-debug.js
index 1904b811161..3216baa2599 100644
--- a/lib/yui/3.4.1/build/shim-plugin/shim-plugin-debug.js
+++ b/lib/yui/3.5.0/build/shim-plugin/shim-plugin-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -109,4 +109,4 @@ YUI.add('shim-plugin', function(Y) {
Y.Plugin.Shim = Shim;
-}, '3.4.1' ,{requires:['node-style', 'node-pluginhost']});
+}, '3.5.0' ,{requires:['node-style', 'node-pluginhost']});
diff --git a/lib/yui/3.4.1/build/shim-plugin/shim-plugin-min.js b/lib/yui/3.5.0/build/shim-plugin/shim-plugin-min.js
similarity index 88%
rename from lib/yui/3.4.1/build/shim-plugin/shim-plugin-min.js
rename to lib/yui/3.5.0/build/shim-plugin/shim-plugin-min.js
index 599711f905f..bf24913177d 100644
--- a/lib/yui/3.4.1/build/shim-plugin/shim-plugin-min.js
+++ b/lib/yui/3.5.0/build/shim-plugin/shim-plugin-min.js
@@ -1,7 +1,7 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
-YUI.add("shim-plugin",function(b){function a(c){this.init(c);}a.CLASS_NAME="yui-node-shim";a.TEMPLATE='';a.prototype={init:function(c){this._host=c.host;this.initEvents();this.insert();this.sync();},initEvents:function(){this._resizeHandle=this._host.on("resize",this.sync,this);},getShim:function(){return this._shim||(this._shim=b.Node.create(a.TEMPLATE,this._host.get("ownerDocument")));},insert:function(){var c=this._host;this._shim=c.insertBefore(this.getShim(),c.get("firstChild"));},sync:function(){var d=this._shim,c=this._host;if(d){d.setAttrs({width:c.getStyle("width"),height:c.getStyle("height")});}},destroy:function(){var c=this._shim;if(c){c.remove(true);}this._resizeHandle.detach();}};a.NAME="Shim";a.NS="shim";b.namespace("Plugin");b.Plugin.Shim=a;},"3.4.1",{requires:["node-style","node-pluginhost"]});
\ No newline at end of file
+YUI.add("shim-plugin",function(b){function a(c){this.init(c);}a.CLASS_NAME="yui-node-shim";a.TEMPLATE='';a.prototype={init:function(c){this._host=c.host;this.initEvents();this.insert();this.sync();},initEvents:function(){this._resizeHandle=this._host.on("resize",this.sync,this);},getShim:function(){return this._shim||(this._shim=b.Node.create(a.TEMPLATE,this._host.get("ownerDocument")));},insert:function(){var c=this._host;this._shim=c.insertBefore(this.getShim(),c.get("firstChild"));},sync:function(){var d=this._shim,c=this._host;if(d){d.setAttrs({width:c.getStyle("width"),height:c.getStyle("height")});}},destroy:function(){var c=this._shim;if(c){c.remove(true);}this._resizeHandle.detach();}};a.NAME="Shim";a.NS="shim";b.namespace("Plugin");b.Plugin.Shim=a;},"3.5.0",{requires:["node-style","node-pluginhost"]});
\ No newline at end of file
diff --git a/lib/yui/3.4.1/build/shim-plugin/shim-plugin.js b/lib/yui/3.5.0/build/shim-plugin/shim-plugin.js
similarity index 95%
rename from lib/yui/3.4.1/build/shim-plugin/shim-plugin.js
rename to lib/yui/3.5.0/build/shim-plugin/shim-plugin.js
index 1904b811161..3216baa2599 100644
--- a/lib/yui/3.4.1/build/shim-plugin/shim-plugin.js
+++ b/lib/yui/3.5.0/build/shim-plugin/shim-plugin.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -109,4 +109,4 @@ YUI.add('shim-plugin', function(Y) {
Y.Plugin.Shim = Shim;
-}, '3.4.1' ,{requires:['node-style', 'node-pluginhost']});
+}, '3.5.0' ,{requires:['node-style', 'node-pluginhost']});
diff --git a/lib/yui/3.4.1/build/simpleyui/simpleyui-debug.js b/lib/yui/3.5.0/build/simpleyui/simpleyui-debug.js
similarity index 76%
rename from lib/yui/3.4.1/build/simpleyui/simpleyui-debug.js
rename to lib/yui/3.5.0/build/simpleyui/simpleyui-debug.js
index ee172912172..0c46741596a 100644
--- a/lib/yui/3.4.1/build/simpleyui/simpleyui-debug.js
+++ b/lib/yui/3.5.0/build/simpleyui/simpleyui-debug.js
@@ -1,6 +1,6 @@
/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
+YUI 3.5.0 (build 5089)
+Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
@@ -17,30 +17,43 @@ if (typeof YUI != 'undefined') {
}
/**
- * The YUI global namespace object. If YUI is already defined, the
- * existing YUI object will not be overwritten so that defined
- * namespaces are preserved. It is the constructor for the object
- * the end user interacts with. As indicated below, each instance
- * has full custom event support, but only if the event system
- * is available. This is a self-instantiable factory function. You
- * can invoke it directly like this:
- *
- * YUI().use('*', function(Y) {
- * // ready
- * });
- *
- * But it also works like this:
- *
- * var Y = YUI();
- *
- * @class YUI
- * @constructor
- * @global
- * @uses EventTarget
- * @param o* {object} 0..n optional configuration objects. these values
- * are store in Y.config. See Config for the list of supported
- * properties.
- */
+The YUI global namespace object. If YUI is already defined, the
+existing YUI object will not be overwritten so that defined
+namespaces are preserved. It is the constructor for the object
+the end user interacts with. As indicated below, each instance
+has full custom event support, but only if the event system
+is available. This is a self-instantiable factory function. You
+can invoke it directly like this:
+
+ YUI().use('*', function(Y) {
+ // ready
+ });
+
+But it also works like this:
+
+ var Y = YUI();
+
+Configuring the YUI object:
+
+ YUI({
+ debug: true,
+ combine: false
+ }).use('node', function(Y) {
+ //Node is ready to use
+ });
+
+See the API docs for the Config class
+for the complete list of supported configuration properties accepted
+by the YUI constuctor.
+
+@class YUI
+@constructor
+@global
+@uses EventTarget
+@param [o]* {Object} 0..n optional configuration objects. these values
+are store in Y.config. See Config for the list of supported
+properties.
+*/
/*global YUI*/
/*global YUI_config*/
var YUI = function() {
@@ -59,17 +72,62 @@ if (typeof YUI != 'undefined') {
// set up the core environment
Y._init();
- // YUI.GlobalConfig is a master configuration that might span
- // multiple contexts in a non-browser environment. It is applied
- // first to all instances in all contexts.
+ /**
+ YUI.GlobalConfig is a master configuration that might span
+ multiple contexts in a non-browser environment. It is applied
+ first to all instances in all contexts.
+ @property GlobalConfig
+ @type {Object}
+ @global
+ @static
+ @example
+
+
+ YUI.GlobalConfig = {
+ filter: 'debug'
+ };
+
+ YUI().use('node', function(Y) {
+ //debug files used here
+ });
+
+ YUI({
+ filter: 'min'
+ }).use('node', function(Y) {
+ //min files used here
+ });
+
+ */
if (YUI.GlobalConfig) {
Y.applyConfig(YUI.GlobalConfig);
}
- // YUI_Config is a page-level config. It is applied to all
- // instances created on the page. This is applied after
- // YUI.GlobalConfig, and before the instance level configuration
- // objects.
+ /**
+ YUI_config is a page-level config. It is applied to all
+ instances created on the page. This is applied after
+ YUI.GlobalConfig, and before the instance level configuration
+ objects.
+ @global
+ @property YUI_config
+ @type {Object}
+ @example
+
+
+ //Single global var to include before YUI seed file
+ YUI_config = {
+ filter: 'debug'
+ };
+
+ YUI().use('node', function(Y) {
+ //debug files used here
+ });
+
+ YUI({
+ filter: 'min'
+ }).use('node', function(Y) {
+ //min files used here
+ });
+ */
if (gconf) {
Y.applyConfig(gconf);
}
@@ -100,10 +158,11 @@ if (typeof YUI != 'undefined') {
(function() {
var proto, prop,
- VERSION = '3.4.1',
+ VERSION = '3.5.0',
PERIOD = '.',
BASE = 'http://yui.yahooapis.com/',
DOC_LABEL = 'yui3-js-enabled',
+ CSS_STAMP_EL = 'yui3-css-stamp',
NOOP = function() {},
SLICE = Array.prototype.slice,
APPLY_TO_AUTH = { 'io.xdrReady': 1, // the functions applyTo
@@ -153,6 +212,7 @@ if (typeof YUI != 'undefined') {
loader = new Y.Loader(Y.config);
Y.Env._loader = loader;
}
+ YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, [ 'loader-base', 'loader-rollup', 'loader-yui3' ]));
return loader;
},
@@ -188,7 +248,7 @@ proto = {
* update the loader cache if necessary. Updating Y.config directly
* will not update the cache.
* @method applyConfig
- * @param {object} the configuration object.
+ * @param {Object} o the configuration object.
* @since 3.2.0
*/
applyConfig: function(o) {
@@ -201,7 +261,7 @@ proto = {
config = this.config,
mods = config.modules,
groups = config.groups,
- rls = config.rls,
+ aliases = config.aliases,
loader = this.Env._loader;
for (name in o) {
@@ -209,13 +269,13 @@ proto = {
attr = o[name];
if (mods && name == 'modules') {
clobber(mods, attr);
+ } else if (aliases && name == 'aliases') {
+ clobber(aliases, attr);
} else if (groups && name == 'groups') {
clobber(groups, attr);
- } else if (rls && name == 'rls') {
- clobber(rls, attr);
} else if (name == 'win') {
- config[name] = attr.contentWindow || attr;
- config.doc = config[name].document;
+ config[name] = (attr && attr.contentWindow) || attr;
+ config.doc = config[name] ? config[name].document : null;
} else if (name == '_yuid') {
// preserve the guid
} else {
@@ -227,6 +287,7 @@ proto = {
if (loader) {
loader._config(o);
}
+
},
/**
* Old way to apply a config to the instance (calls `applyConfig` under the hood)
@@ -244,7 +305,7 @@ proto = {
* @method _init
*/
_init: function() {
- var filter,
+ var filter, el,
Y = this,
G_ENV = YUI.Env,
Env = Y.Env,
@@ -259,6 +320,7 @@ proto = {
if (!Env) {
Y.Env = {
+ core: ['get','features','intl-base','yui-log','yui-later'],
mods: {}, // flat module map
versions: {}, // version module map
base: BASE,
@@ -276,7 +338,7 @@ proto = {
// Regex in English:
// I'll start at the \b(simpleyui).
// 1. Look in the test string for "simpleyui" or "yui" or
- // "yui-base" or "yui-rls" or "yui-foobar" that comes after a word break. That is, it
+ // "yui-base" or "yui-davglass" or "yui-foobar" that comes after a word break. That is, it
// can't match "foyui" or "i_heart_simpleyui". This can be anywhere in the string.
// 2. After #1 must come a forward slash followed by the string matched in #1, so
// "yui-base/yui-base" or "simpleyui/simpleyui" or "yui-pants/yui-pants".
@@ -285,7 +347,7 @@ proto = {
// 4. This is followed by ".js", so "yui/yui.js", "simpleyui/simpleyui-min.js"
// 0. Going back to the beginning, now. If all that stuff in 1-4 comes after a "?" in the string,
// then capture the junk between the LAST "&" and the string in 1-4. So
- // "blah?foo/yui/yui.js" will capture "foo/" and "blah?some/thing.js&3.3.0/build/yui-rls/yui-rls.js"
+ // "blah?foo/yui/yui.js" will capture "foo/" and "blah?some/thing.js&3.3.0/build/yui-davglass/yui-davglass.js"
// will capture "3.3.0/build/"
//
// Regex Exploded:
@@ -380,26 +442,29 @@ proto = {
// configuration defaults
Y.config = Y.config || {
- win: win,
- doc: doc,
- debug: true,
- useBrowserConsole: true,
- throwFail: true,
bootstrap: true,
cacheUse: true,
+ debug: true,
+ doc: doc,
fetchCSS: true,
- use_rls: false,
- rls_timeout: 2000
+ throwFail: true,
+ useBrowserConsole: true,
+ useNativeES5: true,
+ win: win
};
- if (YUI.Env.rls_disabled) {
- Y.config.use_rls = false;
+ //Register the CSS stamp element
+ if (doc && !doc.getElementById(CSS_STAMP_EL)) {
+ el = doc.createElement('div');
+ el.innerHTML = '';
+ YUI.Env.cssStampEl = el.firstChild;
+ docEl.insertBefore(YUI.Env.cssStampEl, docEl.firstChild);
}
Y.config.lang = Y.config.lang || 'en-US';
Y.config.base = YUI.config.base || Y.Env.getBase(Y.Env._BASE_RE);
-
+
if (!filter || (!('mindebug').indexOf(filter))) {
filter = 'min';
}
@@ -418,7 +483,8 @@ proto = {
var i, Y = this,
core = [],
mods = YUI.Env.mods,
- extras = Y.config.core || ['get','features','intl-base','yui-log','yui-later'];
+ //extras = Y.config.core || ['get','features','intl-base','yui-log','yui-later'];
+ extras = Y.config.core || [].concat(YUI.Env.core); //Clone it..
for (i = 0; i < extras.length; i++) {
if (mods[extras[i]]) {
@@ -429,6 +495,10 @@ proto = {
Y._attach(['yui-base']);
Y._attach(core);
+ if (Y.Loader) {
+ getLoader(Y);
+ }
+
// Y.log(Y.id + ' initialized', 'info', 'yui');
},
@@ -458,39 +528,47 @@ proto = {
this.log('applyTo not found: ' + method, 'warn', 'yui');
}
}
- return m.apply(instance, args);
+ return m && m.apply(instance, args);
}
return null;
},
- /**
- * Registers a module with the YUI global. The easiest way to create a
- * first-class YUI module is to use the YUI component build tool.
- *
- * http://yuilibrary.com/projects/builder
- *
- * The build system will produce the `YUI.add` wrapper for you module, along
- * with any configuration info required for the module.
- * @method add
- * @param name {String} module name.
- * @param fn {Function} entry point into the module that
- * is used to bind module to the YUI instance.
- * @param version {String} version string.
- * @param details {Object} optional config data:
- * @param details.requires {Array} features that must be present before this module can be attached.
- * @param details.optional {Array} optional features that should be present if loadOptional
- * is defined. Note: modules are not often loaded this way in YUI 3,
- * but this field is still useful to inform the user that certain
- * features in the component will require additional dependencies.
- * @param details.use {Array} features that are included within this module which need to
- * be attached automatically when this module is attached. This
- * supports the YUI 3 rollup system -- a module with submodules
- * defined will need to have the submodules listed in the 'use'
- * config. The YUI component build tool does this for you.
- * @return {YUI} the YUI instance.
- *
- */
+/**
+Registers a module with the YUI global. The easiest way to create a
+first-class YUI module is to use the YUI component build tool.
+
+http://yuilibrary.com/projects/builder
+
+The build system will produce the `YUI.add` wrapper for you module, along
+with any configuration info required for the module.
+@method add
+@param name {String} module name.
+@param fn {Function} entry point into the module that is used to bind module to the YUI instance.
+@param {YUI} fn.Y The YUI instance this module is executed in.
+@param {String} fn.name The name of the module
+@param version {String} version string.
+@param details {Object} optional config data:
+@param details.requires {Array} features that must be present before this module can be attached.
+@param details.optional {Array} optional features that should be present if loadOptional
+ is defined. Note: modules are not often loaded this way in YUI 3,
+ but this field is still useful to inform the user that certain
+ features in the component will require additional dependencies.
+@param details.use {Array} features that are included within this module which need to
+ be attached automatically when this module is attached. This
+ supports the YUI 3 rollup system -- a module with submodules
+ defined will need to have the submodules listed in the 'use'
+ config. The YUI component build tool does this for you.
+@return {YUI} the YUI instance.
+@example
+
+ YUI.add('davglass', function(Y, name) {
+ Y.davglass = function() {
+ alert('Dav was here!');
+ };
+ }, '3.4.0', { requires: ['yui-base', 'harley-davidson', 'mt-dew'] });
+
+*/
add: function(name, fn, version, details) {
details = details || {};
var env = YUI.Env,
@@ -511,7 +589,7 @@ proto = {
if (instances.hasOwnProperty(i)) {
loader = instances[i].Env._loader;
if (loader) {
- if (!loader.moduleInfo[name]) {
+ if (!loader.moduleInfo[name] || loader.moduleInfo[name].temp) {
loader.addModule(details, name);
}
}
@@ -524,6 +602,8 @@ proto = {
/**
* Executes the function associated with each required
* module, binding the module to the YUI instance.
+ * @param {Array} r The array of modules to attach
+ * @param {Boolean} [moot=false] Don't throw a warning if the module is not attached
* @method _attach
* @private
*/
@@ -532,42 +612,59 @@ proto = {
mods = YUI.Env.mods,
aliases = YUI.Env.aliases,
Y = this, j,
+ loader = Y.Env._loader,
done = Y.Env._attached,
- len = r.length, loader;
+ len = r.length, loader,
+ c = [];
- //console.info('attaching: ' + r, 'info', 'yui');
+ //Check for conditional modules (in a second+ instance) and add their requirements
+ //TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass
+ for (i = 0; i < len; i++) {
+ name = r[i];
+ mod = mods[name];
+ c.push(name);
+ if (loader && loader.conditions[name]) {
+ Y.Object.each(loader.conditions[name], function(def) {
+ var go = def && ((def.ua && Y.UA[def.ua]) || (def.test && def.test(Y)));
+ if (go) {
+ c.push(def.name);
+ }
+ });
+ }
+ }
+ r = c;
+ len = r.length;
for (i = 0; i < len; i++) {
if (!done[r[i]]) {
name = r[i];
mod = mods[name];
+
if (aliases && aliases[name]) {
Y._attach(aliases[name]);
continue;
}
if (!mod) {
- loader = Y.Env._loader;
if (loader && loader.moduleInfo[name]) {
mod = loader.moduleInfo[name];
- if (mod.use) {
- moot = true;
- }
+ moot = true;
}
// Y.log('no js def for: ' + name, 'info', 'yui');
//if (!loader || !loader.moduleInfo[name]) {
//if ((!loader || !loader.moduleInfo[name]) && !moot) {
- if (!moot) {
- if (name.indexOf('skin-') === -1) {
+ if (!moot && name) {
+ if ((name.indexOf('skin-') === -1) && (name.indexOf('css') === -1)) {
Y.Env._missed.push(name);
+ Y.Env._missed = Y.Array.dedupe(Y.Env._missed);
Y.message('NOT loaded: ' + name, 'warn', 'yui');
}
}
} else {
done[name] = true;
//Don't like this, but in case a mod was asked for once, then we fetch it
- //We need to remove it from the missed list
+ //We need to remove it from the missed list ^davglass
for (j = 0; j < Y.Env._missed.length; j++) {
if (Y.Env._missed[j] === name) {
Y.message('Found: ' + name + ' (was reported as missing earlier)', 'warn', 'yui');
@@ -653,10 +750,12 @@ proto = {
* asynchronously.
*
* @method use
- * @param modules* {String} 1-n modules to bind (uses arguments array).
- * @param *callback {Function} callback function executed when
+ * @param modules* {String|Array} 1-n modules to bind (uses arguments array).
+ * @param [callback] {Function} callback function executed when
* the instance has the required functionality. If included, it
* must be the last parameter.
+ * @param callback.Y {YUI} The `YUI` instance created for this sandbox
+ * @param callback.data {Object} Object data returned from `Loader`.
*
* @example
* // loads and attaches dd and its dependencies
@@ -681,6 +780,7 @@ proto = {
callback = args[args.length - 1],
Y = this,
i = 0,
+ a = [],
name,
Env = Y.Env,
provisioned = true;
@@ -712,23 +812,6 @@ proto = {
}
}
- if (Y.config.cacheUse) {
- while ((name = args[i++])) {
- if (!Env._attached[name]) {
- provisioned = false;
- break;
- }
- }
-
- if (provisioned) {
- if (args.length) {
- Y.log('already provisioned: ' + args, 'info', 'yui');
- }
- Y._notify(callback, ALREADY_DONE, args);
- return Y;
- }
- }
-
if (Y._loading) {
Y._useQueue = Y._useQueue || new Y.Queue();
Y._useQueue.add([args, callback]);
@@ -759,7 +842,7 @@ proto = {
}
}
},
-
+
/**
* This private method is called from the `use` method queue. To ensure that only one set of loading
* logic is performed at a time.
@@ -782,6 +865,7 @@ proto = {
mods = G_ENV.mods,
Env = Y.Env,
used = Env._used,
+ aliases = G_ENV.aliases,
queue = G_ENV._loaderQueue,
firstArg = args[0],
YArray = Y.Array,
@@ -793,10 +877,23 @@ proto = {
fetchCSS = config.fetchCSS,
process = function(names, skip) {
+ var i = 0, a = [];
+
if (!names.length) {
return;
}
+ if (aliases) {
+ for (i = 0; i < names.length; i++) {
+ if (aliases[names[i]]) {
+ a = [].concat(a, aliases[names[i]]);
+ } else {
+ a.push(names[i]);
+ }
+ }
+ names = a;
+ }
+
YArray.each(names, function(name) {
// add this module to full list of things to attach
@@ -846,7 +943,6 @@ proto = {
ret = true,
data = response.data;
-
Y._loading = false;
if (data) {
@@ -864,8 +960,8 @@ proto = {
}
if (redo && data) {
- Y._loading = false;
- Y._use(args, function() {
+ Y._loading = true;
+ Y._use(missing, function() {
Y.log('Nested use callback: ' + data, 'info', 'yui');
if (Y._attach(data)) {
Y._notify(callback, response, data);
@@ -898,6 +994,11 @@ proto = {
return Y;
}
+ if (mods['loader'] && !Y.Loader) {
+ Y.log('Loader was found in meta, but it is not attached. Attaching..', 'info', 'yui');
+ Y._attach(['loader']);
+ }
+
// Y.log('before loader requirements: ' + args, 'info', 'yui');
// use loader to expand dependencies and sort the
@@ -906,8 +1007,10 @@ proto = {
loader = getLoader(Y);
loader.require(args);
loader.ignoreRegistered = true;
+ loader._boot = true;
loader.calculate(null, (fetchCSS) ? null : 'js');
args = loader.sorted;
+ loader._boot = false;
}
// process each requirement and any additional requirements
@@ -922,6 +1025,7 @@ proto = {
Y.log('Modules missing: ' + missing + ', ' + missing.length, 'info', 'yui');
}
+
// dynamic load
if (boot && len && Y.Loader) {
// Y.log('Using loader to fetch missing deps: ' + missing, 'info', 'yui');
@@ -934,49 +1038,6 @@ Y.log('Modules missing: ' + missing + ', ' + missing.length, 'info', 'yui');
loader.ignoreRegistered = false;
loader.require(args);
loader.insert(null, (fetchCSS) ? null : 'js');
- // loader.partial(missing, (fetchCSS) ? null : 'js');
-
- } else if (len && Y.config.use_rls && !YUI.Env.rls_enabled) {
-
- G_ENV._rls_queue = G_ENV._rls_queue || new Y.Queue();
-
- // server side loader service
- handleRLS = function(instance, argz) {
-
- var rls_end = function(o) {
- handleLoader(o);
- instance.rls_advance();
- },
- rls_url = instance._rls(argz);
-
- if (rls_url) {
- Y.log('Fetching RLS url', 'info', 'rls');
- instance.rls_oncomplete(function(o) {
- rls_end(o);
- });
- instance.Get.script(rls_url, {
- data: argz,
- timeout: instance.config.rls_timeout,
- onFailure: instance.rls_handleFailure,
- onTimeout: instance.rls_handleTimeout
- });
- } else {
- rls_end({
- data: argz
- });
- }
- };
-
- G_ENV._rls_queue.add(function() {
- Y.log('executing queued rls request', 'info', 'rls');
- G_ENV._rls_in_progress = true;
- Y.rls_callback = callback;
- Y.rls_locals(Y, args, handleRLS);
- });
-
- if (!G_ENV._rls_in_progress && G_ENV._rls_queue.size()) {
- G_ENV._rls_queue.next()();
- }
} else if (boot && len && Y.Get && !Env.bootstrapped) {
@@ -1016,32 +1077,45 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
/**
- * Returns the namespace specified and creates it if it doesn't exist
- *
- * YUI.namespace("property.package");
- * YUI.namespace("YAHOO.property.package");
- *
- * Either of the above would create `YUI.property`, then
- * `YUI.property.package` (`YAHOO` is scrubbed out, this is
- * to remain compatible with YUI2)
- *
- * Be careful when naming packages. Reserved words may work in some browsers
- * and not others. For instance, the following will fail in Safari:
- *
- * YUI.namespace("really.long.nested.namespace");
- *
- * This fails because "long" is a future reserved word in ECMAScript
- *
- * @method namespace
- * @param {string*} arguments 1-n namespaces to create.
- * @return {object} A reference to the last namespace object created.
- */
+ Adds a namespace object onto the YUI global if called statically.
+
+ // creates YUI.your.namespace.here as nested objects
+ YUI.namespace("your.namespace.here");
+
+ If called as a method on a YUI instance, it creates the
+ namespace on the instance.
+
+ // creates Y.property.package
+ Y.namespace("property.package");
+
+ Dots in the input string cause `namespace` to create nested objects for
+ each token. If any part of the requested namespace already exists, the
+ current object will be left in place. This allows multiple calls to
+ `namespace` to preserve existing namespaced properties.
+
+ If the first token in the namespace string is "YAHOO", the token is
+ discarded.
+
+ Be careful with namespace tokens. Reserved words may work in some browsers
+ and not others. For instance, the following will fail in some browsers
+ because the supported version of JavaScript reserves the word "long":
+
+ Y.namespace("really.long.nested.namespace");
+
+ Note: If you pass multiple arguments to create multiple namespaces, only
+ the last one created is returned from this function.
+
+ @method namespace
+ @param {String} namespace* namespaces to create.
+ @return {Object} A reference to the last namespace object created.
+ **/
namespace: function() {
- var a = arguments, o = this, i = 0, j, d, arg;
+ var a = arguments, o, i = 0, j, d, arg;
+
for (; i < a.length; i++) {
- // d = ('' + a[i]).split('.');
+ o = this; //Reset base object per argument or it will get reused from the last
arg = a[i];
- if (arg.indexOf(PERIOD)) {
+ if (arg.indexOf(PERIOD) > -1) { //Skip this if no "." is present
d = arg.split(PERIOD);
for (j = (d[0] == 'YAHOO') ? 1 : 0; j < d.length; j++) {
o[d[j]] = o[d[j]] || {};
@@ -1049,6 +1123,7 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
}
} else {
o[arg] = o[arg] || {};
+ o = o[arg]; //Reset base object to the new object so it's returned
}
}
return o;
@@ -1061,18 +1136,20 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
dump: function (o) { return ''+o; },
/**
- * Report an error. The reporting mechanism is controled by
+ * Report an error. The reporting mechanism is controlled by
* the `throwFail` configuration attribute. If throwFail is
* not specified, the message is written to the Logger, otherwise
- * a JS error is thrown
+ * a JS error is thrown. If an `errorFn` is specified in the config
+ * it must return `true` to keep the error from being thrown.
* @method error
* @param msg {String} the error message.
* @param e {Error|String} Optional JS error that was caught, or an error string.
- * @param data Optional additional info
+ * @param src Optional additional info (passed to `Y.config.errorFn` and `Y.message`)
* and `throwFail` is specified, this error will be re-thrown.
* @return {YUI} this YUI instance.
*/
- error: function(msg, e, data) {
+ error: function(msg, e, src) {
+ //TODO Add check for window.onerror here
var Y = this, ret;
@@ -1083,7 +1160,7 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
if (Y.config.throwFail && !ret) {
throw (e || new Error(msg));
} else {
- Y.message(msg, 'error'); // don't scrub this one
+ Y.message(msg, 'error', ''+src); // don't scrub this one
}
return Y;
@@ -1157,12 +1234,12 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
* memory leak in IE when the item tested is
* window/document
* @method instanceOf
+ * @param o {Object} The object to check.
+ * @param type {Object} The class to check against.
* @since 3.3.0
*/
};
-
-
YUI.prototype = proto;
// inheritance utilities are not available yet
@@ -1172,6 +1249,52 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
}
}
+ /**
+Static method on the Global YUI object to apply a config to all YUI instances.
+It's main use case is "mashups" where several third party scripts are trying to write to
+a global YUI config at the same time. This way they can all call `YUI.applyConfig({})` instead of
+overwriting other scripts configs.
+@static
+@since 3.5.0
+@method applyConfig
+@param {Object} o the configuration object.
+@example
+
+ YUI.applyConfig({
+ modules: {
+ davglass: {
+ fullpath: './davglass.js'
+ }
+ }
+ });
+
+ YUI.applyConfig({
+ modules: {
+ foo: {
+ fullpath: './foo.js'
+ }
+ }
+ });
+
+ YUI().use('davglass', function(Y) {
+ //Module davglass will be available here..
+ });
+
+ */
+ YUI.applyConfig = function(o) {
+ if (!o) {
+ return;
+ }
+ //If there is a GlobalConfig, apply it first to set the defaults
+ if (YUI.GlobalConfig) {
+ this.prototype.applyConfig.call(this, YUI.GlobalConfig);
+ }
+ //Apply this config to it
+ this.prototype.applyConfig.call(this, o);
+ //Reset GlobalConfig to the combined config
+ YUI.GlobalConfig = this.config;
+ };
+
// set up the environment
YUI._init();
@@ -1218,6 +1341,14 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
* @default true
*/
+/**
+ * Turns on writing Ylog messages to the browser console.
+ *
+ * @property debug
+ * @type boolean
+ * @default true
+ */
+
/**
* Log to the browser console if debug is on and the browser has a
* supported console.
@@ -1279,10 +1410,11 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
*/
/**
- * A list of modules that defines the YUI core (overrides the default).
+ * A list of modules that defines the YUI core (overrides the default list).
*
* @property core
- * @type string[]
+ * @type Array
+ * @default [ get,features,intl-base,yui-log,yui-later,loader-base, loader-rollup, loader-yui3 ]
*/
/**
@@ -1380,7 +1512,7 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
*
* You can also define a custom filter, which must be an object literal
* containing a search expression and a replace string:
- *
+ *
* myFilter: {
* 'searchExp': "-min\\.js",
* 'replaceStr': "-debug.js"
@@ -1504,42 +1636,68 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
* for the module. See `Loader.addModule` for the supported module
* metadata fields. Also see groups, which provides a way to
* configure the base and combo spec for a set of modules.
- *
+ *
* modules: {
* mymod1: {
* requires: ['node'],
- * fullpath: 'http://myserver.mydomain.com/mymod1/mymod1.js'
+ * fullpath: '/mymod1/mymod1.js'
* },
* mymod2: {
* requires: ['mymod1'],
- * fullpath: 'http://myserver.mydomain.com/mymod2/mymod2.js'
- * }
+ * fullpath: '/mymod2/mymod2.js'
+ * },
+ * mymod3: '/js/mymod3.js',
+ * mycssmod: '/css/mycssmod.css'
* }
*
+ *
* @property modules
* @type object
*/
+/**
+ * Aliases are dynamic groups of modules that can be used as
+ * shortcuts.
+ *
+ * YUI({
+ * aliases: {
+ * davglass: [ 'node', 'yql', 'dd' ],
+ * mine: [ 'davglass', 'autocomplete']
+ * }
+ * }).use('mine', function(Y) {
+ * //Node, YQL, DD & AutoComplete available here..
+ * });
+ *
+ * @property aliases
+ * @type object
+ */
+
/**
* A hash of module group definitions. It for each group you
* can specify a list of modules and the base path and
* combo spec to use when dynamically loading the modules.
- *
+ *
* groups: {
* yui2: {
* // specify whether or not this group has a combo service
* combine: true,
- *
+ *
+ * // The comboSeperator to use with this group's combo handler
+ * comboSep: ';',
+ *
+ * // The maxURLLength for this server
+ * maxURLLength: 500,
+ *
* // the base path for non-combo paths
* base: 'http://yui.yahooapis.com/2.8.0r4/build/',
- *
+ *
* // the path to the combo service
* comboBase: 'http://yui.yahooapis.com/combo?',
- *
+ *
* // a fragment to prepend to the path attribute when
* // when building combo urls
* root: '2.8.0r4/build/',
- *
+ *
* // the module definitions
* modules: {
* yui2_yde: {
@@ -1552,7 +1710,7 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
* }
* }
* }
- *
+ *
* @property groups
* @type object
*/
@@ -1593,7 +1751,7 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
* @since 3.1.0
* @property yui2
* @type string
- * @default 2.8.1
+ * @default 2.9.0
*/
/**
@@ -1605,7 +1763,7 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
* @since 3.1.0
* @property 2in3
* @type string
- * @default 1
+ * @default 4
*/
/**
@@ -1621,7 +1779,8 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
* A callback to execute when Y.error is called. It receives the
* error message and an javascript error object if Y.error was
* executed because a javascript error was caught. The function
- * is executed in the YUI instance context.
+ * is executed in the YUI instance context. Returning `true` from this
+ * function will stop the Error from being thrown.
*
* @since 3.2.0
* @property errorFn
@@ -1666,56 +1825,15 @@ Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui');
*/
/**
- * The parameter defaults for the remote loader service.
- * Requires the rls submodule. The properties that are
- * supported:
- *
- * * `m`: comma separated list of module requirements. This
- * must be the param name even for custom implemetations.
- * * `v`: the version of YUI to load. Defaults to the version
- * of YUI that is being used.
- * * `gv`: the version of the gallery to load (see the gallery config)
- * * `env`: comma separated list of modules already on the page.
- * this must be the param name even for custom implemetations.
- * * `lang`: the languages supported on the page (see the lang config)
- * * `'2in3v'`: the version of the 2in3 wrapper to use (see the 2in3 config).
- * * `'2v'`: the version of yui2 to use in the yui 2in3 wrappers
- * * `filt`: a filter def to apply to the urls (see the filter config).
- * * `filts`: a list of custom filters to apply per module
- * * `tests`: this is a map of conditional module test function id keys
- * with the values of 1 if the test passes, 0 if not. This must be
- * the name of the querystring param in custom templates.
+ * Whether or not YUI should use native ES5 functionality when available for
+ * features like `Y.Array.each()`, `Y.Object()`, etc. When `false`, YUI will
+ * always use its own fallback implementations instead of relying on ES5
+ * functionality, even when it's available.
*
- * @since 3.2.0
- * @property rls
- */
-
-/**
- * The base path to the remote loader service
- *
- * @since 3.2.0
- * @property rls_base
- */
-
-/**
- * The template to use for building the querystring portion
- * of the remote loader service url. The default is determined
- * by the rls config -- each property that has a value will be
- * represented.
- *
- * @since 3.2.0
- * @property rls_tmpl
- * @example
- * m={m}&v={v}&env={env}&lang={lang}&filt={filt}&tests={tests}
- *
- */
-
-/**
- * Configure the instance to use a remote loader service instead of
- * the client loader.
- *
- * @since 3.2.0
- * @property use_rls
+ * @method useNativeES5
+ * @type Boolean
+ * @default true
+ * @since 3.5.0
*/
YUI.add('yui-base', function(Y) {
@@ -1756,15 +1874,42 @@ TYPES = {
'[object Error]' : 'error'
},
-SUBREGEX = /\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,
-TRIMREGEX = /^\s+|\s+$/g,
+SUBREGEX = /\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,
+TRIMREGEX = /^\s+|\s+$/g,
+NATIVE_FN_REGEX = /\{\s*\[(?:native code|function)\]\s*\}/i;
-// If either MooTools or Prototype is on the page, then there's a chance that we
-// can't trust "native" language features to actually be native. When this is
-// the case, we take the safe route and fall back to our own non-native
-// implementation.
-win = Y.config.win,
-unsafeNatives = win && !!(win.MooTools || win.Prototype);
+// -- Protected Methods --------------------------------------------------------
+
+/**
+Returns `true` if the given function appears to be implemented in native code,
+`false` otherwise. Will always return `false` -- even in ES5-capable browsers --
+if the `useNativeES5` YUI config option is set to `false`.
+
+This isn't guaranteed to be 100% accurate and won't work for anything other than
+functions, but it can be useful for determining whether a function like
+`Array.prototype.forEach` is native or a JS shim provided by another library.
+
+There's a great article by @kangax discussing certain flaws with this technique:
+
+
+While his points are valid, it's still possible to benefit from this function
+as long as it's used carefully and sparingly, and in such a way that false
+negatives have minimal consequences. It's used internally to avoid using
+potentially broken non-native ES5 shims that have been added to the page by
+other libraries.
+
+@method _isNative
+@param {Function} fn Function to test.
+@return {Boolean} `true` if _fn_ appears to be native, `false` otherwise.
+@static
+@protected
+@since 3.5.0
+**/
+L._isNative = function (fn) {
+ return !!(Y.config.useNativeES5 && fn && NATIVE_FN_REGEX.test(fn));
+};
+
+// -- Public Methods -----------------------------------------------------------
/**
* Determines whether or not the provided item is an array.
@@ -1778,7 +1923,7 @@ unsafeNatives = win && !!(win.MooTools || win.Prototype);
* @return {boolean} true if o is an array.
* @static
*/
-L.isArray = (!unsafeNatives && Array.isArray) || function (o) {
+L.isArray = L._isNative(Array.isArray) ? Array.isArray : function (o) {
return L.type(o) === 'array';
};
@@ -1793,6 +1938,17 @@ L.isBoolean = function(o) {
return typeof o === 'boolean';
};
+/**
+ * Determines whether or not the supplied item is a date instance.
+ * @method isDate
+ * @static
+ * @param o The object to test.
+ * @return {boolean} true if o is a date.
+ */
+L.isDate = function(o) {
+ return L.type(o) === 'date' && o.toString() !== 'Invalid Date' && !isNaN(o);
+};
+
/**
*
* Determines whether or not the provided item is a function.
@@ -1821,17 +1977,6 @@ L.isFunction = function(o) {
return L.type(o) === 'function';
};
-/**
- * Determines whether or not the supplied item is a date instance.
- * @method isDate
- * @static
- * @param o The object to test.
- * @return {boolean} true if o is a date.
- */
-L.isDate = function(o) {
- return L.type(o) === 'date' && o.toString() !== 'Invalid Date' && !isNaN(o);
-};
-
/**
* Determines whether or not the provided item is null.
* @method isNull
@@ -1893,6 +2038,60 @@ L.isUndefined = function(o) {
return typeof o === 'undefined';
};
+/**
+ * A convenience method for detecting a legitimate non-null value.
+ * Returns false for null/undefined/NaN, true for other values,
+ * including 0/false/''
+ * @method isValue
+ * @static
+ * @param o The item to test.
+ * @return {boolean} true if it is not null/undefined/NaN || false.
+ */
+L.isValue = function(o) {
+ var t = L.type(o);
+
+ switch (t) {
+ case 'number':
+ return isFinite(o);
+
+ case 'null': // fallthru
+ case 'undefined':
+ return false;
+
+ default:
+ return !!t;
+ }
+};
+
+/**
+ * Returns the current time in milliseconds.
+ *
+ * @method now
+ * @return {Number} Current time in milliseconds.
+ * @static
+ * @since 3.3.0
+ */
+L.now = Date.now || function () {
+ return new Date().getTime();
+};
+
+/**
+ * Lightweight version of Y.substitute. Uses the same template
+ * structure as Y.substitute, but doesn't support recursion,
+ * auto-object coersion, or formats.
+ * @method sub
+ * @param {string} s String to be modified.
+ * @param {object} o Object containing replacement values.
+ * @return {string} the substitute result.
+ * @static
+ * @since 3.2.0
+ */
+L.sub = function(s, o) {
+ return s.replace ? s.replace(SUBREGEX, function (match, key) {
+ return L.isUndefined(o[key]) ? match : o[key];
+ }) : s;
+};
+
/**
* Returns a string without any leading or trailing whitespace. If
* the input is not a string, the input will be returned untouched.
@@ -1938,92 +2137,39 @@ L.trimRight = STRING_PROTO.trimRight ? function (s) {
};
/**
- * A convenience method for detecting a legitimate non-null value.
- * Returns false for null/undefined/NaN, true for other values,
- * including 0/false/''
- * @method isValue
- * @static
- * @param o The item to test.
- * @return {boolean} true if it is not null/undefined/NaN || false.
- */
-L.isValue = function(o) {
- var t = L.type(o);
+Returns one of the following strings, representing the type of the item passed
+in:
- switch (t) {
- case 'number':
- return isFinite(o);
+ * "array"
+ * "boolean"
+ * "date"
+ * "error"
+ * "function"
+ * "null"
+ * "number"
+ * "object"
+ * "regexp"
+ * "string"
+ * "undefined"
- case 'null': // fallthru
- case 'undefined':
- return false;
+Known issues:
- default:
- return !!t;
- }
-};
+ * `typeof HTMLElementCollection` returns function in Safari, but
+ `Y.Lang.type()` reports "object", which could be a good thing --
+ but it actually caused the logic in Y.Lang.isObject to fail.
-/**
- *
- * Returns a string representing the type of the item passed in.
- *
- *
- *
- * Known issues:
- *
- *
- *
- *
- * typeof HTMLElementCollection returns function in Safari, but
- * Y.type() reports object, which could be a good thing --
- * but it actually caused the logic in Y.Lang.isObject to fail.
- *
- *
- *
- * @method type
- * @param o the item to test.
- * @return {string} the detected type.
- * @static
- */
+@method type
+@param o the item to test.
+@return {string} the detected type.
+@static
+**/
L.type = function(o) {
return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? 'object' : 'null');
};
-
/**
- * Lightweight version of Y.substitute. Uses the same template
- * structure as Y.substitute, but doesn't support recursion,
- * auto-object coersion, or formats.
- * @method sub
- * @param {string} s String to be modified.
- * @param {object} o Object containing replacement values.
- * @return {string} the substitute result.
- * @static
- * @since 3.2.0
- */
-L.sub = function(s, o) {
- return s.replace ? s.replace(SUBREGEX, function (match, key) {
- return L.isUndefined(o[key]) ? match : o[key];
- }) : s;
-};
-
-/**
- * Returns the current time in milliseconds.
- *
- * @method now
- * @return {Number} Current time in milliseconds.
- * @static
- * @since 3.3.0
- */
-L.now = Date.now || function () {
- return new Date().getTime();
-};
-/**
- * The YUI module contains the components required for building the YUI seed
- * file. This includes the script loading mechanism, a simple queue, and the
- * core utilities for the library.
- *
- * @module yui
- * @submodule yui-base
- */
+@module yui
+@submodule yui-base
+*/
var Lang = Y.Lang,
Native = Array.prototype,
@@ -2083,43 +2229,6 @@ function YArray(thing, startIndex, force) {
Y.Array = YArray;
-/**
-Evaluates _obj_ to determine if it's an array, an array-like collection, or
-something else. This is useful when working with the function `arguments`
-collection and `HTMLElement` collections.
-
-Note: This implementation doesn't consider elements that are also
-collections, such as `