From 1ee605864f227d40cc83e798dc117ad8e01acb64 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 4 Dec 2012 16:13:12 -0500 Subject: Bug 818091 - Install a full copy of YUI3 into the js directory for use with new extensions/projects --- .../assets/datatable-scroll-core.css | 77 ++++++++++++++++++++++ .../assets/skins/night/datatable-scroll.css | 7 ++ .../assets/skins/sam/datatable-scroll.css | 7 ++ js/yui3/datatable-scroll/datatable-scroll-min.js | 7 ++ 4 files changed, 98 insertions(+) create mode 100644 js/yui3/datatable-scroll/assets/datatable-scroll-core.css create mode 100644 js/yui3/datatable-scroll/assets/skins/night/datatable-scroll.css create mode 100644 js/yui3/datatable-scroll/assets/skins/sam/datatable-scroll.css create mode 100644 js/yui3/datatable-scroll/datatable-scroll-min.js (limited to 'js/yui3/datatable-scroll') diff --git a/js/yui3/datatable-scroll/assets/datatable-scroll-core.css b/js/yui3/datatable-scroll/assets/datatable-scroll-core.css new file mode 100644 index 000000000..ec1d7a7e7 --- /dev/null +++ b/js/yui3/datatable-scroll/assets/datatable-scroll-core.css @@ -0,0 +1,77 @@ +/* +YUI 3.7.3 (build 5687) +Copyright 2012 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ +/* foundational CSS */ +.yui3-datatable-scrollable-x { + _overflow-x: hidden; + _position: relative; +} + +.yui3-datatable-scrollable-y, +.yui3-datatable-scrollable-y .yui3-datatable-x-scroller { + _overflow-y: hidden; + _position: relative; +} + +.yui3-datatable-y-scroller-container { + overflow-x: hidden; + position: relative; +} + +.yui3-datatable-scrollable-y .yui3-datatable-content { + /* To allow absolute positioning of virtual scrollbar */ + position: relative; +} + +.yui3-datatable-scrollable-y .yui3-datatable-table .yui3-datatable-columns { + /* Prevent masked headers from showing during momentum scrolling */ + visibility: hidden; +} + +.yui3-datatable-scroll-columns { + position: absolute; + width: 100%; + z-index: 2; +} + +.yui3-datatable-y-scroller, +.yui3-datatable-scrollable-x .yui3-datatable-caption-table { + width: 100%; +} + +.yui3-datatable-x-scroller { + position: relative; + overflow-x: scroll; + overflow-y: hidden; +} + +.yui3-datatable-scrollable-y .yui3-datatable-y-scroller { + position: relative; + overflow-x: hidden; + overflow-y: scroll; + z-index: 1; + -webkit-overflow-scrolling: touch; +} + +.yui3-datatable-scrollbar { + position: absolute; + overflow-x: hidden; + overflow-y: scroll; + z-index: 2; +} + +.yui3-datatable-scrollbar div { + position: absolute; + width: 1px; + visibility: hidden; +} + +/* Removed because it prevented cmd + zoom resizing in Chrome (at least) */ +/* +.yui3-datatable-header { + -webkit-text-size-adjust: none; +} +*/ diff --git a/js/yui3/datatable-scroll/assets/skins/night/datatable-scroll.css b/js/yui3/datatable-scroll/assets/skins/night/datatable-scroll.css new file mode 100644 index 000000000..4642ac414 --- /dev/null +++ b/js/yui3/datatable-scroll/assets/skins/night/datatable-scroll.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-datatable-scrollable-x{_overflow-x:hidden;_position:relative}.yui3-datatable-scrollable-y,.yui3-datatable-scrollable-y .yui3-datatable-x-scroller{_overflow-y:hidden;_position:relative}.yui3-datatable-y-scroller-container{overflow-x:hidden;position:relative}.yui3-datatable-scrollable-y .yui3-datatable-content{position:relative}.yui3-datatable-scrollable-y .yui3-datatable-table .yui3-datatable-columns{visibility:hidden}.yui3-datatable-scroll-columns{position:absolute;width:100%;z-index:2}.yui3-datatable-y-scroller,.yui3-datatable-scrollable-x .yui3-datatable-caption-table{width:100%}.yui3-datatable-x-scroller{position:relative;overflow-x:scroll;overflow-y:hidden}.yui3-datatable-scrollable-y .yui3-datatable-y-scroller{position:relative;overflow-x:hidden;overflow-y:scroll;z-index:1;-webkit-overflow-scrolling:touch}.yui3-datatable-scrollbar{position:absolute;overflow-x:hidden;overflow-y:scroll;z-index:2}.yui3-datatable-scrollbar div{position:absolute;width:1px;visibility:hidden}.yui3-skin-sam .yui3-datatable-scroll-columns{border-collapse:separate;border-spacing:0;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;margin:0;padding:0;top:0;left:0}.yui3-skin-sam .yui3-datatable-scroll-columns .yui3-datatable-header{padding:0}.yui3-skin-sam .yui3-datatable-x-scroller,.yui3-skin-sam .yui3-datatable-y-scroller-container{border:1px solid #303030;border-left-color:#323434}.yui3-skin-sam .yui3-datatable-scrollable-x .yui3-datatable-y-scroller-container,.yui3-skin-sam .yui3-datatable-x-scroller .yui3-datatable-table,.yui3-skin-sam .yui3-datatable-y-scroller .yui3-datatable-table{border:0 none}#yui3-css-stamp.skin-night-datatable-scroll{display:none} diff --git a/js/yui3/datatable-scroll/assets/skins/sam/datatable-scroll.css b/js/yui3/datatable-scroll/assets/skins/sam/datatable-scroll.css new file mode 100644 index 000000000..13ba4e560 --- /dev/null +++ b/js/yui3/datatable-scroll/assets/skins/sam/datatable-scroll.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-datatable-scrollable-x{_overflow-x:hidden;_position:relative}.yui3-datatable-scrollable-y,.yui3-datatable-scrollable-y .yui3-datatable-x-scroller{_overflow-y:hidden;_position:relative}.yui3-datatable-y-scroller-container{overflow-x:hidden;position:relative}.yui3-datatable-scrollable-y .yui3-datatable-content{position:relative}.yui3-datatable-scrollable-y .yui3-datatable-table .yui3-datatable-columns{visibility:hidden}.yui3-datatable-scroll-columns{position:absolute;width:100%;z-index:2}.yui3-datatable-y-scroller,.yui3-datatable-scrollable-x .yui3-datatable-caption-table{width:100%}.yui3-datatable-x-scroller{position:relative;overflow-x:scroll;overflow-y:hidden}.yui3-datatable-scrollable-y .yui3-datatable-y-scroller{position:relative;overflow-x:hidden;overflow-y:scroll;z-index:1;-webkit-overflow-scrolling:touch}.yui3-datatable-scrollbar{position:absolute;overflow-x:hidden;overflow-y:scroll;z-index:2}.yui3-datatable-scrollbar div{position:absolute;width:1px;visibility:hidden}.yui3-skin-sam .yui3-datatable-scroll-columns{border-collapse:separate;border-spacing:0;font-family:arial,sans-serif;margin:0;padding:0;top:0;left:0}.yui3-skin-sam .yui3-datatable-scroll-columns .yui3-datatable-header{padding:0}.yui3-skin-sam .yui3-datatable-x-scroller,.yui3-skin-sam .yui3-datatable-y-scroller-container{border:1px solid #cbcbcb}.yui3-skin-sam .yui3-datatable-scrollable-x .yui3-datatable-y-scroller-container,.yui3-skin-sam .yui3-datatable-x-scroller .yui3-datatable-table,.yui3-skin-sam .yui3-datatable-y-scroller .yui3-datatable-table{border:0 none}#yui3-css-stamp.skin-sam-datatable-scroll{display:none} diff --git a/js/yui3/datatable-scroll/datatable-scroll-min.js b/js/yui3/datatable-scroll/datatable-scroll-min.js new file mode 100644 index 000000000..163ed1d24 --- /dev/null +++ b/js/yui3/datatable-scroll/datatable-scroll-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("datatable-scroll",function(e,t){function u(e,t){return parseInt(e.getComputedStyle(t),10)|0}var n=e.Lang,r=n.isString,i=n.isNumber,s=n.isArray,o;e.DataTable.Scrollable=o=function(){},o.ATTRS={scrollable:{value:!1,setter:"_setScrollable"}},e.mix(o.prototype,{scrollTo:function(t){var n;return t&&this._tbodyNode&&(this._yScrollNode||this._xScrollNode)&&(s(t)?n=this.getCell(t):i(t)?n=this.getRow(t):r(t)?n=this._tbodyNode.one("#"+t):t instanceof e.Node&&t.ancestor(".yui3-datatable")===this.get("boundingBox")&&(n=t),n&&n.scrollIntoView()),this},_CAPTION_TABLE_TEMPLATE:'',_SCROLL_LINER_TEMPLATE:'
',_SCROLLBAR_TEMPLATE:'
',_X_SCROLLER_TEMPLATE:'
',_Y_SCROLL_HEADER_TEMPLATE:'',_Y_SCROLLER_TEMPLATE:'
',_addScrollbarPadding:function(){var t=this._yScrollHeader,n="."+this.getClassName("header"),r,i,s,o,u;if(t){r=e.DOM.getScrollbarWidth()+"px",i=t.all("tr");for(o=0,u=i.size();o-1,this._yScroll=n&&e.indexOf("y")>-1},_syncScrollPosition:function(t){var n=this._scrollbarNode,r=this._yScrollNode,i=t.currentTarget,s;if(n&&r){if(this._scrollLock&&this._scrollLock.source!==i)return;this._clearScrollLock(),this._scrollLock=e.later(300,this,this._clearScrollLock),this._scrollLock.source=i,s=i===n?r:n,s.set("scrollTop",i.get("scrollTop"))}},_syncScrollCaptionUI:function(){var t=this._captionNode,n=this._tableNode,r=this._captionTable,i;t?(i=t.getAttribute("id"),r||(r=this._createScrollCaptionTable(),this.get("contentBox").prepend(r)),t.get("parentNode").compareTo(r)||(r.empty().insert(t),i||(i=e.stamp(t),t.setAttribute("id",i)),n.setAttribute("aria-describedby",i))):r&&this._removeScrollCaptionTable()},_syncScrollColumnWidths:function(){var t=[];this._theadNode&&this._yScrollHeader&&(this._theadNode.all("."+this.getClassName("header")).each(function(n){t.push(e.UA.ie&&e.UA.ie<8?n.get("clientWidth")-u(n,"paddingLeft")-u(n,"paddingRight")+"px":n.getComputedStyle("width"))}),this._yScrollHeader.all("."+this.getClassName("scroll","liner")).each(function(e,n){e.setStyle("width",t[n])}))},_syncScrollHeaders:function(){var t=this._yScrollHeader,n=this._SCROLL_LINER_TEMPLATE,r=this.getClassName("scroll","liner"),i=this.getClassName("header"),s=this._theadNode.all("."+i);this._theadNode&&t&&(t.empty().appendChild(this._theadNode.cloneNode(!0)),t.all("[id]").removeAttribute("id"),t.all("."+i).each(function(t,i){var o=e.Node.create(e.Lang.sub(n,{className:r})),u=s.item(i);o.setStyle("padding",u.getComputedStyle("paddingTop")+" "+u.getComputedStyle("paddingRight")+" "+u.getComputedStyle("paddingBottom")+" "+u.getComputedStyle("paddingLeft")),o.appendChild(t.get("childNodes").toFrag()),t.appendChild(o)},this),this._syncScrollColumnWidths(),this._addScrollbarPadding())},_syncScrollUI:function(){var e=this._xScroll,t=this._yScroll,n=this._xScrollNode,r=this._yScrollNode,i=n&&n.get("scrollLeft"),s=r&&r.get("scrollTop");this._uiSetScrollable(),e||t?((this.get("width")||"").slice(-1)==="%"?this._bindScrollResize():this._unbindScrollResize(),this._syncScrollCaptionUI()):this._disableScrolling(),this._yScrollHeader&&this._yScrollHeader.setStyle("display","none"),e&&(t||this._disableYScrolling(),this._syncXScrollUI(t)),t&&(e||this._disableXScrolling(),this._syncYScrollUI(e)),i&&this._xScrollNode&&this._xScrollNode.set("scrollLeft",i),s&&this._yScrollNode&&this._yScrollNode.set("scrollTop",s)},_syncXScrollUI:function(t){var n=this._xScrollNode,r=this._yScrollContainer,i=this._tableNode,s=this.get("width"),o=this.get("boundingBox").get("offsetWidth"),a=e.DOM.getScrollbarWidth(),f,l;n||(n=this._createXScrollNode(),(r||i).replace(n).appendTo(n)),f=u(n,"borderLeftWidth")+u(n,"borderRightWidth"),n.setStyle("width",""),this._uiSetDim("width",""),t&&this._yScrollContainer&&this._yScrollContainer.setStyle("width",""),e.UA.ie&&e.UA.ie<8&&(i.setStyle("width",s),i.get("offsetWidth")),i.setStyle("width",""),l=i.get("offsetWidth"),i.setStyle("width",l+"px"),this._uiSetDim("width",s),n.setStyle("width",o-f+"px"),n.get("offsetWidth")-f>l&&(t?i.setStyle("width",n.get("offsetWidth")-f-a+"px"):i.setStyle("width","100%"))},_syncYScrollUI:function(t){var n=this._yScrollContainer,r=this._yScrollNode,i=this._xScrollNode,s=this._yScrollHeader,o=this._scrollbarNode,a=this._tableNode,f=this._theadNode,l=this._captionTable,c=this.get("boundingBox"),h=this.get("contentBox"),p=this.get("width"),d=c.get("offsetHeight"),v=e.DOM.getScrollbarWidth(),m;l&&!t&&l.setStyle("width",p||"100%"),n||(n=this._createYScrollNode(),r=this._yScrollNode,a.replace(n).appendTo(r)),m=t?i:n,t||a.setStyle("width",""),t&&(d-=v),r.setStyle("height",d-m.get("offsetTop")-u(m,"borderTopWidth")-u(m,"borderBottomWidth")+"px"),t?n.setStyle("width",a.get("offsetWidth")+v+"px"):this._uiSetYScrollWidth(p),l&&!t&&l.setStyle("width",n.get("offsetWidth")+"px"),f&&!s&&(s=this._createYScrollHeader(),n.prepend(s),this._syncScrollHeaders()),s&&(this._syncScrollColumnWidths(),s.setStyle("display",""),o||(o=this._createScrollbar(),this._bindScrollbar(),h.prepend(o)),this._uiSetScrollbarHeight(),this._uiSetScrollbarPosition(m))},_uiSetScrollable:function(){this.get("boundingBox").toggleClass(this.getClassName("scrollable","x"),this._xScroll).toggleClass(this.getClassName("scrollable","y"),this._yScroll)},_uiSetScrollbarHeight:function(){var e=this._scrollbarNode,t=this._yScrollNode,n=this._yScrollHeader;e&&t&&n&&(e.get("firstChild").setStyle("height",this._tbodyNode.get("scrollHeight")+"px"),e.setStyle("height",parseFloat(t.getComputedStyle("height"))-parseFloat(n.getComputedStyle("height"))+"px"))},_uiSetScrollbarPosition:function(t){var n=this._scrollbarNode,r=this._yScrollHeader;n&&t&&r&&n.setStyles({top:parseFloat(r.getComputedStyle("height"))+u(t,"borderTopWidth")+t.get("offsetTop")+"px",left:t.get("offsetWidth")-e.DOM.getScrollbarWidth()-1-u(t,"borderRightWidth")+"px"})},_uiSetYScrollWidth:function(t){var n=this._yScrollContainer,r=this._tableNode,i,s,o,u;n&&r&&(u=e.DOM.getScrollbarWidth(),t?(s=n.get("offsetWidth")-n.get("clientWidth")+u,n.setStyle("width",t),o=n.get("clientWidth")-s,r.setStyle("width",o+"px"),i=r.get("offsetWidth"),n.setStyle("width",i+u+"px")):(r.setStyle("width",""),n.setStyle("width",""),n.setStyle("width",r.get("offsetWidth")+u+"px")))},_unbindScrollbar:function(){this._scrollbarEventHandle&&this._scrollbarEventHandle.detach()},_unbindScrollResize:function(){this._scrollResizeHandle&&(this._scrollResizeHandle.detach(),delete this._scrollResizeHandle)}},!0),e.Base.mix(e.DataTable,[o])},"3.7.3",{requires:["datatable-base","datatable-column-widths","dom-screen"],skinnable:!0}); -- cgit v1.2.3-24-g4f1b