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 --- js/yui3/dial/assets/dial-core.css | 48 ++++++++++++++++++++++++++++++++ js/yui3/dial/assets/skins/night/dial.css | 7 +++++ js/yui3/dial/assets/skins/sam/dial.css | 7 +++++ js/yui3/dial/dial-min.js | 7 +++++ js/yui3/dial/lang/dial.js | 7 +++++ js/yui3/dial/lang/dial_en.js | 7 +++++ js/yui3/dial/lang/dial_es.js | 7 +++++ 7 files changed, 90 insertions(+) create mode 100644 js/yui3/dial/assets/dial-core.css create mode 100644 js/yui3/dial/assets/skins/night/dial.css create mode 100644 js/yui3/dial/assets/skins/sam/dial.css create mode 100644 js/yui3/dial/dial-min.js create mode 100644 js/yui3/dial/lang/dial.js create mode 100644 js/yui3/dial/lang/dial_en.js create mode 100644 js/yui3/dial/lang/dial_es.js (limited to 'js/yui3/dial') diff --git a/js/yui3/dial/assets/dial-core.css b/js/yui3/dial/assets/dial-core.css new file mode 100644 index 000000000..84bf14e34 --- /dev/null +++ b/js/yui3/dial/assets/dial-core.css @@ -0,0 +1,48 @@ +/* +YUI 3.7.3 (build 5687) +Copyright 2012 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ +v\:oval, +v\:shadow, +v\:fill { + behavior: url(#default#VML); + display: inline-block; + zoom: 1; *display: inline; /* IE < 8: fake inline-block */ +} +.yui3-dial{ + position:relative; + display:-moz-inline-stack; + display:inline-block; + zoom:1; + *display:inline; + /*text-align:center; This causes problems with the angle calc with longer labels*/ +} +.yui3-dial-content, +.yui3-dial-ring{ + position:relative; +} +.yui3-dial-handle, +.yui3-dial-marker, +.yui3-dial-center-button, +.yui3-dial-reset-string, +.yui3-dial-handle-vml, +.yui3-dial-marker-vml, +.yui3-dial-center-button-vml, +.yui3-dial-ring-vml v\:oval, +.yui3-dial-center-button-vml v\:oval +{ + position:absolute; +} +.yui3-dial-center-button-vml v\:oval { + font-size:1px; + top:0; + left:0; +} +.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden v\:oval, +.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden { + /* [#2530206] using opacity instead of display:none;. display:none was mis-positioning the marker when we set the dial value on ring mousedown. */ + opacity:0; + filter:alpha(opacity=0); +} diff --git a/js/yui3/dial/assets/skins/night/dial.css b/js/yui3/dial/assets/skins/night/dial.css new file mode 100644 index 000000000..3b41bcb08 --- /dev/null +++ b/js/yui3/dial/assets/skins/night/dial.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/ +*/ +v\:oval,v\:shadow,v\:fill{behavior:url(#default#VML);display:inline-block;zoom:1;*display:inline}.yui3-dial{position:relative;display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline}.yui3-dial-content,.yui3-dial-ring{position:relative}.yui3-dial-handle,.yui3-dial-marker,.yui3-dial-center-button,.yui3-dial-reset-string,.yui3-dial-handle-vml,.yui3-dial-marker-vml,.yui3-dial-center-button-vml,.yui3-dial-ring-vml v\:oval,.yui3-dial-center-button-vml v\:oval{position:absolute}.yui3-dial-center-button-vml v\:oval{font-size:1px;top:0;left:0}.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden v\:oval,.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden{opacity:0;filter:alpha(opacity=0)}.yui3-skin-night .yui3-dial{color:#fff}.yui3-skin-night .yui3-dial-handle{background:#439ede;opacity:.3;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.9) inset;-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.9) inset;box-shadow:1px 1px 1px rgba(0,0,0,0.9) inset;cursor:pointer;font-size:1px}.yui3-skin-night .yui3-dial-ring{background:#595b5b;background:-moz-linear-gradient(0% 100% 315deg,#5e6060,#2d2e2f);background:-webkit-gradient(linear,50% 0,100% 100%,from(#636666),to(#424344));-moz-box-shadow:1px 1px 2px rgba(0,0,0,0.7) inset;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.7) inset;box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset}.yui3-skin-night .yui3-dial-center-button{-moz-box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);-webkit-box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);background:#dddbd4;background:-moz-radial-gradient(30% 30% 0deg,circle farthest-side,#999c9c 24%,#898989 41%,#535555 87%) repeat scroll 0 0 transparent;background:-webkit-gradient(radial,15 15,15,30 30,40,from(#999c9c),to(#535555),color-stop(.2,#898989));cursor:pointer;opacity:.7}.yui3-skin-night .yui3-dial-reset-string{color:#fff;font-size:72%;text-decoration:none}.yui3-skin-night .yui3-dial-label{color:#cbcbcb;margin-bottom:.8em}.yui3-skin-night .yui3-dial-value-string{margin-left:.5em;color:#dcdcdc;font-size:130%}.yui3-skin-night .yui3-dial-value{visibility:hidden;position:absolute;top:0;left:102%;width:4em}.yui3-skin-night .yui3-dial-north-mark{position:absolute;border-left:2px solid #434343;height:5px;left:50%;top:-7px;font-size:1px}.yui3-skin-night .yui3-dial-marker{background-color:#a0d8ff;opacity:.2;font-size:1px}.yui3-skin-night .yui3-dial-marker-max-min{background-color:#ff0404;opacity:.6}.yui3-skin-night .yui3-dial-ring-vml,.yui3-skin-night .yui3-dial-center-button-vml,.yui3-skin-night .yui3-dial-marker v\:oval.yui3-dial-marker-max-min,.yui3-skin-night v\:oval.yui3-dial-marker-max-min,.yui3-skin-night .yui3-dial-marker-vml,.yui3-skin-night .yui3-dial-handle-vml{background:0;opacity:1}#yui3-css-stamp.skin-night-dial{display:none} diff --git a/js/yui3/dial/assets/skins/sam/dial.css b/js/yui3/dial/assets/skins/sam/dial.css new file mode 100644 index 000000000..de135759e --- /dev/null +++ b/js/yui3/dial/assets/skins/sam/dial.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/ +*/ +v\:oval,v\:shadow,v\:fill{behavior:url(#default#VML);display:inline-block;zoom:1;*display:inline}.yui3-dial{position:relative;display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline}.yui3-dial-content,.yui3-dial-ring{position:relative}.yui3-dial-handle,.yui3-dial-marker,.yui3-dial-center-button,.yui3-dial-reset-string,.yui3-dial-handle-vml,.yui3-dial-marker-vml,.yui3-dial-center-button-vml,.yui3-dial-ring-vml v\:oval,.yui3-dial-center-button-vml v\:oval{position:absolute}.yui3-dial-center-button-vml v\:oval{font-size:1px;top:0;left:0}.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden v\:oval,.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden{opacity:0;filter:alpha(opacity=0)}.yui3-skin-sam .yui3-dial-handle{background:#6c3a3a;opacity:.3;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.9) inset;cursor:pointer;font-size:1px}.yui3-skin-sam .yui3-dial-ring{background:#bebdb7;background:-moz-linear-gradient(100% 100% 135deg,#7b7a6d,#fff);background:-webkit-gradient(linear,left top,right bottom,from(#fff),to(#7b7a6d));box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset;-webkit-box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset;-moz-box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset}.yui3-skin-sam .yui3-dial-center-button{box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);-moz-box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);background:#dddbd4;background:-moz-radial-gradient(30% 30% 0deg,circle farthest-side,#fbfbf9 24%,#f2f0ea 41%,#d3d0c3 83%) repeat scroll 0 0 transparent;background:-webkit-gradient(radial,15 15,15,30 30,40,from(#fbfbf9),to(#d3d0c3),color-stop(.2,#f2f0ea));cursor:pointer;opacity:.7}.yui3-skin-sam .yui3-dial-reset-string{color:#676767;font-size:85%;text-decoration:underline}.yui3-skin-sam .yui3-dial-label{color:#808080;margin-bottom:.8em}.yui3-skin-sam .yui3-dial-value-string{margin-left:.5em;color:#000;font-size:130%}.yui3-skin-sam .yui3-dial-value{visibility:hidden;position:absolute;top:0;left:102%;width:4em}.yui3-skin-sam .yui3-dial-north-mark{position:absolute;border-left:2px solid #ccc;height:5px;width:10px;left:50%;top:-7px;font-size:1px}.yui3-skin-sam .yui3-dial-marker{background-color:#000;opacity:.2;font-size:1px}.yui3-skin-sam .yui3-dial-marker-max-min{background-color:#ab3232;opacity:.6}.yui3-skin-sam .yui3-dial-ring-vml,.yui3-skin-sam .yui3-dial-center-button-vml,.yui3-skin-sam .yui3-dial-marker v\:oval.yui3-dial-marker-max-min,.yui3-skin-sam v\:oval.yui3-dial-marker-max-min,.yui3-skin-sam .yui3-dial-marker-vml,.yui3-skin-sam .yui3-dial-handle-vml{background:0;opacity:1}#yui3-css-stamp.skin-sam-dial{display:none} diff --git a/js/yui3/dial/dial-min.js b/js/yui3/dial/dial-min.js new file mode 100644 index 000000000..91877f036 --- /dev/null +++ b/js/yui3/dial/dial-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("dial",function(e,t){function o(e){o.superclass.constructor.apply(this,arguments)}function u(t){return e.ClassNameManager.getClassName(o.NAME,t)}var n=!1;e.UA.ie&&e.UA.ie<9&&(n=!0);var r=e.Lang,i=e.Widget,s=e.Node;o.NAME="dial",o.ATTRS={min:{value:-220},max:{value:220},diameter:{value:100},handleDiameter:{value:.2},markerDiameter:{value:.1},centerButtonDiameter:{value:.5},value:{value:0,validator:function(e){return this._validateValue(e)}},minorStep:{value:1},majorStep:{value:10},stepsPerRevolution:{value:100},decimalPlaces:{value:0},strings:{valueFn:function(){return e.Intl.get("dial")}},handleDistance:{value:.75}},o.CSS_CLASSES={label:u("label"),labelString:u("label-string"),valueString:u("value-string"),northMark:u("north-mark"),ring:u("ring"),ringVml:u("ring-vml"),marker:u("marker"),markerVml:u("marker-vml"),markerMaxMin:u("marker-max-min"),centerButton:u("center-button"),centerButtonVml:u("center-button-vml"),resetString:u("reset-string"),handle:u("handle"),handleVml:u("handle-vml"),hidden:u("hidden"),dragging:e.ClassNameManager.getClassName("dd-dragging")},o.LABEL_TEMPLATE='
{label}
',n===!1?(o.RING_TEMPLATE='
',o.MARKER_TEMPLATE='
',o.CENTER_BUTTON_TEMPLATE='
{resetStr}
',o.HANDLE_TEMPLATE='
'):(o.RING_TEMPLATE='
'+'
'+''+"
"+"",o.MARKER_TEMPLATE='
'+''+''+""+"
"+"",o.CENTER_BUTTON_TEMPLATE='
'+''+''+''+""+'
{resetStr}
'+"
"+"",o.HANDLE_TEMPLATE='
'+''+''+""+"
"+""),e.extend(o,i,{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"})},_handleCenterButtonEnter:function(){this._resetString.removeClass(o.CSS_CLASSES.hidden)},_handleCenterButtonLeave:function(){this._resetString.addClass(o.CSS_CLASSES.hidden)},bindUI:function(){this.after("valueChange",this._afterValueChange);var t=this.get("boundingBox"),n=e.UA.opera?"press:":"down:",r=n+"38,40,33,34,35,36",i=n+"37,39",s=n+"37+meta,39+meta",o=e.DD.Drag;e.on("key",e.bind(this._onDirectionKey,this),t,r),e.on("key",e.bind(this._onLeftRightKey,this),t,i),t.on("key",this._onLeftRightKeyMeta,s,this),e.on("mouseenter",e.bind(this._handleCenterButtonEnter,this),this._centerButtonNode),e.on("mouseleave",e.bind(this._handleCenterButtonLeave,this),this._centerButtonNode),e.on("gesturemovestart",e.bind(this._resetDial,this),this._centerButtonNode),e.on("gesturemoveend",e.bind(this._handleCenterButtonMouseup,this),this._centerButtonNode),e.on(o.START_EVENT,e.bind(this._handleHandleMousedown,this),this._handleNode),e.on(o.START_EVENT,e.bind(this._handleMousedown,this),this._ringNode),e.on("gesturemoveend",e.bind(this._handleRingMouseup,this),this._ringNode),this._dd1=new o({node:this._handleNode,on:{"drag:drag":e.bind(this._handleDrag,this),"drag:start":e.bind(this._handleDragStart,this),"drag:end":e.bind(this._handleDragEnd,this)}}),e.bind(this._dd1.addHandle(this._ringNode),this)},_setTimesWrappedFromValue:function(e){e%this._stepsPerRevolution===0?this._timesWrapped=e/this._stepsPerRevolution:this._timesWrapped=Math.floor(e/this._stepsPerRevolution)},_getAngleFromHandleCenter:function(e,t){var n=Math.atan((this._dialCenterY-t)/(this._dialCenterX-e))*(180/Math.PI);return n=this._dialCenterX-e<0?n+90:n+90+180,n},_calculateDialCenter:function(){this._dialCenterX=this._ringNode.get("offsetWidth")/2,this._dialCenterY=this._ringNode.get("offsetHeight")/2},_handleRingMouseup:function(){this._handleNode.focus()},_handleCenterButtonMouseup:function(){this._handleNode.focus()},_handleHandleMousedown:function(){this._handleNode.focus()},_handleDrag:function(e){var t,n,r,i;t=parseInt(this._handleNode.getStyle("left"),10)+this._handleNodeRadius,n=parseInt(this._handleNode.getStyle("top"),10)+this._handleNodeRadius,r=this._getAngleFromHandleCenter(t,n),this._prevAng>270&&r<90?this._timesWrapped270&&this._timesWrapped>this._minTimesWrapped&&(this._timesWrapped=this._timesWrapped-1),i=this._getValueFromAngle(r),i>this._maxValue+this._stepsPerRevolution?this._timesWrapped--:ithis._stepsPerRevolution)Math.abs(this._prevAng-a)>180?this._timesWrapped>this._minTimesWrapped&&this._timesWrapped0?this._timesWrapped+1:this._timesWrapped-1):this._timesWrapped===this._minTimesWrapped&&a-this._prevAng<180&&this._timesWrapped++;else if(this._maxValue-this._minValue===this._stepsPerRevolution)ar)this._prevAng>=n&&a<=(n+r)/2?this._timesWrapped++:this._prevAng<=r&&a>(n+r)/2&&this._timesWrapped--;else if(ar){s=((n+r)/2+180)%360,s>180?i=ra&&a>s?this.get("min"):this.get("max"),this._prevAng=this._getAngleFromValue(i),this.set("value",i),this._setTimesWrappedFromValue(i);return}i=this._getValueFromAngle(a),this._prevAng=a,this._handleValuesBeyondMinMax(t,i)}},_handleValuesBeyondMinMax:function(e,t){t>=this._minValue&&t<=this._maxValue?(this.set("value",t),e.currentTarget===this._ringNode&&this._dd1._handleMouseDownEvent(e)):t>this._maxValue?(this.set("value",this._maxValue),this._prevAng=this._getAngleFromValue(this._maxValue)):tthis._minValue&&e=t&&e<=n}}),e.Dial=o},"3.7.3",{requires:["widget","dd-drag","event-mouseenter","event-move","event-key","transition","intl"],lang:["en","es"],skinnable:!0}); diff --git a/js/yui3/dial/lang/dial.js b/js/yui3/dial/lang/dial.js new file mode 100644 index 000000000..5a09d3827 --- /dev/null +++ b/js/yui3/dial/lang/dial.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("lang/dial",function(e){e.Intl.add("dial","",{label:"My label",resetStr:"Reset",tooltipHandle:"Drag to set value"})},"3.7.3"); diff --git a/js/yui3/dial/lang/dial_en.js b/js/yui3/dial/lang/dial_en.js new file mode 100644 index 000000000..15b684655 --- /dev/null +++ b/js/yui3/dial/lang/dial_en.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("lang/dial_en",function(e){e.Intl.add("dial","en",{label:"My label",resetStr:"Reset",tooltipHandle:"Drag to set value"})},"3.7.3"); diff --git a/js/yui3/dial/lang/dial_es.js b/js/yui3/dial/lang/dial_es.js new file mode 100644 index 000000000..4376c579b --- /dev/null +++ b/js/yui3/dial/lang/dial_es.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("lang/dial_es",function(e){e.Intl.add("dial","es",{label:"Mi etiqueta",resetStr:"Resetear",tooltipHandle:"Arrastre para ajustar el valor"})},"3.7.3"); -- cgit v1.2.3-24-g4f1b