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 --- .../resize-constrain/assets/resize-base-core.css | 247 +++++++++++++++++++++ .../resize-constrain/assets/skins/night/arrows.png | Bin 0 -> 258 bytes .../resize-constrain/assets/skins/sam/arrows.png | Bin 0 -> 258 bytes js/yui3/resize-constrain/resize-constrain-min.js | 7 + 4 files changed, 254 insertions(+) create mode 100644 js/yui3/resize-constrain/assets/resize-base-core.css create mode 100644 js/yui3/resize-constrain/assets/skins/night/arrows.png create mode 100644 js/yui3/resize-constrain/assets/skins/sam/arrows.png create mode 100644 js/yui3/resize-constrain/resize-constrain-min.js (limited to 'js/yui3/resize-constrain') diff --git a/js/yui3/resize-constrain/assets/resize-base-core.css b/js/yui3/resize-constrain/assets/resize-base-core.css new file mode 100644 index 000000000..5b4676972 --- /dev/null +++ b/js/yui3/resize-constrain/assets/resize-base-core.css @@ -0,0 +1,247 @@ +/* +YUI 3.7.3 (build 5687) +Copyright 2012 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ +.yui3-resize,.yui3-resize-wrapper { + z-index: 0; + zoom: 1; +} + +.yui3-resize-handle { + position: absolute; + display: block; + z-index: 100; + zoom: 1; +} + +.yui3-resize-proxy { + position: absolute; + border: 1px dashed #000; + position: absolute; + z-index: 10000; +} + +.yui3-resize-hidden-handles .yui3-resize-handle { + opacity: 0; + filter: alpha(opacity=0); +} + +.yui3-resize-handle-t, +.yui3-resize-handle-b { + width: 100%; + left: 0; + height: 6px; +} + +.yui3-resize-handle-l, +.yui3-resize-handle-r { + height: 100%; + top: 0; + width: 6px; +} + +.yui3-resize-handle-t { + cursor: n-resize; + top: 0; +} + +.yui3-resize-handle-b { + cursor: s-resize; + bottom: 0; +} + +.yui3-resize-handle-l { + cursor: w-resize; + left: 0; +} + +.yui3-resize-handle-r { + cursor: e-resize; + right: 0; +} + +.yui3-resize-handle-inner { + position: absolute; + zoom: 1; +} + +/* Smartphones (portrait and landscape) ----------- +Adding larger hit-area ':after' objects to handles +*/ +@media only screen +and (min-device-width : 320px) +and (max-device-width : 480px) { +/* Styles */ + .yui3-resize-handle-inner:after { + content: ""; + width: 40px; + height: 40px; + position: absolute; + } + + .yui3-resize-handle-inner-r, + .yui3-resize-handle-inner-l, + .yui3-resize-handle-inner-t, + .yui3-resize-handle-inner-b, + .yui3-resize-handle-inner-tr, + .yui3-resize-handle-inner-br, + .yui3-resize-handle-inner-tl, + .yui3-resize-handle-inner-bl { + overflow: visible !important; + } + + .yui3-resize-handle-inner-r:after { + top: -12px; + right: 0; + } + .yui3-resize-handle-inner-l:after { + top: -12px; + left: 0; + } + .yui3-resize-handle-inner-t:after { + top: 0; + left: -12px; + } + .yui3-resize-handle-inner-b:after { + bottom: 0; + left: -12px; + } + .yui3-resize-handle-inner-tr:after { + top: 0; + right: 0; + } + .yui3-resize-handle-inner-br:after { + bottom: 0; + right: 0; + } + .yui3-resize-handle-inner-tl:after { + top: 0; + left: 0; + } + .yui3-resize-handle-inner-bl:after { + bottom: 0; + left: 0; + } +} + +/* iPads (portrait and landscape) ----------- +Adding larger hit-area ':after' objects to handles +*/ +@media only screen +and (min-device-width : 768px) +and (max-device-width : 1024px) { +/* Styles */ + .yui3-resize-handle-inner:after { + content: ""; + width: 30px; + height: 30px; + position: absolute; + } + + .yui3-resize-handle-inner-r, + .yui3-resize-handle-inner-l, + .yui3-resize-handle-inner-t, + .yui3-resize-handle-inner-b, + .yui3-resize-handle-inner-tr, + .yui3-resize-handle-inner-br, + .yui3-resize-handle-inner-tl, + .yui3-resize-handle-inner-bl { + overflow: visible !important; + } + + .yui3-resize-handle-inner-r:after { + top: -6px; + right: 0; + } + .yui3-resize-handle-inner-l:after { + top: -6px; + left: 0; + } + .yui3-resize-handle-inner-t:after { + top: 0; + left: -6px; + } + .yui3-resize-handle-inner-b:after { + bottom: 0; + left: -6px; + } + .yui3-resize-handle-inner-tr:after { + top: 0; + right: 0; + } + .yui3-resize-handle-inner-br:after { + bottom: 0; + right: 0; + } + .yui3-resize-handle-inner-tl:after { + top: 0; + left: 0; + } + .yui3-resize-handle-inner-bl:after { + bottom: 0; + left: 0; + } +} + +.yui3-resize-handle-inner-t, +.yui3-resize-handle-inner-b { + margin-left: -8px; + left: 50%; +} + +.yui3-resize-handle-inner-l, +.yui3-resize-handle-inner-r { + margin-top: -8px; + top: 50%; +} + +.yui3-resize-handle-inner-t { + top: -4px; +} + +.yui3-resize-handle-inner-b { + bottom: -4px; +} + +.yui3-resize-handle-inner-l { + left: -4px; +} + +.yui3-resize-handle-inner-r { + right: -4px; +} + +.yui3-resize-handle-tr, +.yui3-resize-handle-br, +.yui3-resize-handle-tl, +.yui3-resize-handle-bl { + height: 15px; + width: 15px; + z-index: 200; +} + +.yui3-resize-handle-tr { + cursor: ne-resize; + top: 0; + right: 0; +} + +.yui3-resize-handle-tl { + cursor: nw-resize; + top: 0; + left: 0; +} + +.yui3-resize-handle-br { + cursor: se-resize; + bottom: 0; + right: 0; +} + +.yui3-resize-handle-bl { + cursor: sw-resize; + bottom: 0; + left: 0; +} \ No newline at end of file diff --git a/js/yui3/resize-constrain/assets/skins/night/arrows.png b/js/yui3/resize-constrain/assets/skins/night/arrows.png new file mode 100644 index 000000000..2942681f4 Binary files /dev/null and b/js/yui3/resize-constrain/assets/skins/night/arrows.png differ diff --git a/js/yui3/resize-constrain/assets/skins/sam/arrows.png b/js/yui3/resize-constrain/assets/skins/sam/arrows.png new file mode 100644 index 000000000..2942681f4 Binary files /dev/null and b/js/yui3/resize-constrain/assets/skins/sam/arrows.png differ diff --git a/js/yui3/resize-constrain/resize-constrain-min.js b/js/yui3/resize-constrain/resize-constrain-min.js new file mode 100644 index 000000000..17506052a --- /dev/null +++ b/js/yui3/resize-constrain/resize-constrain-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("resize-constrain",function(e,t){function B(){B.superclass.constructor.apply(this,arguments)}var n=e.Lang,r=n.isBoolean,i=n.isNumber,s=n.isString,o=e.Resize.capitalize,u=function(t){return t instanceof e.Node},a=function(e){return parseFloat(e)||0},f="borderBottomWidth",l="borderLeftWidth",c="borderRightWidth",h="borderTopWidth",p="border",d="bottom",v="con",m="constrain",g="host",y="left",b="maxHeight",w="maxWidth",E="minHeight",S="minWidth",x="node",T="offsetHeight",N="offsetWidth",C="preserveRatio",k="region",L="resizeConstrained",A="right",O="tickX",M="tickY",_="top",D="width",P="view",H="viewportRegion";e.mix(B,{NAME:L,NS:v,ATTRS:{constrain:{setter:function(t){return t&&(u(t)||s(t)||t.nodeType)&&(t=e.one(t)),t}},minHeight:{value:15,validator:i},minWidth:{value:15,validator:i},maxHeight:{value:Infinity,validator:i},maxWidth:{value:Infinity,validator:i},preserveRatio:{value:!1,validator:r},tickX:{value:!1},tickY:{value:!1}}}),e.extend(B,e.Plugin.Base,{constrainSurrounding:null,initializer:function(){var t=this,n=t.get(g);n.delegate.dd.plug(e.Plugin.DDConstrained,{tickX:t.get(O),tickY:t.get(M)}),n.after("resize:align",e.bind(t._handleResizeAlignEvent,t)),n.on("resize:start",e.bind(t._handleResizeStartEvent,t))},_checkConstrain:function(e,t,n){var r=this,i,s,u,f,l=r.get(g),c=l.info,h=r.constrainSurrounding.border,d=r._getConstrainRegion();d&&(i=c[e]+c[n],s=d[t]-a(h[o(p,t,D)]),i>=s&&(c[n]-=i-s),u=c[e],f=d[e]+a(h[o(p,e,D)]),u<=f&&(c[e]+=f-u,c[n]-=f-u))},_checkHeight:function(){var e=this,t=e.get(g),n=t.info,r=e.get(b)+t.totalVSurrounding,i=e.get(E)+t.totalVSurrounding;e._checkConstrain(_,d,T),n.offsetHeight>r&&t._checkSize(T,r),n.offsetHeightr&&t._checkSize(N,r)},_getConstrainRegion:function(){var e=this,t=e.get(g),n=t.get(x),r=e.get(m),i=null;return r&&(r===P?i=n.get(H):u(r)?i=r.get(k):i=r),i},_handleResizeAlignEvent:function(){var e=this,t=e.get(g);e._checkHeight(),e._checkWidth(),e.get(C)&&e._checkRatio(),e.get(m)&&!e._checkRegion()&&(t.info=t.lastInfo)},_handleResizeStartEvent:function(){var e=this,t=e.get(m),n=e.get(g);e.constrainSurrounding=n._getBoxSurroundingInfo(t)}}),e.namespace("Plugin"),e.Plugin.ResizeConstrained=B},"3.7.3",{requires:["plugin","resize-base"]}); -- cgit v1.2.3-24-g4f1b