diff options
Diffstat (limited to 'js/yui3/scrollview-scrollbars')
4 files changed, 122 insertions, 0 deletions
diff --git a/js/yui3/scrollview-scrollbars/assets/scrollview-scrollbars-core.css b/js/yui3/scrollview-scrollbars/assets/scrollview-scrollbars-core.css new file mode 100644 index 000000000..4af9a3ac1 --- /dev/null +++ b/js/yui3/scrollview-scrollbars/assets/scrollview-scrollbars-core.css @@ -0,0 +1,101 @@ +/* +YUI 3.7.3 (build 5687) +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: 0px; + 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; +}
\ No newline at end of file diff --git a/js/yui3/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css b/js/yui3/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css new file mode 100644 index 000000000..e259b756b --- /dev/null +++ b/js/yui3/scrollview-scrollbars/assets/skins/night/scrollview-scrollbars.css @@ -0,0 +1,7 @@ +/* +YUI 3.7.3 (build 5687) +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-css-stamp.skin-night-scrollview-scrollbars{display:none} diff --git a/js/yui3/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css b/js/yui3/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css new file mode 100644 index 000000000..8a8332586 --- /dev/null +++ b/js/yui3/scrollview-scrollbars/assets/skins/sam/scrollview-scrollbars.css @@ -0,0 +1,7 @@ +/* +YUI 3.7.3 (build 5687) +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-css-stamp.skin-sam-scrollview-scrollbars{display:none} diff --git a/js/yui3/scrollview-scrollbars/scrollview-scrollbars-min.js b/js/yui3/scrollview-scrollbars/scrollview-scrollbars-min.js new file mode 100644 index 000000000..1bedc7608 --- /dev/null +++ b/js/yui3/scrollview-scrollbars/scrollview-scrollbars-min.js @@ -0,0 +1,7 @@ +/* +YUI 3.7.3 (build 5687) +Copyright 2012 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ +YUI.add("scrollview-scrollbars",function(e,t){function O(){O.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r,i=e.Transition,s=i.useNative,o="scrollbar",u="scrollview",a="verticalNode",f="horizontalNode",l="childCache",c="top",h="left",p="width",d="height",v="scrollWidth",m="scrollHeight",g="_sbh",y="_sbv",b=e.ScrollView._TRANSITION.PROPERTY,w="transform",E="translateX(",S="translateY(",x="scaleX(",T="scaleY(",N="scrollX",C="scrollY",k="px",L=")",A=k+L;O.CLASS_NAMES={showing:n(u,o,"showing"),scrollbar:n(u,o),scrollbarV:n(u,o,"vert"),scrollbarH:n(u,o,"horiz"),scrollbarVB:n(u,o,"vert","basic"),scrollbarHB:n(u,o,"horiz","basic"),child:n(u,"child"),first:n(u,"first"),middle:n(u,"middle"),last:n(u,"last")},r=O.CLASS_NAMES,O.NAME="pluginScrollViewScrollbars",O.NS="scrollbars",O.SCROLLBAR_TEMPLATE=["<div>",'<span class="'+r.child+" "+r.first+'"></span>','<span class="'+r.child+" "+r.middle+'"></span>','<span class="'+r.child+" "+r.last+'"></span>',"</div>"].join(""),O.ATTRS={verticalNode:{setter:"_setNode",valueFn:"_defaultNode"},horizontalNode:{setter:"_setNode",valueFn:"_defaultNode"}},e.namespace("Plugin").ScrollViewScrollbars=e.extend(O,e.Plugin.Base,{initializer:function(){this._host=this.get("host"),this.afterHostEvent("scrollEnd",this._hostScrollEnd),this.afterHostMethod("scrollTo",this._update),this.afterHostMethod("_uiDimensionsChange",this._hostDimensionsChange)},_hostDimensionsChange:function(){var t=this._host,n=t._cAxis;this._dims=t._getScrollDims(),n&&n.y&&this._renderBar(this.get(a),!0,"vert"),n&&n.x&&this._renderBar(this.get(f),!0,"horiz"),this._update(),e.later(500,this,"flash",!0)},_hostScrollEnd:function(e){this._host._flicking||this.flash()},_renderBar:function(e,t){var n=e.inDoc(),i=this._host._bb,s=e.getData("isHoriz")?r.scrollbarHB:r.scrollbarVB;t&&!n?(i.append(e),e.toggleClass(s,this._basic),this._setChildCache(e)):!t&&n&&(e.remove(),this._clearChildCache(e))},_setChildCache:function(e){var t=e.get("children"),n=t.item(0),r=t.item(1),i=t.item(2),s=e.getData("isHoriz")?"offsetWidth":"offsetHeight";e.setStyle(b,w),r.setStyle(b,w),i.setStyle(b,w),e.setData(l,{fc:n,lc:i,mc:r,fcSize:n&&n.get(s),lcSize:i&&i.get(s)})},_clearChildCache:function(e){e.clearData(l)},_updateBar:function(e,t,n,r){var i=this._host,o=this._basic,u=i._cb,a=0,f=1,v=e.getData(l),m=v.lc,b=v.mc,O=v.fcSize,M=v.lcSize,_,D,P,H,B,j,F,I,q,R;r?(j=p,F=h,I=g,q=this._dims.offsetWidth,R=this._dims.scrollWidth,H=E,B=x,t=t!==undefined?t:i.get(N)):(j=d,F=c,I=y,q=this._dims.offsetHeight,R=this._dims.scrollHeight,H=S,B=T,t=t!==undefined?t:i.get(C)),a=Math.floor(q*(q/R)),f=Math.floor(t/(R-q)*(q-a)),a>q&&(a=1),f>q-a?a-=f-(q-a):f<0&&(a=f+a,f=0),_=a-(O+M),_<0&&(_=0),_===0&&f!==0&&(f=q-(O+M)-1),n!==0?(P={duration:n},s?P.transform=H+f+A:P[F]=f+k,e.transition(P)):s?e.setStyle(w,H+f+A):e.setStyle(F,f+k);if(this[I]!==_){this[I]=_;if(_>0){n!==0?(P={duration:n},s?P.transform=B+_+L:P[j]=_+k,b.transition(P)):s?b.setStyle(w,B+_+L):b.setStyle(j,_+k);if(!r||!o)D=a-M,n!==0?(P={duration:n},s?P.transform=H+D+A:P[F]=D,m.transition(P)):s?m.setStyle(w,H+D+A):m.setStyle(F,D+k)}}},_update:function(e,t,n,r){var i=this.get(a),s=this.get(f),o=this._host,u=o._cAxis;n=(n||0)/1e3,this._showing||this.show(),u&&u.y&&i&&this._updateBar(i,t,n,!1),u&&u.x&&s&&this._updateBar(s,e,n,!0)},show:function(e){this._show(!0,e)},hide:function(e){this._show(!1,e)},_show:function(e,t){var n=this.get(a),r=this.get(f),i=t?.6:0,s=e?1:0,o;this._showing=e,this._flashTimer&&this._flashTimer.cancel(),o={duration:i,opacity:s},n&&n.transition(o),r&&r.transition(o)},flash:function(){var t=this._host;this.show(!0),this._flashTimer=e.later(800,this,"hide",!0)},_setNode:function(t,n){var i=n===f;return t=e.one(t),t&&(t.addClass(r.scrollbar),t.addClass(i?r.scrollbarH:r.scrollbarV),t.setData("isHoriz",i)),t},_defaultNode:function(){return e.Node.create(O.SCROLLBAR_TEMPLATE)},_basic:e.UA.ie&&e.UA.ie<=8})},"3.7.3",{requires:["classnamemanager","transition","plugin"],skinnable:!0}); |