From: nicolasconnault Date: Fri, 7 Mar 2008 09:48:29 +0000 (+0000) Subject: MDL-13828 Updated to YUI 2.5.0 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8436e8b94b97ff37c0cf9702f763fd6c74c73b54;p=moodle.git MDL-13828 Updated to YUI 2.5.0 --- diff --git a/lib/yui/README.txt b/lib/yui/README.txt index 81a21aa89a..89dd4ee384 100644 --- a/lib/yui/README.txt +++ b/lib/yui/README.txt @@ -10,3 +10,4 @@ Updated to YUI 0.12.0, 23 November 2006 Updated to YUI 0.12.1, 8 January 2007 Updated to YUI 0.12.2, 8 Febuary 2007 Updated to YUI 2.3.0, 3 August 2007 +Updated to YUI 2.5.0, 7 March 2008 \ No newline at end of file diff --git a/lib/yui/animation/README b/lib/yui/animation/README index f5dc0bda21..313c2d9e56 100755 --- a/lib/yui/animation/README +++ b/lib/yui/animation/README @@ -1,45 +1,51 @@ Animation Release Notes +*** version 2.5.0 *** +* replace toString overrides with static NAME property + +*** version 2.4.0 *** +* calling stop() on an non-animated Anim no longer fires onComplete + +*** version 2.3.1 *** +* no change + *** version 2.3.0 *** * duration of zero now executes 1 frame animation * added setEl() method to enable reuse * fixed stop() for multiple animations -*** version 2.2.2 ** +*** version 2.3.0 *** +* duration of zero now executes 1 frame animation +* added setEl() method to enable reuse +* fixed stop() for multiple animations +*** version 2.2.2 *** * no change -*** version 2.2.1 ** - +*** version 2.2.1 *** * no change -*** version 2.2.0 ** - +*** version 2.2.0 *** * Fixed AnimMgr.stop() when called without tween *** version 0.12.2 *** - * raised AnimMgr.fps to 1000 *** version 0.12.1 *** * minified version no longer strips line breaks *** version 0.12.0 *** - * added boolean finish argument to Anim.stop() *** version 0.11.3 *** - * no changes *** version 0.11.1 *** - * changed "prototype" shorthand to "proto" (workaround firefox < 1.5 scoping bug) *** version 0.11.0 *** - * ColorAnim subclass added * Motion and Scroll now inherit from ColorAnim * getDefaultUnit method added @@ -47,13 +53,10 @@ bug) * getDefault and setDefault methods deprecated *** version 0.10.0 *** - * Scroll now handles relative ("by") animation correctly - * Now converts "auto" values of "from" to appropriate initial values *** version 0.9.0 *** - * Initial release diff --git a/lib/yui/animation/animation-debug.js b/lib/yui/animation/animation-debug.js index 4980ffadb3..1bfb6974cc 100755 --- a/lib/yui/animation/animation-debug.js +++ b/lib/yui/animation/animation-debug.js @@ -1,9 +1,13 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ +(function() { + +var Y = YAHOO.util; + /* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: @@ -37,23 +41,25 @@ http://developer.yahoo.net/yui/license.txt * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ -YAHOO.util.Anim = function(el, attributes, duration, method) { +var Anim = function(el, attributes, duration, method) { if (!el) { YAHOO.log('element required to create Anim instance', 'error', 'Anim'); } this.init(el, attributes, duration, method); }; -YAHOO.util.Anim.prototype = { +Anim.NAME = 'Anim'; + +Anim.prototype = { /** * Provides a readable name for the Anim instance. * @method toString * @return {String} */ toString: function() { - var el = this.getEl(); - var id = el.id || el.tagName || el; - return ("Anim " + id); + var el = this.getEl() || {}; + var id = el.id || el.tagName; + return (this.constructor.NAME + ': ' + id); }, patterns: { // cached for performance @@ -87,7 +93,7 @@ YAHOO.util.Anim.prototype = { val = (val > 0) ? val : 0; } - YAHOO.util.Dom.setStyle(this.getEl(), attr, val + unit); + Y.Dom.setStyle(this.getEl(), attr, val + unit); }, /** @@ -98,7 +104,7 @@ YAHOO.util.Anim.prototype = { */ getAttribute: function(attr) { var el = this.getEl(); - var val = YAHOO.util.Dom.getStyle(el, attr); + var val = Y.Dom.getStyle(el, attr); if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) { return parseFloat(val); @@ -109,7 +115,7 @@ YAHOO.util.Anim.prototype = { var box = !!( a[2] ); // width or height // use offsets for width/height and abs pos top/left - if ( box || (YAHOO.util.Dom.getStyle(el, 'position') == 'absolute' && pos) ) { + if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) { val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)]; } else { // default to zero for other 'auto' val = 0; @@ -220,7 +226,7 @@ YAHOO.util.Anim.prototype = { * @private * @type HTMLElement */ - el = YAHOO.util.Dom.get(el); + el = Y.Dom.get(el); /** * The collection of attributes to be animated. @@ -247,7 +253,7 @@ YAHOO.util.Anim.prototype = { * @property method * @type Function */ - this.method = method || YAHOO.util.Easing.easeNone; + this.method = method || Y.Easing.easeNone; /** * Whether or not the duration should be treated as seconds. @@ -271,14 +277,14 @@ YAHOO.util.Anim.prototype = { * @property totalFrames * @type Int */ - this.totalFrames = YAHOO.util.AnimMgr.fps; + this.totalFrames = Y.AnimMgr.fps; /** * Changes the animated element * @method setEl */ this.setEl = function(element) { - el = YAHOO.util.Dom.get(element); + el = Y.Dom.get(element); }; /** @@ -324,12 +330,12 @@ YAHOO.util.Anim.prototype = { this.currentFrame = 0; - this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration; + this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration; - if (this.duration === 0 && this.useSeconds) { - this.totalFrames = 1; // jump to last frame if no duration + if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration + this.totalFrames = 1; } - YAHOO.util.AnimMgr.registerElement(this); + Y.AnimMgr.registerElement(this); return true; }; @@ -339,11 +345,15 @@ YAHOO.util.Anim.prototype = { * @param {Boolean} finish (optional) If true, animation will jump to final frame. */ this.stop = function(finish) { + if (!this.isAnimated()) { // nothing to stop + return false; + } + if (finish) { this.currentFrame = this.totalFrames; this._onTween.fire(); } - YAHOO.util.AnimMgr.stop(this); + Y.AnimMgr.stop(this); }; var onStart = function() { @@ -414,39 +424,39 @@ YAHOO.util.Anim.prototype = { * Custom event that fires after onStart, useful in subclassing * @private */ - this._onStart = new YAHOO.util.CustomEvent('_start', this, true); + this._onStart = new Y.CustomEvent('_start', this, true); /** * Custom event that fires when animation begins * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction) * @event onStart */ - this.onStart = new YAHOO.util.CustomEvent('start', this); + this.onStart = new Y.CustomEvent('start', this); /** * Custom event that fires between each frame * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction) * @event onTween */ - this.onTween = new YAHOO.util.CustomEvent('tween', this); + this.onTween = new Y.CustomEvent('tween', this); /** * Custom event that fires after onTween * @private */ - this._onTween = new YAHOO.util.CustomEvent('_tween', this, true); + this._onTween = new Y.CustomEvent('_tween', this, true); /** * Custom event that fires when animation ends * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction) * @event onComplete */ - this.onComplete = new YAHOO.util.CustomEvent('complete', this); + this.onComplete = new Y.CustomEvent('complete', this); /** * Custom event that fires after onComplete * @private */ - this._onComplete = new YAHOO.util.CustomEvent('_complete', this, true); + this._onComplete = new Y.CustomEvent('_complete', this, true); this._onStart.subscribe(onStart); this._onTween.subscribe(onTween); @@ -454,6 +464,8 @@ YAHOO.util.Anim.prototype = { } }; + Y.Anim = Anim; +})(); /** * Handles animation queueing and threading. * Used by Anim and subclasses. @@ -524,12 +536,12 @@ YAHOO.util.AnimMgr = new function() { * @private */ this.unRegister = function(tween, index) { - tween._onComplete.fire(); index = index || getIndex(tween); - if (index == -1) { + if (!tween.isAnimated() || index == -1) { return false; } + tween._onComplete.fire(); queue.splice(index, 1); tweenCount -= 1; @@ -562,9 +574,7 @@ YAHOO.util.AnimMgr = new function() { clearInterval(thread); for (var i = 0, len = queue.length; i < len; ++i) { - if ( queue[0].isAnimated() ) { - this.unRegister(queue[0], 0); - } + this.unRegister(queue[0], 0); } queue = []; @@ -694,23 +704,19 @@ YAHOO.util.Bezier = new function() { * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ - YAHOO.util.ColorAnim = function(el, attributes, duration, method) { - YAHOO.util.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + var ColorAnim = function(el, attributes, duration, method) { + ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); }; - YAHOO.extend(YAHOO.util.ColorAnim, YAHOO.util.Anim); - + ColorAnim.NAME = 'ColorAnim'; + // shorthand var Y = YAHOO.util; - var superclass = Y.ColorAnim.superclass; - var proto = Y.ColorAnim.prototype; - - proto.toString = function() { - var el = this.getEl(); - var id = el.id || el.tagName; - return ("ColorAnim " + id); - }; + YAHOO.extend(ColorAnim, Y.Anim); + var superclass = ColorAnim.superclass; + var proto = ColorAnim.prototype; + proto.patterns.color = /color$/i; proto.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i; proto.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i; @@ -806,8 +812,10 @@ YAHOO.util.Bezier = new function() { this.runtimeAttributes[attr].end = end; } }; + + Y.ColorAnim = ColorAnim; })(); -/* +/*! TERMS OF USE - EASING EQUATIONS Open source under the BSD License. Copyright 2001 Robert Penner All rights reserved. @@ -1157,7 +1165,7 @@ YAHOO.util.Easing = { * @requires YAHOO.util.Event * @requires YAHOO.util.CustomEvent * @constructor - * @extends YAHOO.util.Anim + * @extends YAHOO.util.ColorAnim * @param {String | HTMLElement} el Reference to the element that will be animated * @param {Object} attributes The attribute(s) to be animated. * Each attribute is an object with at minimum a "to" or "by" member defined. @@ -1166,25 +1174,22 @@ YAHOO.util.Easing = { * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ - YAHOO.util.Motion = function(el, attributes, duration, method) { + var Motion = function(el, attributes, duration, method) { if (el) { // dont break existing subclasses not using YAHOO.extend - YAHOO.util.Motion.superclass.constructor.call(this, el, attributes, duration, method); + Motion.superclass.constructor.call(this, el, attributes, duration, method); } }; - YAHOO.extend(YAHOO.util.Motion, YAHOO.util.ColorAnim); - + + Motion.NAME = 'Motion'; + // shorthand var Y = YAHOO.util; - var superclass = Y.Motion.superclass; - var proto = Y.Motion.prototype; - - proto.toString = function() { - var el = this.getEl(); - var id = el.id || el.tagName; - return ("Motion " + id); - }; + YAHOO.extend(Motion, Y.ColorAnim); + var superclass = Motion.superclass; + var proto = Motion.prototype; + proto.patterns.points = /^points$/i; proto.setAttribute = function(attr, val, unit) { @@ -1293,6 +1298,8 @@ YAHOO.util.Easing = { var isset = function(prop) { return (typeof prop !== 'undefined'); }; + + Y.Motion = Motion; })(); (function() { /** @@ -1308,7 +1315,7 @@ YAHOO.util.Easing = { * @requires YAHOO.util.Dom * @requires YAHOO.util.Event * @requires YAHOO.util.CustomEvent - * @extends YAHOO.util.Anim + * @extends YAHOO.util.ColorAnim * @constructor * @param {String or HTMLElement} el Reference to the element that will be animated * @param {Object} attributes The attribute(s) to be animated. @@ -1318,24 +1325,20 @@ YAHOO.util.Easing = { * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ - YAHOO.util.Scroll = function(el, attributes, duration, method) { + var Scroll = function(el, attributes, duration, method) { if (el) { // dont break existing subclasses not using YAHOO.extend - YAHOO.util.Scroll.superclass.constructor.call(this, el, attributes, duration, method); + Scroll.superclass.constructor.call(this, el, attributes, duration, method); } }; - YAHOO.extend(YAHOO.util.Scroll, YAHOO.util.ColorAnim); - + Scroll.NAME = 'Scroll'; + // shorthand var Y = YAHOO.util; - var superclass = Y.Scroll.superclass; - var proto = Y.Scroll.prototype; - - proto.toString = function() { - var el = this.getEl(); - var id = el.id || el.tagName; - return ("Scroll " + id); - }; + YAHOO.extend(Scroll, Y.ColorAnim); + + var superclass = Scroll.superclass; + var proto = Scroll.prototype; proto.doMethod = function(attr, start, end) { var val = null; @@ -1375,5 +1378,7 @@ YAHOO.util.Easing = { superclass.setAttribute.call(this, attr, val, unit); } }; + + Y.Scroll = Scroll; })(); -YAHOO.register("animation", YAHOO.util.Anim, {version: "2.3.0", build: "442"}); +YAHOO.register("animation", YAHOO.util.Anim, {version: "2.5.0", build: "895"}); diff --git a/lib/yui/animation/animation-min.js b/lib/yui/animation/animation-min.js index 284ff25f75..840c05d21c 100755 --- a/lib/yui/animation/animation-min.js +++ b/lib/yui/animation/animation-min.js @@ -1,78 +1,23 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ +(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0)?val:0;} -YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);} -var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position')=='absolute'&&pos)){val=el['offset'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;} -return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return'px';} -return'';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!=='undefined');};if(!isset(attributes[attr]['to'])&&!isset(attributes[attr]['by'])){return false;} -start=(isset(attributes[attr]['from']))?attributes[attr]['from']:this.getAttribute(attr);if(isset(attributes[attr]['to'])){end=attributes[attr]['to'];}else if(isset(attributes[attr]['by'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);} -tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);} -this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;} -else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!=='undefined');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);} -return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);} -return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.3.0",build:"442"}); \ No newline at end of file + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.0",build:"895"}); \ No newline at end of file diff --git a/lib/yui/animation/animation.js b/lib/yui/animation/animation.js index 236d338353..a601597267 100755 --- a/lib/yui/animation/animation.js +++ b/lib/yui/animation/animation.js @@ -1,9 +1,13 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ +(function() { + +var Y = YAHOO.util; + /* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: @@ -37,22 +41,24 @@ http://developer.yahoo.net/yui/license.txt * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ -YAHOO.util.Anim = function(el, attributes, duration, method) { +var Anim = function(el, attributes, duration, method) { if (!el) { } this.init(el, attributes, duration, method); }; -YAHOO.util.Anim.prototype = { +Anim.NAME = 'Anim'; + +Anim.prototype = { /** * Provides a readable name for the Anim instance. * @method toString * @return {String} */ toString: function() { - var el = this.getEl(); - var id = el.id || el.tagName || el; - return ("Anim " + id); + var el = this.getEl() || {}; + var id = el.id || el.tagName; + return (this.constructor.NAME + ': ' + id); }, patterns: { // cached for performance @@ -86,7 +92,7 @@ YAHOO.util.Anim.prototype = { val = (val > 0) ? val : 0; } - YAHOO.util.Dom.setStyle(this.getEl(), attr, val + unit); + Y.Dom.setStyle(this.getEl(), attr, val + unit); }, /** @@ -97,7 +103,7 @@ YAHOO.util.Anim.prototype = { */ getAttribute: function(attr) { var el = this.getEl(); - var val = YAHOO.util.Dom.getStyle(el, attr); + var val = Y.Dom.getStyle(el, attr); if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) { return parseFloat(val); @@ -108,7 +114,7 @@ YAHOO.util.Anim.prototype = { var box = !!( a[2] ); // width or height // use offsets for width/height and abs pos top/left - if ( box || (YAHOO.util.Dom.getStyle(el, 'position') == 'absolute' && pos) ) { + if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) { val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)]; } else { // default to zero for other 'auto' val = 0; @@ -219,7 +225,7 @@ YAHOO.util.Anim.prototype = { * @private * @type HTMLElement */ - el = YAHOO.util.Dom.get(el); + el = Y.Dom.get(el); /** * The collection of attributes to be animated. @@ -246,7 +252,7 @@ YAHOO.util.Anim.prototype = { * @property method * @type Function */ - this.method = method || YAHOO.util.Easing.easeNone; + this.method = method || Y.Easing.easeNone; /** * Whether or not the duration should be treated as seconds. @@ -270,14 +276,14 @@ YAHOO.util.Anim.prototype = { * @property totalFrames * @type Int */ - this.totalFrames = YAHOO.util.AnimMgr.fps; + this.totalFrames = Y.AnimMgr.fps; /** * Changes the animated element * @method setEl */ this.setEl = function(element) { - el = YAHOO.util.Dom.get(element); + el = Y.Dom.get(element); }; /** @@ -320,12 +326,12 @@ YAHOO.util.Anim.prototype = { this.currentFrame = 0; - this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration; + this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration; - if (this.duration === 0 && this.useSeconds) { - this.totalFrames = 1; // jump to last frame if no duration + if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration + this.totalFrames = 1; } - YAHOO.util.AnimMgr.registerElement(this); + Y.AnimMgr.registerElement(this); return true; }; @@ -335,11 +341,15 @@ YAHOO.util.Anim.prototype = { * @param {Boolean} finish (optional) If true, animation will jump to final frame. */ this.stop = function(finish) { + if (!this.isAnimated()) { // nothing to stop + return false; + } + if (finish) { this.currentFrame = this.totalFrames; this._onTween.fire(); } - YAHOO.util.AnimMgr.stop(this); + Y.AnimMgr.stop(this); }; var onStart = function() { @@ -410,39 +420,39 @@ YAHOO.util.Anim.prototype = { * Custom event that fires after onStart, useful in subclassing * @private */ - this._onStart = new YAHOO.util.CustomEvent('_start', this, true); + this._onStart = new Y.CustomEvent('_start', this, true); /** * Custom event that fires when animation begins * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction) * @event onStart */ - this.onStart = new YAHOO.util.CustomEvent('start', this); + this.onStart = new Y.CustomEvent('start', this); /** * Custom event that fires between each frame * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction) * @event onTween */ - this.onTween = new YAHOO.util.CustomEvent('tween', this); + this.onTween = new Y.CustomEvent('tween', this); /** * Custom event that fires after onTween * @private */ - this._onTween = new YAHOO.util.CustomEvent('_tween', this, true); + this._onTween = new Y.CustomEvent('_tween', this, true); /** * Custom event that fires when animation ends * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction) * @event onComplete */ - this.onComplete = new YAHOO.util.CustomEvent('complete', this); + this.onComplete = new Y.CustomEvent('complete', this); /** * Custom event that fires after onComplete * @private */ - this._onComplete = new YAHOO.util.CustomEvent('_complete', this, true); + this._onComplete = new Y.CustomEvent('_complete', this, true); this._onStart.subscribe(onStart); this._onTween.subscribe(onTween); @@ -450,6 +460,8 @@ YAHOO.util.Anim.prototype = { } }; + Y.Anim = Anim; +})(); /** * Handles animation queueing and threading. * Used by Anim and subclasses. @@ -520,12 +532,12 @@ YAHOO.util.AnimMgr = new function() { * @private */ this.unRegister = function(tween, index) { - tween._onComplete.fire(); index = index || getIndex(tween); - if (index == -1) { + if (!tween.isAnimated() || index == -1) { return false; } + tween._onComplete.fire(); queue.splice(index, 1); tweenCount -= 1; @@ -558,9 +570,7 @@ YAHOO.util.AnimMgr = new function() { clearInterval(thread); for (var i = 0, len = queue.length; i < len; ++i) { - if ( queue[0].isAnimated() ) { - this.unRegister(queue[0], 0); - } + this.unRegister(queue[0], 0); } queue = []; @@ -690,23 +700,19 @@ YAHOO.util.Bezier = new function() { * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ - YAHOO.util.ColorAnim = function(el, attributes, duration, method) { - YAHOO.util.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + var ColorAnim = function(el, attributes, duration, method) { + ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); }; - YAHOO.extend(YAHOO.util.ColorAnim, YAHOO.util.Anim); - + ColorAnim.NAME = 'ColorAnim'; + // shorthand var Y = YAHOO.util; - var superclass = Y.ColorAnim.superclass; - var proto = Y.ColorAnim.prototype; - - proto.toString = function() { - var el = this.getEl(); - var id = el.id || el.tagName; - return ("ColorAnim " + id); - }; + YAHOO.extend(ColorAnim, Y.Anim); + var superclass = ColorAnim.superclass; + var proto = ColorAnim.prototype; + proto.patterns.color = /color$/i; proto.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i; proto.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i; @@ -802,8 +808,10 @@ YAHOO.util.Bezier = new function() { this.runtimeAttributes[attr].end = end; } }; + + Y.ColorAnim = ColorAnim; })(); -/* +/*! TERMS OF USE - EASING EQUATIONS Open source under the BSD License. Copyright 2001 Robert Penner All rights reserved. @@ -1153,7 +1161,7 @@ YAHOO.util.Easing = { * @requires YAHOO.util.Event * @requires YAHOO.util.CustomEvent * @constructor - * @extends YAHOO.util.Anim + * @extends YAHOO.util.ColorAnim * @param {String | HTMLElement} el Reference to the element that will be animated * @param {Object} attributes The attribute(s) to be animated. * Each attribute is an object with at minimum a "to" or "by" member defined. @@ -1162,25 +1170,22 @@ YAHOO.util.Easing = { * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ - YAHOO.util.Motion = function(el, attributes, duration, method) { + var Motion = function(el, attributes, duration, method) { if (el) { // dont break existing subclasses not using YAHOO.extend - YAHOO.util.Motion.superclass.constructor.call(this, el, attributes, duration, method); + Motion.superclass.constructor.call(this, el, attributes, duration, method); } }; - YAHOO.extend(YAHOO.util.Motion, YAHOO.util.ColorAnim); - + + Motion.NAME = 'Motion'; + // shorthand var Y = YAHOO.util; - var superclass = Y.Motion.superclass; - var proto = Y.Motion.prototype; - - proto.toString = function() { - var el = this.getEl(); - var id = el.id || el.tagName; - return ("Motion " + id); - }; + YAHOO.extend(Motion, Y.ColorAnim); + var superclass = Motion.superclass; + var proto = Motion.prototype; + proto.patterns.points = /^points$/i; proto.setAttribute = function(attr, val, unit) { @@ -1289,6 +1294,8 @@ YAHOO.util.Easing = { var isset = function(prop) { return (typeof prop !== 'undefined'); }; + + Y.Motion = Motion; })(); (function() { /** @@ -1304,7 +1311,7 @@ YAHOO.util.Easing = { * @requires YAHOO.util.Dom * @requires YAHOO.util.Event * @requires YAHOO.util.CustomEvent - * @extends YAHOO.util.Anim + * @extends YAHOO.util.ColorAnim * @constructor * @param {String or HTMLElement} el Reference to the element that will be animated * @param {Object} attributes The attribute(s) to be animated. @@ -1314,24 +1321,20 @@ YAHOO.util.Easing = { * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) */ - YAHOO.util.Scroll = function(el, attributes, duration, method) { + var Scroll = function(el, attributes, duration, method) { if (el) { // dont break existing subclasses not using YAHOO.extend - YAHOO.util.Scroll.superclass.constructor.call(this, el, attributes, duration, method); + Scroll.superclass.constructor.call(this, el, attributes, duration, method); } }; - YAHOO.extend(YAHOO.util.Scroll, YAHOO.util.ColorAnim); - + Scroll.NAME = 'Scroll'; + // shorthand var Y = YAHOO.util; - var superclass = Y.Scroll.superclass; - var proto = Y.Scroll.prototype; - - proto.toString = function() { - var el = this.getEl(); - var id = el.id || el.tagName; - return ("Scroll " + id); - }; + YAHOO.extend(Scroll, Y.ColorAnim); + + var superclass = Scroll.superclass; + var proto = Scroll.prototype; proto.doMethod = function(attr, start, end) { var val = null; @@ -1371,5 +1374,7 @@ YAHOO.util.Easing = { superclass.setAttribute.call(this, attr, val, unit); } }; + + Y.Scroll = Scroll; })(); -YAHOO.register("animation", YAHOO.util.Anim, {version: "2.3.0", build: "442"}); +YAHOO.register("animation", YAHOO.util.Anim, {version: "2.5.0", build: "895"}); diff --git a/lib/yui/assets/skins/sam/asc.gif b/lib/yui/assets/skins/sam/asc.gif new file mode 100644 index 0000000000..a1fe7385d5 Binary files /dev/null and b/lib/yui/assets/skins/sam/asc.gif differ diff --git a/lib/yui/assets/skins/sam/autocomplete.css b/lib/yui/assets/skins/sam/autocomplete.css index 98b473e26a..ed09f85f97 100755 --- a/lib/yui/assets/skins/sam/autocomplete.css +++ b/lib/yui/assets/skins/sam/autocomplete.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;} diff --git a/lib/yui/assets/skins/sam/button.css b/lib/yui/assets/skins/sam/button.css index c1e05f48a2..a34617a8c8 100755 --- a/lib/yui/assets/skins/sam/button.css +++ b/lib/yui/assets/skins/sam/button.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-skin-sam .yui-button{display:-moz-inline-box;display:inline-block;border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{display:block;*display:inline-block;border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{display:block;*display:inline-block;padding:0 10px;border:none;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button button{*overflow:visible;background-color:transparent;cursor:pointer;cursor:hand;}.yui-skin-sam .yui-button a{text-decoration:none;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} +.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:2;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} diff --git a/lib/yui/assets/skins/sam/calendar.css b/lib/yui/assets/skins/sam/calendar.css index 18e466b658..f5a7f8f0ea 100755 --- a/lib/yui/assets/skins/sam/calendar.css +++ b/lib/yui/assets/skins/sam/calendar.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;} +.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;} diff --git a/lib/yui/assets/skins/sam/colorpicker.css b/lib/yui/assets/skins/sam/colorpicker.css index f07aa5140b..b4a18d7eaa 100755 --- a/lib/yui/assets/skins/sam/colorpicker.css +++ b/lib/yui/assets/skins/sam/colorpicker.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;list-style:none;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;} +.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;} diff --git a/lib/yui/assets/skins/sam/container.css b/lib/yui/assets/skins/sam/container.css index 39eb8f52f8..b0d7e4925f 100755 --- a/lib/yui/assets/skins/sam/container.css +++ b/lib/yui/assets/skins/sam/container.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:1;}yui-panel-container form{margin:0;}.masked .yui-panel-container{z-index:2;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft .default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft .default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft .default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);} +.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay{display:none;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);} diff --git a/lib/yui/assets/skins/sam/datatable.css b/lib/yui/assets/skins/sam/datatable.css index bff0dbf339..ac21fba675 100755 --- a/lib/yui/assets/skins/sam/datatable.css +++ b/lib/yui/assets/skins/sam/datatable.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-dt-table th,.yui-dt-table td{overflow:hidden;}th .yui-dt-header{position:relative;}th .yui-dt-label{position:relative;}th .yui-dt-resizer{position:absolute;margin-right:-6px;right:0;bottom:0;width:6px;height:100%;cursor:w-resize;cursor:col-resize;}.yui-dt-scrollable{*overflow-y:auto;}.yui-dt-scrollable thead{display:block;}.yui-dt-scrollable thead tr{position:relative;}.yui-dt-scrollbody{display:block;overflow:auto;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt-table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-table caption{padding-bottom:1em;text-align:left;}.yui-skin-sam .yui-dt-table th{background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table td{padding:4px 10px 4px 10px;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt-table td{white-space:nowrap;text-align:left;}.yui-skin-sam .yui-dt-table th.yui-dt-last,.yui-skin-sam .yui-dt-table td.yui-dt-last{border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-table thead{border:1px solid #989898;}.yui-skin-sam .yui-dt-table tbody{border-left:1px solid #7F7F7F;border-right:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-sortable{padding-right:5px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:15px;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-asc .yui-dt-header{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-header{background:url(dt-arrow-dn.png) no-repeat right;}.yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;} +.yui-dt{border:1px solid transparent;}.yui-dt-noop{border:none;}.yui-dt-liner{overflow:hidden;}.yui-dt-bd thead tr,.yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-liner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;}.yui-skin-sam th.yui-dt-hidden .yui-dt-liner,.yui-skin-sam td.yui-dt-hidden .yui-dt-liner{margin:0;padding:0;overflow:hidden;white-space:nowrap;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border-spacing:0;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{padding-bottom:1em;text-align:left;}.yui-skin-sam .yui-dt-hd table{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-bd table{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd table{border:0px;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd table{border:0px;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th{background:#D8D8DA url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px;}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red;}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;text-align:left;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-resizer{width:6px;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-empty{background-color:#FFF;}.yui-skin-sam .yui-dt-error{background-color:#FFF;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px;}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-dn.png) no-repeat right;}.yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-pg-container,.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current-page,.yui-skin-sam .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam a.yui-pg-first,.yui-skin-sam a.yui-pg-previous,.yui-skin-sam a.yui-pg-next,.yui-skin-sam a.yui-pg-last,.yui-skin-sam a.yui-pg-page,.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-pg-page,.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;background-color:#fff}.yui-skin-sam .yui-pg-current-page,.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;}.yui-skin-sam .yui-pg-pages{margin-left:1ex;margin-right:1ex;}.yui-skin-sam .yui-pg-page{margin-right:1px;margin-left:1px;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{margin-right:3px;}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{margin-left:3px;}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-right:1em;margin-left:1em;} diff --git a/lib/yui/assets/skins/sam/desc.gif b/lib/yui/assets/skins/sam/desc.gif new file mode 100644 index 0000000000..c114f290c8 Binary files /dev/null and b/lib/yui/assets/skins/sam/desc.gif differ diff --git a/lib/yui/assets/skins/sam/dt-arrow-dn.png b/lib/yui/assets/skins/sam/dt-arrow-dn.png index 2178f11e32..85fda0bbca 100755 Binary files a/lib/yui/assets/skins/sam/dt-arrow-dn.png and b/lib/yui/assets/skins/sam/dt-arrow-dn.png differ diff --git a/lib/yui/assets/skins/sam/dt-arrow-up.png b/lib/yui/assets/skins/sam/dt-arrow-up.png index 5a543a573e..1c674316ae 100755 Binary files a/lib/yui/assets/skins/sam/dt-arrow-up.png and b/lib/yui/assets/skins/sam/dt-arrow-up.png differ diff --git a/lib/yui/assets/skins/sam/editor.css b/lib/yui/assets/skins/sam/editor.css index 950a2a69d4..05d6f11248 100755 --- a/lib/yui/assets/skins/sam/editor.css +++ b/lib/yui/assets/skins/sam/editor.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;color:#999;padding-left:.25em;}.yui-toolbar-container span.yui-toolbar-separator{border-left:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;float:left;}.yui-toolbar-container .yui-button{border:1px solid #999999;background:none;padding:0;cursor:pointer;height:20px;width:30px;overflow:hidden;display:block;float:left;margin:0 1px;position:relative;filter:none;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{margin:0;border:0;display:block;text-indent:50px !important;width:200px;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{opacity:.5;filter:alpha(opacity=50);cursor:default;}.yui-toolbar-container .yui-button a{padding:0;}.yui-toolbar-container .yui-button.ie6.hover{background-color:#98D5FC !important;}.yui-toolbar-container .yui-toolbar-select{height:20px;width:auto;}.yui-toolbar-container .yui-toolbar-select a{border:none;background-color:transparent;height:19px;width:100%;text-align:left;cursor:pointer;opacity:1;filter:none;}.yui-toolbar-container .yui-toolbar-select .first-child{width:100% !important;}.yui-toolbar-container .yui-toolbar-select .first-child a{text-indent:3px !important;width:100% !important;}.yui-toolbar-container .yui-toolbar-select.yui-button-disabled a{cursor:default;opacity:1;filter:none;display:block;}.yui-toolbar-container .yui-toolbar-fontname{width:125px;}.yui-toolbar-container .yui-toolbar-heading{width:80px;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-push-button-focus{border:1px dotted #999;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;width:35px;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{border:none;background-color:transparent;background-image:none;background-repeat:no-repeat;width:28px;height:20px;text-align:left;text-indent:2px !important;z-index:0;opacity:1;filter:none;}.yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.up,.yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.down{position:absolute;display:block right:0;cursor:pointer;text-indent:999px;overflow:hidden;z-index:1;border:none;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{float:none;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:hidden;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{height:1em;padding:0.25em;font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding-left:23px;text-align:left;margin:.5em;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;overflow:auto;width:100%;zoom:1;text-align:left;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{width:100px;}.yui-editor-panel .yui-toolbar-group-border{width:175px;*width:190px;}.yui-editor-panel .yui-toolbar-group-textflow{width:150px;*width:180px;}.yui-editor-panel .height-width{float:left;width:68%;}.yui-editor-panel .height-width h3{padding-right:11px;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{width:50px;font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-container div.yuimenu li.yuimenuitem a{float:none;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{border-bottom:3px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{border-bottom:4px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{border-bottom:5px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-toolbar-container .yui-toolbar-bordersize-menu{width:30px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel{display:block;width:50px;color:#ffffff;position:relative;margin-left:20px;padding:0;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-14px;}.yui-toolbar-bordersize-menu .yuimenuitem a.selected,.yui-toolbar-bordertype-menu .yuimenuitem a.selected{color:#B3D4FF;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-0 a{color:#000;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-0 a.selected{color:#fff;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;}div.yuimenu.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;}div.yuimenu.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;}div.yuimenu.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-skin-sam .yui-toolbar-container{border:1px solid #808080;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0.25em;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-container .yui-editor-editable-container{border:1px solid #808080;border-top:none;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border:1px solid #808080;border-top:none;color:#999;text-align:left;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:2px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-toolbar-container .yui-toolbar-select .first-child a{padding-top:0;}.yui-skin-sam .yui-toolbar-container .yui-button{background:url(sprite.png) repeat-x 0 0;border:1px solid #808080;cursor:pointer;height:22px;margin:0;overflow:hidden;position:relative;display:block;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) no-repeat 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background-image:url( editor-sprite.gif );background-repeat:no-repeat;background-position:30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .visible .yuimenuitemlabel{text-align:left;}.yui-skin-sam .yui-button-menu{background-color:#ffffff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname,.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold,.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic,.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript,.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor,.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat,.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft,.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter,.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright,.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent,.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent,.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist,.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink,.yui-skin-sam .yui-toolbar-container .yui-toolbar-left,.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline,.yui-skin-sam .yui-toolbar-container .yui-toolbar-block,.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordersize,.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordertype{border-right:none;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-button .first-child a{width:500px;position:absolute;_position:static;top:-1px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{position:static;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{height:19px;left:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.up{top:0;right:0;background-image:url( editor-sprite.gif );background-position:0 -1221px;overflow:hidden;height:8px;width:8px;min-height:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.down{bottom:0;right:0;background-image:url( editor-sprite.gif );background-position:0 -1187px;overflow:hidden;height:8px;width:8px;min-height:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background-image:url( editor-sprite.gif );background-position:0px -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;*width:195px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:185px;}.yui-skin-sam .yui-editor-panel .hd{margin:13px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;*margin-left:-1px;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0;z-index:-1;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background-image:url( editor-sprite.gif );background-position:0 -1260px;display:block;height:20px;left:0;position:absolute;top:0;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background-image:url( editor-knob.gif );background-repeat:no-repeat;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;padding-top:5px;}.yui-editor-blankimage{background-image:url( blankimage.png );} +.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );} diff --git a/lib/yui/assets/skins/sam/header_background.png b/lib/yui/assets/skins/sam/header_background.png new file mode 100644 index 0000000000..3ef7909d3e Binary files /dev/null and b/lib/yui/assets/skins/sam/header_background.png differ diff --git a/lib/yui/assets/skins/sam/imagecropper.css b/lib/yui/assets/skins/sam/imagecropper.css new file mode 100644 index 0000000000..66f861b6af --- /dev/null +++ b/lib/yui/assets/skins/sam/imagecropper.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +.yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;} diff --git a/lib/yui/assets/skins/sam/layout.css b/lib/yui/assets/skins/sam/layout.css new file mode 100644 index 0000000000..cd33f52a52 --- /dev/null +++ b/lib/yui/assets/skins/sam/layout.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +.yui-layout-loading{visibility:hidden;}body.yui-layout{overflow:hidden;position:relative;padding:0;margin:0;}.yui-layout-doc{position:relative;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;overflow:hidden;}.yui-layout-unit-top{position:absolute;top:0;left:0;width:100%;}.yui-layout-unit-left{position:absolute;top:0;left:0;}.yui-layout-unit-right{position:absolute;top:0;right:0;}.yui-layout-unit-bottom{position:absolute;bottom:0;left:0;width:100%;}.yui-layout-unit-center{position:absolute;top:0;left:0;width:100%;}.yui-layout div.yui-layout-hd{position:absolute;top:0;left:0;zoom:1;width:100%;overflow:hidden;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;overflow:hidden;}.yui-layout .yui-layout-scroll div.yui-layout-bd{overflow:auto;}.yui-layout div.yui-layout-ft{position:absolute;bottom:0;left:0;width:100%;zoom:1;overflow:hidden;}.yui-layout .yui-layout-unit div.yui-layout-hd h2{text-align:left;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .close{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse-close{right:25px;}.yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#c0c0c0;display:none;}.yui-layout .yui-layout-clip .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0px;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.yui-layout .yui-layout-unit .yui-content{overflow:hidden;}.yui-layout .yui-layout-unit .yui-layout-scroll{overflow:auto;}.yui-skin-sam .yui-layout .yui-resize-proxy{border:none;font-size:0;margin:0;padding:0;}.yui-skin-sam .yui-layout .yui-resize-resizing .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-skin-sam .yui-layout .yui-resize-proxy div{position:absolute;border:1px solid #808080;background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-resize .yui-resize-handle-active{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-b{width:100%;bottom:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-t{width:100%;top:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-layout-unit-left div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -160px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-left .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -140px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-right div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -200px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-right .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -120px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -220px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-top .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -240px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-bottom div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -260px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-bottom .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -180px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd .close{background:transparent url(layout_sprite.png) no-repeat -20px -100px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-hd{background:url(sprite.png) repeat-x 0 -1400px;border:1px solid #808080;}.yui-skin-sam .yui-layout{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd h2{font-weight:bold;color:#fff;padding:3px;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd{border:1px solid #808080;border-bottom:none;border-top:none;*border-bottom-width:0;*border-top-width:0;background-color:#f2f2f2;text-align:left;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-noft{border-bottom:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd{border-top:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#EDF5FF;display:none;border:1px solid #808080;}.yui-skin-sam .yui-layout div.yui-layout-ft{border:1px solid #808080;border-top:none;*border-top-width:0;background-color:#f2f2f2;}.yui-skin-sam .yui-layout-unit .yui-resize-handle{background-color:transparent;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-b{right:0;bottom:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-l .yui-layout-resize-knob{position:absolute;height:16px;width:6px;top:45%;left:0px;background:transparent url(layout_sprite.png) no-repeat 0 -5px;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob{position:absolute;height:6px;width:16px;left:45%;background:transparent url(layout_sprite.png) no-repeat -20px 0;} diff --git a/lib/yui/assets/skins/sam/layout_sprite.png b/lib/yui/assets/skins/sam/layout_sprite.png new file mode 100644 index 0000000000..d6fce3c7a5 Binary files /dev/null and b/lib/yui/assets/skins/sam/layout_sprite.png differ diff --git a/lib/yui/assets/skins/sam/logger.css b/lib/yui/assets/skins/sam/logger.css index 5b8077f184..f91c8c333e 100755 --- a/lib/yui/assets/skins/sam/logger.css +++ b/lib/yui/assets/skins/sam/logger.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ .yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;} diff --git a/lib/yui/assets/skins/sam/menu.css b/lib/yui/assets/skins/sam/menu.css index 046a9c6a4f..bb8989a2b7 100755 --- a/lib/yui/assets/skins/sam/menu.css +++ b/lib/yui/assets/skins/sam/menu.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;visibility:hidden;}.yuimenubar ul,.yuimenu ul{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{white-space:nowrap;}.yui-menu-shadow{position:absolute;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubar .bd,.yui-skin-sam .yuimenubar ul{*zoom:1;}.yui-skin-sam .yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yui-skin-sam .yuimenubaritem{float:left;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{display:block;*display:inline-block;font-size:93%;line-height:2;*line-height:1.9;padding:0 10px;color:#000;text-decoration:none;outline:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;}.yui-skin-sam .yuimenubaritemlabel .submenuindicator{width:1px;height:1px;top:0;left:0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel .submenuindicator{top:50%;right:8px;left:auto;margin-top:-3px;height:4px;width:7px;text-indent:8px;background-position:-16px -856px;}.yui-skin-sam .yuimenubaritem a.selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubar a.selected .submenuindicator{background:transparent;}.yui-skin-sam .yuimenubarnav a.selected .submenuindicator{background:url(sprite.png) repeat-x -16px -856px;}.yui-skin-sam .yuimenubaritem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.disabled .submenuindicator{background-position:-16px -881px;}.yui-skin-sam .yuimenu .bd{position:relative;top:0;left:0;border:solid 1px #808080;background-color:#fff;z-index:1;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-size:93%;font-weight:bold;line-height:1.5;*line-height:1.45;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{position:relative;height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{z-index:2;border-bottom-color:#ccc;margin-bottom:-1px;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{z-index:3;border-top-color:#ccc;margin-top:-1px;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitemlabel{font-size:93%;line-height:1.5;*line-height:1.45;padding:0 20px;display:block;color:#000;text-decoration:none;outline:none;position:relative;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{font-style:normal;margin:0 0 0 40px;}.yui-skin-sam .yuimenuitemlabel .submenuindicator,.yui-skin-sam .yuimenuitemlabel .checkedindicator,.yui-skin-sam .yuimenubaritemlabel .submenuindicator{position:absolute;overflow:hidden;background:url(sprite.png) no-repeat;}.yui-skin-sam .yuimenuitemlabel .submenuindicator{top:50%;right:8px;margin-top:-3px;height:7px;width:4px;text-indent:5px;background-position:0 -906px;}.yui-skin-sam .yuimenuitemlabel .checkedindicator{top:50%;left:8px;margin-top:-3px;height:7px;width:7px;text-indent:8px;background-position:0 -1006px;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);visibility:visible;}.yui-skin-sam .visible .bd,.yui-skin-sam .visible .yuimenuitem{_zoom:1;}.yui-skin-sam .visible .yuimenuitemlabel{*zoom:1;}.yui-skin-sam .visible .yuimenuitemlabel .helptext{float:right;width:100%;text-align:right;margin:-1.5em 0 0 0;*margin:-1.45em 0 0 0;}.yui-skin-sam .yuimenuitem a.selected{background:#B3D4FF;}.yui-skin-sam .yuimenubar .yuimenuitem a.selected .submenuindicator{background:url(sprite.png) no-repeat 0 -906px;}.yui-skin-sam .yuimenubarnav .yuimenuitem a.selected{border-width:0;margin:0;*left:0;}.yui-skin-sam .yuimenuitem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem a.disabled .submenuindicator{background-position:0 -931px;}.yui-skin-sam .yuimenuitem a.disabled .checkedindicator{background-position:0 -1031px;} +.yuimenubar{visibility:visible;position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{visibility:hidden;position:absolute;top:-10000px;left:-10000px;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);} diff --git a/lib/yui/assets/skins/sam/menubaritem_submenuindicator.png b/lib/yui/assets/skins/sam/menubaritem_submenuindicator.png new file mode 100644 index 0000000000..030941c9cf Binary files /dev/null and b/lib/yui/assets/skins/sam/menubaritem_submenuindicator.png differ diff --git a/lib/yui/assets/skins/sam/menubaritem_submenuindicator_disabled.png b/lib/yui/assets/skins/sam/menubaritem_submenuindicator_disabled.png new file mode 100644 index 0000000000..6c16122305 Binary files /dev/null and b/lib/yui/assets/skins/sam/menubaritem_submenuindicator_disabled.png differ diff --git a/lib/yui/assets/skins/sam/menuitem_checkbox.png b/lib/yui/assets/skins/sam/menuitem_checkbox.png new file mode 100644 index 0000000000..1437a4f4b9 Binary files /dev/null and b/lib/yui/assets/skins/sam/menuitem_checkbox.png differ diff --git a/lib/yui/assets/skins/sam/menuitem_checkbox_disabled.png b/lib/yui/assets/skins/sam/menuitem_checkbox_disabled.png new file mode 100644 index 0000000000..5d5b9985e3 Binary files /dev/null and b/lib/yui/assets/skins/sam/menuitem_checkbox_disabled.png differ diff --git a/lib/yui/assets/skins/sam/menuitem_submenuindicator.png b/lib/yui/assets/skins/sam/menuitem_submenuindicator.png new file mode 100644 index 0000000000..ea4f660291 Binary files /dev/null and b/lib/yui/assets/skins/sam/menuitem_submenuindicator.png differ diff --git a/lib/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png b/lib/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png new file mode 100644 index 0000000000..427d60a38a Binary files /dev/null and b/lib/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png differ diff --git a/lib/yui/assets/skins/sam/profilerviewer.css b/lib/yui/assets/skins/sam/profilerviewer.css new file mode 100644 index 0000000000..dce1d57dde --- /dev/null +++ b/lib/yui/assets/skins/sam/profilerviewer.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +.yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;} diff --git a/lib/yui/assets/skins/sam/resize.css b/lib/yui/assets/skins/sam/resize.css new file mode 100644 index 0000000000..45a907d04c --- /dev/null +++ b/lib/yui/assets/skins/sam/resize.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +.yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-handle-inner-l{background:transparent url( layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;} diff --git a/lib/yui/assets/skins/sam/simpleeditor.css b/lib/yui/assets/skins/sam/simpleeditor.css new file mode 100644 index 0000000000..05d6f11248 --- /dev/null +++ b/lib/yui/assets/skins/sam/simpleeditor.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );} diff --git a/lib/yui/assets/skins/sam/skin.css b/lib/yui/assets/skins/sam/skin.css index 66c2fc5612..ba3a7d141a 100755 --- a/lib/yui/assets/skins/sam/skin.css +++ b/lib/yui/assets/skins/sam/skin.css @@ -1,18 +1,23 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;} -.yui-skin-sam .yui-button{display:-moz-inline-box;display:inline-block;border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{display:block;*display:inline-block;border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{display:block;*display:inline-block;padding:0 10px;border:none;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button button{*overflow:visible;background-color:transparent;cursor:pointer;cursor:hand;}.yui-skin-sam .yui-button a{text-decoration:none;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} -.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;} -.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;list-style:none;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;} -.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:1;}yui-panel-container form{margin:0;}.masked .yui-panel-container{z-index:2;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft .default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft .default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft .default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);} -.yui-dt-table th,.yui-dt-table td{overflow:hidden;}th .yui-dt-header{position:relative;}th .yui-dt-label{position:relative;}th .yui-dt-resizer{position:absolute;margin-right:-6px;right:0;bottom:0;width:6px;height:100%;cursor:w-resize;cursor:col-resize;}.yui-dt-scrollable{*overflow-y:auto;}.yui-dt-scrollable thead{display:block;}.yui-dt-scrollable thead tr{position:relative;}.yui-dt-scrollbody{display:block;overflow:auto;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt-table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-table caption{padding-bottom:1em;text-align:left;}.yui-skin-sam .yui-dt-table th{background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt-table th,.yui-skin-sam .yui-dt-table td{padding:4px 10px 4px 10px;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt-table td{white-space:nowrap;text-align:left;}.yui-skin-sam .yui-dt-table th.yui-dt-last,.yui-skin-sam .yui-dt-table td.yui-dt-last{border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-table thead{border:1px solid #989898;}.yui-skin-sam .yui-dt-table tbody{border-left:1px solid #7F7F7F;border-right:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-sortable{padding-right:5px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:15px;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-asc .yui-dt-header{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-header{background:url(dt-arrow-dn.png) no-repeat right;}.yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-dt-paginator .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;} -.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;color:#999;padding-left:.25em;}.yui-toolbar-container span.yui-toolbar-separator{border-left:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;float:left;}.yui-toolbar-container .yui-button{border:1px solid #999999;background:none;padding:0;cursor:pointer;height:20px;width:30px;overflow:hidden;display:block;float:left;margin:0 1px;position:relative;filter:none;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{margin:0;border:0;display:block;text-indent:50px !important;width:200px;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{opacity:.5;filter:alpha(opacity=50);cursor:default;}.yui-toolbar-container .yui-button a{padding:0;}.yui-toolbar-container .yui-button.ie6.hover{background-color:#98D5FC !important;}.yui-toolbar-container .yui-toolbar-select{height:20px;width:auto;}.yui-toolbar-container .yui-toolbar-select a{border:none;background-color:transparent;height:19px;width:100%;text-align:left;cursor:pointer;opacity:1;filter:none;}.yui-toolbar-container .yui-toolbar-select .first-child{width:100% !important;}.yui-toolbar-container .yui-toolbar-select .first-child a{text-indent:3px !important;width:100% !important;}.yui-toolbar-container .yui-toolbar-select.yui-button-disabled a{cursor:default;opacity:1;filter:none;display:block;}.yui-toolbar-container .yui-toolbar-fontname{width:125px;}.yui-toolbar-container .yui-toolbar-heading{width:80px;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-push-button-focus{border:1px dotted #999;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;width:35px;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{border:none;background-color:transparent;background-image:none;background-repeat:no-repeat;width:28px;height:20px;text-align:left;text-indent:2px !important;z-index:0;opacity:1;filter:none;}.yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.up,.yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.down{position:absolute;display:block right:0;cursor:pointer;text-indent:999px;overflow:hidden;z-index:1;border:none;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{float:none;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:hidden;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{height:1em;padding:0.25em;font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding-left:23px;text-align:left;margin:.5em;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;overflow:auto;width:100%;zoom:1;text-align:left;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{width:100px;}.yui-editor-panel .yui-toolbar-group-border{width:175px;*width:190px;}.yui-editor-panel .yui-toolbar-group-textflow{width:150px;*width:180px;}.yui-editor-panel .height-width{float:left;width:68%;}.yui-editor-panel .height-width h3{padding-right:11px;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{width:50px;font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-container div.yuimenu li.yuimenuitem a{float:none;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{border-bottom:3px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{border-bottom:4px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{border-bottom:5px solid black;text-indent:777px;overflow:hidden;display:block;width:22px;height:8px;position:absolute;left:2px;}.yui-toolbar-container .yui-toolbar-bordersize-menu{width:30px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel{display:block;width:50px;color:#ffffff;position:relative;margin-left:20px;padding:0;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-14px;}.yui-toolbar-bordersize-menu .yuimenuitem a.selected,.yui-toolbar-bordertype-menu .yuimenuitem a.selected{color:#B3D4FF;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-0 a{color:#000;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-0 a.selected{color:#fff;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;}div.yuimenu.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;}div.yuimenu.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;}div.yuimenu.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;}div.yuimenu.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-skin-sam .yui-toolbar-container{border:1px solid #808080;zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0.25em;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-container .yui-editor-editable-container{border:1px solid #808080;border-top:none;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border:1px solid #808080;border-top:none;color:#999;text-align:left;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:2px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-toolbar-container .yui-toolbar-select .first-child a{padding-top:0;}.yui-skin-sam .yui-toolbar-container .yui-button{background:url(sprite.png) repeat-x 0 0;border:1px solid #808080;cursor:pointer;height:22px;margin:0;overflow:hidden;position:relative;display:block;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) no-repeat 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background-image:url( editor-sprite.gif );background-repeat:no-repeat;background-position:30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .visible .yuimenuitemlabel{text-align:left;}.yui-skin-sam .yui-button-menu{background-color:#ffffff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname,.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold,.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic,.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript,.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor,.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat,.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft,.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter,.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright,.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent,.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent,.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist,.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink,.yui-skin-sam .yui-toolbar-container .yui-toolbar-left,.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline,.yui-skin-sam .yui-toolbar-container .yui-toolbar-block,.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordersize,.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordertype{border-right:none;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-button .first-child a{width:500px;position:absolute;_position:static;top:-1px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{position:static;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{height:19px;left:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.up{top:0;right:0;background-image:url( editor-sprite.gif );background-position:0 -1221px;overflow:hidden;height:8px;width:8px;min-height:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton.yui-button a.down{bottom:0;right:0;background-image:url( editor-sprite.gif );background-position:0 -1187px;overflow:hidden;height:8px;width:8px;min-height:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background-image:url( editor-sprite.gif );background-position:0px -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;*width:195px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:185px;}.yui-skin-sam .yui-editor-panel .hd{margin:13px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;*margin-left:-1px;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0;z-index:-1;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background-image:url( editor-sprite.gif );background-position:0 -1260px;display:block;height:20px;left:0;position:absolute;top:0;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background-image:url( editor-knob.gif );background-repeat:no-repeat;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;padding-top:5px;}.yui-editor-blankimage{background-image:url( blankimage.png );} +.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:2;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} +.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;} +.yui-picker-panel{background:#e3e3e3;border-color:#888;}.yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.yui-picker{position:relative;}.yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.yui-picker-hue-bg{-moz-outline:none;outline:0px none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.yui-picker-bg{-moz-outline:none;outline:0px none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../build/colorpicker/assets/picker_mask.png',sizingMethod='scale');}.yui-picker-mask{position:absolute;z-index:1;top:0px;left:0px;}.yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.yui-picker-controls .hd{background:transparent;border-width:0px !important;}.yui-picker-controls .bd{height:100px;border-width:0px !important;}.yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0}.yui-picker-controls li{padding:2px;list-style:none;margin:0}.yui-picker-controls input{font-size:0.85em;width:2.4em;}.yui-picker-hex-controls{clear:both;padding:2px;}.yui-picker-hex-controls input{width:4.6em;}.yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;} +.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay{display:none;}.yui-tt-shadow{position:absolute;}.yui-skin-sam .mask{background-color:#000;opacity:.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px 3px;}.yui-skin-sam .yui-panel{position:relative;*zoom:1;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{*zoom:1;*position:relative;border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .yui-panel-container.focused .yui-panel .hd{}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 5px 0 3px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;right:-3px;bottom:-3px;left:-3px;*top:3px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_right:0;_bottom:0;_left:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;*filter:alpha(opacity=12);} +.yui-dt{border:1px solid transparent;}.yui-dt-noop{border:none;}.yui-dt-liner{overflow:hidden;}.yui-dt-bd thead tr,.yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-liner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;}.yui-skin-sam th.yui-dt-hidden .yui-dt-liner,.yui-skin-sam td.yui-dt-hidden .yui-dt-liner{margin:0;padding:0;overflow:hidden;white-space:nowrap;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-editor{position:absolute;z-index:9000;}.yui-skin-sam .yui-dt table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:collapse;border-spacing:0;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{padding-bottom:1em;text-align:left;}.yui-skin-sam .yui-dt-hd table{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-bd table{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd table{border:0px;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd table{border:0px;}.yui-skin-sam .yui-dt-scrollable .yui-dt-hd{border-left:1px solid #7F7F7F;border-top:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt-scrollable .yui-dt-bd{border-left:1px solid #7F7F7F;border-bottom:1px solid #7F7F7F;border-right:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th{background:#D8D8DA url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yui-dt th,.yui-skin-sam .yui-dt th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom;}.yui-skin-sam .yui-dt th{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;}.yui-skin-sam .yui-dt-liner{margin:0;padding:0;padding:4px 10px 4px 10px;}.yui-skin-sam .yui-dt-coltarget{width:5px;background-color:red;}.yui-skin-sam .yui-dt td{margin:0;padding:0;border:none;border-right:1px solid #CBCBCB;text-align:left;}.yui-skin-sam .yui-dt-list td{border-right:none;}.yui-skin-sam .yui-dt-resizer{width:6px;}.yui-skin-sam .yui-dt-loading{background-color:#FFF;}.yui-skin-sam .yui-dt-empty{background-color:#FFF;}.yui-skin-sam .yui-dt-error{background-color:#FFF;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam th.yui-dt-asc,.yui-skin-sam th.yui-dt-desc{background:url(sprite.png) repeat-x 0 -100px;}.yui-skin-sam th.yui-dt-sortable .yui-dt-label{margin-right:10px;}.yui-skin-sam th.yui-dt-asc .yui-dt-liner{background:url(dt-arrow-up.png) no-repeat right;}.yui-skin-sam th.yui-dt-desc .yui-dt-liner{background:url(dt-arrow-dn.png) no-repeat right;}.yui-dt-editable{cursor:pointer;}.yui-dt-editor{text-align:left;background-color:#F2F2F2;border:1px solid #808080;padding:6px;}.yui-dt-editor label{padding-left:4px;padding-right:6px;}.yui-dt-editor .yui-dt-button{padding-top:6px;text-align:right;}.yui-dt-editor .yui-dt-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px;}.yui-dt-editor .yui-dt-button button.yui-dt-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584E0;border:1px solid #304369;color:#FFF}.yui-dt-editor .yui-dt-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000;}.yui-dt-editor .yui-dt-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000;}.yui-skin-sam tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam tr.yui-dt-odd{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam tr.yui-dt-odd td.yui-dt-desc{background-color:#DBEAFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd{background-color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-desc{background-color:#EDF5FF;}.yui-skin-sam th.yui-dt-highlighted,.yui-skin-sam th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam tr.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list th.yui-dt-highlighted,.yui-skin-sam .yui-dt-list th.yui-dt-highlighted a{background-color:#B2D2FF;}.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-highlighted td.yui-dt-desc,.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-highlighted,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-highlighted{cursor:pointer;background-color:#B2D2FF;}.yui-skin-sam th.yui-dt-selected,.yui-skin-sam th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam tr.yui-dt-selected td,.yui-skin-sam tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-dt-list th.yui-dt-selected,.yui-skin-sam .yui-dt-list th.yui-dt-selected a{background-color:#446CD7;}.yui-skin-sam .yui-dt-list tr.yui-dt-selected td,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-asc,.yui-skin-sam .yui-dt-list tr.yui-dt-selected td.yui-dt-desc{background-color:#426FD9;color:#FFF;}.yui-skin-sam .yui-dt-list tr.yui-dt-even td.yui-dt-selected,.yui-skin-sam .yui-dt-list tr.yui-dt-odd td.yui-dt-selected{background-color:#446CD7;color:#FFF;}.yui-skin-sam .yui-pg-container,.yui-skin-sam .yui-dt-paginator{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current-page,.yui-skin-sam .yui-dt-first,.yui-skin-sam .yui-dt-paginator .yui-dt-last,.yui-skin-sam .yui-dt-paginator .yui-dt-selected{padding:2px 6px;}.yui-skin-sam a.yui-pg-first,.yui-skin-sam a.yui-pg-previous,.yui-skin-sam a.yui-pg-next,.yui-skin-sam a.yui-pg-last,.yui-skin-sam a.yui-pg-page,.yui-skin-sam .yui-dt-paginator a.yui-dt-first,.yui-skin-sam .yui-dt-paginator a.yui-dt-last{text-decoration:none;}.yui-skin-sam .yui-dt-paginator .yui-dt-previous,.yui-skin-sam .yui-dt-paginator .yui-dt-next{display:none;}.yui-skin-sam a.yui-pg-page,.yui-skin-sam a.yui-dt-page{border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;background-color:#fff}.yui-skin-sam .yui-pg-current-page,.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;}.yui-skin-sam .yui-pg-pages{margin-left:1ex;margin-right:1ex;}.yui-skin-sam .yui-pg-page{margin-right:1px;margin-left:1px;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{margin-right:3px;}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{margin-left:3px;}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-right:1em;margin-left:1em;} +.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );} +.yui-crop{position:relative;}.yui-crop .yui-crop-mask{position:absolute;top:0;left:0;height:100%;width:100%;}.yui-crop .yui-resize{position:absolute;top:10px;left:10px;}.yui-crop .yui-crop-resize-mask{position:absolute;top:0;left:0;height:100%;width:100%;background-position:-10px -10px;overflow:hidden;}.yui-skin-sam .yui-crop .yui-crop-mask{background-color:#000;opacity:.5;filter:alpha(opacity=50);}.yui-skin-sam .yui-crop .yui-resize{border:1px dashed #fff;} +.yui-layout-loading{visibility:hidden;}body.yui-layout{overflow:hidden;position:relative;padding:0;margin:0;}.yui-layout-doc{position:relative;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;overflow:hidden;}.yui-layout-unit-top{position:absolute;top:0;left:0;width:100%;}.yui-layout-unit-left{position:absolute;top:0;left:0;}.yui-layout-unit-right{position:absolute;top:0;right:0;}.yui-layout-unit-bottom{position:absolute;bottom:0;left:0;width:100%;}.yui-layout-unit-center{position:absolute;top:0;left:0;width:100%;}.yui-layout div.yui-layout-hd{position:absolute;top:0;left:0;zoom:1;width:100%;overflow:hidden;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;overflow:hidden;}.yui-layout .yui-layout-scroll div.yui-layout-bd{overflow:auto;}.yui-layout div.yui-layout-ft{position:absolute;bottom:0;left:0;width:100%;zoom:1;overflow:hidden;}.yui-layout .yui-layout-unit div.yui-layout-hd h2{text-align:left;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .close{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0;}.yui-layout .yui-layout-unit div.yui-layout-hd .collapse-close{right:25px;}.yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#c0c0c0;display:none;}.yui-layout .yui-layout-clip .collapse{cursor:pointer;height:13px;position:absolute;right:2px;top:2px;width:17px;font-size:0px;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.yui-layout .yui-layout-unit .yui-content{overflow:hidden;}.yui-layout .yui-layout-unit .yui-layout-scroll{overflow:auto;}.yui-skin-sam .yui-layout .yui-resize-proxy{border:none;font-size:0;margin:0;padding:0;}.yui-skin-sam .yui-layout .yui-resize-resizing .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-skin-sam .yui-layout .yui-resize-proxy div{position:absolute;border:1px solid #808080;background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-resize .yui-resize-handle-active{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-b{width:100%;bottom:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-t{width:100%;top:0;left:0;height:5px;}.yui-skin-sam .yui-layout .yui-layout-unit-left div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -160px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-left .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -140px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-right div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -200px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-right .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -120px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -220px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-top .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -240px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit-bottom div.yui-layout-hd .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -260px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip-bottom .collapse{background:transparent url(layout_sprite.png) no-repeat -20px -180px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd .close{background:transparent url(layout_sprite.png) no-repeat -20px -100px;border:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-hd{background:url(sprite.png) repeat-x 0 -1400px;border:1px solid #808080;}.yui-skin-sam .yui-layout{background-color:#EDF5FF;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-hd h2{font-weight:bold;color:#fff;padding:3px;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd{border:1px solid #808080;border-bottom:none;border-top:none;*border-bottom-width:0;*border-top-width:0;background-color:#f2f2f2;text-align:left;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-noft{border-bottom:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd-nohd{border-top:1px solid #808080;}.yui-skin-sam .yui-layout .yui-layout-clip{position:absolute;height:20px;background-color:#EDF5FF;display:none;border:1px solid #808080;}.yui-skin-sam .yui-layout div.yui-layout-ft{border:1px solid #808080;border-top:none;*border-top-width:0;background-color:#f2f2f2;}.yui-skin-sam .yui-layout-unit .yui-resize-handle{background-color:transparent;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-b{right:0;bottom:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t{right:0;top:0;background-image:none;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-l .yui-layout-resize-knob{position:absolute;height:16px;width:6px;top:45%;left:0px;background:transparent url(layout_sprite.png) no-repeat 0 -5px;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-t .yui-layout-resize-knob,.yui-skin-sam .yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob{position:absolute;height:6px;width:16px;left:45%;background:transparent url(layout_sprite.png) no-repeat -20px 0;} .yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;} -.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;visibility:hidden;}.yuimenubar ul,.yuimenu ul{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{white-space:nowrap;}.yui-menu-shadow{position:absolute;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubar .bd,.yui-skin-sam .yuimenubar ul{*zoom:1;}.yui-skin-sam .yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yui-skin-sam .yuimenubaritem{float:left;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{display:block;*display:inline-block;font-size:93%;line-height:2;*line-height:1.9;padding:0 10px;color:#000;text-decoration:none;outline:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;}.yui-skin-sam .yuimenubaritemlabel .submenuindicator{width:1px;height:1px;top:0;left:0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel .submenuindicator{top:50%;right:8px;left:auto;margin-top:-3px;height:4px;width:7px;text-indent:8px;background-position:-16px -856px;}.yui-skin-sam .yuimenubaritem a.selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubar a.selected .submenuindicator{background:transparent;}.yui-skin-sam .yuimenubarnav a.selected .submenuindicator{background:url(sprite.png) repeat-x -16px -856px;}.yui-skin-sam .yuimenubaritem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritem a.disabled .submenuindicator{background-position:-16px -881px;}.yui-skin-sam .yuimenu .bd{position:relative;top:0;left:0;border:solid 1px #808080;background-color:#fff;z-index:1;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-size:93%;font-weight:bold;line-height:1.5;*line-height:1.45;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{position:relative;height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{z-index:2;border-bottom-color:#ccc;margin-bottom:-1px;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{z-index:3;border-top-color:#ccc;margin-top:-1px;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitemlabel{font-size:93%;line-height:1.5;*line-height:1.45;padding:0 20px;display:block;color:#000;text-decoration:none;outline:none;position:relative;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{font-style:normal;margin:0 0 0 40px;}.yui-skin-sam .yuimenuitemlabel .submenuindicator,.yui-skin-sam .yuimenuitemlabel .checkedindicator,.yui-skin-sam .yuimenubaritemlabel .submenuindicator{position:absolute;overflow:hidden;background:url(sprite.png) no-repeat;}.yui-skin-sam .yuimenuitemlabel .submenuindicator{top:50%;right:8px;margin-top:-3px;height:7px;width:4px;text-indent:5px;background-position:0 -906px;}.yui-skin-sam .yuimenuitemlabel .checkedindicator{top:50%;left:8px;margin-top:-3px;height:7px;width:7px;text-indent:8px;background-position:0 -1006px;}.yui-skin-sam .yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;opacity:.12;*filter:alpha(opacity=12);visibility:visible;}.yui-skin-sam .visible .bd,.yui-skin-sam .visible .yuimenuitem{_zoom:1;}.yui-skin-sam .visible .yuimenuitemlabel{*zoom:1;}.yui-skin-sam .visible .yuimenuitemlabel .helptext{float:right;width:100%;text-align:right;margin:-1.5em 0 0 0;*margin:-1.45em 0 0 0;}.yui-skin-sam .yuimenuitem a.selected{background:#B3D4FF;}.yui-skin-sam .yuimenubar .yuimenuitem a.selected .submenuindicator{background:url(sprite.png) no-repeat 0 -906px;}.yui-skin-sam .yuimenubarnav .yuimenuitem a.selected{border-width:0;margin:0;*left:0;}.yui-skin-sam .yuimenuitem a.disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem a.disabled .submenuindicator{background-position:0 -931px;}.yui-skin-sam .yuimenuitem a.disabled .checkedindicator{background-position:0 -1031px;} -.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{Xoutline:0;}.yui-navset .yui-nav a{Xposition:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;} -.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:18px;} +.yuimenubar{visibility:visible;position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{visibility:hidden;position:absolute;top:-10000px;left:-10000px;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;*filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);} +.yui-skin-sam .yui-pv{background-color:#4a4a4a;font:arial;position:relative;width:99%;z-index:1000;margin-bottom:1em;overflow:hidden;}.yui-skin-sam .yui-pv .hd{background:url(header_background.png) repeat-x;min-height:30px;overflow:hidden;zoom:1;padding:2px 0;}.yui-skin-sam .yui-pv .hd h4{padding:8px 10px;margin:0;font:bold 14px arial;color:#fff;}.yui-skin-sam .yui-pv .hd a{background:#3f6bc3;font:bold 11px arial;color:#fff;padding:4px;margin:3px 10px 0 0;border:1px solid #3f567d;cursor:pointer;display:block;float:right;}.yui-skin-sam .yui-pv .hd span{display:none;}.yui-skin-sam .yui-pv .hd span.yui-pv-busy{height:18px;width:18px;background:url(wait.gif) no-repeat;overflow:hidden;display:block;float:right;margin:4px 10px 0 0;}.yui-skin-sam .yui-pv .hd:after,.yui-pv .bd:after,.yui-skin-sam .yui-pv-chartlegend dl:after{content:'.';visibility:hidden;clear:left;height:0;display:block;}.yui-skin-sam .yui-pv .bd{position:relative;zoom:1;overflow-x:auto;overflow-y:hidden;}.yui-skin-sam .yui-pv .yui-pv-table{padding:0 10px;margin:5px 0 10px 0;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-bd td{color:#eeee5c;font:12px arial;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd{background:#929292;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even{background:#58637a;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-even td.yui-dt-desc{background:#384970;}.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table tr.yui-dt-odd td.yui-dt-desc{background:#6F6E6E;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th{background-image:none;background:#2E2D2D;}.yui-skin-sam .yui-pv th.yui-dt-asc .yui-dt-liner{background:transparent url(asc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv th.yui-dt-desc .yui-dt-liner{background:transparent url(desc.gif) no-repeat scroll right center;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th a{color:#fff;font:bold 12px arial;}.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-asc,.yui-skin-sam .yui-pv .yui-pv-table .yui-dt-hd th.yui-dt-desc{background:#333;}.yui-skin-sam .yui-pv-chartcontainer{padding:0 10px;}.yui-skin-sam .yui-pv-chart{height:250px;clear:right;margin:5px 0 0 0;color:#fff;}.yui-skin-sam .yui-pv-chartlegend div{float:right;margin:0 0 0 10px;_width:250px;}.yui-skin-sam .yui-pv-chartlegend dl{border:1px solid #999;padding:.2em 0 .2em .5em;zoom:1;margin:5px 0;}.yui-skin-sam .yui-pv-chartlegend dt{float:left;display:block;height:.7em;width:.7em;padding:0;}.yui-skin-sam .yui-pv-chartlegend dd{float:left;display:block;color:#fff;margin:0 1em 0 .5em;padding:0;font:11px arial;}.yui-skin-sam .yui-pv-minimized{height:35px;}.yui-skin-sam .yui-pv-minimized .bd{top:-3000px;}.yui-skin-sam .yui-pv-minimized .hd a.yui-pv-refresh{display:none;} +.yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-handle-inner-l{background:transparent url( layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url( layout_sprite.png );background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;} +.yui-busy{cursor:wait !important;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:auto;}.yui-editor-panel .height-width span.info{font-size:70%;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:.25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel #createlink_target,.yui-skin-sam .yui-editor-panel #insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );} +.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;} +.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:12px;} diff --git a/lib/yui/assets/skins/sam/tabview.css b/lib/yui/assets/skins/sam/tabview.css index 247414abb6..85b05bb9be 100755 --- a/lib/yui/assets/skins/sam/tabview.css +++ b/lib/yui/assets/skins/sam/tabview.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{Xoutline:0;}.yui-navset .yui-nav a{Xposition:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;} +.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 0.5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 0.5em;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content{zoom:1;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;Xposition:relative;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 0.16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 0.16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:0.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:0.35em 0.75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:0.25em 0.5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 0.16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px 0.16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 0.16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:0.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px 0.16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li a,.yui-skin-sam .yui-navset-bottom .yui-nav li a{}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}.yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;} diff --git a/lib/yui/assets/skins/sam/treeview.css b/lib/yui/assets/skins/sam/treeview.css index b82d34e6e8..447c4a5e88 100755 --- a/lib/yui/assets/skins/sam/treeview.css +++ b/lib/yui/assets/skins/sam/treeview.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:18px;} +.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvitem{}.ygtvchildren{*zoom:1;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;}.ygtvspacer{height:22px;width:12px;} diff --git a/lib/yui/assets/skins/sam/wait.gif b/lib/yui/assets/skins/sam/wait.gif new file mode 100644 index 0000000000..471c1a4f93 Binary files /dev/null and b/lib/yui/assets/skins/sam/wait.gif differ diff --git a/lib/yui/assets/skins/sam/yuitest.css b/lib/yui/assets/skins/sam/yuitest.css index 8b4d7cdee7..4bee47ea74 100755 --- a/lib/yui/assets/skins/sam/yuitest.css +++ b/lib/yui/assets/skins/sam/yuitest.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ diff --git a/lib/yui/autocomplete/README b/lib/yui/autocomplete/README index 89659ae9fb..16d0eb70a0 100755 --- a/lib/yui/autocomplete/README +++ b/lib/yui/autocomplete/README @@ -1,8 +1,48 @@ AutoComplete Release Notes +*** version 2.5.0 *** + +* Fixed bug where Mac users were not able to input "&" or "(" characters. + + + +*** version 2.4.0 *** + +* Support for YUI JSON Utility. + +* The allowBrowserAutocomplete property now supports cases when the user navigates +away from page via mean other than a form submission. + +* Added support for integration with the Get Utility, for proxyless data +retrieval from dynamically loaded script nodes. + +* Typing 'Enter' to select item no longer causes automatic form submission on +Mac browsers. + + + +*** version 2.3.1 *** + +* AutoComplete no longer throw a JavaScript error due to an invalid or +non-existent parent container. While a wrapper DIV element is still expected in +order to enable skinning (see 2.3.0 release note), a lack of such will not +cause an error. + +* When suggestion container is collapsed, Mac users no longer need to type +Enter twice to submit input. + + + *** version 2.3.0 *** -* Applied new skinning model. +* Applied new skinning model. Please note that in order to enable skinning, +AutoComplete now expects a wrapper DIV element around the INPUT element and the +container DIV element, in this fashion: + +
+ +
+
* The default queryDelay value has been changed to 0.2. In low-latency implementations (e.g., when queryDelay is set to 0 against a local diff --git a/lib/yui/autocomplete/assets/autocomplete-core.css b/lib/yui/autocomplete/assets/autocomplete-core.css index 921fad9617..38a466d85d 100755 --- a/lib/yui/autocomplete/assets/autocomplete-core.css +++ b/lib/yui/autocomplete/assets/autocomplete-core.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -/* This file intentionally left blank */ +/* This file intentionally left blank */ diff --git a/lib/yui/autocomplete/assets/skins/sam/autocomplete-skin.css b/lib/yui/autocomplete/assets/skins/sam/autocomplete-skin.css index a2d2359072..343e4bb96c 100755 --- a/lib/yui/autocomplete/assets/skins/sam/autocomplete-skin.css +++ b/lib/yui/autocomplete/assets/skins/sam/autocomplete-skin.css @@ -1,50 +1,50 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -/* styles for entire widget */ -.yui-skin-sam .yui-ac { - position:relative;font-family:arial;font-size:100%; -} - -/* styles for input field */ -.yui-skin-sam .yui-ac-input { - position:absolute;width:100%; -} - -/* styles for results container */ -.yui-skin-sam .yui-ac-container { - position:absolute;top:1.6em;width:100%; -} - -/* styles for header/body/footer wrapper within container */ -.yui-skin-sam .yui-ac-content { - position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050; -} - -/* styles for container shadow */ -.yui-skin-sam .yui-ac-shadow { - position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity: 0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049; -} - -/* styles for results list */ -.yui-skin-sam .yui-ac-content ul{ - margin:0;padding:0;width:100%; -} - -/* styles for result item */ -.yui-skin-sam .yui-ac-content li { - margin:0;padding:2px 5px;cursor:default;white-space:nowrap; -} - -/* styles for prehighlighted result item */ -.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight { - background:#B3D4FF; -} - -/* styles for highlighted result item */ -.yui-skin-sam .yui-ac-content li.yui-ac-highlight { - background:#426FD9;color:#FFF; -} +/* styles for entire widget */ +.yui-skin-sam .yui-ac { + position:relative;font-family:arial;font-size:100%; +} + +/* styles for input field */ +.yui-skin-sam .yui-ac-input { + position:absolute;width:100%; +} + +/* styles for results container */ +.yui-skin-sam .yui-ac-container { + position:absolute;top:1.6em;width:100%; +} + +/* styles for header/body/footer wrapper within container */ +.yui-skin-sam .yui-ac-content { + position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050; +} + +/* styles for container shadow */ +.yui-skin-sam .yui-ac-shadow { + position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity: 0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049; +} + +/* styles for results list */ +.yui-skin-sam .yui-ac-content ul{ + margin:0;padding:0;width:100%; +} + +/* styles for result item */ +.yui-skin-sam .yui-ac-content li { + margin:0;padding:2px 5px;cursor:default;white-space:nowrap; +} + +/* styles for prehighlighted result item */ +.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight { + background:#B3D4FF; +} + +/* styles for highlighted result item */ +.yui-skin-sam .yui-ac-content li.yui-ac-highlight { + background:#426FD9;color:#FFF; +} diff --git a/lib/yui/autocomplete/assets/skins/sam/autocomplete.css b/lib/yui/autocomplete/assets/skins/sam/autocomplete.css index 98b473e26a..ed09f85f97 100755 --- a/lib/yui/autocomplete/assets/skins/sam/autocomplete.css +++ b/lib/yui/autocomplete/assets/skins/sam/autocomplete.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:0.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;} diff --git a/lib/yui/autocomplete/autocomplete-debug.js b/lib/yui/autocomplete/autocomplete-debug.js index 522add11f0..47eec8d6c4 100755 --- a/lib/yui/autocomplete/autocomplete-debug.js +++ b/lib/yui/autocomplete/autocomplete-debug.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ /** * The AutoComplete control provides the front-end logic for text-entry suggestion and @@ -10,7 +10,7 @@ version: 2.3.0 * * @module autocomplete * @requires yahoo, dom, event, datasource - * @optional animation, connection + * @optional animation, connection, get * @namespace YAHOO.widget * @title AutoComplete Widget */ @@ -54,15 +54,15 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { if(YAHOO.util.Dom.inDocument(elInput)) { if(YAHOO.lang.isString(elInput)) { this._sName = "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput; - this._oTextbox = document.getElementById(elInput); + this._elTextbox = document.getElementById(elInput); } else { this._sName = (elInput.id) ? "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput.id: "instance" + YAHOO.widget.AutoComplete._nIndex; - this._oTextbox = elInput; + this._elTextbox = elInput; } - YAHOO.util.Dom.addClass(this._oTextbox, "yui-ac-input"); + YAHOO.util.Dom.addClass(this._elTextbox, "yui-ac-input"); } else { YAHOO.log("Could not instantiate AutoComplete due to an invalid input element", "error", this.toString()); @@ -72,30 +72,23 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { // Validate container element if(YAHOO.util.Dom.inDocument(elContainer)) { if(YAHOO.lang.isString(elContainer)) { - this._oContainer = document.getElementById(elContainer); + this._elContainer = document.getElementById(elContainer); } else { - this._oContainer = elContainer; + this._elContainer = elContainer; } - if(this._oContainer.style.display == "none") { + if(this._elContainer.style.display == "none") { YAHOO.log("The container may not display properly if display is set to \"none\" in CSS", "warn", this.toString()); } // For skinning - var elParent = this._oContainer.parentNode; + var elParent = this._elContainer.parentNode; var elTag = elParent.tagName.toLowerCase(); - while(elParent && (elParent != "document")) { - if(elTag == "div") { - YAHOO.util.Dom.addClass(elParent, "yui-ac"); - break; - } - else { - elParent = elParent.parentNode; - elTag = elParent.tagName.toLowerCase(); - } + if(elTag == "div") { + YAHOO.util.Dom.addClass(elParent, "yui-ac"); } - if(elTag != "div") { - YAHOO.log("Could not find an appropriate parent container for skinning", "warn", this.toString()); + else { + YAHOO.log("Could not find the wrapper element for skinning", "warn", this.toString()); } } else { @@ -120,23 +113,21 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { // Set up events var oSelf = this; - var oTextbox = this._oTextbox; + var elTextbox = this._elTextbox; // Events are actually for the content module within the container - var oContent = this._oContainer._oContent; + var elContent = this._elContent; // Dom events - YAHOO.util.Event.addListener(oTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf); - YAHOO.util.Event.addListener(oTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf); - YAHOO.util.Event.addListener(oTextbox,"focus",oSelf._onTextboxFocus,oSelf); - YAHOO.util.Event.addListener(oTextbox,"blur",oSelf._onTextboxBlur,oSelf); - YAHOO.util.Event.addListener(oContent,"mouseover",oSelf._onContainerMouseover,oSelf); - YAHOO.util.Event.addListener(oContent,"mouseout",oSelf._onContainerMouseout,oSelf); - YAHOO.util.Event.addListener(oContent,"scroll",oSelf._onContainerScroll,oSelf); - YAHOO.util.Event.addListener(oContent,"resize",oSelf._onContainerResize,oSelf); - if(oTextbox.form) { - YAHOO.util.Event.addListener(oTextbox.form,"submit",oSelf._onFormSubmit,oSelf); - } - YAHOO.util.Event.addListener(oTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf); + YAHOO.util.Event.addListener(elTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf); + YAHOO.util.Event.addListener(elTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf); + YAHOO.util.Event.addListener(elTextbox,"focus",oSelf._onTextboxFocus,oSelf); + YAHOO.util.Event.addListener(elTextbox,"blur",oSelf._onTextboxBlur,oSelf); + YAHOO.util.Event.addListener(elContent,"mouseover",oSelf._onContainerMouseover,oSelf); + YAHOO.util.Event.addListener(elContent,"mouseout",oSelf._onContainerMouseout,oSelf); + YAHOO.util.Event.addListener(elContent,"scroll",oSelf._onContainerScroll,oSelf); + YAHOO.util.Event.addListener(elContent,"resize",oSelf._onContainerResize,oSelf); + YAHOO.util.Event.addListener(elTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf); + YAHOO.util.Event.addListener(window,"unload",oSelf._onWindowUnload,oSelf); // Custom events this.textboxFocusEvent = new YAHOO.util.CustomEvent("textboxFocus", this); @@ -157,7 +148,7 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { this.textboxBlurEvent = new YAHOO.util.CustomEvent("textboxBlur", this); // Finish up - oTextbox.setAttribute("autocomplete","off"); + elTextbox.setAttribute("autocomplete","off"); YAHOO.widget.AutoComplete._nIndex++; YAHOO.log("AutoComplete initialized","info",this.toString()); } @@ -415,15 +406,16 @@ YAHOO.widget.AutoComplete.prototype.getListItemData = function(oListItem) { * @param sHeader {String} HTML markup for results container header. */ YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) { - if(sHeader) { - if(this._oContainer._oContent._oHeader) { - this._oContainer._oContent._oHeader.innerHTML = sHeader; - this._oContainer._oContent._oHeader.style.display = "block"; + if(this._elHeader) { + var elHeader = this._elHeader; + if(sHeader) { + elHeader.innerHTML = sHeader; + elHeader.style.display = "block"; + } + else { + elHeader.innerHTML = ""; + elHeader.style.display = "none"; } - } - else { - this._oContainer._oContent._oHeader.innerHTML = ""; - this._oContainer._oContent._oHeader.style.display = "none"; } }; @@ -435,15 +427,16 @@ YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) { * @param sFooter {String} HTML markup for results container footer. */ YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) { - if(sFooter) { - if(this._oContainer._oContent._oFooter) { - this._oContainer._oContent._oFooter.innerHTML = sFooter; - this._oContainer._oContent._oFooter.style.display = "block"; + if(this._elFooter) { + var elFooter = this._elFooter; + if(sFooter) { + elFooter.innerHTML = sFooter; + elFooter.style.display = "block"; + } + else { + elFooter.innerHTML = ""; + elFooter.style.display = "none"; } - } - else { - this._oContainer._oContent._oFooter.innerHTML = ""; - this._oContainer._oContent._oFooter.style.display = "none"; } }; @@ -455,18 +448,19 @@ YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) { * @param sBody {String} HTML markup for results container body. */ YAHOO.widget.AutoComplete.prototype.setBody = function(sBody) { - if(sBody) { - if(this._oContainer._oContent._oBody) { - this._oContainer._oContent._oBody.innerHTML = sBody; - this._oContainer._oContent._oBody.style.display = "block"; - this._oContainer._oContent.style.display = "block"; + if(this._elBody) { + var elBody = this._elBody; + if(sBody) { + elBody.innerHTML = sBody; + elBody.style.display = "block"; + elBody.style.display = "block"; } + else { + elBody.innerHTML = ""; + elBody.style.display = "none"; + } + this._maxResultsDisplayed = 0; } - else { - this._oContainer._oContent._oBody.innerHTML = ""; - this._oContainer._oContent.style.display = "none"; - } - this._maxResultsDisplayed = 0; }; /** @@ -495,13 +489,13 @@ YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultItem, sQuery) * and DOM elements. * * @method doBeforeExpandContainer - * @param oTextbox {HTMLElement} The text input box. - * @param oContainer {HTMLElement} The container element. + * @param elTextbox {HTMLElement} The text input box. + * @param elContainer {HTMLElement} The container element. * @param sQuery {String} The query string. * @param aResults {Object[]} An array of query results. * @return {Boolean} Return true to continue expanding container, false to cancel the expand. */ -YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer = function(oTextbox, oContainer, sQuery, aResults) { +YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer = function(elTextbox, elContainer, sQuery, aResults) { return true; }; @@ -536,26 +530,26 @@ YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery = function(sQuery) { */ YAHOO.widget.AutoComplete.prototype.destroy = function() { var instanceName = this.toString(); - var elInput = this._oTextbox; - var elContainer = this._oContainer; + var elInput = this._elTextbox; + var elContainer = this._elContainer; // Unhook custom events - this.textboxFocusEvent.unsubscribe(); - this.textboxKeyEvent.unsubscribe(); - this.dataRequestEvent.unsubscribe(); - this.dataReturnEvent.unsubscribe(); - this.dataErrorEvent.unsubscribe(); - this.containerExpandEvent.unsubscribe(); - this.typeAheadEvent.unsubscribe(); - this.itemMouseOverEvent.unsubscribe(); - this.itemMouseOutEvent.unsubscribe(); - this.itemArrowToEvent.unsubscribe(); - this.itemArrowFromEvent.unsubscribe(); - this.itemSelectEvent.unsubscribe(); - this.unmatchedItemSelectEvent.unsubscribe(); - this.selectionEnforceEvent.unsubscribe(); - this.containerCollapseEvent.unsubscribe(); - this.textboxBlurEvent.unsubscribe(); + this.textboxFocusEvent.unsubscribeAll(); + this.textboxKeyEvent.unsubscribeAll(); + this.dataRequestEvent.unsubscribeAll(); + this.dataReturnEvent.unsubscribeAll(); + this.dataErrorEvent.unsubscribeAll(); + this.containerExpandEvent.unsubscribeAll(); + this.typeAheadEvent.unsubscribeAll(); + this.itemMouseOverEvent.unsubscribeAll(); + this.itemMouseOutEvent.unsubscribeAll(); + this.itemArrowToEvent.unsubscribeAll(); + this.itemArrowFromEvent.unsubscribeAll(); + this.itemSelectEvent.unsubscribeAll(); + this.unmatchedItemSelectEvent.unsubscribeAll(); + this.selectionEnforceEvent.unsubscribeAll(); + this.containerCollapseEvent.unsubscribeAll(); + this.textboxBlurEvent.unsubscribeAll(); // Unhook DOM events YAHOO.util.Event.purgeElement(elInput, true); @@ -566,7 +560,7 @@ YAHOO.widget.AutoComplete.prototype.destroy = function() { // Null out objects for(var key in this) { - if(this.hasOwnProperty(key)) { + if(YAHOO.lang.hasOwnProperty(this, key)) { this[key] = null; } } @@ -695,12 +689,9 @@ YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null; /** * Fired when a user selection does not match any of the displayed result items. - * Note that this event may not behave as expected when delimiter characters - * have been defined. * * @event unmatchedItemSelectEvent * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sQuery {String} The user-typed query string. */ YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null; @@ -757,11 +748,74 @@ YAHOO.widget.AutoComplete.prototype._sName = null; /** * Text input field DOM element. * - * @property _oTextbox + * @property _elTextbox * @type HTMLElement * @private */ -YAHOO.widget.AutoComplete.prototype._oTextbox = null; +YAHOO.widget.AutoComplete.prototype._elTextbox = null; + +/** + * Container DOM element. + * + * @property _elContainer + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elContainer = null; + +/** + * Reference to content element within container element. + * + * @property _elContent + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elContent = null; + +/** + * Reference to header element within content element. + * + * @property _elHeader + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elHeader = null; + +/** + * Reference to body element within content element. + * + * @property _elBody + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elBody = null; + +/** + * Reference to footer element within content element. + * + * @property _elFooter + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elFooter = null; + +/** + * Reference to shadow element within container element. + * + * @property _elShadow + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elShadow = null; + +/** + * Reference to iframe element within container element. + * + * @property _elIFrame + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elIFrame = null; /** * Whether or not the input field is currently in focus. If query results come back @@ -782,15 +836,6 @@ YAHOO.widget.AutoComplete.prototype._bFocused = true; */ YAHOO.widget.AutoComplete.prototype._oAnim = null; -/** - * Container DOM element. - * - * @property _oContainer - * @type HTMLElement - * @private - */ -YAHOO.widget.AutoComplete.prototype._oContainer = null; - /** * Whether or not the results container is currently open. * @@ -952,7 +997,7 @@ YAHOO.widget.AutoComplete.prototype._initProps = function() { this.queryDelay = 0.2; } var delimChar = this.delimChar; - if(YAHOO.lang.isString(delimChar)) { + if(YAHOO.lang.isString(delimChar) && (delimChar.length > 0)) { this.delimChar = [delimChar]; } else if(!YAHOO.lang.isArray(delimChar)) { @@ -964,7 +1009,7 @@ YAHOO.widget.AutoComplete.prototype._initProps = function() { this.animSpeed = 0.3; } if(!this._oAnim ) { - this._oAnim = new YAHOO.util.Anim(this._oContainer._oContent, {}, this.animSpeed); + this._oAnim = new YAHOO.util.Anim(this._elContent, {}, this.animSpeed); } else { this._oAnim.duration = this.animSpeed; @@ -983,21 +1028,21 @@ YAHOO.widget.AutoComplete.prototype._initProps = function() { * @private */ YAHOO.widget.AutoComplete.prototype._initContainerHelpers = function() { - if(this.useShadow && !this._oContainer._oShadow) { - var oShadow = document.createElement("div"); - oShadow.className = "yui-ac-shadow"; - this._oContainer._oShadow = this._oContainer.appendChild(oShadow); - } - if(this.useIFrame && !this._oContainer._oIFrame) { - var oIFrame = document.createElement("iframe"); - oIFrame.src = this._iFrameSrc; - oIFrame.frameBorder = 0; - oIFrame.scrolling = "no"; - oIFrame.style.position = "absolute"; - oIFrame.style.width = "100%"; - oIFrame.style.height = "100%"; - oIFrame.tabIndex = -1; - this._oContainer._oIFrame = this._oContainer.appendChild(oIFrame); + if(this.useShadow && !this._elShadow) { + var elShadow = document.createElement("div"); + elShadow.className = "yui-ac-shadow"; + this._elShadow = this._elContainer.appendChild(elShadow); + } + if(this.useIFrame && !this._elIFrame) { + var elIFrame = document.createElement("iframe"); + elIFrame.src = this._iFrameSrc; + elIFrame.frameBorder = 0; + elIFrame.scrolling = "no"; + elIFrame.style.position = "absolute"; + elIFrame.style.width = "100%"; + elIFrame.style.height = "100%"; + elIFrame.tabIndex = -1; + this._elIFrame = this._elContainer.appendChild(elIFrame); } }; @@ -1008,28 +1053,28 @@ YAHOO.widget.AutoComplete.prototype._initContainerHelpers = function() { * @private */ YAHOO.widget.AutoComplete.prototype._initContainer = function() { - YAHOO.util.Dom.addClass(this._oContainer, "yui-ac-container"); + YAHOO.util.Dom.addClass(this._elContainer, "yui-ac-container"); - if(!this._oContainer._oContent) { - // The oContent div helps size the iframe and shadow properly - var oContent = document.createElement("div"); - oContent.className = "yui-ac-content"; - oContent.style.display = "none"; - this._oContainer._oContent = this._oContainer.appendChild(oContent); - - var oHeader = document.createElement("div"); - oHeader.className = "yui-ac-hd"; - oHeader.style.display = "none"; - this._oContainer._oContent._oHeader = this._oContainer._oContent.appendChild(oHeader); - - var oBody = document.createElement("div"); - oBody.className = "yui-ac-bd"; - this._oContainer._oContent._oBody = this._oContainer._oContent.appendChild(oBody); - - var oFooter = document.createElement("div"); - oFooter.className = "yui-ac-ft"; - oFooter.style.display = "none"; - this._oContainer._oContent._oFooter = this._oContainer._oContent.appendChild(oFooter); + if(!this._elContent) { + // The elContent div helps size the iframe and shadow properly + var elContent = document.createElement("div"); + elContent.className = "yui-ac-content"; + elContent.style.display = "none"; + this._elContent = this._elContainer.appendChild(elContent); + + var elHeader = document.createElement("div"); + elHeader.className = "yui-ac-hd"; + elHeader.style.display = "none"; + this._elHeader = this._elContent.appendChild(elHeader); + + var elBody = document.createElement("div"); + elBody.className = "yui-ac-bd"; + this._elBody = this._elContent.appendChild(elBody); + + var elFooter = document.createElement("div"); + elFooter.className = "yui-ac-ft"; + elFooter.style.display = "none"; + this._elFooter = this._elContent.appendChild(elFooter); } else { YAHOO.log("Could not initialize the container","warn",this.toString()); @@ -1046,18 +1091,18 @@ YAHOO.widget.AutoComplete.prototype._initContainer = function() { */ YAHOO.widget.AutoComplete.prototype._initList = function() { this._aListItems = []; - while(this._oContainer._oContent._oBody.hasChildNodes()) { + while(this._elBody.hasChildNodes()) { var oldListItems = this.getListItems(); if(oldListItems) { for(var oldi = oldListItems.length-1; oldi >= 0; oldi--) { oldListItems[oldi] = null; } } - this._oContainer._oContent._oBody.innerHTML = ""; + this._elBody.innerHTML = ""; } var oList = document.createElement("ul"); - oList = this._oContainer._oContent._oBody.appendChild(oList); + oList = this._elBody.appendChild(oList); for(var i=0; i -1) { - this._oTextbox.value = sValue.substring(0,nIndex); + this._elTextbox.value = sValue.substring(0,nIndex); } else { - this._oTextbox.value = ""; + this._elTextbox.value = ""; } - this._sSavedQuery = this._oTextbox.value; + this._sSavedQuery = this._elTextbox.value; // Fire custom event this.selectionEnforceEvent.fire(this); @@ -1372,20 +1417,20 @@ YAHOO.widget.AutoComplete.prototype._typeAhead = function(oItem, sQuery) { return; } - var oTextbox = this._oTextbox; - var sValue = this._oTextbox.value; // any saved queries plus what user has typed + var elTextbox = this._elTextbox; + var sValue = this._elTextbox.value; // any saved queries plus what user has typed // Don't update with type-ahead if text selection is not supported - if(!oTextbox.setSelectionRange && !oTextbox.createTextRange) { + if(!elTextbox.setSelectionRange && !elTextbox.createTextRange) { return; } // Select the portion of text that the user has not typed var nStart = sValue.length; this._updateValue(oItem); - var nEnd = oTextbox.value.length; - this._selectText(oTextbox,nStart,nEnd); - var sPrefill = oTextbox.value.substr(nStart,nEnd); + var nEnd = elTextbox.value.length; + this._selectText(elTextbox,nStart,nEnd); + var sPrefill = elTextbox.value.substr(nStart,nEnd); this.typeAheadEvent.fire(this,sQuery,sPrefill); YAHOO.log("Typeahead occured with prefill string \"" + sPrefill + "\"", "info", this.toString()); }; @@ -1394,23 +1439,23 @@ YAHOO.widget.AutoComplete.prototype._typeAhead = function(oItem, sQuery) { * Selects text in the input field. * * @method _selectText - * @param oTextbox {HTMLElement} Text input box element in which to select text. + * @param elTextbox {HTMLElement} Text input box element in which to select text. * @param nStart {Number} Starting index of text string to select. * @param nEnd {Number} Ending index of text selection. * @private */ -YAHOO.widget.AutoComplete.prototype._selectText = function(oTextbox, nStart, nEnd) { - if(oTextbox.setSelectionRange) { // For Mozilla - oTextbox.setSelectionRange(nStart,nEnd); +YAHOO.widget.AutoComplete.prototype._selectText = function(elTextbox, nStart, nEnd) { + if(elTextbox.setSelectionRange) { // For Mozilla + elTextbox.setSelectionRange(nStart,nEnd); } - else if(oTextbox.createTextRange) { // For IE - var oTextRange = oTextbox.createTextRange(); + else if(elTextbox.createTextRange) { // For IE + var oTextRange = elTextbox.createTextRange(); oTextRange.moveStart("character", nStart); - oTextRange.moveEnd("character", nEnd-oTextbox.value.length); + oTextRange.moveEnd("character", nEnd-elTextbox.value.length); oTextRange.select(); } else { - oTextbox.select(); + elTextbox.select(); } }; @@ -1423,29 +1468,29 @@ YAHOO.widget.AutoComplete.prototype._selectText = function(oTextbox, nStart, nEn */ YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) { var bFireEvent = false; - var width = this._oContainer._oContent.offsetWidth + "px"; - var height = this._oContainer._oContent.offsetHeight + "px"; + var width = this._elContent.offsetWidth + "px"; + var height = this._elContent.offsetHeight + "px"; - if(this.useIFrame && this._oContainer._oIFrame) { + if(this.useIFrame && this._elIFrame) { bFireEvent = true; if(bShow) { - this._oContainer._oIFrame.style.width = width; - this._oContainer._oIFrame.style.height = height; + this._elIFrame.style.width = width; + this._elIFrame.style.height = height; } else { - this._oContainer._oIFrame.style.width = 0; - this._oContainer._oIFrame.style.height = 0; + this._elIFrame.style.width = 0; + this._elIFrame.style.height = 0; } } - if(this.useShadow && this._oContainer._oShadow) { + if(this.useShadow && this._elShadow) { bFireEvent = true; if(bShow) { - this._oContainer._oShadow.style.width = width; - this._oContainer._oShadow.style.height = height; + this._elShadow.style.width = width; + this._elShadow.style.height = height; } else { - this._oContainer._oShadow.style.width = 0; - this._oContainer._oShadow.style.height = 0; + this._elShadow.style.width = 0; + this._elShadow.style.height = 0; } } }; @@ -1458,7 +1503,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) { * @private */ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { - var oContainer = this._oContainer; + var elContainer = this._elContainer; // Implementer has container always open so don't mess with it if(this.alwaysShowContainer && this._bContainerOpen) { @@ -1467,7 +1512,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // Clear contents of container if(!bShow) { - this._oContainer._oContent.scrollTop = 0; + this._elContent.scrollTop = 0; var aItems = this._aListItems; if(aItems && (aItems.length > 0)) { @@ -1487,7 +1532,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // Container is already closed if(!bShow && !this._bContainerOpen) { - oContainer._oContent.style.display = "none"; + this._elContent.style.display = "none"; return; } @@ -1505,8 +1550,8 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { } // Clone container to grab current size offscreen - var oClone = oContainer._oContent.cloneNode(true); - oContainer.appendChild(oClone); + var oClone = this._elContent.cloneNode(true); + elContainer.appendChild(oClone); oClone.style.top = "-9000px"; oClone.style.display = "block"; @@ -1525,16 +1570,16 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // If opening anew, set to a collapsed size... if(bShow && !this._bContainerOpen) { - oContainer._oContent.style.width = wColl+"px"; - oContainer._oContent.style.height = hColl+"px"; + this._elContent.style.width = wColl+"px"; + this._elContent.style.height = hColl+"px"; } // Else, set it to its last known size. else { - oContainer._oContent.style.width = wExp+"px"; - oContainer._oContent.style.height = hExp+"px"; + this._elContent.style.width = wExp+"px"; + this._elContent.style.height = hExp+"px"; } - oContainer.removeChild(oClone); + elContainer.removeChild(oClone); oClone = null; var oSelf = this; @@ -1547,7 +1592,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { YAHOO.log("Container expanded", "info", oSelf.toString()); } else { - oContainer._oContent.style.display = "none"; + oSelf._elContent.style.display = "none"; oSelf.containerCollapseEvent.fire(oSelf); YAHOO.log("Container collapsed", "info", oSelf.toString()); } @@ -1555,7 +1600,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { }; // Display container and animate it - oContainer._oContent.style.display = "block"; + this._elContent.style.display = "block"; oAnim.onComplete.subscribe(onAnimComplete); oAnim.animate(); this._bContainerOpen = bShow; @@ -1563,12 +1608,12 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // Else don't animate, just show or hide else { if(bShow) { - oContainer._oContent.style.display = "block"; + this._elContent.style.display = "block"; this.containerExpandEvent.fire(this); YAHOO.log("Container expanded", "info", this.toString()); } else { - oContainer._oContent.style.display = "none"; + this._elContent.style.display = "none"; this.containerCollapseEvent.fire(this); YAHOO.log("Container collapsed", "info", this.toString()); } @@ -1634,34 +1679,34 @@ YAHOO.widget.AutoComplete.prototype._togglePrehighlight = function(oNewItem, sTy * @private */ YAHOO.widget.AutoComplete.prototype._updateValue = function(oItem) { - var oTextbox = this._oTextbox; + var elTextbox = this._elTextbox; var sDelimChar = (this.delimChar) ? (this.delimChar[0] || this.delimChar) : null; var sSavedQuery = this._sSavedQuery; var sResultKey = oItem._sResultKey; - oTextbox.focus(); + elTextbox.focus(); // First clear text field - oTextbox.value = ""; + elTextbox.value = ""; // Grab data to put into text field if(sDelimChar) { if(sSavedQuery) { - oTextbox.value = sSavedQuery; + elTextbox.value = sSavedQuery; } - oTextbox.value += sResultKey + sDelimChar; + elTextbox.value += sResultKey + sDelimChar; if(sDelimChar != " ") { - oTextbox.value += " "; + elTextbox.value += " "; } } - else { oTextbox.value = sResultKey; } + else { elTextbox.value = sResultKey; } // scroll to bottom of textarea if necessary - if(oTextbox.type == "textarea") { - oTextbox.scrollTop = oTextbox.scrollHeight; + if(elTextbox.type == "textarea") { + elTextbox.scrollTop = elTextbox.scrollHeight; } // move cursor to end - var end = oTextbox.value.length; - this._selectText(oTextbox,end,end); + var end = elTextbox.value.length; + this._selectText(elTextbox,end,end); this._oCurItem = oItem; }; @@ -1735,14 +1780,14 @@ YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) { // Go back to query (remove type-ahead string) if(this.delimChar && this._sSavedQuery) { if(!this._textMatchesOption()) { - this._oTextbox.value = this._sSavedQuery; + this._elTextbox.value = this._sSavedQuery; } else { - this._oTextbox.value = this._sSavedQuery + this._sCurQuery; + this._elTextbox.value = this._sSavedQuery + this._sCurQuery; } } else { - this._oTextbox.value = this._sCurQuery; + this._elTextbox.value = this._sCurQuery; } this._oCurItem = null; return; @@ -1756,36 +1801,36 @@ YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) { var oNewItem = this._aListItems[nNewItemIndex]; // Scroll the container if necessary - var oContent = this._oContainer._oContent; - var scrollOn = ((YAHOO.util.Dom.getStyle(oContent,"overflow") == "auto") || - (YAHOO.util.Dom.getStyle(oContent,"overflowY") == "auto")); + var elContent = this._elContent; + var scrollOn = ((YAHOO.util.Dom.getStyle(elContent,"overflow") == "auto") || + (YAHOO.util.Dom.getStyle(elContent,"overflowY") == "auto")); if(scrollOn && (nNewItemIndex > -1) && (nNewItemIndex < this._nDisplayedItems)) { // User is keying down if(nKeyCode == 40) { // Bottom of selected item is below scroll area... - if((oNewItem.offsetTop+oNewItem.offsetHeight) > (oContent.scrollTop + oContent.offsetHeight)) { + if((oNewItem.offsetTop+oNewItem.offsetHeight) > (elContent.scrollTop + elContent.offsetHeight)) { // Set bottom of scroll area to bottom of selected item - oContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - oContent.offsetHeight; + elContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - elContent.offsetHeight; } // Bottom of selected item is above scroll area... - else if((oNewItem.offsetTop+oNewItem.offsetHeight) < oContent.scrollTop) { + else if((oNewItem.offsetTop+oNewItem.offsetHeight) < elContent.scrollTop) { // Set top of selected item to top of scroll area - oContent.scrollTop = oNewItem.offsetTop; + elContent.scrollTop = oNewItem.offsetTop; } } // User is keying up else { // Top of selected item is above scroll area - if(oNewItem.offsetTop < oContent.scrollTop) { + if(oNewItem.offsetTop < elContent.scrollTop) { // Set top of scroll area to top of selected item - this._oContainer._oContent.scrollTop = oNewItem.offsetTop; + this._elContent.scrollTop = oNewItem.offsetTop; } // Top of selected item is below scroll area - else if(oNewItem.offsetTop > (oContent.scrollTop + oContent.offsetHeight)) { + else if(oNewItem.offsetTop > (elContent.scrollTop + elContent.offsetHeight)) { // Set bottom of selected item to bottom of scroll area - this._oContainer._oContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - oContent.offsetHeight; + this._elContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - elContent.offsetHeight; } } } @@ -1896,7 +1941,7 @@ YAHOO.widget.AutoComplete.prototype._onContainerMouseout = function(v,oSelf) { * @private */ YAHOO.widget.AutoComplete.prototype._onContainerScroll = function(v,oSelf) { - oSelf._oTextbox.focus(); + oSelf._elTextbox.focus(); }; /** @@ -1939,16 +1984,18 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown = function(v,oSelf) { } break; case 13: // enter - if(oSelf._oCurItem) { - if(oSelf._nKeyCode != nKeyCode) { - if(oSelf._bContainerOpen) { - YAHOO.util.Event.stopEvent(v); + if(!YAHOO.env.ua.webkit) { + if(oSelf._oCurItem) { + if(oSelf._nKeyCode != nKeyCode) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } } + oSelf._selectItem(oSelf._oCurItem); + } + else { + oSelf._toggleContainer(false); } - oSelf._selectItem(oSelf._oCurItem); - } - else { - oSelf._toggleContainer(false); } break; case 27: // esc @@ -1981,22 +2028,27 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress = function(v,oSelf) { var nKeyCode = v.keyCode; //Expose only to Mac browsers, where stopEvent is ineffective on keydown events (bug 790337) - var isMac = (navigator.userAgent.toLowerCase().indexOf("mac") != -1); - if(isMac) { + if(YAHOO.env.ua.webkit) { switch (nKeyCode) { case 9: // tab - if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) { - YAHOO.util.Event.stopEvent(v); + if(oSelf._oCurItem) { + if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) { + YAHOO.util.Event.stopEvent(v); + } } break; case 13: // enter - if(oSelf._nKeyCode != nKeyCode) { - YAHOO.util.Event.stopEvent(v); + if(oSelf._oCurItem) { + if(oSelf._nKeyCode != nKeyCode) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } + } + oSelf._selectItem(oSelf._oCurItem); + } + else { + oSelf._toggleContainer(false); } - break; - case 38: // up - case 40: // down - YAHOO.util.Event.stopEvent(v); break; default: break; @@ -2023,6 +2075,7 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp = function(v,oSelf) { oSelf._initProps(); var nKeyCode = v.keyCode; + oSelf._nKeyCode = nKeyCode; var sText = this.value; //string in textbox @@ -2065,7 +2118,7 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp = function(v,oSelf) { * @private */ YAHOO.widget.AutoComplete.prototype._onTextboxFocus = function (v,oSelf) { - oSelf._oTextbox.setAttribute("autocomplete","off"); + oSelf._elTextbox.setAttribute("autocomplete","off"); oSelf._bFocused = true; if(!oSelf._bItemSelected) { oSelf.textboxFocusEvent.fire(oSelf); @@ -2084,20 +2137,27 @@ YAHOO.widget.AutoComplete.prototype._onTextboxFocus = function (v,oSelf) { YAHOO.widget.AutoComplete.prototype._onTextboxBlur = function (v,oSelf) { // Don't treat as a blur if it was a selection via mouse click if(!oSelf._bOverContainer || (oSelf._nKeyCode == 9)) { - // Current query needs to be validated + // Current query needs to be validated as a selection if(!oSelf._bItemSelected) { var oMatch = oSelf._textMatchesOption(); + // Container is closed or current query doesn't match any result if(!oSelf._bContainerOpen || (oSelf._bContainerOpen && (oMatch === null))) { + // Force selection is enabled so clear the current query if(oSelf.forceSelection) { oSelf._clearSelection(); } + // Treat current query as a valid selection else { - oSelf.unmatchedItemSelectEvent.fire(oSelf, oSelf._sCurQuery); + oSelf.unmatchedItemSelectEvent.fire(oSelf); YAHOO.log("Unmatched item selected", "info", oSelf.toString()); } } + // Container is open and current query matches a result else { - oSelf._selectItem(oMatch); + // Force a selection when textbox is blurred with a match + if(oSelf.forceSelection) { + oSelf._selectItem(oMatch); + } } } @@ -2112,19 +2172,16 @@ YAHOO.widget.AutoComplete.prototype._onTextboxBlur = function (v,oSelf) { }; /** - * Handles form submission event. + * Handles window unload event. * - * @method _onFormSubmit - * @param v {HTMLEvent} The submit event. + * @method _onWindowUnload + * @param v {HTMLEvent} The unload event. * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. * @private */ -YAHOO.widget.AutoComplete.prototype._onFormSubmit = function(v,oSelf) { - if(oSelf.allowBrowserAutocomplete) { - oSelf._oTextbox.setAttribute("autocomplete","on"); - } - else { - oSelf._oTextbox.setAttribute("autocomplete","off"); +YAHOO.widget.AutoComplete.prototype._onWindowUnload = function(v,oSelf) { + if(oSelf && oSelf._elTextbox && oSelf.allowBrowserAutocomplete) { + oSelf._elTextbox.setAttribute("autocomplete","on"); } }; @@ -2478,6 +2535,7 @@ YAHOO.widget.DataSource.prototype._doQueryCache = function(oCallbackFn, sQuery, var aCache = this._aCache; var nCacheLength = (aCache) ? aCache.length : 0; var bMatchContains = this.queryMatchContains; + var sOrigQuery; // If cache is enabled... if((this.maxCacheEntries > 0) && aCache && (nCacheLength > 0)) { @@ -2485,7 +2543,7 @@ YAHOO.widget.DataSource.prototype._doQueryCache = function(oCallbackFn, sQuery, YAHOO.log("Querying cache: \"" + sQuery + "\"", "info", this.toString()); // If case is unimportant, normalize query now instead of in loops if(!this.queryMatchCase) { - var sOrigQuery = sQuery; + sOrigQuery = sQuery; sQuery = sQuery.toLowerCase(); } @@ -2660,8 +2718,7 @@ YAHOO.widget.DS_XHR.ERROR_DATAXHR = "XHR response failed"; ///////////////////////////////////////////////////////////////////////////// /** - * Alias to YUI Connection Manager. Allows implementers to specify their own - * subclasses of the YUI Connection Manager utility. + * Alias to YUI Connection Manager, to allow implementers to customize the utility. * * @property connMgr * @type Object @@ -2853,9 +2910,27 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen switch (this.responseType) { case YAHOO.widget.DS_XHR.TYPE_JSON: var jsonList, jsonObjParsed; - // Check for JSON lib but divert KHTML clients - var isNotMac = (navigator.userAgent.toLowerCase().indexOf('khtml')== -1); - if(oResponse.parseJSON && isNotMac) { + // Check for YUI JSON + if(YAHOO.lang.JSON) { + // Use the JSON utility if available + jsonObjParsed = YAHOO.lang.JSON.parse(oResponse); + if(!jsonObjParsed) { + bError = true; + break; + } + else { + try { + // eval is necessary here since aSchema[0] is of unknown depth + jsonList = eval("jsonObjParsed." + aSchema[0]); + } + catch(e) { + bError = true; + break; + } + } + } + // Check for JSON lib + else if(oResponse.parseJSON) { // Use the new JSON utility if available jsonObjParsed = oResponse.parseJSON(); if(!jsonObjParsed) { @@ -2872,8 +2947,8 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen } } } - else if(window.JSON && isNotMac) { - // Use older JSON lib if available + // Use older JSON lib if available + else if(window.JSON) { jsonObjParsed = JSON.parse(oResponse); if(!jsonObjParsed) { bError = true; @@ -2935,7 +3010,7 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen if(!YAHOO.lang.isArray(jsonList)) { jsonList = [jsonList]; } - + // Loop through the array of all responses... for(var i = jsonList.length-1; i >= 0 ; i--) { var aResultItem = []; @@ -3042,6 +3117,293 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen YAHOO.widget.DS_XHR.prototype._oConn = null; +/****************************************************************************/ +/****************************************************************************/ +/****************************************************************************/ + +/** + * Implementation of YAHOO.widget.DataSource using the Get Utility to generate + * dynamic SCRIPT nodes for data retrieval. + * + * @class DS_ScriptNode + * @constructor + * @extends YAHOO.widget.DataSource + * @param sUri {String} URI to the script location that will return data. + * @param aSchema {String[]} Data schema definition of results. + * @param oConfigs {Object} (optional) Object literal of config params. + */ +YAHOO.widget.DS_ScriptNode = function(sUri, aSchema, oConfigs) { + // Set any config params passed in to override defaults + if(oConfigs && (oConfigs.constructor == Object)) { + for(var sConfig in oConfigs) { + this[sConfig] = oConfigs[sConfig]; + } + } + + // Initialization sequence + if(!YAHOO.lang.isArray(aSchema) || !YAHOO.lang.isString(sUri)) { + YAHOO.log("Could not instantiate Script Node DataSource due to invalid arguments", "error", this.toString()); + return; + } + + this.schema = aSchema; + this.scriptURI = sUri; + + this._init(); + YAHOO.log("Script Node DataSource initialized","info",this.toString()); +}; + +YAHOO.widget.DS_ScriptNode.prototype = new YAHOO.widget.DataSource(); + +///////////////////////////////////////////////////////////////////////////// +// +// Public member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Alias to YUI Get Utility. Allows implementers to specify their own + * subclasses of the YUI Get Utility. + * + * @property getUtility + * @type Object + * @default YAHOO.util.Get + */ +YAHOO.widget.DS_ScriptNode.prototype.getUtility = YAHOO.util.Get; + +/** + * URI to the script that returns data. + * + * @property scriptURI + * @type String + */ +YAHOO.widget.DS_ScriptNode.prototype.scriptURI = null; + +/** + * Query string parameter name sent to scriptURI. For instance, requests will be + * sent to <scriptURI>?<scriptQueryParam>=queryString + * + * @property scriptQueryParam + * @type String + * @default "query" + */ +YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam = "query"; + +/** + * Defines request/response management in the following manner: + *
+ * + *
ignoreStaleResponses
+ *
Send all requests, but handle only the response for the most recently sent request.
+ *
allowAll
+ *
Send all requests and handle all responses.
+ *
+ * + * @property asyncMode + * @type String + * @default "allowAll" + */ +YAHOO.widget.DS_ScriptNode.prototype.asyncMode = "allowAll"; + +/** + * Callback string parameter name sent to scriptURI. For instance, requests will be + * sent to <scriptURI>?<scriptCallbackParam>=callbackFunction + * + * @property scriptCallbackParam + * @type String + * @default "callback" + */ +YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam = "callback"; + +/** + * Global array of callback functions, one for each request sent. + * + * @property callbacks + * @type Function[] + * @static + */ +YAHOO.widget.DS_ScriptNode.callbacks = []; + +///////////////////////////////////////////////////////////////////////////// +// +// Private member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Unique ID to track requests. + * + * @property _nId + * @type Number + * @private + * @static + */ +YAHOO.widget.DS_ScriptNode._nId = 0; + +/** + * Counter for pending requests. When this is 0, it is safe to purge callbacks + * array. + * + * @property _nPending + * @type Number + * @private + * @static + */ +YAHOO.widget.DS_ScriptNode._nPending = 0; + +///////////////////////////////////////////////////////////////////////////// +// +// Public methods +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Queries the live data source. Results are passed back to a callback function. + * + * @method doQuery + * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results. + * @param sQuery {String} Query string. + * @param oParent {Object} The object instance that has requested data. + */ +YAHOO.widget.DS_ScriptNode.prototype.doQuery = function(oCallbackFn, sQuery, oParent) { + var oSelf = this; + + // If there are no global pending requests, it is safe to purge global callback stack and global counter + if(YAHOO.widget.DS_ScriptNode._nPending === 0) { + YAHOO.widget.DS_ScriptNode.callbacks = []; + YAHOO.widget.DS_ScriptNode._nId = 0; + } + + // ID for this request + var id = YAHOO.widget.DS_ScriptNode._nId; + YAHOO.widget.DS_ScriptNode._nId++; + + // Dynamically add handler function with a closure to the callback stack + YAHOO.widget.DS_ScriptNode.callbacks[id] = function(oResponse) { + if((oSelf.asyncMode !== "ignoreStaleResponses")|| + (id === YAHOO.widget.DS_ScriptNode.callbacks.length-1)) { // Must ignore stale responses + oSelf.handleResponse(oResponse, oCallbackFn, sQuery, oParent); + } + else { + YAHOO.log("DataSource ignored stale response for " + sQuery, "info", oSelf.toString()); + } + + delete YAHOO.widget.DS_ScriptNode.callbacks[id]; + }; + + // We are now creating a request + YAHOO.widget.DS_ScriptNode._nPending++; + + var sUri = this.scriptURI+"&"+ this.scriptQueryParam+"="+sQuery+"&"+ + this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+id+"]"; + YAHOO.log("DataSource is querying URL " + sUri, "info", this.toString()); + this.getUtility.script(sUri, + {autopurge:true, + onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown, + onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown}); +}; + +/** + * Parses JSON response data into an array of result objects and passes it to + * the callback function. + * + * @method handleResponse + * @param oResponse {Object} The raw response data to parse. + * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results. + * @param sQuery {String} Query string. + * @param oParent {Object} The object instance that has requested data. + */ +YAHOO.widget.DS_ScriptNode.prototype.handleResponse = function(oResponse, oCallbackFn, sQuery, oParent) { + var aSchema = this.schema; + var aResults = []; + var bError = false; + + var jsonList, jsonObjParsed; + + // Parse the JSON response as a string + try { + // Grab the object member that contains an array of all reponses... + // ...eval is necessary here since aSchema[0] is of unknown depth + jsonList = eval("(oResponse." + aSchema[0]+")"); + } + catch(e) { + bError = true; + } + + if(!jsonList) { + bError = true; + jsonList = []; + } + + else if(!YAHOO.lang.isArray(jsonList)) { + jsonList = [jsonList]; + } + + // Loop through the array of all responses... + for(var i = jsonList.length-1; i >= 0 ; i--) { + var aResultItem = []; + var jsonResult = jsonList[i]; + // ...and loop through each data field value of each response + for(var j = aSchema.length-1; j >= 1 ; j--) { + // ...and capture data into an array mapped according to the schema... + var dataFieldValue = jsonResult[aSchema[j]]; + if(!dataFieldValue) { + dataFieldValue = ""; + } + //YAHOO.log("data: " + i + " value:" +j+" = "+dataFieldValue,"debug",this.toString()); + aResultItem.unshift(dataFieldValue); + } + // If schema isn't well defined, pass along the entire result object + if(aResultItem.length == 1) { + aResultItem.push(jsonResult); + } + // Capture the array of data field values in an array of results + aResults.unshift(aResultItem); + } + + if(bError) { + aResults = null; + } + + if(aResults === null) { + this.dataErrorEvent.fire(this, oParent, sQuery, YAHOO.widget.DataSource.ERROR_DATAPARSE); + YAHOO.log(YAHOO.widget.DataSource.ERROR_DATAPARSE, "error", this.toString()); + aResults = []; + } + else { + var resultObj = {}; + resultObj.query = decodeURIComponent(sQuery); + resultObj.results = aResults; + this._addCacheElem(resultObj); + + this.getResultsEvent.fire(this, oParent, sQuery, aResults); + YAHOO.log("Results returned for query \"" + sQuery + "\": " + + YAHOO.lang.dump(aResults), "info", this.toString()); + } + + oCallbackFn(sQuery, aResults, oParent); +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Private methods +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Any success/failure response should decrement counter. + * + * @method _bumpPendingDown + * @private + */ +YAHOO.widget.DS_ScriptNode._bumpPendingDown = function() { + YAHOO.widget.DS_ScriptNode._nPending--; +}; + + /****************************************************************************/ /****************************************************************************/ /****************************************************************************/ @@ -3130,6 +3492,7 @@ YAHOO.widget.DS_JSFunction.prototype.doQuery = function(oCallbackFn, sQuery, oPa return; }; + /****************************************************************************/ /****************************************************************************/ /****************************************************************************/ @@ -3250,4 +3613,4 @@ YAHOO.widget.DS_JSArray.prototype.doQuery = function(oCallbackFn, sQuery, oParen oCallbackFn(sQuery, aResults, oParent); }; -YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.3.0", build: "442"}); +YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.5.0", build: "895"}); diff --git a/lib/yui/autocomplete/autocomplete-min.js b/lib/yui/autocomplete/autocomplete-min.js index d877c981f5..77eacceb94 100755 --- a/lib/yui/autocomplete/autocomplete-min.js +++ b/lib/yui/autocomplete/autocomplete-min.js @@ -1,191 +1,12 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ - -YAHOO.widget.AutoComplete=function(elInput,elContainer,oDataSource,oConfigs){if(elInput&&elContainer&&oDataSource){if(oDataSource instanceof YAHOO.widget.DataSource){this.dataSource=oDataSource;} -else{return;} -if(YAHOO.util.Dom.inDocument(elInput)){if(YAHOO.lang.isString(elInput)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+elInput;this._oTextbox=document.getElementById(elInput);} -else{this._sName=(elInput.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+elInput.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._oTextbox=elInput;} -YAHOO.util.Dom.addClass(this._oTextbox,"yui-ac-input");} -else{return;} -if(YAHOO.util.Dom.inDocument(elContainer)){if(YAHOO.lang.isString(elContainer)){this._oContainer=document.getElementById(elContainer);} -else{this._oContainer=elContainer;} -if(this._oContainer.style.display=="none"){} -var elParent=this._oContainer.parentNode;var elTag=elParent.tagName.toLowerCase();while(elParent&&(elParent!="document")){if(elTag=="div"){YAHOO.util.Dom.addClass(elParent,"yui-ac");break;} -else{elParent=elParent.parentNode;elTag=elParent.tagName.toLowerCase();}} -if(elTag!="div"){}} -else{return;} -if(oConfigs&&(oConfigs.constructor==Object)){for(var sConfig in oConfigs){if(sConfig){this[sConfig]=oConfigs[sConfig];}}} -this._initContainer();this._initProps();this._initList();this._initContainerHelpers();var oSelf=this;var oTextbox=this._oTextbox;var oContent=this._oContainer._oContent;YAHOO.util.Event.addListener(oTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf);YAHOO.util.Event.addListener(oTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf);YAHOO.util.Event.addListener(oTextbox,"focus",oSelf._onTextboxFocus,oSelf);YAHOO.util.Event.addListener(oTextbox,"blur",oSelf._onTextboxBlur,oSelf);YAHOO.util.Event.addListener(oContent,"mouseover",oSelf._onContainerMouseover,oSelf);YAHOO.util.Event.addListener(oContent,"mouseout",oSelf._onContainerMouseout,oSelf);YAHOO.util.Event.addListener(oContent,"scroll",oSelf._onContainerScroll,oSelf);YAHOO.util.Event.addListener(oContent,"resize",oSelf._onContainerResize,oSelf);if(oTextbox.form){YAHOO.util.Event.addListener(oTextbox.form,"submit",oSelf._onFormSubmit,oSelf);} -YAHOO.util.Event.addListener(oTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);oTextbox.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;} -else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListItems=function(){return this._aListItems;};YAHOO.widget.AutoComplete.prototype.getListItemData=function(oListItem){if(oListItem._oResultData){return oListItem._oResultData;} -else{return false;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(sHeader){if(sHeader){if(this._oContainer._oContent._oHeader){this._oContainer._oContent._oHeader.innerHTML=sHeader;this._oContainer._oContent._oHeader.style.display="block";}} -else{this._oContainer._oContent._oHeader.innerHTML="";this._oContainer._oContent._oHeader.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setFooter=function(sFooter){if(sFooter){if(this._oContainer._oContent._oFooter){this._oContainer._oContent._oFooter.innerHTML=sFooter;this._oContainer._oContent._oFooter.style.display="block";}} -else{this._oContainer._oContent._oFooter.innerHTML="";this._oContainer._oContent._oFooter.style.display="none";}};YAHOO.widget.AutoComplete.prototype.setBody=function(sBody){if(sBody){if(this._oContainer._oContent._oBody){this._oContainer._oContent._oBody.innerHTML=sBody;this._oContainer._oContent._oBody.style.display="block";this._oContainer._oContent.style.display="block";}} -else{this._oContainer._oContent._oBody.innerHTML="";this._oContainer._oContent.style.display="none";} -this._maxResultsDisplayed=0;};YAHOO.widget.AutoComplete.prototype.formatResult=function(oResultItem,sQuery){var sResult=oResultItem[0];if(sResult){return sResult;} -else{return"";}};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(oTextbox,oContainer,sQuery,aResults){return true;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(sQuery){this._sendQuery(sQuery);};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(sQuery){return sQuery;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var instanceName=this.toString();var elInput=this._oTextbox;var elContainer=this._oContainer;this.textboxFocusEvent.unsubscribe();this.textboxKeyEvent.unsubscribe();this.dataRequestEvent.unsubscribe();this.dataReturnEvent.unsubscribe();this.dataErrorEvent.unsubscribe();this.containerExpandEvent.unsubscribe();this.typeAheadEvent.unsubscribe();this.itemMouseOverEvent.unsubscribe();this.itemMouseOutEvent.unsubscribe();this.itemArrowToEvent.unsubscribe();this.itemArrowFromEvent.unsubscribe();this.itemSelectEvent.unsubscribe();this.unmatchedItemSelectEvent.unsubscribe();this.selectionEnforceEvent.unsubscribe();this.containerCollapseEvent.unsubscribe();this.textboxBlurEvent.unsubscribe();YAHOO.util.Event.purgeElement(elInput,true);YAHOO.util.Event.purgeElement(elContainer,true);elContainer.innerHTML="";for(var key in this){if(this.hasOwnProperty(key)){this[key]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._oTextbox=null;YAHOO.widget.AutoComplete.prototype._bFocused=true;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._oContainer=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._aListItems=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sSavedQuery=null;YAHOO.widget.AutoComplete.prototype._oCurItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var minQueryLength=this.minQueryLength;if(!YAHOO.lang.isNumber(minQueryLength)){this.minQueryLength=1;} -var maxResultsDisplayed=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(maxResultsDisplayed)||(maxResultsDisplayed<1)){this.maxResultsDisplayed=10;} -var queryDelay=this.queryDelay;if(!YAHOO.lang.isNumber(queryDelay)||(queryDelay<0)){this.queryDelay=0.2;} -var delimChar=this.delimChar;if(YAHOO.lang.isString(delimChar)){this.delimChar=[delimChar];} -else if(!YAHOO.lang.isArray(delimChar)){this.delimChar=null;} -var animSpeed=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(animSpeed)||(animSpeed<0)){this.animSpeed=0.3;} -if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._oContainer._oContent,{},this.animSpeed);} -else{this._oAnim.duration=this.animSpeed;}} -if(this.forceSelection&&delimChar){}};YAHOO.widget.AutoComplete.prototype._initContainerHelpers=function(){if(this.useShadow&&!this._oContainer._oShadow){var oShadow=document.createElement("div");oShadow.className="yui-ac-shadow";this._oContainer._oShadow=this._oContainer.appendChild(oShadow);} -if(this.useIFrame&&!this._oContainer._oIFrame){var oIFrame=document.createElement("iframe");oIFrame.src=this._iFrameSrc;oIFrame.frameBorder=0;oIFrame.scrolling="no";oIFrame.style.position="absolute";oIFrame.style.width="100%";oIFrame.style.height="100%";oIFrame.tabIndex=-1;this._oContainer._oIFrame=this._oContainer.appendChild(oIFrame);}};YAHOO.widget.AutoComplete.prototype._initContainer=function(){YAHOO.util.Dom.addClass(this._oContainer,"yui-ac-container");if(!this._oContainer._oContent){var oContent=document.createElement("div");oContent.className="yui-ac-content";oContent.style.display="none";this._oContainer._oContent=this._oContainer.appendChild(oContent);var oHeader=document.createElement("div");oHeader.className="yui-ac-hd";oHeader.style.display="none";this._oContainer._oContent._oHeader=this._oContainer._oContent.appendChild(oHeader);var oBody=document.createElement("div");oBody.className="yui-ac-bd";this._oContainer._oContent._oBody=this._oContainer._oContent.appendChild(oBody);var oFooter=document.createElement("div");oFooter.className="yui-ac-ft";oFooter.style.display="none";this._oContainer._oContent._oFooter=this._oContainer._oContent.appendChild(oFooter);} -else{}};YAHOO.widget.AutoComplete.prototype._initList=function(){this._aListItems=[];while(this._oContainer._oContent._oBody.hasChildNodes()){var oldListItems=this.getListItems();if(oldListItems){for(var oldi=oldListItems.length-1;oldi>=0;oldi--){oldListItems[oldi]=null;}} -this._oContainer._oContent._oBody.innerHTML="";} -var oList=document.createElement("ul");oList=this._oContainer._oContent._oBody.appendChild(oList);for(var i=0;i=18&&nKeyCode<=20)||(nKeyCode==27)||(nKeyCode>=33&&nKeyCode<=35)||(nKeyCode>=36&&nKeyCode<=40)||(nKeyCode>=44&&nKeyCode<=45)){return true;} -return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(sQuery){if(this.minQueryLength==-1){this._toggleContainer(false);return;} -var aDelimChar=(this.delimChar)?this.delimChar:null;if(aDelimChar){var nDelimIndex=-1;for(var i=aDelimChar.length-1;i>=0;i--){var nNewIndex=sQuery.lastIndexOf(aDelimChar[i]);if(nNewIndex>nDelimIndex){nDelimIndex=nNewIndex;}} -if(aDelimChar[i]==" "){for(var j=aDelimChar.length-1;j>=0;j--){if(sQuery[nDelimIndex-1]==aDelimChar[j]){nDelimIndex--;break;}}} -if(nDelimIndex>-1){var nQueryStart=nDelimIndex+1;while(sQuery.charAt(nQueryStart)==" "){nQueryStart+=1;} -this._sSavedQuery=sQuery.substring(0,nQueryStart);sQuery=sQuery.substr(nQueryStart);} -else if(sQuery.indexOf(this._sSavedQuery)<0){this._sSavedQuery=null;}} -if((sQuery&&(sQuery.length0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);} -this._toggleContainer(false);return;} -sQuery=encodeURIComponent(sQuery);this._nDelayID=-1;sQuery=this.doBeforeSendQuery(sQuery);this.dataRequestEvent.fire(this,sQuery);this.dataSource.getResults(this._populateList,sQuery,this);};YAHOO.widget.AutoComplete.prototype._populateList=function(sQuery,aResults,oSelf){if(aResults===null){oSelf.dataErrorEvent.fire(oSelf,sQuery);} -if(!oSelf._bFocused||!aResults){return;} -var isOpera=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);var contentStyle=oSelf._oContainer._oContent.style;contentStyle.width=(!isOpera)?null:"";contentStyle.height=(!isOpera)?null:"";var sCurQuery=decodeURIComponent(sQuery);oSelf._sCurQuery=sCurQuery;oSelf._bItemSelected=false;if(oSelf._maxResultsDisplayed!=oSelf.maxResultsDisplayed){oSelf._initList();} -var nItems=Math.min(aResults.length,oSelf.maxResultsDisplayed);oSelf._nDisplayedItems=nItems;if(nItems>0){oSelf._initContainerHelpers();var aItems=oSelf._aListItems;for(var i=nItems-1;i>=0;i--){var oItemi=aItems[i];var oResultItemi=aResults[i];oItemi.innerHTML=oSelf.formatResult(oResultItemi,sCurQuery);oItemi.style.display="list-item";oItemi._sResultKey=oResultItemi[0];oItemi._oResultData=oResultItemi;} -for(var j=aItems.length-1;j>=nItems;j--){var oItemj=aItems[j];oItemj.innerHTML=null;oItemj.style.display="none";oItemj._sResultKey=null;oItemj._oResultData=null;} -var ok=oSelf.doBeforeExpandContainer(oSelf._oTextbox,oSelf._oContainer,sQuery,aResults);oSelf._toggleContainer(ok);if(oSelf.autoHighlight){var oFirstItem=aItems[0];oSelf._toggleHighlight(oFirstItem,"to");oSelf.itemArrowToEvent.fire(oSelf,oFirstItem);oSelf._typeAhead(oFirstItem,sQuery);} -else{oSelf._oCurItem=null;}} -else{oSelf._toggleContainer(false);} -oSelf.dataReturnEvent.fire(oSelf,sQuery,aResults);};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var sValue=this._oTextbox.value;var sChar=(this.delimChar)?this.delimChar[0]:null;var nIndex=(sChar)?sValue.lastIndexOf(sChar,sValue.length-2):-1;if(nIndex>-1){this._oTextbox.value=sValue.substring(0,nIndex);} -else{this._oTextbox.value="";} -this._sSavedQuery=this._oTextbox.value;this.selectionEnforceEvent.fire(this);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var foundMatch=null;for(var i=this._nDisplayedItems-1;i>=0;i--){var oItem=this._aListItems[i];var sMatch=oItem._sResultKey.toLowerCase();if(sMatch==this._sCurQuery.toLowerCase()){foundMatch=oItem;break;}} -return(foundMatch);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(oItem,sQuery){if(!this.typeAhead||(this._nKeyCode==8)){return;} -var oTextbox=this._oTextbox;var sValue=this._oTextbox.value;if(!oTextbox.setSelectionRange&&!oTextbox.createTextRange){return;} -var nStart=sValue.length;this._updateValue(oItem);var nEnd=oTextbox.value.length;this._selectText(oTextbox,nStart,nEnd);var sPrefill=oTextbox.value.substr(nStart,nEnd);this.typeAheadEvent.fire(this,sQuery,sPrefill);};YAHOO.widget.AutoComplete.prototype._selectText=function(oTextbox,nStart,nEnd){if(oTextbox.setSelectionRange){oTextbox.setSelectionRange(nStart,nEnd);} -else if(oTextbox.createTextRange){var oTextRange=oTextbox.createTextRange();oTextRange.moveStart("character",nStart);oTextRange.moveEnd("character",nEnd-oTextbox.value.length);oTextRange.select();} -else{oTextbox.select();}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(bShow){var bFireEvent=false;var width=this._oContainer._oContent.offsetWidth+"px";var height=this._oContainer._oContent.offsetHeight+"px";if(this.useIFrame&&this._oContainer._oIFrame){bFireEvent=true;if(bShow){this._oContainer._oIFrame.style.width=width;this._oContainer._oIFrame.style.height=height;} -else{this._oContainer._oIFrame.style.width=0;this._oContainer._oIFrame.style.height=0;}} -if(this.useShadow&&this._oContainer._oShadow){bFireEvent=true;if(bShow){this._oContainer._oShadow.style.width=width;this._oContainer._oShadow.style.height=height;} -else{this._oContainer._oShadow.style.width=0;this._oContainer._oShadow.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(bShow){var oContainer=this._oContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return;} -if(!bShow){this._oContainer._oContent.scrollTop=0;var aItems=this._aListItems;if(aItems&&(aItems.length>0)){for(var i=aItems.length-1;i>=0;i--){aItems[i].style.display="none";}} -if(this._oCurItem){this._toggleHighlight(this._oCurItem,"from");} -this._oCurItem=null;this._nDisplayedItems=0;this._sCurQuery=null;} -if(!bShow&&!this._bContainerOpen){oContainer._oContent.style.display="none";return;} -var oAnim=this._oAnim;if(oAnim&&oAnim.getEl()&&(this.animHoriz||this.animVert)){if(!bShow){this._toggleContainerHelpers(bShow);} -if(oAnim.isAnimated()){oAnim.stop();} -var oClone=oContainer._oContent.cloneNode(true);oContainer.appendChild(oClone);oClone.style.top="-9000px";oClone.style.display="block";var wExp=oClone.offsetWidth;var hExp=oClone.offsetHeight;var wColl=(this.animHoriz)?0:wExp;var hColl=(this.animVert)?0:hExp;oAnim.attributes=(bShow)?{width:{to:wExp},height:{to:hExp}}:{width:{to:wColl},height:{to:hColl}};if(bShow&&!this._bContainerOpen){oContainer._oContent.style.width=wColl+"px";oContainer._oContent.style.height=hColl+"px";} -else{oContainer._oContent.style.width=wExp+"px";oContainer._oContent.style.height=hExp+"px";} -oContainer.removeChild(oClone);oClone=null;var oSelf=this;var onAnimComplete=function(){oAnim.onComplete.unsubscribeAll();if(bShow){oSelf.containerExpandEvent.fire(oSelf);} -else{oContainer._oContent.style.display="none";oSelf.containerCollapseEvent.fire(oSelf);} -oSelf._toggleContainerHelpers(bShow);};oContainer._oContent.style.display="block";oAnim.onComplete.subscribe(onAnimComplete);oAnim.animate();this._bContainerOpen=bShow;} -else{if(bShow){oContainer._oContent.style.display="block";this.containerExpandEvent.fire(this);} -else{oContainer._oContent.style.display="none";this.containerCollapseEvent.fire(this);} -this._toggleContainerHelpers(bShow);this._bContainerOpen=bShow;}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(oNewItem,sType){var sHighlight=this.highlightClassName;if(this._oCurItem){YAHOO.util.Dom.removeClass(this._oCurItem,sHighlight);} -if((sType=="to")&&sHighlight){YAHOO.util.Dom.addClass(oNewItem,sHighlight);this._oCurItem=oNewItem;}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(oNewItem,sType){if(oNewItem==this._oCurItem){return;} -var sPrehighlight=this.prehighlightClassName;if((sType=="mouseover")&&sPrehighlight){YAHOO.util.Dom.addClass(oNewItem,sPrehighlight);} -else{YAHOO.util.Dom.removeClass(oNewItem,sPrehighlight);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(oItem){var oTextbox=this._oTextbox;var sDelimChar=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var sSavedQuery=this._sSavedQuery;var sResultKey=oItem._sResultKey;oTextbox.focus();oTextbox.value="";if(sDelimChar){if(sSavedQuery){oTextbox.value=sSavedQuery;} -oTextbox.value+=sResultKey+sDelimChar;if(sDelimChar!=" "){oTextbox.value+=" ";}} -else{oTextbox.value=sResultKey;} -if(oTextbox.type=="textarea"){oTextbox.scrollTop=oTextbox.scrollHeight;} -var end=oTextbox.value.length;this._selectText(oTextbox,end,end);this._oCurItem=oItem;};YAHOO.widget.AutoComplete.prototype._selectItem=function(oItem){this._bItemSelected=true;this._updateValue(oItem);this._cancelIntervalDetection(this);this.itemSelectEvent.fire(this,oItem,oItem._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._oCurItem){this._selectItem(this._oCurItem);} -else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(nKeyCode){if(this._bContainerOpen){var oCurItem=this._oCurItem;var nCurItemIndex=-1;if(oCurItem){nCurItemIndex=oCurItem._nItemIndex;} -var nNewItemIndex=(nKeyCode==40)?(nCurItemIndex+1):(nCurItemIndex-1);if(nNewItemIndex<-2||nNewItemIndex>=this._nDisplayedItems){return;} -if(oCurItem){this._toggleHighlight(oCurItem,"from");this.itemArrowFromEvent.fire(this,oCurItem);} -if(nNewItemIndex==-1){if(this.delimChar&&this._sSavedQuery){if(!this._textMatchesOption()){this._oTextbox.value=this._sSavedQuery;} -else{this._oTextbox.value=this._sSavedQuery+this._sCurQuery;}} -else{this._oTextbox.value=this._sCurQuery;} -this._oCurItem=null;return;} -if(nNewItemIndex==-2){this._toggleContainer(false);return;} -var oNewItem=this._aListItems[nNewItemIndex];var oContent=this._oContainer._oContent;var scrollOn=((YAHOO.util.Dom.getStyle(oContent,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(oContent,"overflowY")=="auto"));if(scrollOn&&(nNewItemIndex>-1)&&(nNewItemIndex(oContent.scrollTop+oContent.offsetHeight)){oContent.scrollTop=(oNewItem.offsetTop+oNewItem.offsetHeight)-oContent.offsetHeight;} -else if((oNewItem.offsetTop+oNewItem.offsetHeight)(oContent.scrollTop+oContent.offsetHeight)){this._oContainer._oContent.scrollTop=(oNewItem.offsetTop+oNewItem.offsetHeight)-oContent.offsetHeight;}}} -this._toggleHighlight(oNewItem,"to");this.itemArrowToEvent.fire(this,oNewItem);if(this.typeAhead){this._updateValue(oNewItem);}}};YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(v,oSelf){if(oSelf.prehighlightClassName){oSelf._togglePrehighlight(this,"mouseover");} -else{oSelf._toggleHighlight(this,"to");} -oSelf.itemMouseOverEvent.fire(oSelf,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(v,oSelf){if(oSelf.prehighlightClassName){oSelf._togglePrehighlight(this,"mouseout");} -else{oSelf._toggleHighlight(this,"from");} -oSelf.itemMouseOutEvent.fire(oSelf,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(v,oSelf){oSelf._toggleHighlight(this,"to");oSelf._selectItem(this);};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(v,oSelf){oSelf._bOverContainer=true;};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(v,oSelf){oSelf._bOverContainer=false;if(oSelf._oCurItem){oSelf._toggleHighlight(oSelf._oCurItem,"to");}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(v,oSelf){oSelf._oTextbox.focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(v,oSelf){oSelf._toggleContainerHelpers(oSelf._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(v,oSelf){var nKeyCode=v.keyCode;switch(nKeyCode){case 9:if(oSelf._oCurItem){if(oSelf.delimChar&&(oSelf._nKeyCode!=nKeyCode)){if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);}} -oSelf._selectItem(oSelf._oCurItem);} -else{oSelf._toggleContainer(false);} -break;case 13:if(oSelf._oCurItem){if(oSelf._nKeyCode!=nKeyCode){if(oSelf._bContainerOpen){YAHOO.util.Event.stopEvent(v);}} -oSelf._selectItem(oSelf._oCurItem);} -else{oSelf._toggleContainer(false);} -break;case 27:oSelf._toggleContainer(false);return;case 39:oSelf._jumpSelection();break;case 38:YAHOO.util.Event.stopEvent(v);oSelf._moveSelection(nKeyCode);break;case 40:YAHOO.util.Event.stopEvent(v);oSelf._moveSelection(nKeyCode);break;default:break;}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(v,oSelf){var nKeyCode=v.keyCode;var isMac=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);if(isMac){switch(nKeyCode){case 9:if(oSelf.delimChar&&(oSelf._nKeyCode!=nKeyCode)){YAHOO.util.Event.stopEvent(v);} -break;case 13:if(oSelf._nKeyCode!=nKeyCode){YAHOO.util.Event.stopEvent(v);} -break;case 38:case 40:YAHOO.util.Event.stopEvent(v);break;default:break;}} -else if(nKeyCode==229){oSelf._queryInterval=setInterval(function(){oSelf._onIMEDetected(oSelf);},500);}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(v,oSelf){oSelf._initProps();var nKeyCode=v.keyCode;oSelf._nKeyCode=nKeyCode;var sText=this.value;if(oSelf._isIgnoreKey(nKeyCode)||(sText.toLowerCase()==oSelf._sCurQuery)){return;} -else{oSelf._bItemSelected=false;YAHOO.util.Dom.removeClass(oSelf._oCurItem,oSelf.highlightClassName);oSelf._oCurItem=null;oSelf.textboxKeyEvent.fire(oSelf,nKeyCode);} -if(oSelf.queryDelay>0){var nDelayID=setTimeout(function(){oSelf._sendQuery(sText);},(oSelf.queryDelay*1000));if(oSelf._nDelayID!=-1){clearTimeout(oSelf._nDelayID);} -oSelf._nDelayID=nDelayID;} -else{oSelf._sendQuery(sText);}};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(v,oSelf){oSelf._oTextbox.setAttribute("autocomplete","off");oSelf._bFocused=true;if(!oSelf._bItemSelected){oSelf.textboxFocusEvent.fire(oSelf);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(v,oSelf){if(!oSelf._bOverContainer||(oSelf._nKeyCode==9)){if(!oSelf._bItemSelected){var oMatch=oSelf._textMatchesOption();if(!oSelf._bContainerOpen||(oSelf._bContainerOpen&&(oMatch===null))){if(oSelf.forceSelection){oSelf._clearSelection();} -else{oSelf.unmatchedItemSelectEvent.fire(oSelf,oSelf._sCurQuery);}} -else{oSelf._selectItem(oMatch);}} -if(oSelf._bContainerOpen){oSelf._toggleContainer(false);} -oSelf._cancelIntervalDetection(oSelf);oSelf._bFocused=false;oSelf.textboxBlurEvent.fire(oSelf);}};YAHOO.widget.AutoComplete.prototype._onFormSubmit=function(v,oSelf){if(oSelf.allowBrowserAutocomplete){oSelf._oTextbox.setAttribute("autocomplete","on");} -else{oSelf._oTextbox.setAttribute("autocomplete","off");}};YAHOO.widget.DataSource=function(){};YAHOO.widget.DataSource.ERROR_DATANULL="Response data was null";YAHOO.widget.DataSource.ERROR_DATAPARSE="Response data could not be parsed";YAHOO.widget.DataSource.prototype.maxCacheEntries=15;YAHOO.widget.DataSource.prototype.queryMatchContains=false;YAHOO.widget.DataSource.prototype.queryMatchSubset=false;YAHOO.widget.DataSource.prototype.queryMatchCase=false;YAHOO.widget.DataSource.prototype.toString=function(){return"DataSource "+this._sName;};YAHOO.widget.DataSource.prototype.getResults=function(oCallbackFn,sQuery,oParent){var aResults=this._doQueryCache(oCallbackFn,sQuery,oParent);if(aResults.length===0){this.queryEvent.fire(this,oParent,sQuery);this.doQuery(oCallbackFn,sQuery,oParent);}};YAHOO.widget.DataSource.prototype.doQuery=function(oCallbackFn,sQuery,oParent){};YAHOO.widget.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];} -if(this._aCacheHelper){this._aCacheHelper=[];} -this.cacheFlushEvent.fire(this);};YAHOO.widget.DataSource.prototype.queryEvent=null;YAHOO.widget.DataSource.prototype.cacheQueryEvent=null;YAHOO.widget.DataSource.prototype.getResultsEvent=null;YAHOO.widget.DataSource.prototype.getCachedResultsEvent=null;YAHOO.widget.DataSource.prototype.dataErrorEvent=null;YAHOO.widget.DataSource.prototype.cacheFlushEvent=null;YAHOO.widget.DataSource._nIndex=0;YAHOO.widget.DataSource.prototype._sName=null;YAHOO.widget.DataSource.prototype._aCache=null;YAHOO.widget.DataSource.prototype._init=function(){var maxCacheEntries=this.maxCacheEntries;if(!YAHOO.lang.isNumber(maxCacheEntries)||(maxCacheEntries<0)){maxCacheEntries=0;} -if(maxCacheEntries>0&&!this._aCache){this._aCache=[];} -this._sName="instance"+YAHOO.widget.DataSource._nIndex;YAHOO.widget.DataSource._nIndex++;this.queryEvent=new YAHOO.util.CustomEvent("query",this);this.cacheQueryEvent=new YAHOO.util.CustomEvent("cacheQuery",this);this.getResultsEvent=new YAHOO.util.CustomEvent("getResults",this);this.getCachedResultsEvent=new YAHOO.util.CustomEvent("getCachedResults",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.cacheFlushEvent=new YAHOO.util.CustomEvent("cacheFlush",this);};YAHOO.widget.DataSource.prototype._addCacheElem=function(oResult){var aCache=this._aCache;if(!aCache||!oResult||!oResult.query||!oResult.results){return;} -if(aCache.length>=this.maxCacheEntries){aCache.shift();} -aCache.push(oResult);};YAHOO.widget.DataSource.prototype._doQueryCache=function(oCallbackFn,sQuery,oParent){var aResults=[];var bMatchFound=false;var aCache=this._aCache;var nCacheLength=(aCache)?aCache.length:0;var bMatchContains=this.queryMatchContains;if((this.maxCacheEntries>0)&&aCache&&(nCacheLength>0)){this.cacheQueryEvent.fire(this,oParent,sQuery);if(!this.queryMatchCase){var sOrigQuery=sQuery;sQuery=sQuery.toLowerCase();} -for(var i=nCacheLength-1;i>=0;i--){var resultObj=aCache[i];var aAllResultItems=resultObj.results;var matchKey=(!this.queryMatchCase)?encodeURIComponent(resultObj.query).toLowerCase():encodeURIComponent(resultObj.query);if(matchKey==sQuery){bMatchFound=true;aResults=aAllResultItems;if(i!=nCacheLength-1){aCache.splice(i,1);this._addCacheElem(resultObj);} -break;} -else if(this.queryMatchSubset){for(var j=sQuery.length-1;j>=0;j--){var subQuery=sQuery.substr(0,j);if(matchKey==subQuery){bMatchFound=true;for(var k=aAllResultItems.length-1;k>=0;k--){var aRecord=aAllResultItems[k];var sKeyIndex=(this.queryMatchCase)?encodeURIComponent(aRecord[0]).indexOf(sQuery):encodeURIComponent(aRecord[0]).toLowerCase().indexOf(sQuery);if((!bMatchContains&&(sKeyIndex===0))||(bMatchContains&&(sKeyIndex>-1))){aResults.unshift(aRecord);}} -resultObj={};resultObj.query=sQuery;resultObj.results=aResults;this._addCacheElem(resultObj);break;}} -if(bMatchFound){break;}}} -if(bMatchFound){this.getCachedResultsEvent.fire(this,oParent,sOrigQuery,aResults);oCallbackFn(sOrigQuery,aResults,oParent);}} -return aResults;};YAHOO.widget.DS_XHR=function(sScriptURI,aSchema,oConfigs){if(oConfigs&&(oConfigs.constructor==Object)){for(var sConfig in oConfigs){this[sConfig]=oConfigs[sConfig];}} -if(!YAHOO.lang.isArray(aSchema)||!YAHOO.lang.isString(sScriptURI)){return;} -this.schema=aSchema;this.scriptURI=sScriptURI;this._init();};YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_XHR.TYPE_JSON=0;YAHOO.widget.DS_XHR.TYPE_XML=1;YAHOO.widget.DS_XHR.TYPE_FLAT=2;YAHOO.widget.DS_XHR.ERROR_DATAXHR="XHR response failed";YAHOO.widget.DS_XHR.prototype.connMgr=YAHOO.util.Connect;YAHOO.widget.DS_XHR.prototype.connTimeout=0;YAHOO.widget.DS_XHR.prototype.scriptURI=null;YAHOO.widget.DS_XHR.prototype.scriptQueryParam="query";YAHOO.widget.DS_XHR.prototype.scriptQueryAppend="";YAHOO.widget.DS_XHR.prototype.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n0){sUri+="&"+this.scriptQueryAppend;} -var oResponse=null;var oSelf=this;var responseSuccess=function(oResp){if(!oSelf._oConn||(oResp.tId!=oSelf._oConn.tId)){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATANULL);return;} -for(var foo in oResp){} -if(!isXML){oResp=oResp.responseText;} -else{oResp=oResp.responseXML;} -if(oResp===null){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATANULL);return;} -var aResults=oSelf.parseResponse(sQuery,oResp,oParent);var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;if(aResults===null){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATAPARSE);aResults=[];} -else{oSelf.getResultsEvent.fire(oSelf,oParent,sQuery,aResults);oSelf._addCacheElem(resultObj);} -oCallbackFn(sQuery,aResults,oParent);};var responseFailure=function(oResp){oSelf.dataErrorEvent.fire(oSelf,oParent,sQuery,YAHOO.widget.DS_XHR.ERROR_DATAXHR);return;};var oCallback={success:responseSuccess,failure:responseFailure};if(YAHOO.lang.isNumber(this.connTimeout)&&(this.connTimeout>0)){oCallback.timeout=this.connTimeout;} -if(this._oConn){this.connMgr.abort(this._oConn);} -oSelf._oConn=this.connMgr.asyncRequest("GET",sUri,oCallback,null);};YAHOO.widget.DS_XHR.prototype.parseResponse=function(sQuery,oResponse,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var nEnd=((this.responseStripAfter!=="")&&(oResponse.indexOf))?oResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oResponse=oResponse.substring(0,nEnd);} -switch(this.responseType){case YAHOO.widget.DS_XHR.TYPE_JSON:var jsonList,jsonObjParsed;var isNotMac=(navigator.userAgent.toLowerCase().indexOf('khtml')==-1);if(oResponse.parseJSON&&isNotMac){jsonObjParsed=oResponse.parseJSON();if(!jsonObjParsed){bError=true;} -else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);} -catch(e){bError=true;break;}}} -else if(window.JSON&&isNotMac){jsonObjParsed=JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break;} -else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);} -catch(e){bError=true;break;}}} -else{try{while(oResponse.substring(0,1)==" "){oResponse=oResponse.substring(1,oResponse.length);} -if(oResponse.indexOf("{")<0){bError=true;break;} -if(oResponse.indexOf("{}")===0){break;} -var jsonObjRaw=eval("("+oResponse+")");if(!jsonObjRaw){bError=true;break;} -jsonList=eval("(jsonObjRaw."+aSchema[0]+")");} -catch(e){bError=true;break;}} -if(!jsonList){bError=true;break;} -if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList];} -for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue="";} -aResultItem.unshift(dataFieldValue);} -if(aResultItem.length==1){aResultItem.push(jsonResult);} -aResults.unshift(aResultItem);} -break;case YAHOO.widget.DS_XHR.TYPE_XML:var xmlList=oResponse.getElementsByTagName(aSchema[0]);if(!xmlList){bError=true;break;} -for(var k=xmlList.length-1;k>=0;k--){var result=xmlList.item(k);var aFieldSet=[];for(var m=aSchema.length-1;m>=1;m--){var sValue=null;var xmlAttr=result.attributes.getNamedItem(aSchema[m]);if(xmlAttr){sValue=xmlAttr.value;} -else{var xmlNode=result.getElementsByTagName(aSchema[m]);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0).firstChild){sValue=xmlNode.item(0).firstChild.nodeValue;} -else{sValue="";}} -aFieldSet.unshift(sValue);} -aResults.unshift(aFieldSet);} -break;case YAHOO.widget.DS_XHR.TYPE_FLAT:if(oResponse.length>0){var newLength=oResponse.length-aSchema[0].length;if(oResponse.substr(newLength)==aSchema[0]){oResponse=oResponse.substr(0,newLength);} -var aRecords=oResponse.split(aSchema[0]);for(var n=aRecords.length-1;n>=0;n--){aResults[n]=aRecords[n].split(aSchema[1]);}} -break;default:break;} -sQuery=null;oResponse=null;oParent=null;if(bError){return null;} -else{return aResults;}};YAHOO.widget.DS_XHR.prototype._oConn=null;YAHOO.widget.DS_JSFunction=function(oFunction,oConfigs){if(oConfigs&&(oConfigs.constructor==Object)){for(var sConfig in oConfigs){this[sConfig]=oConfigs[sConfig];}} -if(!YAHOO.lang.isFunction(oFunction)){return;} -else{this.dataFunction=oFunction;this._init();}};YAHOO.widget.DS_JSFunction.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSFunction.prototype.dataFunction=null;YAHOO.widget.DS_JSFunction.prototype.doQuery=function(oCallbackFn,sQuery,oParent){var oFunction=this.dataFunction;var aResults=[];aResults=oFunction(sQuery);if(aResults===null){this.dataErrorEvent.fire(this,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATANULL);return;} -var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;this._addCacheElem(resultObj);this.getResultsEvent.fire(this,oParent,sQuery,aResults);oCallbackFn(sQuery,aResults,oParent);return;};YAHOO.widget.DS_JSArray=function(aData,oConfigs){if(oConfigs&&(oConfigs.constructor==Object)){for(var sConfig in oConfigs){this[sConfig]=oConfigs[sConfig];}} -if(!YAHOO.lang.isArray(aData)){return;} -else{this.data=aData;this._init();}};YAHOO.widget.DS_JSArray.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSArray.prototype.data=null;YAHOO.widget.DS_JSArray.prototype.doQuery=function(oCallbackFn,sQuery,oParent){var i;var aData=this.data;var aResults=[];var bMatchFound=false;var bMatchContains=this.queryMatchContains;if(sQuery){if(!this.queryMatchCase){sQuery=sQuery.toLowerCase();} -for(i=aData.length-1;i>=0;i--){var aDataset=[];if(YAHOO.lang.isString(aData[i])){aDataset[0]=aData[i];} -else if(YAHOO.lang.isArray(aData[i])){aDataset=aData[i];} -if(YAHOO.lang.isString(aDataset[0])){var sKeyIndex=(this.queryMatchCase)?encodeURIComponent(aDataset[0]).indexOf(sQuery):encodeURIComponent(aDataset[0]).toLowerCase().indexOf(sQuery);if((!bMatchContains&&(sKeyIndex===0))||(bMatchContains&&(sKeyIndex>-1))){aResults.unshift(aDataset);}}}} -else{for(i=aData.length-1;i>=0;i--){if(YAHOO.lang.isString(aData[i])){aResults.unshift([aData[i]]);} -else if(YAHOO.lang.isArray(aData[i])){aResults.unshift(aData[i]);}}} -this.getResultsEvent.fire(this,oParent,sQuery,aResults);oCallbackFn(sQuery,aResults,oParent);};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.3.0",build:"442"}); \ No newline at end of file +YAHOO.widget.AutoComplete=function(G,B,J,C){if(G&&B&&J){if(J instanceof YAHOO.widget.DataSource){this.dataSource=J;}else{return ;}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._elTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=G;}YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input");}else{return ;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._elContainer=document.getElementById(B);}else{this._elContainer=B;}if(this._elContainer.style.display=="none"){}var D=this._elContainer.parentNode;var A=D.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(D,"yui-ac");}else{}}else{return ;}if(C&&(C.constructor==Object)){for(var I in C){if(I){this[I]=C[I];}}}this._initContainer();this._initProps();this._initList();this._initContainerHelpers();var H=this;var F=this._elTextbox;var E=this._elContent;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(E,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(E,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(E,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(E,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListItems=function(){return this._aListItems;};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return false;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(B){if(this._elHeader){var A=this._elHeader;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(B){if(this._elFooter){var A=this._elFooter;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(this._elBody){var B=this._elBody;if(A){B.innerHTML=A;B.style.display="block";B.style.display="block";}else{B.innerHTML="";B.style.display="none";}this._maxResultsDisplayed=0;}};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,C){var A=B[0];if(A){return A;}else{return"";}};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(A){this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return A;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._elTextbox;var D=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(A,true); +YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=true;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._aListItems=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sSavedQuery=null;YAHOO.widget.AutoComplete.prototype._oCurItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1;}var D=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(D)||(D<1)){this.maxResultsDisplayed=10;}var E=this.queryDelay;if(!YAHOO.lang.isNumber(E)||(E<0)){this.queryDelay=0.2;}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A];}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null;}}var C=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(C)||(C<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelpers=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";this._elShadow=this._elContainer.appendChild(A);}if(this.useIFrame&&!this._elIFrame){var B=document.createElement("iframe");B.src=this._iFrameSrc;B.frameBorder=0;B.scrolling="no";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.tabIndex=-1;this._elIFrame=this._elContainer.appendChild(B);}};YAHOO.widget.AutoComplete.prototype._initContainer=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var C=document.createElement("div");C.className="yui-ac-content";C.style.display="none";this._elContent=this._elContainer.appendChild(C);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._elHeader=this._elContent.appendChild(B);var D=document.createElement("div");D.className="yui-ac-bd";this._elBody=this._elContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._elFooter=this._elContent.appendChild(A);}else{}};YAHOO.widget.AutoComplete.prototype._initList=function(){this._aListItems=[];while(this._elBody.hasChildNodes()){var B=this.getListItems();if(B){for(var A=B.length-1;A>=0;A--){B[A]=null;}}this._elBody.innerHTML="";}var E=document.createElement("ul");E=this._elBody.appendChild(E);for(var C=0;C=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(G){if(this.minQueryLength==-1){this._toggleContainer(false);return ;}var C=(this.delimChar)?this.delimChar:null;if(C){var E=-1;for(var B=C.length-1;B>=0;B--){var F=G.lastIndexOf(C[B]);if(F>E){E=F; +}}if(C[B]==" "){for(var A=C.length-1;A>=0;A--){if(G[E-1]==C[A]){E--;break;}}}if(E>-1){var D=E+1;while(G.charAt(D)==" "){D+=1;}this._sSavedQuery=G.substring(0,D);G=G.substr(D);}else{if(G.indexOf(this._sSavedQuery)<0){this._sSavedQuery=null;}}}if((G&&(G.length0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);return ;}G=encodeURIComponent(G);this._nDelayID=-1;G=this.doBeforeSendQuery(G);this.dataRequestEvent.fire(this,G);this.dataSource.getResults(this._populateList,G,this);};YAHOO.widget.AutoComplete.prototype._populateList=function(K,L,I){if(L===null){I.dataErrorEvent.fire(I,K);}if(!I._bFocused||!L){return ;}var A=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);var O=I._elContent.style;O.width=(!A)?null:"";O.height=(!A)?null:"";var H=decodeURIComponent(K);I._sCurQuery=H;I._bItemSelected=false;if(I._maxResultsDisplayed!=I.maxResultsDisplayed){I._initList();}var C=Math.min(L.length,I.maxResultsDisplayed);I._nDisplayedItems=C;if(C>0){I._initContainerHelpers();var D=I._aListItems;for(var G=C-1;G>=0;G--){var N=D[G];var B=L[G];N.innerHTML=I.formatResult(B,H);N.style.display="list-item";N._sResultKey=B[0];N._oResultData=B;}for(var F=D.length-1;F>=C;F--){var M=D[F];M.innerHTML=null;M.style.display="none";M._sResultKey=null;M._oResultData=null;}var J=I.doBeforeExpandContainer(I._elTextbox,I._elContainer,K,L);I._toggleContainer(J);if(I.autoHighlight){var E=D[0];I._toggleHighlight(E,"to");I.itemArrowToEvent.fire(I,E);I._typeAhead(E,K);}else{I._oCurItem=null;}}else{I._toggleContainer(false);}I.dataReturnEvent.fire(I,K,L);};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var C=this._elTextbox.value;var B=(this.delimChar)?this.delimChar[0]:null;var A=(B)?C.lastIndexOf(B,C.length-2):-1;if(A>-1){this._elTextbox.value=C.substring(0,A);}else{this._elTextbox.value="";}this._sSavedQuery=this._elTextbox.value;this.selectionEnforceEvent.fire(this);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var D=null;for(var A=this._nDisplayedItems-1;A>=0;A--){var C=this._aListItems[A];var B=C._sResultKey.toLowerCase();if(B==this._sCurQuery.toLowerCase()){D=C;break;}}return(D);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(D,G){if(!this.typeAhead||(this._nKeyCode==8)){return ;}var F=this._elTextbox;var E=this._elTextbox.value;if(!F.setSelectionRange&&!F.createTextRange){return ;}var B=E.length;this._updateValue(D);var C=F.value.length;this._selectText(F,B,C);var A=F.value.substr(B,C);this.typeAheadEvent.fire(this,G,A);};YAHOO.widget.AutoComplete.prototype._selectText=function(D,A,B){if(D.setSelectionRange){D.setSelectionRange(A,B);}else{if(D.createTextRange){var C=D.createTextRange();C.moveStart("character",A);C.moveEnd("character",B-D.value.length);C.select();}else{D.select();}}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(B){var D=false;var C=this._elContent.offsetWidth+"px";var A=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){D=true;if(B){this._elIFrame.style.width=C;this._elIFrame.style.height=A;}else{this._elIFrame.style.width=0;this._elIFrame.style.height=0;}}if(this.useShadow&&this._elShadow){D=true;if(B){this._elShadow.style.width=C;this._elShadow.style.height=A;}else{this._elShadow.style.width=0;this._elShadow.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(K){var E=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return ;}if(!K){this._elContent.scrollTop=0;var C=this._aListItems;if(C&&(C.length>0)){for(var H=C.length-1;H>=0;H--){C[H].style.display="none";}}if(this._oCurItem){this._toggleHighlight(this._oCurItem,"from");}this._oCurItem=null;this._nDisplayedItems=0;this._sCurQuery=null;}if(!K&&!this._bContainerOpen){this._elContent.style.display="none";return ;}var B=this._oAnim;if(B&&B.getEl()&&(this.animHoriz||this.animVert)){if(!K){this._toggleContainerHelpers(K);}if(B.isAnimated()){B.stop();}var I=this._elContent.cloneNode(true);E.appendChild(I);I.style.top="-9000px";I.style.display="block";var G=I.offsetWidth;var D=I.offsetHeight;var A=(this.animHoriz)?0:G;var F=(this.animVert)?0:D;B.attributes=(K)?{width:{to:G},height:{to:D}}:{width:{to:A},height:{to:F}};if(K&&!this._bContainerOpen){this._elContent.style.width=A+"px";this._elContent.style.height=F+"px";}else{this._elContent.style.width=G+"px";this._elContent.style.height=D+"px";}E.removeChild(I);I=null;var J=this;var L=function(){B.onComplete.unsubscribeAll();if(K){J.containerExpandEvent.fire(J);}else{J._elContent.style.display="none";J.containerCollapseEvent.fire(J);}J._toggleContainerHelpers(K);};this._elContent.style.display="block";B.onComplete.subscribe(L);B.animate();this._bContainerOpen=K;}else{if(K){this._elContent.style.display="block";this.containerExpandEvent.fire(this);}else{this._elContent.style.display="none";this.containerCollapseEvent.fire(this);}this._toggleContainerHelpers(K);this._bContainerOpen=K;}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){var B=this.highlightClassName;if(this._oCurItem){YAHOO.util.Dom.removeClass(this._oCurItem,B);}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._oCurItem=A;}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(A,C){if(A==this._oCurItem){return ;}var B=this.prehighlightClassName;if((C=="mouseover")&&B){YAHOO.util.Dom.addClass(A,B);}else{YAHOO.util.Dom.removeClass(A,B);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(E){var F=this._elTextbox;var D=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=this._sSavedQuery;var C=E._sResultKey;F.focus();F.value="";if(D){if(B){F.value=B;}F.value+=C+D;if(D!=" "){F.value+=" ";}}else{F.value=C;}if(F.type=="textarea"){F.scrollTop=F.scrollHeight;}var A=F.value.length;this._selectText(F,A,A);this._oCurItem=E;};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._cancelIntervalDetection(this);this.itemSelectEvent.fire(this,A,A._oResultData); +this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._oCurItem){this._selectItem(this._oCurItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var E=this._oCurItem;var F=-1;if(E){F=E._nItemIndex;}var D=(G==40)?(F+1):(F-1);if(D<-2||D>=this._nDisplayedItems){return ;}if(E){this._toggleHighlight(E,"from");this.itemArrowFromEvent.fire(this,E);}if(D==-1){if(this.delimChar&&this._sSavedQuery){if(!this._textMatchesOption()){this._elTextbox.value=this._sSavedQuery;}else{this._elTextbox.value=this._sSavedQuery+this._sCurQuery;}}else{this._elTextbox.value=this._sCurQuery;}this._oCurItem=null;return ;}if(D==-2){this._toggleContainer(false);return ;}var C=this._aListItems[D];var A=this._elContent;var B=((YAHOO.util.Dom.getStyle(A,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(A,"overflowY")=="auto"));if(B&&(D>-1)&&(D(A.scrollTop+A.offsetHeight)){A.scrollTop=(C.offsetTop+C.offsetHeight)-A.offsetHeight;}else{if((C.offsetTop+C.offsetHeight)(A.scrollTop+A.offsetHeight)){this._elContent.scrollTop=(C.offsetTop+C.offsetHeight)-A.offsetHeight;}}}}this._toggleHighlight(C,"to");this.itemArrowToEvent.fire(this,C);if(this.typeAhead){this._updateValue(C);}}};YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(A,B){if(B.prehighlightClassName){B._togglePrehighlight(this,"mouseover");}else{B._toggleHighlight(this,"to");}B.itemMouseOverEvent.fire(B,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(A,B){if(B.prehighlightClassName){B._togglePrehighlight(this,"mouseout");}else{B._toggleHighlight(this,"from");}B.itemMouseOutEvent.fire(B,this);};YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(A,B){B._toggleHighlight(this,"to");B._selectItem(this);};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,B){B._bOverContainer=true;};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,B){B._bOverContainer=false;if(B._oCurItem){B._toggleHighlight(B._oCurItem,"to");}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._elTextbox.focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;switch(C){case 9:if(B._oCurItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._oCurItem);}else{B._toggleContainer(false);}break;case 13:if(!YAHOO.env.ua.webkit){if(B._oCurItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._oCurItem);}else{B._toggleContainer(false);}}break;case 27:B._toggleContainer(false);return ;case 39:B._jumpSelection();break;case 38:YAHOO.util.Event.stopEvent(A);B._moveSelection(C);break;case 40:YAHOO.util.Event.stopEvent(A);B._moveSelection(C);break;default:break;}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if(YAHOO.env.ua.webkit){switch(C){case 9:if(B._oCurItem){if(B.delimChar&&(B._nKeyCode!=C)){YAHOO.util.Event.stopEvent(A);}}break;case 13:if(B._oCurItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._oCurItem);}else{B._toggleContainer(false);}break;default:break;}}else{if(C==229){B._queryInterval=setInterval(function(){B._onIMEDetected(B);},500);}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(B,D){D._initProps();var E=B.keyCode;D._nKeyCode=E;var C=this.value;if(D._isIgnoreKey(E)||(C.toLowerCase()==D._sCurQuery)){return ;}else{D._bItemSelected=false;YAHOO.util.Dom.removeClass(D._oCurItem,D.highlightClassName);D._oCurItem=null;D.textboxKeyEvent.fire(D,E);}if(D.queryDelay>0){var A=setTimeout(function(){D._sendQuery(C);},(D.queryDelay*1000));if(D._nDelayID!=-1){clearTimeout(D._nDelayID);}D._nDelayID=A;}else{D._sendQuery(C);}};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;if(!B._bItemSelected){B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,B){if(!B._bOverContainer||(B._nKeyCode==9)){if(!B._bItemSelected){var C=B._textMatchesOption();if(!B._bContainerOpen||(B._bContainerOpen&&(C===null))){if(B.forceSelection){B._clearSelection();}else{B.unmatchedItemSelectEvent.fire(B);}}else{if(B.forceSelection){B._selectItem(C);}}}if(B._bContainerOpen){B._toggleContainer(false);}B._cancelIntervalDetection(B);B._bFocused=false;B.textboxBlurEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.DataSource=function(){};YAHOO.widget.DataSource.ERROR_DATANULL="Response data was null";YAHOO.widget.DataSource.ERROR_DATAPARSE="Response data could not be parsed";YAHOO.widget.DataSource.prototype.maxCacheEntries=15;YAHOO.widget.DataSource.prototype.queryMatchContains=false;YAHOO.widget.DataSource.prototype.queryMatchSubset=false;YAHOO.widget.DataSource.prototype.queryMatchCase=false;YAHOO.widget.DataSource.prototype.toString=function(){return"DataSource "+this._sName;};YAHOO.widget.DataSource.prototype.getResults=function(A,D,B){var C=this._doQueryCache(A,D,B);if(C.length===0){this.queryEvent.fire(this,B,D);this.doQuery(A,D,B);}};YAHOO.widget.DataSource.prototype.doQuery=function(A,C,B){};YAHOO.widget.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];}if(this._aCacheHelper){this._aCacheHelper=[];}this.cacheFlushEvent.fire(this);};YAHOO.widget.DataSource.prototype.queryEvent=null;YAHOO.widget.DataSource.prototype.cacheQueryEvent=null;YAHOO.widget.DataSource.prototype.getResultsEvent=null;YAHOO.widget.DataSource.prototype.getCachedResultsEvent=null; +YAHOO.widget.DataSource.prototype.dataErrorEvent=null;YAHOO.widget.DataSource.prototype.cacheFlushEvent=null;YAHOO.widget.DataSource._nIndex=0;YAHOO.widget.DataSource.prototype._sName=null;YAHOO.widget.DataSource.prototype._aCache=null;YAHOO.widget.DataSource.prototype._init=function(){var A=this.maxCacheEntries;if(!YAHOO.lang.isNumber(A)||(A<0)){A=0;}if(A>0&&!this._aCache){this._aCache=[];}this._sName="instance"+YAHOO.widget.DataSource._nIndex;YAHOO.widget.DataSource._nIndex++;this.queryEvent=new YAHOO.util.CustomEvent("query",this);this.cacheQueryEvent=new YAHOO.util.CustomEvent("cacheQuery",this);this.getResultsEvent=new YAHOO.util.CustomEvent("getResults",this);this.getCachedResultsEvent=new YAHOO.util.CustomEvent("getCachedResults",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.cacheFlushEvent=new YAHOO.util.CustomEvent("cacheFlush",this);};YAHOO.widget.DataSource.prototype._addCacheElem=function(B){var A=this._aCache;if(!A||!B||!B.query||!B.results){return ;}if(A.length>=this.maxCacheEntries){A.shift();}A.push(B);};YAHOO.widget.DataSource.prototype._doQueryCache=function(A,I,N){var H=[];var G=false;var J=this._aCache;var F=(J)?J.length:0;var K=this.queryMatchContains;var D;if((this.maxCacheEntries>0)&&J&&(F>0)){this.cacheQueryEvent.fire(this,N,I);if(!this.queryMatchCase){D=I;I=I.toLowerCase();}for(var P=F-1;P>=0;P--){var E=J[P];var B=E.results;var C=(!this.queryMatchCase)?encodeURIComponent(E.query).toLowerCase():encodeURIComponent(E.query);if(C==I){G=true;H=B;if(P!=F-1){J.splice(P,1);this._addCacheElem(E);}break;}else{if(this.queryMatchSubset){for(var O=I.length-1;O>=0;O--){var R=I.substr(0,O);if(C==R){G=true;for(var M=B.length-1;M>=0;M--){var Q=B[M];var L=(this.queryMatchCase)?encodeURIComponent(Q[0]).indexOf(I):encodeURIComponent(Q[0]).toLowerCase().indexOf(I);if((!K&&(L===0))||(K&&(L>-1))){H.unshift(Q);}}E={};E.query=I;E.results=H;this._addCacheElem(E);break;}}if(G){break;}}}}if(G){this.getCachedResultsEvent.fire(this,N,D,H);A(D,H,N);}}return H;};YAHOO.widget.DS_XHR=function(C,A,D){if(D&&(D.constructor==Object)){for(var B in D){this[B]=D[B];}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(C)){return ;}this.schema=A;this.scriptURI=C;this._init();};YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_XHR.TYPE_JSON=0;YAHOO.widget.DS_XHR.TYPE_XML=1;YAHOO.widget.DS_XHR.TYPE_FLAT=2;YAHOO.widget.DS_XHR.ERROR_DATAXHR="XHR response failed";YAHOO.widget.DS_XHR.prototype.connMgr=YAHOO.util.Connect;YAHOO.widget.DS_XHR.prototype.connTimeout=0;YAHOO.widget.DS_XHR.prototype.scriptURI=null;YAHOO.widget.DS_XHR.prototype.scriptQueryParam="query";YAHOO.widget.DS_XHR.prototype.scriptQueryAppend="";YAHOO.widget.DS_XHR.prototype.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n0){D+="&"+this.scriptQueryAppend;}var C=null;var F=this;var I=function(K){if(!F._oConn||(K.tId!=F._oConn.tId)){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}for(var N in K){}if(!J){K=K.responseText;}else{K=K.responseXML;}if(K===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}var M=F.parseResponse(G,K,B);var L={};L.query=decodeURIComponent(G);L.results=M;if(M===null){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DataSource.ERROR_DATAPARSE);M=[];}else{F.getResultsEvent.fire(F,B,G,M);F._addCacheElem(L);}E(G,M,B);};var A=function(K){F.dataErrorEvent.fire(F,B,G,YAHOO.widget.DS_XHR.ERROR_DATAXHR);return ;};var H={success:I,failure:A};if(YAHOO.lang.isNumber(this.connTimeout)&&(this.connTimeout>0)){H.timeout=this.connTimeout;}if(this._oConn){this.connMgr.abort(this._oConn);}F._oConn=this.connMgr.asyncRequest("GET",D,H,null);};YAHOO.widget.DS_XHR.prototype.parseResponse=function(sQuery,oResponse,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var nEnd=((this.responseStripAfter!=="")&&(oResponse.indexOf))?oResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oResponse=oResponse.substring(0,nEnd);}switch(this.responseType){case YAHOO.widget.DS_XHR.TYPE_JSON:var jsonList,jsonObjParsed;if(YAHOO.lang.JSON){jsonObjParsed=YAHOO.lang.JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{if(oResponse.parseJSON){jsonObjParsed=oResponse.parseJSON();if(!jsonObjParsed){bError=true;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{if(window.JSON){jsonObjParsed=JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break;}else{try{jsonList=eval("jsonObjParsed."+aSchema[0]);}catch(e){bError=true;break;}}}else{try{while(oResponse.substring(0,1)==" "){oResponse=oResponse.substring(1,oResponse.length);}if(oResponse.indexOf("{")<0){bError=true;break;}if(oResponse.indexOf("{}")===0){break;}var jsonObjRaw=eval("("+oResponse+")");if(!jsonObjRaw){bError=true;break;}jsonList=eval("(jsonObjRaw."+aSchema[0]+")");}catch(e){bError=true;break;}}}}if(!jsonList){bError=true;break;}if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList];}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue="";}aResultItem.unshift(dataFieldValue);}if(aResultItem.length==1){aResultItem.push(jsonResult);}aResults.unshift(aResultItem);}break;case YAHOO.widget.DS_XHR.TYPE_XML:var xmlList=oResponse.getElementsByTagName(aSchema[0]);if(!xmlList){bError=true;break;}for(var k=xmlList.length-1;k>=0;k--){var result=xmlList.item(k);var aFieldSet=[];for(var m=aSchema.length-1;m>=1;m--){var sValue=null;var xmlAttr=result.attributes.getNamedItem(aSchema[m]);if(xmlAttr){sValue=xmlAttr.value;}else{var xmlNode=result.getElementsByTagName(aSchema[m]);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0).firstChild){sValue=xmlNode.item(0).firstChild.nodeValue; +}else{sValue="";}}aFieldSet.unshift(sValue);}aResults.unshift(aFieldSet);}break;case YAHOO.widget.DS_XHR.TYPE_FLAT:if(oResponse.length>0){var newLength=oResponse.length-aSchema[0].length;if(oResponse.substr(newLength)==aSchema[0]){oResponse=oResponse.substr(0,newLength);}var aRecords=oResponse.split(aSchema[0]);for(var n=aRecords.length-1;n>=0;n--){aResults[n]=aRecords[n].split(aSchema[1]);}}break;default:break;}sQuery=null;oResponse=null;oParent=null;if(bError){return null;}else{return aResults;}};YAHOO.widget.DS_XHR.prototype._oConn=null;YAHOO.widget.DS_ScriptNode=function(D,A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(D)){return ;}this.schema=A;this.scriptURI=D;this._init();};YAHOO.widget.DS_ScriptNode.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_ScriptNode.prototype.getUtility=YAHOO.util.Get;YAHOO.widget.DS_ScriptNode.prototype.scriptURI=null;YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam="query";YAHOO.widget.DS_ScriptNode.prototype.asyncMode="allowAll";YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam="callback";YAHOO.widget.DS_ScriptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0;YAHOO.widget.DS_ScriptNode._nPending=0;YAHOO.widget.DS_ScriptNode.prototype.doQuery=function(A,F,C){var B=this;if(YAHOO.widget.DS_ScriptNode._nPending===0){YAHOO.widget.DS_ScriptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0;}var E=YAHOO.widget.DS_ScriptNode._nId;YAHOO.widget.DS_ScriptNode._nId++;YAHOO.widget.DS_ScriptNode.callbacks[E]=function(G){if((B.asyncMode!=="ignoreStaleResponses")||(E===YAHOO.widget.DS_ScriptNode.callbacks.length-1)){B.handleResponse(G,A,F,C);}else{}delete YAHOO.widget.DS_ScriptNode.callbacks[E];};YAHOO.widget.DS_ScriptNode._nPending++;var D=this.scriptURI+"&"+this.scriptQueryParam+"="+F+"&"+this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+E+"]";this.getUtility.script(D,{autopurge:true,onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown,onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown});};YAHOO.widget.DS_ScriptNode.prototype.handleResponse=function(oResponse,oCallbackFn,sQuery,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var jsonList,jsonObjParsed;try{jsonList=eval("(oResponse."+aSchema[0]+")");}catch(e){bError=true;}if(!jsonList){bError=true;jsonList=[];}else{if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList];}}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue="";}aResultItem.unshift(dataFieldValue);}if(aResultItem.length==1){aResultItem.push(jsonResult);}aResults.unshift(aResultItem);}if(bError){aResults=null;}if(aResults===null){this.dataErrorEvent.fire(this,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATAPARSE);aResults=[];}else{var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;this._addCacheElem(resultObj);this.getResultsEvent.fire(this,oParent,sQuery,aResults);}oCallbackFn(sQuery,aResults,oParent);};YAHOO.widget.DS_ScriptNode._bumpPendingDown=function(){YAHOO.widget.DS_ScriptNode._nPending--;};YAHOO.widget.DS_JSFunction=function(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isFunction(A)){return ;}else{this.dataFunction=A;this._init();}};YAHOO.widget.DS_JSFunction.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSFunction.prototype.dataFunction=null;YAHOO.widget.DS_JSFunction.prototype.doQuery=function(C,F,D){var B=this.dataFunction;var E=[];E=B(F);if(E===null){this.dataErrorEvent.fire(this,D,F,YAHOO.widget.DataSource.ERROR_DATANULL);return ;}var A={};A.query=decodeURIComponent(F);A.results=E;this._addCacheElem(A);this.getResultsEvent.fire(this,D,F,E);C(F,E,D);return ;};YAHOO.widget.DS_JSArray=function(A,C){if(C&&(C.constructor==Object)){for(var B in C){this[B]=C[B];}}if(!YAHOO.lang.isArray(A)){return ;}else{this.data=A;this._init();}};YAHOO.widget.DS_JSArray.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSArray.prototype.data=null;YAHOO.widget.DS_JSArray.prototype.doQuery=function(E,I,A){var F;var C=this.data;var J=[];var D=false;var B=this.queryMatchContains;if(I){if(!this.queryMatchCase){I=I.toLowerCase();}for(F=C.length-1;F>=0;F--){var H=[];if(YAHOO.lang.isString(C[F])){H[0]=C[F];}else{if(YAHOO.lang.isArray(C[F])){H=C[F];}}if(YAHOO.lang.isString(H[0])){var G=(this.queryMatchCase)?encodeURIComponent(H[0]).indexOf(I):encodeURIComponent(H[0]).toLowerCase().indexOf(I);if((!B&&(G===0))||(B&&(G>-1))){J.unshift(H);}}}}else{for(F=C.length-1;F>=0;F--){if(YAHOO.lang.isString(C[F])){J.unshift([C[F]]);}else{if(YAHOO.lang.isArray(C[F])){J.unshift(C[F]);}}}}this.getResultsEvent.fire(this,A,I,J);E(I,J,A);};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.5.0",build:"895"}); \ No newline at end of file diff --git a/lib/yui/autocomplete/autocomplete.js b/lib/yui/autocomplete/autocomplete.js index 72a6772b59..d435e873c4 100755 --- a/lib/yui/autocomplete/autocomplete.js +++ b/lib/yui/autocomplete/autocomplete.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ /** * The AutoComplete control provides the front-end logic for text-entry suggestion and @@ -10,7 +10,7 @@ version: 2.3.0 * * @module autocomplete * @requires yahoo, dom, event, datasource - * @optional animation, connection + * @optional animation, connection, get * @namespace YAHOO.widget * @title AutoComplete Widget */ @@ -53,15 +53,15 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { if(YAHOO.util.Dom.inDocument(elInput)) { if(YAHOO.lang.isString(elInput)) { this._sName = "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput; - this._oTextbox = document.getElementById(elInput); + this._elTextbox = document.getElementById(elInput); } else { this._sName = (elInput.id) ? "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput.id: "instance" + YAHOO.widget.AutoComplete._nIndex; - this._oTextbox = elInput; + this._elTextbox = elInput; } - YAHOO.util.Dom.addClass(this._oTextbox, "yui-ac-input"); + YAHOO.util.Dom.addClass(this._elTextbox, "yui-ac-input"); } else { return; @@ -70,28 +70,21 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { // Validate container element if(YAHOO.util.Dom.inDocument(elContainer)) { if(YAHOO.lang.isString(elContainer)) { - this._oContainer = document.getElementById(elContainer); + this._elContainer = document.getElementById(elContainer); } else { - this._oContainer = elContainer; + this._elContainer = elContainer; } - if(this._oContainer.style.display == "none") { + if(this._elContainer.style.display == "none") { } // For skinning - var elParent = this._oContainer.parentNode; + var elParent = this._elContainer.parentNode; var elTag = elParent.tagName.toLowerCase(); - while(elParent && (elParent != "document")) { - if(elTag == "div") { - YAHOO.util.Dom.addClass(elParent, "yui-ac"); - break; - } - else { - elParent = elParent.parentNode; - elTag = elParent.tagName.toLowerCase(); - } + if(elTag == "div") { + YAHOO.util.Dom.addClass(elParent, "yui-ac"); } - if(elTag != "div") { + else { } } else { @@ -115,23 +108,21 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { // Set up events var oSelf = this; - var oTextbox = this._oTextbox; + var elTextbox = this._elTextbox; // Events are actually for the content module within the container - var oContent = this._oContainer._oContent; + var elContent = this._elContent; // Dom events - YAHOO.util.Event.addListener(oTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf); - YAHOO.util.Event.addListener(oTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf); - YAHOO.util.Event.addListener(oTextbox,"focus",oSelf._onTextboxFocus,oSelf); - YAHOO.util.Event.addListener(oTextbox,"blur",oSelf._onTextboxBlur,oSelf); - YAHOO.util.Event.addListener(oContent,"mouseover",oSelf._onContainerMouseover,oSelf); - YAHOO.util.Event.addListener(oContent,"mouseout",oSelf._onContainerMouseout,oSelf); - YAHOO.util.Event.addListener(oContent,"scroll",oSelf._onContainerScroll,oSelf); - YAHOO.util.Event.addListener(oContent,"resize",oSelf._onContainerResize,oSelf); - if(oTextbox.form) { - YAHOO.util.Event.addListener(oTextbox.form,"submit",oSelf._onFormSubmit,oSelf); - } - YAHOO.util.Event.addListener(oTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf); + YAHOO.util.Event.addListener(elTextbox,"keyup",oSelf._onTextboxKeyUp,oSelf); + YAHOO.util.Event.addListener(elTextbox,"keydown",oSelf._onTextboxKeyDown,oSelf); + YAHOO.util.Event.addListener(elTextbox,"focus",oSelf._onTextboxFocus,oSelf); + YAHOO.util.Event.addListener(elTextbox,"blur",oSelf._onTextboxBlur,oSelf); + YAHOO.util.Event.addListener(elContent,"mouseover",oSelf._onContainerMouseover,oSelf); + YAHOO.util.Event.addListener(elContent,"mouseout",oSelf._onContainerMouseout,oSelf); + YAHOO.util.Event.addListener(elContent,"scroll",oSelf._onContainerScroll,oSelf); + YAHOO.util.Event.addListener(elContent,"resize",oSelf._onContainerResize,oSelf); + YAHOO.util.Event.addListener(elTextbox,"keypress",oSelf._onTextboxKeyPress,oSelf); + YAHOO.util.Event.addListener(window,"unload",oSelf._onWindowUnload,oSelf); // Custom events this.textboxFocusEvent = new YAHOO.util.CustomEvent("textboxFocus", this); @@ -152,7 +143,7 @@ YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { this.textboxBlurEvent = new YAHOO.util.CustomEvent("textboxBlur", this); // Finish up - oTextbox.setAttribute("autocomplete","off"); + elTextbox.setAttribute("autocomplete","off"); YAHOO.widget.AutoComplete._nIndex++; } // Required arguments were not found @@ -408,15 +399,16 @@ YAHOO.widget.AutoComplete.prototype.getListItemData = function(oListItem) { * @param sHeader {String} HTML markup for results container header. */ YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) { - if(sHeader) { - if(this._oContainer._oContent._oHeader) { - this._oContainer._oContent._oHeader.innerHTML = sHeader; - this._oContainer._oContent._oHeader.style.display = "block"; + if(this._elHeader) { + var elHeader = this._elHeader; + if(sHeader) { + elHeader.innerHTML = sHeader; + elHeader.style.display = "block"; + } + else { + elHeader.innerHTML = ""; + elHeader.style.display = "none"; } - } - else { - this._oContainer._oContent._oHeader.innerHTML = ""; - this._oContainer._oContent._oHeader.style.display = "none"; } }; @@ -428,15 +420,16 @@ YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) { * @param sFooter {String} HTML markup for results container footer. */ YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) { - if(sFooter) { - if(this._oContainer._oContent._oFooter) { - this._oContainer._oContent._oFooter.innerHTML = sFooter; - this._oContainer._oContent._oFooter.style.display = "block"; + if(this._elFooter) { + var elFooter = this._elFooter; + if(sFooter) { + elFooter.innerHTML = sFooter; + elFooter.style.display = "block"; + } + else { + elFooter.innerHTML = ""; + elFooter.style.display = "none"; } - } - else { - this._oContainer._oContent._oFooter.innerHTML = ""; - this._oContainer._oContent._oFooter.style.display = "none"; } }; @@ -448,18 +441,19 @@ YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) { * @param sBody {String} HTML markup for results container body. */ YAHOO.widget.AutoComplete.prototype.setBody = function(sBody) { - if(sBody) { - if(this._oContainer._oContent._oBody) { - this._oContainer._oContent._oBody.innerHTML = sBody; - this._oContainer._oContent._oBody.style.display = "block"; - this._oContainer._oContent.style.display = "block"; + if(this._elBody) { + var elBody = this._elBody; + if(sBody) { + elBody.innerHTML = sBody; + elBody.style.display = "block"; + elBody.style.display = "block"; } + else { + elBody.innerHTML = ""; + elBody.style.display = "none"; + } + this._maxResultsDisplayed = 0; } - else { - this._oContainer._oContent._oBody.innerHTML = ""; - this._oContainer._oContent.style.display = "none"; - } - this._maxResultsDisplayed = 0; }; /** @@ -488,13 +482,13 @@ YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultItem, sQuery) * and DOM elements. * * @method doBeforeExpandContainer - * @param oTextbox {HTMLElement} The text input box. - * @param oContainer {HTMLElement} The container element. + * @param elTextbox {HTMLElement} The text input box. + * @param elContainer {HTMLElement} The container element. * @param sQuery {String} The query string. * @param aResults {Object[]} An array of query results. * @return {Boolean} Return true to continue expanding container, false to cancel the expand. */ -YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer = function(oTextbox, oContainer, sQuery, aResults) { +YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer = function(elTextbox, elContainer, sQuery, aResults) { return true; }; @@ -529,26 +523,26 @@ YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery = function(sQuery) { */ YAHOO.widget.AutoComplete.prototype.destroy = function() { var instanceName = this.toString(); - var elInput = this._oTextbox; - var elContainer = this._oContainer; + var elInput = this._elTextbox; + var elContainer = this._elContainer; // Unhook custom events - this.textboxFocusEvent.unsubscribe(); - this.textboxKeyEvent.unsubscribe(); - this.dataRequestEvent.unsubscribe(); - this.dataReturnEvent.unsubscribe(); - this.dataErrorEvent.unsubscribe(); - this.containerExpandEvent.unsubscribe(); - this.typeAheadEvent.unsubscribe(); - this.itemMouseOverEvent.unsubscribe(); - this.itemMouseOutEvent.unsubscribe(); - this.itemArrowToEvent.unsubscribe(); - this.itemArrowFromEvent.unsubscribe(); - this.itemSelectEvent.unsubscribe(); - this.unmatchedItemSelectEvent.unsubscribe(); - this.selectionEnforceEvent.unsubscribe(); - this.containerCollapseEvent.unsubscribe(); - this.textboxBlurEvent.unsubscribe(); + this.textboxFocusEvent.unsubscribeAll(); + this.textboxKeyEvent.unsubscribeAll(); + this.dataRequestEvent.unsubscribeAll(); + this.dataReturnEvent.unsubscribeAll(); + this.dataErrorEvent.unsubscribeAll(); + this.containerExpandEvent.unsubscribeAll(); + this.typeAheadEvent.unsubscribeAll(); + this.itemMouseOverEvent.unsubscribeAll(); + this.itemMouseOutEvent.unsubscribeAll(); + this.itemArrowToEvent.unsubscribeAll(); + this.itemArrowFromEvent.unsubscribeAll(); + this.itemSelectEvent.unsubscribeAll(); + this.unmatchedItemSelectEvent.unsubscribeAll(); + this.selectionEnforceEvent.unsubscribeAll(); + this.containerCollapseEvent.unsubscribeAll(); + this.textboxBlurEvent.unsubscribeAll(); // Unhook DOM events YAHOO.util.Event.purgeElement(elInput, true); @@ -559,7 +553,7 @@ YAHOO.widget.AutoComplete.prototype.destroy = function() { // Null out objects for(var key in this) { - if(this.hasOwnProperty(key)) { + if(YAHOO.lang.hasOwnProperty(this, key)) { this[key] = null; } } @@ -687,12 +681,9 @@ YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null; /** * Fired when a user selection does not match any of the displayed result items. - * Note that this event may not behave as expected when delimiter characters - * have been defined. * * @event unmatchedItemSelectEvent * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. - * @param sQuery {String} The user-typed query string. */ YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null; @@ -749,11 +740,74 @@ YAHOO.widget.AutoComplete.prototype._sName = null; /** * Text input field DOM element. * - * @property _oTextbox + * @property _elTextbox * @type HTMLElement * @private */ -YAHOO.widget.AutoComplete.prototype._oTextbox = null; +YAHOO.widget.AutoComplete.prototype._elTextbox = null; + +/** + * Container DOM element. + * + * @property _elContainer + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elContainer = null; + +/** + * Reference to content element within container element. + * + * @property _elContent + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elContent = null; + +/** + * Reference to header element within content element. + * + * @property _elHeader + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elHeader = null; + +/** + * Reference to body element within content element. + * + * @property _elBody + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elBody = null; + +/** + * Reference to footer element within content element. + * + * @property _elFooter + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elFooter = null; + +/** + * Reference to shadow element within container element. + * + * @property _elShadow + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elShadow = null; + +/** + * Reference to iframe element within container element. + * + * @property _elIFrame + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elIFrame = null; /** * Whether or not the input field is currently in focus. If query results come back @@ -774,15 +828,6 @@ YAHOO.widget.AutoComplete.prototype._bFocused = true; */ YAHOO.widget.AutoComplete.prototype._oAnim = null; -/** - * Container DOM element. - * - * @property _oContainer - * @type HTMLElement - * @private - */ -YAHOO.widget.AutoComplete.prototype._oContainer = null; - /** * Whether or not the results container is currently open. * @@ -944,7 +989,7 @@ YAHOO.widget.AutoComplete.prototype._initProps = function() { this.queryDelay = 0.2; } var delimChar = this.delimChar; - if(YAHOO.lang.isString(delimChar)) { + if(YAHOO.lang.isString(delimChar) && (delimChar.length > 0)) { this.delimChar = [delimChar]; } else if(!YAHOO.lang.isArray(delimChar)) { @@ -956,7 +1001,7 @@ YAHOO.widget.AutoComplete.prototype._initProps = function() { this.animSpeed = 0.3; } if(!this._oAnim ) { - this._oAnim = new YAHOO.util.Anim(this._oContainer._oContent, {}, this.animSpeed); + this._oAnim = new YAHOO.util.Anim(this._elContent, {}, this.animSpeed); } else { this._oAnim.duration = this.animSpeed; @@ -974,21 +1019,21 @@ YAHOO.widget.AutoComplete.prototype._initProps = function() { * @private */ YAHOO.widget.AutoComplete.prototype._initContainerHelpers = function() { - if(this.useShadow && !this._oContainer._oShadow) { - var oShadow = document.createElement("div"); - oShadow.className = "yui-ac-shadow"; - this._oContainer._oShadow = this._oContainer.appendChild(oShadow); - } - if(this.useIFrame && !this._oContainer._oIFrame) { - var oIFrame = document.createElement("iframe"); - oIFrame.src = this._iFrameSrc; - oIFrame.frameBorder = 0; - oIFrame.scrolling = "no"; - oIFrame.style.position = "absolute"; - oIFrame.style.width = "100%"; - oIFrame.style.height = "100%"; - oIFrame.tabIndex = -1; - this._oContainer._oIFrame = this._oContainer.appendChild(oIFrame); + if(this.useShadow && !this._elShadow) { + var elShadow = document.createElement("div"); + elShadow.className = "yui-ac-shadow"; + this._elShadow = this._elContainer.appendChild(elShadow); + } + if(this.useIFrame && !this._elIFrame) { + var elIFrame = document.createElement("iframe"); + elIFrame.src = this._iFrameSrc; + elIFrame.frameBorder = 0; + elIFrame.scrolling = "no"; + elIFrame.style.position = "absolute"; + elIFrame.style.width = "100%"; + elIFrame.style.height = "100%"; + elIFrame.tabIndex = -1; + this._elIFrame = this._elContainer.appendChild(elIFrame); } }; @@ -999,28 +1044,28 @@ YAHOO.widget.AutoComplete.prototype._initContainerHelpers = function() { * @private */ YAHOO.widget.AutoComplete.prototype._initContainer = function() { - YAHOO.util.Dom.addClass(this._oContainer, "yui-ac-container"); + YAHOO.util.Dom.addClass(this._elContainer, "yui-ac-container"); - if(!this._oContainer._oContent) { - // The oContent div helps size the iframe and shadow properly - var oContent = document.createElement("div"); - oContent.className = "yui-ac-content"; - oContent.style.display = "none"; - this._oContainer._oContent = this._oContainer.appendChild(oContent); - - var oHeader = document.createElement("div"); - oHeader.className = "yui-ac-hd"; - oHeader.style.display = "none"; - this._oContainer._oContent._oHeader = this._oContainer._oContent.appendChild(oHeader); - - var oBody = document.createElement("div"); - oBody.className = "yui-ac-bd"; - this._oContainer._oContent._oBody = this._oContainer._oContent.appendChild(oBody); - - var oFooter = document.createElement("div"); - oFooter.className = "yui-ac-ft"; - oFooter.style.display = "none"; - this._oContainer._oContent._oFooter = this._oContainer._oContent.appendChild(oFooter); + if(!this._elContent) { + // The elContent div helps size the iframe and shadow properly + var elContent = document.createElement("div"); + elContent.className = "yui-ac-content"; + elContent.style.display = "none"; + this._elContent = this._elContainer.appendChild(elContent); + + var elHeader = document.createElement("div"); + elHeader.className = "yui-ac-hd"; + elHeader.style.display = "none"; + this._elHeader = this._elContent.appendChild(elHeader); + + var elBody = document.createElement("div"); + elBody.className = "yui-ac-bd"; + this._elBody = this._elContent.appendChild(elBody); + + var elFooter = document.createElement("div"); + elFooter.className = "yui-ac-ft"; + elFooter.style.display = "none"; + this._elFooter = this._elContent.appendChild(elFooter); } else { } @@ -1036,18 +1081,18 @@ YAHOO.widget.AutoComplete.prototype._initContainer = function() { */ YAHOO.widget.AutoComplete.prototype._initList = function() { this._aListItems = []; - while(this._oContainer._oContent._oBody.hasChildNodes()) { + while(this._elBody.hasChildNodes()) { var oldListItems = this.getListItems(); if(oldListItems) { for(var oldi = oldListItems.length-1; oldi >= 0; oldi--) { oldListItems[oldi] = null; } } - this._oContainer._oContent._oBody.innerHTML = ""; + this._elBody.innerHTML = ""; } var oList = document.createElement("ul"); - oList = this._oContainer._oContent._oBody.appendChild(oList); + oList = this._elBody.appendChild(oList); for(var i=0; i -1) { - this._oTextbox.value = sValue.substring(0,nIndex); + this._elTextbox.value = sValue.substring(0,nIndex); } else { - this._oTextbox.value = ""; + this._elTextbox.value = ""; } - this._sSavedQuery = this._oTextbox.value; + this._sSavedQuery = this._elTextbox.value; // Fire custom event this.selectionEnforceEvent.fire(this); @@ -1355,20 +1400,20 @@ YAHOO.widget.AutoComplete.prototype._typeAhead = function(oItem, sQuery) { return; } - var oTextbox = this._oTextbox; - var sValue = this._oTextbox.value; // any saved queries plus what user has typed + var elTextbox = this._elTextbox; + var sValue = this._elTextbox.value; // any saved queries plus what user has typed // Don't update with type-ahead if text selection is not supported - if(!oTextbox.setSelectionRange && !oTextbox.createTextRange) { + if(!elTextbox.setSelectionRange && !elTextbox.createTextRange) { return; } // Select the portion of text that the user has not typed var nStart = sValue.length; this._updateValue(oItem); - var nEnd = oTextbox.value.length; - this._selectText(oTextbox,nStart,nEnd); - var sPrefill = oTextbox.value.substr(nStart,nEnd); + var nEnd = elTextbox.value.length; + this._selectText(elTextbox,nStart,nEnd); + var sPrefill = elTextbox.value.substr(nStart,nEnd); this.typeAheadEvent.fire(this,sQuery,sPrefill); }; @@ -1376,23 +1421,23 @@ YAHOO.widget.AutoComplete.prototype._typeAhead = function(oItem, sQuery) { * Selects text in the input field. * * @method _selectText - * @param oTextbox {HTMLElement} Text input box element in which to select text. + * @param elTextbox {HTMLElement} Text input box element in which to select text. * @param nStart {Number} Starting index of text string to select. * @param nEnd {Number} Ending index of text selection. * @private */ -YAHOO.widget.AutoComplete.prototype._selectText = function(oTextbox, nStart, nEnd) { - if(oTextbox.setSelectionRange) { // For Mozilla - oTextbox.setSelectionRange(nStart,nEnd); +YAHOO.widget.AutoComplete.prototype._selectText = function(elTextbox, nStart, nEnd) { + if(elTextbox.setSelectionRange) { // For Mozilla + elTextbox.setSelectionRange(nStart,nEnd); } - else if(oTextbox.createTextRange) { // For IE - var oTextRange = oTextbox.createTextRange(); + else if(elTextbox.createTextRange) { // For IE + var oTextRange = elTextbox.createTextRange(); oTextRange.moveStart("character", nStart); - oTextRange.moveEnd("character", nEnd-oTextbox.value.length); + oTextRange.moveEnd("character", nEnd-elTextbox.value.length); oTextRange.select(); } else { - oTextbox.select(); + elTextbox.select(); } }; @@ -1405,29 +1450,29 @@ YAHOO.widget.AutoComplete.prototype._selectText = function(oTextbox, nStart, nEn */ YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) { var bFireEvent = false; - var width = this._oContainer._oContent.offsetWidth + "px"; - var height = this._oContainer._oContent.offsetHeight + "px"; + var width = this._elContent.offsetWidth + "px"; + var height = this._elContent.offsetHeight + "px"; - if(this.useIFrame && this._oContainer._oIFrame) { + if(this.useIFrame && this._elIFrame) { bFireEvent = true; if(bShow) { - this._oContainer._oIFrame.style.width = width; - this._oContainer._oIFrame.style.height = height; + this._elIFrame.style.width = width; + this._elIFrame.style.height = height; } else { - this._oContainer._oIFrame.style.width = 0; - this._oContainer._oIFrame.style.height = 0; + this._elIFrame.style.width = 0; + this._elIFrame.style.height = 0; } } - if(this.useShadow && this._oContainer._oShadow) { + if(this.useShadow && this._elShadow) { bFireEvent = true; if(bShow) { - this._oContainer._oShadow.style.width = width; - this._oContainer._oShadow.style.height = height; + this._elShadow.style.width = width; + this._elShadow.style.height = height; } else { - this._oContainer._oShadow.style.width = 0; - this._oContainer._oShadow.style.height = 0; + this._elShadow.style.width = 0; + this._elShadow.style.height = 0; } } }; @@ -1440,7 +1485,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) { * @private */ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { - var oContainer = this._oContainer; + var elContainer = this._elContainer; // Implementer has container always open so don't mess with it if(this.alwaysShowContainer && this._bContainerOpen) { @@ -1449,7 +1494,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // Clear contents of container if(!bShow) { - this._oContainer._oContent.scrollTop = 0; + this._elContent.scrollTop = 0; var aItems = this._aListItems; if(aItems && (aItems.length > 0)) { @@ -1469,7 +1514,7 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // Container is already closed if(!bShow && !this._bContainerOpen) { - oContainer._oContent.style.display = "none"; + this._elContent.style.display = "none"; return; } @@ -1487,8 +1532,8 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { } // Clone container to grab current size offscreen - var oClone = oContainer._oContent.cloneNode(true); - oContainer.appendChild(oClone); + var oClone = this._elContent.cloneNode(true); + elContainer.appendChild(oClone); oClone.style.top = "-9000px"; oClone.style.display = "block"; @@ -1507,16 +1552,16 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // If opening anew, set to a collapsed size... if(bShow && !this._bContainerOpen) { - oContainer._oContent.style.width = wColl+"px"; - oContainer._oContent.style.height = hColl+"px"; + this._elContent.style.width = wColl+"px"; + this._elContent.style.height = hColl+"px"; } // Else, set it to its last known size. else { - oContainer._oContent.style.width = wExp+"px"; - oContainer._oContent.style.height = hExp+"px"; + this._elContent.style.width = wExp+"px"; + this._elContent.style.height = hExp+"px"; } - oContainer.removeChild(oClone); + elContainer.removeChild(oClone); oClone = null; var oSelf = this; @@ -1528,14 +1573,14 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { oSelf.containerExpandEvent.fire(oSelf); } else { - oContainer._oContent.style.display = "none"; + oSelf._elContent.style.display = "none"; oSelf.containerCollapseEvent.fire(oSelf); } oSelf._toggleContainerHelpers(bShow); }; // Display container and animate it - oContainer._oContent.style.display = "block"; + this._elContent.style.display = "block"; oAnim.onComplete.subscribe(onAnimComplete); oAnim.animate(); this._bContainerOpen = bShow; @@ -1543,11 +1588,11 @@ YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { // Else don't animate, just show or hide else { if(bShow) { - oContainer._oContent.style.display = "block"; + this._elContent.style.display = "block"; this.containerExpandEvent.fire(this); } else { - oContainer._oContent.style.display = "none"; + this._elContent.style.display = "none"; this.containerCollapseEvent.fire(this); } this._toggleContainerHelpers(bShow); @@ -1612,34 +1657,34 @@ YAHOO.widget.AutoComplete.prototype._togglePrehighlight = function(oNewItem, sTy * @private */ YAHOO.widget.AutoComplete.prototype._updateValue = function(oItem) { - var oTextbox = this._oTextbox; + var elTextbox = this._elTextbox; var sDelimChar = (this.delimChar) ? (this.delimChar[0] || this.delimChar) : null; var sSavedQuery = this._sSavedQuery; var sResultKey = oItem._sResultKey; - oTextbox.focus(); + elTextbox.focus(); // First clear text field - oTextbox.value = ""; + elTextbox.value = ""; // Grab data to put into text field if(sDelimChar) { if(sSavedQuery) { - oTextbox.value = sSavedQuery; + elTextbox.value = sSavedQuery; } - oTextbox.value += sResultKey + sDelimChar; + elTextbox.value += sResultKey + sDelimChar; if(sDelimChar != " ") { - oTextbox.value += " "; + elTextbox.value += " "; } } - else { oTextbox.value = sResultKey; } + else { elTextbox.value = sResultKey; } // scroll to bottom of textarea if necessary - if(oTextbox.type == "textarea") { - oTextbox.scrollTop = oTextbox.scrollHeight; + if(elTextbox.type == "textarea") { + elTextbox.scrollTop = elTextbox.scrollHeight; } // move cursor to end - var end = oTextbox.value.length; - this._selectText(oTextbox,end,end); + var end = elTextbox.value.length; + this._selectText(elTextbox,end,end); this._oCurItem = oItem; }; @@ -1711,14 +1756,14 @@ YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) { // Go back to query (remove type-ahead string) if(this.delimChar && this._sSavedQuery) { if(!this._textMatchesOption()) { - this._oTextbox.value = this._sSavedQuery; + this._elTextbox.value = this._sSavedQuery; } else { - this._oTextbox.value = this._sSavedQuery + this._sCurQuery; + this._elTextbox.value = this._sSavedQuery + this._sCurQuery; } } else { - this._oTextbox.value = this._sCurQuery; + this._elTextbox.value = this._sCurQuery; } this._oCurItem = null; return; @@ -1732,36 +1777,36 @@ YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) { var oNewItem = this._aListItems[nNewItemIndex]; // Scroll the container if necessary - var oContent = this._oContainer._oContent; - var scrollOn = ((YAHOO.util.Dom.getStyle(oContent,"overflow") == "auto") || - (YAHOO.util.Dom.getStyle(oContent,"overflowY") == "auto")); + var elContent = this._elContent; + var scrollOn = ((YAHOO.util.Dom.getStyle(elContent,"overflow") == "auto") || + (YAHOO.util.Dom.getStyle(elContent,"overflowY") == "auto")); if(scrollOn && (nNewItemIndex > -1) && (nNewItemIndex < this._nDisplayedItems)) { // User is keying down if(nKeyCode == 40) { // Bottom of selected item is below scroll area... - if((oNewItem.offsetTop+oNewItem.offsetHeight) > (oContent.scrollTop + oContent.offsetHeight)) { + if((oNewItem.offsetTop+oNewItem.offsetHeight) > (elContent.scrollTop + elContent.offsetHeight)) { // Set bottom of scroll area to bottom of selected item - oContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - oContent.offsetHeight; + elContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - elContent.offsetHeight; } // Bottom of selected item is above scroll area... - else if((oNewItem.offsetTop+oNewItem.offsetHeight) < oContent.scrollTop) { + else if((oNewItem.offsetTop+oNewItem.offsetHeight) < elContent.scrollTop) { // Set top of selected item to top of scroll area - oContent.scrollTop = oNewItem.offsetTop; + elContent.scrollTop = oNewItem.offsetTop; } } // User is keying up else { // Top of selected item is above scroll area - if(oNewItem.offsetTop < oContent.scrollTop) { + if(oNewItem.offsetTop < elContent.scrollTop) { // Set top of scroll area to top of selected item - this._oContainer._oContent.scrollTop = oNewItem.offsetTop; + this._elContent.scrollTop = oNewItem.offsetTop; } // Top of selected item is below scroll area - else if(oNewItem.offsetTop > (oContent.scrollTop + oContent.offsetHeight)) { + else if(oNewItem.offsetTop > (elContent.scrollTop + elContent.offsetHeight)) { // Set bottom of selected item to bottom of scroll area - this._oContainer._oContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - oContent.offsetHeight; + this._elContent.scrollTop = (oNewItem.offsetTop+oNewItem.offsetHeight) - elContent.offsetHeight; } } } @@ -1869,7 +1914,7 @@ YAHOO.widget.AutoComplete.prototype._onContainerMouseout = function(v,oSelf) { * @private */ YAHOO.widget.AutoComplete.prototype._onContainerScroll = function(v,oSelf) { - oSelf._oTextbox.focus(); + oSelf._elTextbox.focus(); }; /** @@ -1912,16 +1957,18 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown = function(v,oSelf) { } break; case 13: // enter - if(oSelf._oCurItem) { - if(oSelf._nKeyCode != nKeyCode) { - if(oSelf._bContainerOpen) { - YAHOO.util.Event.stopEvent(v); + if(!YAHOO.env.ua.webkit) { + if(oSelf._oCurItem) { + if(oSelf._nKeyCode != nKeyCode) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } } + oSelf._selectItem(oSelf._oCurItem); + } + else { + oSelf._toggleContainer(false); } - oSelf._selectItem(oSelf._oCurItem); - } - else { - oSelf._toggleContainer(false); } break; case 27: // esc @@ -1954,22 +2001,27 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress = function(v,oSelf) { var nKeyCode = v.keyCode; //Expose only to Mac browsers, where stopEvent is ineffective on keydown events (bug 790337) - var isMac = (navigator.userAgent.toLowerCase().indexOf("mac") != -1); - if(isMac) { + if(YAHOO.env.ua.webkit) { switch (nKeyCode) { case 9: // tab - if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) { - YAHOO.util.Event.stopEvent(v); + if(oSelf._oCurItem) { + if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) { + YAHOO.util.Event.stopEvent(v); + } } break; case 13: // enter - if(oSelf._nKeyCode != nKeyCode) { - YAHOO.util.Event.stopEvent(v); + if(oSelf._oCurItem) { + if(oSelf._nKeyCode != nKeyCode) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } + } + oSelf._selectItem(oSelf._oCurItem); + } + else { + oSelf._toggleContainer(false); } - break; - case 38: // up - case 40: // down - YAHOO.util.Event.stopEvent(v); break; default: break; @@ -1996,6 +2048,7 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp = function(v,oSelf) { oSelf._initProps(); var nKeyCode = v.keyCode; + oSelf._nKeyCode = nKeyCode; var sText = this.value; //string in textbox @@ -2037,7 +2090,7 @@ YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp = function(v,oSelf) { * @private */ YAHOO.widget.AutoComplete.prototype._onTextboxFocus = function (v,oSelf) { - oSelf._oTextbox.setAttribute("autocomplete","off"); + oSelf._elTextbox.setAttribute("autocomplete","off"); oSelf._bFocused = true; if(!oSelf._bItemSelected) { oSelf.textboxFocusEvent.fire(oSelf); @@ -2055,19 +2108,26 @@ YAHOO.widget.AutoComplete.prototype._onTextboxFocus = function (v,oSelf) { YAHOO.widget.AutoComplete.prototype._onTextboxBlur = function (v,oSelf) { // Don't treat as a blur if it was a selection via mouse click if(!oSelf._bOverContainer || (oSelf._nKeyCode == 9)) { - // Current query needs to be validated + // Current query needs to be validated as a selection if(!oSelf._bItemSelected) { var oMatch = oSelf._textMatchesOption(); + // Container is closed or current query doesn't match any result if(!oSelf._bContainerOpen || (oSelf._bContainerOpen && (oMatch === null))) { + // Force selection is enabled so clear the current query if(oSelf.forceSelection) { oSelf._clearSelection(); } + // Treat current query as a valid selection else { - oSelf.unmatchedItemSelectEvent.fire(oSelf, oSelf._sCurQuery); + oSelf.unmatchedItemSelectEvent.fire(oSelf); } } + // Container is open and current query matches a result else { - oSelf._selectItem(oMatch); + // Force a selection when textbox is blurred with a match + if(oSelf.forceSelection) { + oSelf._selectItem(oMatch); + } } } @@ -2081,19 +2141,16 @@ YAHOO.widget.AutoComplete.prototype._onTextboxBlur = function (v,oSelf) { }; /** - * Handles form submission event. + * Handles window unload event. * - * @method _onFormSubmit - * @param v {HTMLEvent} The submit event. + * @method _onWindowUnload + * @param v {HTMLEvent} The unload event. * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. * @private */ -YAHOO.widget.AutoComplete.prototype._onFormSubmit = function(v,oSelf) { - if(oSelf.allowBrowserAutocomplete) { - oSelf._oTextbox.setAttribute("autocomplete","on"); - } - else { - oSelf._oTextbox.setAttribute("autocomplete","off"); +YAHOO.widget.AutoComplete.prototype._onWindowUnload = function(v,oSelf) { + if(oSelf && oSelf._elTextbox && oSelf.allowBrowserAutocomplete) { + oSelf._elTextbox.setAttribute("autocomplete","on"); } }; @@ -2445,13 +2502,14 @@ YAHOO.widget.DataSource.prototype._doQueryCache = function(oCallbackFn, sQuery, var aCache = this._aCache; var nCacheLength = (aCache) ? aCache.length : 0; var bMatchContains = this.queryMatchContains; + var sOrigQuery; // If cache is enabled... if((this.maxCacheEntries > 0) && aCache && (nCacheLength > 0)) { this.cacheQueryEvent.fire(this, oParent, sQuery); // If case is unimportant, normalize query now instead of in loops if(!this.queryMatchCase) { - var sOrigQuery = sQuery; + sOrigQuery = sQuery; sQuery = sQuery.toLowerCase(); } @@ -2622,8 +2680,7 @@ YAHOO.widget.DS_XHR.ERROR_DATAXHR = "XHR response failed"; ///////////////////////////////////////////////////////////////////////////// /** - * Alias to YUI Connection Manager. Allows implementers to specify their own - * subclasses of the YUI Connection Manager utility. + * Alias to YUI Connection Manager, to allow implementers to customize the utility. * * @property connMgr * @type Object @@ -2805,9 +2862,27 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen switch (this.responseType) { case YAHOO.widget.DS_XHR.TYPE_JSON: var jsonList, jsonObjParsed; - // Check for JSON lib but divert KHTML clients - var isNotMac = (navigator.userAgent.toLowerCase().indexOf('khtml')== -1); - if(oResponse.parseJSON && isNotMac) { + // Check for YUI JSON + if(YAHOO.lang.JSON) { + // Use the JSON utility if available + jsonObjParsed = YAHOO.lang.JSON.parse(oResponse); + if(!jsonObjParsed) { + bError = true; + break; + } + else { + try { + // eval is necessary here since aSchema[0] is of unknown depth + jsonList = eval("jsonObjParsed." + aSchema[0]); + } + catch(e) { + bError = true; + break; + } + } + } + // Check for JSON lib + else if(oResponse.parseJSON) { // Use the new JSON utility if available jsonObjParsed = oResponse.parseJSON(); if(!jsonObjParsed) { @@ -2824,8 +2899,8 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen } } } - else if(window.JSON && isNotMac) { - // Use older JSON lib if available + // Use older JSON lib if available + else if(window.JSON) { jsonObjParsed = JSON.parse(oResponse); if(!jsonObjParsed) { bError = true; @@ -2887,7 +2962,7 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen if(!YAHOO.lang.isArray(jsonList)) { jsonList = [jsonList]; } - + // Loop through the array of all responses... for(var i = jsonList.length-1; i >= 0 ; i--) { var aResultItem = []; @@ -2988,6 +3063,285 @@ YAHOO.widget.DS_XHR.prototype.parseResponse = function(sQuery, oResponse, oParen YAHOO.widget.DS_XHR.prototype._oConn = null; +/****************************************************************************/ +/****************************************************************************/ +/****************************************************************************/ + +/** + * Implementation of YAHOO.widget.DataSource using the Get Utility to generate + * dynamic SCRIPT nodes for data retrieval. + * + * @class DS_ScriptNode + * @constructor + * @extends YAHOO.widget.DataSource + * @param sUri {String} URI to the script location that will return data. + * @param aSchema {String[]} Data schema definition of results. + * @param oConfigs {Object} (optional) Object literal of config params. + */ +YAHOO.widget.DS_ScriptNode = function(sUri, aSchema, oConfigs) { + // Set any config params passed in to override defaults + if(oConfigs && (oConfigs.constructor == Object)) { + for(var sConfig in oConfigs) { + this[sConfig] = oConfigs[sConfig]; + } + } + + // Initialization sequence + if(!YAHOO.lang.isArray(aSchema) || !YAHOO.lang.isString(sUri)) { + return; + } + + this.schema = aSchema; + this.scriptURI = sUri; + + this._init(); +}; + +YAHOO.widget.DS_ScriptNode.prototype = new YAHOO.widget.DataSource(); + +///////////////////////////////////////////////////////////////////////////// +// +// Public member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Alias to YUI Get Utility. Allows implementers to specify their own + * subclasses of the YUI Get Utility. + * + * @property getUtility + * @type Object + * @default YAHOO.util.Get + */ +YAHOO.widget.DS_ScriptNode.prototype.getUtility = YAHOO.util.Get; + +/** + * URI to the script that returns data. + * + * @property scriptURI + * @type String + */ +YAHOO.widget.DS_ScriptNode.prototype.scriptURI = null; + +/** + * Query string parameter name sent to scriptURI. For instance, requests will be + * sent to <scriptURI>?<scriptQueryParam>=queryString + * + * @property scriptQueryParam + * @type String + * @default "query" + */ +YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam = "query"; + +/** + * Defines request/response management in the following manner: + *
+ * + *
ignoreStaleResponses
+ *
Send all requests, but handle only the response for the most recently sent request.
+ *
allowAll
+ *
Send all requests and handle all responses.
+ *
+ * + * @property asyncMode + * @type String + * @default "allowAll" + */ +YAHOO.widget.DS_ScriptNode.prototype.asyncMode = "allowAll"; + +/** + * Callback string parameter name sent to scriptURI. For instance, requests will be + * sent to <scriptURI>?<scriptCallbackParam>=callbackFunction + * + * @property scriptCallbackParam + * @type String + * @default "callback" + */ +YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam = "callback"; + +/** + * Global array of callback functions, one for each request sent. + * + * @property callbacks + * @type Function[] + * @static + */ +YAHOO.widget.DS_ScriptNode.callbacks = []; + +///////////////////////////////////////////////////////////////////////////// +// +// Private member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Unique ID to track requests. + * + * @property _nId + * @type Number + * @private + * @static + */ +YAHOO.widget.DS_ScriptNode._nId = 0; + +/** + * Counter for pending requests. When this is 0, it is safe to purge callbacks + * array. + * + * @property _nPending + * @type Number + * @private + * @static + */ +YAHOO.widget.DS_ScriptNode._nPending = 0; + +///////////////////////////////////////////////////////////////////////////// +// +// Public methods +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Queries the live data source. Results are passed back to a callback function. + * + * @method doQuery + * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results. + * @param sQuery {String} Query string. + * @param oParent {Object} The object instance that has requested data. + */ +YAHOO.widget.DS_ScriptNode.prototype.doQuery = function(oCallbackFn, sQuery, oParent) { + var oSelf = this; + + // If there are no global pending requests, it is safe to purge global callback stack and global counter + if(YAHOO.widget.DS_ScriptNode._nPending === 0) { + YAHOO.widget.DS_ScriptNode.callbacks = []; + YAHOO.widget.DS_ScriptNode._nId = 0; + } + + // ID for this request + var id = YAHOO.widget.DS_ScriptNode._nId; + YAHOO.widget.DS_ScriptNode._nId++; + + // Dynamically add handler function with a closure to the callback stack + YAHOO.widget.DS_ScriptNode.callbacks[id] = function(oResponse) { + if((oSelf.asyncMode !== "ignoreStaleResponses")|| + (id === YAHOO.widget.DS_ScriptNode.callbacks.length-1)) { // Must ignore stale responses + oSelf.handleResponse(oResponse, oCallbackFn, sQuery, oParent); + } + else { + } + + delete YAHOO.widget.DS_ScriptNode.callbacks[id]; + }; + + // We are now creating a request + YAHOO.widget.DS_ScriptNode._nPending++; + + var sUri = this.scriptURI+"&"+ this.scriptQueryParam+"="+sQuery+"&"+ + this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+id+"]"; + this.getUtility.script(sUri, + {autopurge:true, + onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown, + onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown}); +}; + +/** + * Parses JSON response data into an array of result objects and passes it to + * the callback function. + * + * @method handleResponse + * @param oResponse {Object} The raw response data to parse. + * @param oCallbackFn {HTMLFunction} Callback function defined by oParent object to which to return results. + * @param sQuery {String} Query string. + * @param oParent {Object} The object instance that has requested data. + */ +YAHOO.widget.DS_ScriptNode.prototype.handleResponse = function(oResponse, oCallbackFn, sQuery, oParent) { + var aSchema = this.schema; + var aResults = []; + var bError = false; + + var jsonList, jsonObjParsed; + + // Parse the JSON response as a string + try { + // Grab the object member that contains an array of all reponses... + // ...eval is necessary here since aSchema[0] is of unknown depth + jsonList = eval("(oResponse." + aSchema[0]+")"); + } + catch(e) { + bError = true; + } + + if(!jsonList) { + bError = true; + jsonList = []; + } + + else if(!YAHOO.lang.isArray(jsonList)) { + jsonList = [jsonList]; + } + + // Loop through the array of all responses... + for(var i = jsonList.length-1; i >= 0 ; i--) { + var aResultItem = []; + var jsonResult = jsonList[i]; + // ...and loop through each data field value of each response + for(var j = aSchema.length-1; j >= 1 ; j--) { + // ...and capture data into an array mapped according to the schema... + var dataFieldValue = jsonResult[aSchema[j]]; + if(!dataFieldValue) { + dataFieldValue = ""; + } + aResultItem.unshift(dataFieldValue); + } + // If schema isn't well defined, pass along the entire result object + if(aResultItem.length == 1) { + aResultItem.push(jsonResult); + } + // Capture the array of data field values in an array of results + aResults.unshift(aResultItem); + } + + if(bError) { + aResults = null; + } + + if(aResults === null) { + this.dataErrorEvent.fire(this, oParent, sQuery, YAHOO.widget.DataSource.ERROR_DATAPARSE); + aResults = []; + } + else { + var resultObj = {}; + resultObj.query = decodeURIComponent(sQuery); + resultObj.results = aResults; + this._addCacheElem(resultObj); + + this.getResultsEvent.fire(this, oParent, sQuery, aResults); + } + + oCallbackFn(sQuery, aResults, oParent); +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Private methods +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Any success/failure response should decrement counter. + * + * @method _bumpPendingDown + * @private + */ +YAHOO.widget.DS_ScriptNode._bumpPendingDown = function() { + YAHOO.widget.DS_ScriptNode._nPending--; +}; + + /****************************************************************************/ /****************************************************************************/ /****************************************************************************/ @@ -3071,6 +3425,7 @@ YAHOO.widget.DS_JSFunction.prototype.doQuery = function(oCallbackFn, sQuery, oPa return; }; + /****************************************************************************/ /****************************************************************************/ /****************************************************************************/ @@ -3187,4 +3542,4 @@ YAHOO.widget.DS_JSArray.prototype.doQuery = function(oCallbackFn, sQuery, oParen oCallbackFn(sQuery, aResults, oParent); }; -YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.3.0", build: "442"}); +YAHOO.register("autocomplete", YAHOO.widget.AutoComplete, {version: "2.5.0", build: "895"}); diff --git a/lib/yui/base/README b/lib/yui/base/README index 287f22ea11..a5f3562d1f 100755 --- a/lib/yui/base/README +++ b/lib/yui/base/README @@ -1,5 +1,17 @@ YUI Library - Base - Release Notes +Version 2.5.0 + + * No changes. + +Version 2.4.0 + + * Fixed typo in comments. + * Added margin-bottom:1em; for PRE element to match P + * Added color:#000 for legend element, accomodation for IE + * Added set width (equivilant to 160px but set in EMs) for input's + width type = text or password, and for textareas. + Version 2.3.0 * Initial release. \ No newline at end of file diff --git a/lib/yui/base/base-min.css b/lib/yui/base/base-min.css index a4dcc816f6..fcb5b2c853 100755 --- a/lib/yui/base/base-min.css +++ b/lib/yui/base/base-min.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;}em{font-style:italic;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style: decimal outside;}ul li{list-style: disc outside;}dl dd{margin-left:1em;}th,td {border:1px solid #000;padding:.5em;}th {font-weight:bold;text-align:center;}caption {margin-bottom:.5em;text-align:center;}p,fieldset,table {margin-bottom:1em;} \ No newline at end of file +h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;} em{font-style:italic;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style:decimal outside;}ul li{list-style:disc outside;}dl dd{margin-left:1em;}th,td{border:1px solid #000;padding:.5em;}th{font-weight:bold;text-align:center;}caption{margin-bottom:.5em;text-align:center;}p,fieldset,table,pre{margin-bottom:1em;}input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;} diff --git a/lib/yui/base/base.css b/lib/yui/base/base.css index 85dcca7dd2..bb504f8873 100755 --- a/lib/yui/base/base.css +++ b/lib/yui/base/base.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ /* base.css, part of YUI's CSS Foundation */ h1 { @@ -65,12 +65,15 @@ th { text-align:center; } caption { - /*coordinated marking to match cell's padding*/ + /*coordinated margin to match cell's padding*/ margin-bottom:.5em; /*centered so it doesn't blend in to other content*/ text-align:center; } -p,fieldset,table { +p,fieldset,table,pre { /*so things don't run into each other*/ margin-bottom:1em; -} \ No newline at end of file +} +/* setting a consistent width, 160px; + control of type=file still not possible */ +input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;} diff --git a/lib/yui/button/README b/lib/yui/button/README index a0bcb58831..b0dca1d4a4 100755 --- a/lib/yui/button/README +++ b/lib/yui/button/README @@ -1,4 +1,75 @@ -*** Version 2.3.0 *** +*** Version 2.5.0 *** + ++ Fixed issue where returning false inside the scope of a listener for attribute "before" + events (i.e "beforeCheckedChange") would not cancel the attribute's default setter. + + + +*** Version 2.4.1 *** + ++ No changes. + + + +*** Version 2.4.0 *** + +Added the following features: +----------------------------- + ++ Added a static method "YAHOO.widget.Button.getButton" that returns a Button + instance with the specified HTML element id. + + +Fixed the following bugs: +------------------------- + ++ Removed the ".yui-skin-sam" CSS class name from style rules in the core + stylesheet so that it is now truly skin agnostic. + ++ Updated the default text for tooltips for Buttons of type "radio" so that + they offer the correct instructional text. + ++ Menus with grouped YAHOO.widget.MenuItem instances will now highlight + correctly when used with Button. + ++ Buttons of type "link" now have the same default height as other Button + types in Internet Explorer. + ++ Buttons of various types now line up correctly on the same line. + ++ Menu is now truly an optional dependancy of Button. + ++ Menus now render with the correct width when the "yui-skin-sam" CSS class + name is applied to an element other than the . + + + +*** Version 2.3.1 *** + +Fixed the following bugs: +------------------------- ++ Purged the old 2.2.2 Button stylesheet and related image assets that was + mistakenly included in the 2.3.0 build. + ++ Fixed an issue in Gecko where changing a Button instance's "label" attribute + after the Button had been created would not result in the Button redrawing at + a width to fit its content. + ++ Fixed an issue where the singleton keypress event handler + (YAHOO.widget.Button.onFormKeyPress) registered for forms containing + Button instances of type "submit" was not removed from the form once all of + its child Button instances are destroyed. + ++ Submitting a form by clicking on a MenuItem of a SplitButton's or MenuButton's + Menu will no longer result in a JavaScript error. + ++ Modified how element tag names are compared to support XHTML applications. + ++ Added code to remove the CSS class names representing the "hover," "focus," + and "active" states when a Button instance is disabled. + + +*** Version 2.3 *** Added the following features: ----------------------------- diff --git a/lib/yui/button/assets/button-core.css b/lib/yui/button/assets/button-core.css index 5aa3015efe..e3ff7ea186 100755 --- a/lib/yui/button/assets/button-core.css +++ b/lib/yui/button/assets/button-core.css @@ -1,6 +1,44 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ +.yui-button { + + display: -moz-inline-box; /* Gecko */ + display: inline-block; /* IE, Opera and Safari */ + vertical-align: text-bottom; + +} + +.yui-button .first-child { + + display: block; + *display: inline-block; /* IE */ + +} + +.yui-button button, +.yui-button a { + + display: block; + *display: inline-block; /* IE */ + border: none; + margin: 0; + +} + +.yui-button button { + + background-color: transparent; + *overflow: visible; /* Remove superfluous padding for IE */ + cursor: pointer; + +} + +.yui-button a { + + text-decoration: none; + +} \ No newline at end of file diff --git a/lib/yui/button/assets/skins/sam/button-skin.css b/lib/yui/button/assets/skins/sam/button-skin.css index e8f8011a81..ad97242ac3 100755 --- a/lib/yui/button/assets/skins/sam/button-skin.css +++ b/lib/yui/button/assets/skins/sam/button-skin.css @@ -1,13 +1,11 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ .yui-skin-sam .yui-button { - display: -moz-inline-box; /* Gecko */ - display: inline-block; /* IE, Opera and Safari */ border-width: 1px 0; border-style: solid; border-color: #808080; @@ -18,13 +16,11 @@ version: 2.3.0 .yui-skin-sam .yui-button .first-child { - display: block; - *display: inline-block; /* IE */ border-width: 0 1px; border-style: solid; border-color: #808080; margin: 0 -1px; - *position: relative; + *position: relative; /* Necessary to get negative margins working in IE */ *left: -1px; } @@ -32,10 +28,7 @@ version: 2.3.0 .yui-skin-sam .yui-button button, .yui-skin-sam .yui-button a { - display: block; - *display: inline-block; /* IE */ padding: 0 10px; - border: none; font-size: 93%; /* 12px */ line-height: 2; /* ~24px */ *line-height: 1.7; /* For IE */ @@ -45,22 +38,16 @@ version: 2.3.0 } -.yui-skin-sam .yui-button button { - - *overflow: visible; /* Remove superfluous padding for IE */ - background-color: transparent; - cursor: pointer; - cursor: hand; - -} - .yui-skin-sam .yui-button a { - text-decoration: none; + /* + Necessary to get Button's of type "link" to be the correct + height in IE. + */ + *line-height: 2; } - .yui-skin-sam .yui-split-button button, .yui-skin-sam .yui-menu-button button { diff --git a/lib/yui/button/assets/skins/sam/button.css b/lib/yui/button/assets/skins/sam/button.css index 0de5e6e01e..cef04bbe92 100755 --- a/lib/yui/button/assets/skins/sam/button.css +++ b/lib/yui/button/assets/skins/sam/button.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-skin-sam .yui-button{display:-moz-inline-box;display:inline-block;border-width:1px 0;border-style:solid;border-color:#808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{display:block;*display:inline-block;border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{display:block;*display:inline-block;padding:0 10px;border:none;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button button{*overflow:visible;background-color:transparent;cursor:pointer;cursor:hand;}.yui-skin-sam .yui-button a{text-decoration:none;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} +.yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;*position:relative;*left:-1px;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:2;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-focus button,.yui-skin-sam .yui-button-focus a{color:#000;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-hover button,.yui-skin-sam .yui-button-hover a{color:#000;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-button-active button,.yui-skin-sam .yui-button-active a{color:#000;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} diff --git a/lib/yui/button/button-debug.js b/lib/yui/button/button-debug.js new file mode 100644 index 0000000000..2474c910f6 --- /dev/null +++ b/lib/yui/button/button-debug.js @@ -0,0 +1,4738 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +/** +* @module button +* @description

The Button Control enables the creation of rich, graphical +* buttons that function like traditional HTML form buttons. Unlike +* tradition HTML form buttons, buttons created with the Button Control can have +* a label that is different from its value. With the inclusion of the optional +* Menu Control, the Button Control can also be +* used to create menu buttons and split buttons, controls that are not +* available natively in HTML. The Button Control can also be thought of as a +* way to create more visually engaging implementations of the browser's +* default radio-button and check-box controls.

+*

The Button Control supports the following types:

+*
+*
push
+*
Basic push button that can execute a user-specified command when +* pressed.
+*
link
+*
Navigates to a specified url when pressed.
+*
submit
+*
Submits the parent form when pressed.
+*
reset
+*
Resets the parent form when pressed.
+*
checkbox
+*
Maintains a "checked" state that can be toggled on and off.
+*
radio
+*
Maintains a "checked" state that can be toggled on and off. Use with +* the ButtonGroup class to create a set of controls that are mutually +* exclusive; checking one button in the set will uncheck all others in +* the group.
+*
menu
+*
When pressed will show/hide a menu.
+*
split
+*
Can execute a user-specified command or display a menu when pressed.
+*
+* @title Button +* @namespace YAHOO.widget +* @requires yahoo, dom, element, event +* @optional container, menu +*/ + + +(function () { + + + /** + * The Button class creates a rich, graphical button. + * @param {String} p_oElement String specifying the id attribute of the + * <input>, <button>, + * <a>, or <span> element to + * be used to create the button. + * @param {HTMLInputElement| + * HTMLButtonElement|HTMLElement} p_oElement Object reference for the + * <input>, <button>, + * <a>, or <span> element to be + * used to create the button. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button. + * @param {Object} p_oAttributes Optional. Object literal specifying a set + * of configuration attributes used to create the button. + * @namespace YAHOO.widget + * @class Button + * @constructor + * @extends YAHOO.util.Element + */ + + + + // Shorthard for utilities + + var Dom = YAHOO.util.Dom, + Event = YAHOO.util.Event, + Lang = YAHOO.lang, + Overlay = YAHOO.widget.Overlay, + Menu = YAHOO.widget.Menu, + + + // Private member variables + + m_oButtons = {}, // Collection of all Button instances + m_oOverlayManager = null, // YAHOO.widget.OverlayManager instance + m_oSubmitTrigger = null, // The button that submitted the form + m_oFocusedButton = null; // The button that has focus + + + + // Private methods + + + + /** + * @method createInputElement + * @description Creates an <input> element of the + * specified type. + * @private + * @param {String} p_sType String specifying the type of + * <input> element to create. + * @param {String} p_sName String specifying the name of + * <input> element to create. + * @param {String} p_sValue String specifying the value of + * <input> element to create. + * @param {String} p_bChecked Boolean specifying if the + * <input> element is to be checked. + * @return {HTMLInputElement} + */ + function createInputElement(p_sType, p_sName, p_sValue, p_bChecked) { + + var oInput, + sInput; + + if (Lang.isString(p_sType) && Lang.isString(p_sName)) { + + if (YAHOO.env.ua.ie) { + + /* + For IE it is necessary to create the element with the + "type," "name," "value," and "checked" properties set all + at once. + */ + + sInput = "<input> or <a>) that + * map to Button configuration attributes and sets them into a collection + * that is passed to the Button constructor. + * @private + * @param {HTMLInputElement|HTMLAnchorElement} p_oElement Object reference to the HTML + * element (either <input> or <span> + * ) used to create the button. + * @param {Object} p_oAttributes Object reference for the collection of + * configuration attributes used to create the button. + */ + function setAttributesFromSrcElement(p_oElement, p_oAttributes) { + + var sSrcElementNodeName = p_oElement.nodeName.toUpperCase(), + me = this, + oAttribute, + oRootNode, + sText; + + + /** + * @method setAttributeFromDOMAttribute + * @description Gets the value of the specified DOM attribute and sets it + * into the collection of configuration attributes used to configure + * the button. + * @private + * @param {String} p_sAttribute String representing the name of the + * attribute to retrieve from the DOM element. + */ + function setAttributeFromDOMAttribute(p_sAttribute) { + + if (!(p_sAttribute in p_oAttributes)) { + + /* + Need to use "getAttributeNode" instead of "getAttribute" + because using "getAttribute," IE will return the innerText + of a <button> for the value attribute + rather than the value of the "value" attribute. + */ + + oAttribute = p_oElement.getAttributeNode(p_sAttribute); + + + if (oAttribute && ("value" in oAttribute)) { + + me.logger.log("Setting attribute \"" + p_sAttribute + + "\" using source element's attribute value of \"" + + oAttribute.value + "\""); + + p_oAttributes[p_sAttribute] = oAttribute.value; + + } + + } + + } + + + /** + * @method setFormElementProperties + * @description Gets the value of the attributes from the form element + * and sets them into the collection of configuration attributes used to + * configure the button. + * @private + */ + function setFormElementProperties() { + + setAttributeFromDOMAttribute("type"); + + if (p_oAttributes.type == "button") { + + p_oAttributes.type = "push"; + + } + + if (!("disabled" in p_oAttributes)) { + + p_oAttributes.disabled = p_oElement.disabled; + + } + + setAttributeFromDOMAttribute("name"); + setAttributeFromDOMAttribute("value"); + setAttributeFromDOMAttribute("title"); + + } + + + switch (sSrcElementNodeName) { + + case "A": + + p_oAttributes.type = "link"; + + setAttributeFromDOMAttribute("href"); + setAttributeFromDOMAttribute("target"); + + break; + + case "INPUT": + + setFormElementProperties(); + + if (!("checked" in p_oAttributes)) { + + p_oAttributes.checked = p_oElement.checked; + + } + + break; + + case "BUTTON": + + setFormElementProperties(); + + oRootNode = p_oElement.parentNode.parentNode; + + if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-checked")) { + + p_oAttributes.checked = true; + + } + + if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-disabled")) { + + p_oAttributes.disabled = true; + + } + + p_oElement.removeAttribute("value"); + + p_oElement.setAttribute("type", "button"); + + break; + + } + + p_oElement.removeAttribute("id"); + p_oElement.removeAttribute("name"); + + if (!("tabindex" in p_oAttributes)) { + + p_oAttributes.tabindex = p_oElement.tabIndex; + + } + + if (!("label" in p_oAttributes)) { + + // Set the "label" property + + sText = sSrcElementNodeName == "INPUT" ? + p_oElement.value : p_oElement.innerHTML; + + + if (sText && sText.length > 0) { + + p_oAttributes.label = sText; + + } + + } + + } + + + /** + * @method initConfig + * @description Initializes the set of configuration attributes that are + * used to instantiate the button. + * @private + * @param {Object} Object representing the button's set of + * configuration attributes. + */ + function initConfig(p_oConfig) { + + var oAttributes = p_oConfig.attributes, + oSrcElement = oAttributes.srcelement, + sSrcElementNodeName = oSrcElement.nodeName.toUpperCase(), + me = this; + + + if (sSrcElementNodeName == this.NODE_NAME) { + + p_oConfig.element = oSrcElement; + p_oConfig.id = oSrcElement.id; + + Dom.getElementsBy(function (p_oElement) { + + switch (p_oElement.nodeName.toUpperCase()) { + + case "BUTTON": + case "A": + case "INPUT": + + setAttributesFromSrcElement.call(me, p_oElement, + oAttributes); + + break; + + } + + }, "*", oSrcElement); + + } + else { + + switch (sSrcElementNodeName) { + + case "BUTTON": + case "A": + case "INPUT": + + setAttributesFromSrcElement.call(this, oSrcElement, + oAttributes); + + break; + + } + + } + + } + + + + // Constructor + + YAHOO.widget.Button = function (p_oElement, p_oAttributes) { + + if (!Overlay && YAHOO.widget.Overlay) { + + Overlay = YAHOO.widget.Overlay; + + } + + + if (!Menu && YAHOO.widget.Menu) { + + Menu = YAHOO.widget.Menu; + + } + + + var fnSuperClass = YAHOO.widget.Button.superclass.constructor, + oConfig, + oElement; + + if (arguments.length == 1 && !Lang.isString(p_oElement) && + !p_oElement.nodeName) { + + if (!p_oElement.id) { + + p_oElement.id = Dom.generateId(); + + YAHOO.log("No value specified for the button's \"id\" " + + "attribute. Setting button id to \"" + p_oElement.id + + "\".", "warn"); + + } + + this.logger = new YAHOO.widget.LogWriter("Button " + p_oElement.id); + + this.logger.log("No source HTML element. Building the button " + + "using the set of configuration attributes."); + + fnSuperClass.call(this, + (this.createButtonElement(p_oElement.type)), + p_oElement); + + } + else { + + oConfig = { element: null, attributes: (p_oAttributes || {}) }; + + + if (Lang.isString(p_oElement)) { + + oElement = Dom.get(p_oElement); + + if (oElement) { + + if (!oConfig.attributes.id) { + + oConfig.attributes.id = p_oElement; + + } + + this.logger = new YAHOO.widget.LogWriter( + "Button " + oConfig.attributes.id); + + this.logger.log("Building the button using an existing " + + "HTML element as a source element."); + + + oConfig.attributes.srcelement = oElement; + + initConfig.call(this, oConfig); + + + if (!oConfig.element) { + + this.logger.log("Source element could not be used " + + "as is. Creating a new HTML element for " + + "the button."); + + oConfig.element = + this.createButtonElement(oConfig.attributes.type); + + } + + fnSuperClass.call(this, oConfig.element, + oConfig.attributes); + + } + + } + else if (p_oElement.nodeName) { + + if (!oConfig.attributes.id) { + + if (p_oElement.id) { + + oConfig.attributes.id = p_oElement.id; + + } + else { + + oConfig.attributes.id = Dom.generateId(); + + YAHOO.log("No value specified for the button's " + + "\"id\" attribute. Setting button id to \"" + + oConfig.attributes.id + "\".", "warn"); + + } + + } + + + this.logger = new YAHOO.widget.LogWriter( + "Button " + oConfig.attributes.id); + + this.logger.log("Building the button using an existing HTML " + + "element as a source element."); + + + oConfig.attributes.srcelement = p_oElement; + + initConfig.call(this, oConfig); + + + if (!oConfig.element) { + + this.logger.log("Source element could not be used as is." + + " Creating a new HTML element for the button."); + + oConfig.element = + this.createButtonElement(oConfig.attributes.type); + + } + + fnSuperClass.call(this, oConfig.element, oConfig.attributes); + + } + + } + + }; + + + + YAHOO.extend(YAHOO.widget.Button, YAHOO.util.Element, { + + + // Protected properties + + + /** + * @property _button + * @description Object reference to the button's internal + * <a> or <button> element. + * @default null + * @protected + * @type HTMLAnchorElement|HTMLButtonElement + */ + _button: null, + + + /** + * @property _menu + * @description Object reference to the button's menu. + * @default null + * @protected + * @type {YAHOO.widget.Overlay| + * YAHOO.widget.Menu} + */ + _menu: null, + + + /** + * @property _hiddenFields + * @description Object reference to the <input> + * element, or array of HTML form elements used to represent the button + * when its parent form is submitted. + * @default null + * @protected + * @type HTMLInputElement|Array + */ + _hiddenFields: null, + + + /** + * @property _onclickAttributeValue + * @description Object reference to the button's current value for the + * "onclick" configuration attribute. + * @default null + * @protected + * @type Object + */ + _onclickAttributeValue: null, + + + /** + * @property _activationKeyPressed + * @description Boolean indicating if the key(s) that toggle the button's + * "active" state have been pressed. + * @default false + * @protected + * @type Boolean + */ + _activationKeyPressed: false, + + + /** + * @property _activationButtonPressed + * @description Boolean indicating if the mouse button that toggles + * the button's "active" state has been pressed. + * @default false + * @protected + * @type Boolean + */ + _activationButtonPressed: false, + + + /** + * @property _hasKeyEventHandlers + * @description Boolean indicating if the button's "blur", "keydown" and + * "keyup" event handlers are assigned + * @default false + * @protected + * @type Boolean + */ + _hasKeyEventHandlers: false, + + + /** + * @property _hasMouseEventHandlers + * @description Boolean indicating if the button's "mouseout," + * "mousedown," and "mouseup" event handlers are assigned + * @default false + * @protected + * @type Boolean + */ + _hasMouseEventHandlers: false, + + + + // Constants + + + /** + * @property NODE_NAME + * @description The name of the node to be used for the button's + * root element. + * @default "SPAN" + * @final + * @type String + */ + NODE_NAME: "SPAN", + + + /** + * @property CHECK_ACTIVATION_KEYS + * @description Array of numbers representing keys that (when pressed) + * toggle the button's "checked" attribute. + * @default [32] + * @final + * @type Array + */ + CHECK_ACTIVATION_KEYS: [32], + + + /** + * @property ACTIVATION_KEYS + * @description Array of numbers representing keys that (when presed) + * toggle the button's "active" state. + * @default [13, 32] + * @final + * @type Array + */ + ACTIVATION_KEYS: [13, 32], + + + /** + * @property OPTION_AREA_WIDTH + * @description Width (in pixels) of the area of a split button that + * when pressed will display a menu. + * @default 20 + * @final + * @type Number + */ + OPTION_AREA_WIDTH: 20, + + + /** + * @property CSS_CLASS_NAME + * @description String representing the CSS class(es) to be applied to + * the button's root element. + * @default "yui-button" + * @final + * @type String + */ + CSS_CLASS_NAME: "yui-button", + + + /** + * @property RADIO_DEFAULT_TITLE + * @description String representing the default title applied to buttons + * of type "radio." + * @default "Unchecked. Click to check." + * @final + * @type String + */ + RADIO_DEFAULT_TITLE: "Unchecked. Click to check.", + + + /** + * @property RADIO_CHECKED_TITLE + * @description String representing the title applied to buttons of + * type "radio" when checked. + * @default "Checked. Click another button to uncheck" + * @final + * @type String + */ + RADIO_CHECKED_TITLE: "Checked. Click another button to uncheck", + + + /** + * @property CHECKBOX_DEFAULT_TITLE + * @description String representing the default title applied to + * buttons of type "checkbox." + * @default "Unchecked. Click to check." + * @final + * @type String + */ + CHECKBOX_DEFAULT_TITLE: "Unchecked. Click to check.", + + + /** + * @property CHECKBOX_CHECKED_TITLE + * @description String representing the title applied to buttons of type + * "checkbox" when checked. + * @default "Checked. Click to uncheck." + * @final + * @type String + */ + CHECKBOX_CHECKED_TITLE: "Checked. Click to uncheck.", + + + /** + * @property MENUBUTTON_DEFAULT_TITLE + * @description String representing the default title applied to + * buttons of type "menu." + * @default "Menu collapsed. Click to expand." + * @final + * @type String + */ + MENUBUTTON_DEFAULT_TITLE: "Menu collapsed. Click to expand.", + + + /** + * @property MENUBUTTON_MENU_VISIBLE_TITLE + * @description String representing the title applied to buttons of type + * "menu" when the button's menu is visible. + * @default "Menu expanded. Click or press Esc to collapse." + * @final + * @type String + */ + MENUBUTTON_MENU_VISIBLE_TITLE: + "Menu expanded. Click or press Esc to collapse.", + + + /** + * @property SPLITBUTTON_DEFAULT_TITLE + * @description String representing the default title applied to + * buttons of type "split." + * @default "Menu collapsed. Click inside option region or press + * Ctrl + Shift + M to show the menu." + * @final + * @type String + */ + SPLITBUTTON_DEFAULT_TITLE: ("Menu collapsed. Click inside option " + + "region or press Ctrl + Shift + M to show the menu."), + + + /** + * @property SPLITBUTTON_OPTION_VISIBLE_TITLE + * @description String representing the title applied to buttons of type + * "split" when the button's menu is visible. + * @default "Menu expanded. Press Esc or Ctrl + Shift + M to hide + * the menu." + * @final + * @type String + */ + SPLITBUTTON_OPTION_VISIBLE_TITLE: + "Menu expanded. Press Esc or Ctrl + Shift + M to hide the menu.", + + + /** + * @property SUBMIT_TITLE + * @description String representing the title applied to buttons of + * type "submit." + * @default "Click to submit form." + * @final + * @type String + */ + SUBMIT_TITLE: "Click to submit form.", + + + + // Protected attribute setter methods + + + /** + * @method _setType + * @description Sets the value of the button's "type" attribute. + * @protected + * @param {String} p_sType String indicating the value for the button's + * "type" attribute. + */ + _setType: function (p_sType) { + + if (p_sType == "split") { + + this.on("option", this._onOption); + + } + + }, + + + /** + * @method _setLabel + * @description Sets the value of the button's "label" attribute. + * @protected + * @param {String} p_sLabel String indicating the value for the button's + * "label" attribute. + */ + _setLabel: function (p_sLabel) { + + this._button.innerHTML = p_sLabel; + + /* + Remove and add the default class name from the root element + for Gecko to ensure that the button shrinkwraps to the label. + Without this the button will not be rendered at the correct + width when the label changes. The most likely cause for this + bug is button's use of the Gecko-specific CSS display type of + "-moz-inline-box" to simulate "inline-block" supported by IE, + Safari and Opera. + */ + + var sClass, + me; + + if (YAHOO.env.ua.gecko && Dom.inDocument(this.get("element"))) { + + me = this; + sClass = this.CSS_CLASS_NAME; + + this.removeClass(sClass); + + window.setTimeout(function () { + + me.addClass(sClass); + + }, 0); + + } + + }, + + + /** + * @method _setTabIndex + * @description Sets the value of the button's "tabindex" attribute. + * @protected + * @param {Number} p_nTabIndex Number indicating the value for the + * button's "tabindex" attribute. + */ + _setTabIndex: function (p_nTabIndex) { + + this._button.tabIndex = p_nTabIndex; + + }, + + + /** + * @method _setTitle + * @description Sets the value of the button's "title" attribute. + * @protected + * @param {String} p_nTabIndex Number indicating the value for + * the button's "title" attribute. + */ + _setTitle: function (p_sTitle) { + + var sTitle = p_sTitle; + + if (this.get("type") != "link") { + + if (!sTitle) { + + switch (this.get("type")) { + + case "radio": + + sTitle = this.RADIO_DEFAULT_TITLE; + + break; + + case "checkbox": + + sTitle = this.CHECKBOX_DEFAULT_TITLE; + + break; + + case "menu": + + sTitle = this.MENUBUTTON_DEFAULT_TITLE; + + break; + + case "split": + + sTitle = this.SPLITBUTTON_DEFAULT_TITLE; + + break; + + case "submit": + + sTitle = this.SUBMIT_TITLE; + + break; + + } + + } + + this._button.title = sTitle; + + } + + }, + + + /** + * @method _setDisabled + * @description Sets the value of the button's "disabled" attribute. + * @protected + * @param {Boolean} p_bDisabled Boolean indicating the value for + * the button's "disabled" attribute. + */ + _setDisabled: function (p_bDisabled) { + + if (this.get("type") != "link") { + + if (p_bDisabled) { + + if (this._menu) { + + this._menu.hide(); + + } + + if (this.hasFocus()) { + + this.blur(); + + } + + this._button.setAttribute("disabled", "disabled"); + + this.addStateCSSClasses("disabled"); + + this.removeStateCSSClasses("hover"); + this.removeStateCSSClasses("active"); + this.removeStateCSSClasses("focus"); + + } + else { + + this._button.removeAttribute("disabled"); + + this.removeStateCSSClasses("disabled"); + + } + + } + + }, + + + /** + * @method _setHref + * @description Sets the value of the button's "href" attribute. + * @protected + * @param {String} p_sHref String indicating the value for the button's + * "href" attribute. + */ + _setHref: function (p_sHref) { + + if (this.get("type") == "link") { + + this._button.href = p_sHref; + + } + + }, + + + /** + * @method _setTarget + * @description Sets the value of the button's "target" attribute. + * @protected + * @param {String} p_sTarget String indicating the value for the button's + * "target" attribute. + */ + _setTarget: function (p_sTarget) { + + if (this.get("type") == "link") { + + this._button.setAttribute("target", p_sTarget); + + } + + }, + + + /** + * @method _setChecked + * @description Sets the value of the button's "target" attribute. + * @protected + * @param {Boolean} p_bChecked Boolean indicating the value for + * the button's "checked" attribute. + */ + _setChecked: function (p_bChecked) { + + var sType = this.get("type"), + sTitle; + + if (sType == "checkbox" || sType == "radio") { + + if (p_bChecked) { + + this.addStateCSSClasses("checked"); + + sTitle = (sType == "radio") ? + this.RADIO_CHECKED_TITLE : + this.CHECKBOX_CHECKED_TITLE; + + } + else { + + this.removeStateCSSClasses("checked"); + + sTitle = (sType == "radio") ? + this.RADIO_DEFAULT_TITLE : + this.CHECKBOX_DEFAULT_TITLE; + + } + + this.set("title", sTitle); + + } + + }, + + + /** + * @method _setMenu + * @description Sets the value of the button's "menu" attribute. + * @protected + * @param {Object} p_oMenu Object indicating the value for the button's + * "menu" attribute. + */ + _setMenu: function (p_oMenu) { + + var bLazyLoad = this.get("lazyloadmenu"), + oButtonElement = this.get("element"), + sMenuCSSClassName, + + /* + Boolean indicating if the value of p_oMenu is an instance + of YAHOO.widget.Menu or YAHOO.widget.Overlay. + */ + + bInstance = false, + + + oMenu, + oMenuElement, + oSrcElement, + aItems, + nItems, + oItem, + i; + + + if (!Overlay) { + + this.logger.log("YAHOO.widget.Overlay dependency not met.", + "error"); + + return false; + + } + + + if (Menu) { + + sMenuCSSClassName = Menu.prototype.CSS_CLASS_NAME; + + } + + + function onAppendTo() { + + oMenu.render(oButtonElement.parentNode); + + this.removeListener("appendTo", onAppendTo); + + } + + + function initMenu() { + + if (oMenu) { + + Dom.addClass(oMenu.element, this.get("menuclassname")); + Dom.addClass(oMenu.element, + "yui-" + this.get("type") + "-button-menu"); + + oMenu.showEvent.subscribe(this._onMenuShow, null, this); + oMenu.hideEvent.subscribe(this._onMenuHide, null, this); + oMenu.renderEvent.subscribe(this._onMenuRender, null, this); + + + if (Menu && oMenu instanceof Menu) { + + oMenu.keyDownEvent.subscribe(this._onMenuKeyDown, + this, true); + + oMenu.subscribe("click", this._onMenuClick, + this, true); + + oMenu.itemAddedEvent.subscribe(this._onMenuItemAdded, + this, true); + + oSrcElement = oMenu.srcElement; + + if (oSrcElement && + oSrcElement.nodeName.toUpperCase() == "SELECT") { + + oSrcElement.style.display = "none"; + oSrcElement.parentNode.removeChild(oSrcElement); + + } + + } + else if (Overlay && oMenu instanceof Overlay) { + + if (!m_oOverlayManager) { + + m_oOverlayManager = + new YAHOO.widget.OverlayManager(); + + } + + m_oOverlayManager.register(oMenu); + + } + + + this._menu = oMenu; + + + if (!bInstance) { + + if (bLazyLoad && Menu && !(oMenu instanceof Menu)) { + + /* + Mimic Menu's "lazyload" functionality by adding + a "beforeshow" event listener that renders the + Overlay instance before it is made visible by + the button. + */ + + oMenu.beforeShowEvent.subscribe( + this._onOverlayBeforeShow, null, this); + + } + else if (!bLazyLoad) { + + if (Dom.inDocument(oButtonElement)) { + + oMenu.render(oButtonElement.parentNode); + + } + else { + + this.on("appendTo", onAppendTo); + + } + + } + + } + + } + + } + + + if (p_oMenu && Menu && (p_oMenu instanceof Menu)) { + + oMenu = p_oMenu; + aItems = oMenu.getItems(); + nItems = aItems.length; + bInstance = true; + + + if (nItems > 0) { + + i = nItems - 1; + + do { + + oItem = aItems[i]; + + if (oItem) { + + oItem.cfg.subscribeToConfigEvent("selected", + this._onMenuItemSelected, + oItem, + this); + + } + + } + while (i--); + + } + + initMenu.call(this); + + } + else if (Overlay && p_oMenu && (p_oMenu instanceof Overlay)) { + + oMenu = p_oMenu; + bInstance = true; + + oMenu.cfg.setProperty("visible", false); + oMenu.cfg.setProperty("context", [oButtonElement, "tl", "bl"]); + + initMenu.call(this); + + } + else if (Menu && Lang.isArray(p_oMenu)) { + + this.on("appendTo", function () { + + oMenu = new Menu(Dom.generateId(), { lazyload: bLazyLoad, + itemdata: p_oMenu }); + + initMenu.call(this); + + }); + + } + else if (Lang.isString(p_oMenu)) { + + oMenuElement = Dom.get(p_oMenu); + + if (oMenuElement) { + + if (Menu && Dom.hasClass(oMenuElement, sMenuCSSClassName) || + oMenuElement.nodeName.toUpperCase() == "SELECT") { + + oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad }); + + initMenu.call(this); + + } + else if (Overlay) { + + oMenu = new Overlay(p_oMenu, { visible: false, + context: [oButtonElement, "tl", "bl"] }); + + initMenu.call(this); + + } + + } + + } + else if (p_oMenu && p_oMenu.nodeName) { + + if (Menu && Dom.hasClass(p_oMenu, sMenuCSSClassName) || + p_oMenu.nodeName.toUpperCase() == "SELECT") { + + oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad }); + + initMenu.call(this); + + } + else if (Overlay) { + + if (!p_oMenu.id) { + + Dom.generateId(p_oMenu); + + } + + oMenu = new Overlay(p_oMenu, { visible: false, + context: [oButtonElement, "tl", "bl"] }); + + initMenu.call(this); + + } + + } + + }, + + + /** + * @method _setOnClick + * @description Sets the value of the button's "onclick" attribute. + * @protected + * @param {Object} p_oObject Object indicating the value for the button's + * "onclick" attribute. + */ + _setOnClick: function (p_oObject) { + + /* + Remove any existing listeners if a "click" event handler + has already been specified. + */ + + if (this._onclickAttributeValue && + (this._onclickAttributeValue != p_oObject)) { + + this.removeListener("click", this._onclickAttributeValue.fn); + + this._onclickAttributeValue = null; + + } + + + if (!this._onclickAttributeValue && + Lang.isObject(p_oObject) && + Lang.isFunction(p_oObject.fn)) { + + this.on("click", p_oObject.fn, p_oObject.obj, p_oObject.scope); + + this._onclickAttributeValue = p_oObject; + + } + + }, + + + /** + * @method _setSelectedMenuItem + * @description Sets the value of the button's + * "selectedMenuItem" attribute. + * @protected + * @param {Number} p_nIndex Number representing the index of the item + * in the button's menu that is currently selected. + */ + _setSelectedMenuItem: function (p_nIndex) { + + var oMenu = this._menu, + oMenuItem; + + + if (Menu && oMenu && oMenu instanceof Menu) { + + oMenuItem = oMenu.getItem(p_nIndex); + + + if (oMenuItem && !oMenuItem.cfg.getProperty("selected")) { + + oMenuItem.cfg.setProperty("selected", true); + + } + + } + + }, + + + // Protected methods + + + + /** + * @method _isActivationKey + * @description Determines if the specified keycode is one that toggles + * the button's "active" state. + * @protected + * @param {Number} p_nKeyCode Number representing the keycode to + * be evaluated. + * @return {Boolean} + */ + _isActivationKey: function (p_nKeyCode) { + + var sType = this.get("type"), + aKeyCodes = (sType == "checkbox" || sType == "radio") ? + this.CHECK_ACTIVATION_KEYS : this.ACTIVATION_KEYS, + + nKeyCodes = aKeyCodes.length, + i; + + if (nKeyCodes > 0) { + + i = nKeyCodes - 1; + + do { + + if (p_nKeyCode == aKeyCodes[i]) { + + return true; + + } + + } + while (i--); + + } + + }, + + + /** + * @method _isSplitButtonOptionKey + * @description Determines if the specified keycode is one that toggles + * the display of the split button's menu. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + * @return {Boolean} + */ + _isSplitButtonOptionKey: function (p_oEvent) { + + return (p_oEvent.ctrlKey && p_oEvent.shiftKey && + Event.getCharCode(p_oEvent) == 77); + + }, + + + /** + * @method _addListenersToForm + * @description Adds event handlers to the button's form. + * @protected + */ + _addListenersToForm: function () { + + var oForm = this.getForm(), + onFormKeyPress = YAHOO.widget.Button.onFormKeyPress, + bHasKeyPressListener, + oSrcElement, + aListeners, + nListeners, + i; + + + if (oForm) { + + Event.on(oForm, "reset", this._onFormReset, null, this); + Event.on(oForm, "submit", this.createHiddenFields, null, this); + + oSrcElement = this.get("srcelement"); + + + if (this.get("type") == "submit" || + (oSrcElement && oSrcElement.type == "submit")) + { + + aListeners = Event.getListeners(oForm, "keypress"); + bHasKeyPressListener = false; + + if (aListeners) { + + nListeners = aListeners.length; + + if (nListeners > 0) { + + i = nListeners - 1; + + do { + + if (aListeners[i].fn == onFormKeyPress) { + + bHasKeyPressListener = true; + break; + + } + + } + while (i--); + + } + + } + + + if (!bHasKeyPressListener) { + + Event.on(oForm, "keypress", onFormKeyPress); + + } + + } + + } + + }, + + + + /** + * @method _showMenu + * @description Shows the button's menu. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event) that triggered + * the display of the menu. + */ + _showMenu: function (p_oEvent) { + + if (YAHOO.widget.MenuManager) { + + YAHOO.widget.MenuManager.hideVisible(); + + } + + + if (m_oOverlayManager) { + + m_oOverlayManager.hideAll(); + + } + + + var nViewportOffset = Overlay.VIEWPORT_OFFSET, + + oMenu = this._menu, + oButton = this, + oButtonEL = oButton.get("element"), + bMenuFlipped = false, + nButtonY = Dom.getY(oButtonEL), + nScrollTop = Dom.getDocumentScrollTop(), + nMenuMinScrollHeight, + nMenuHeight, + oMenuShadow; + + + if (nScrollTop) { + + nButtonY = nButtonY - nScrollTop; + + } + + + var nTopRegion = nButtonY, + nBottomRegion = (Dom.getViewportHeight() - + (nButtonY + oButtonEL.offsetHeight)); + + + /* + Uses the Button's position to calculate the availble height + above and below it to display its corresponding Menu. + */ + + function getMenuDisplayRegionHeight() { + + if (bMenuFlipped) { + + return (nTopRegion - nViewportOffset); + + } + else { + + return (nBottomRegion - nViewportOffset); + + } + + } + + + + /* + Sets the Menu's "maxheight" configuration property and trys to + place the Menu in the best possible position (either above or + below its corresponding Button). + */ + + function sizeAndPositionMenu() { + + var nDisplayRegionHeight = getMenuDisplayRegionHeight(); + + + if (nMenuHeight > nDisplayRegionHeight) { + + nMenuMinScrollHeight = oMenu.cfg.getProperty("minscrollheight"); + + + if (nDisplayRegionHeight > nMenuMinScrollHeight) { + + oMenu.cfg.setProperty("maxheight", + nDisplayRegionHeight); + + + if (bMenuFlipped) { + + oMenu.align("bl", "tl"); + + } + + } + + + if (nDisplayRegionHeight < nMenuMinScrollHeight) { + + if (bMenuFlipped) { + + /* + All possible positions and values for the + "maxheight" configuration property have been + tried, but none were successful, so fall back + to the original size and position. + */ + + oMenu.cfg.setProperty("context", + [oButtonEL, "tl", "bl"], true); + + oMenu.align("tl", "bl"); + + } + else { + + oMenu.cfg.setProperty("context", + [oButtonEL, "bl", "tl"], true); + + oMenu.align("bl", "tl"); + + bMenuFlipped = true; + + return sizeAndPositionMenu(); + + } + + } + + } + + } + + + if (Menu && oMenu && (oMenu instanceof Menu)) { + + oMenu.cfg.applyConfig({ context: [oButtonEL, "tl", "bl"], + clicktohide: false, + visible: true }); + + oMenu.cfg.fireQueue(); + + oMenu.cfg.setProperty("maxheight", 0); + + oMenu.align("tl", "bl"); + + + /* + Stop the propagation of the event so that the MenuManager + doesn't blur the menu after it gets focus. + */ + + if (p_oEvent.type == "mousedown") { + + Event.stopPropagation(p_oEvent); + + } + + + nMenuHeight = oMenu.element.offsetHeight; + + oMenuShadow = oMenu.element.lastChild; + + sizeAndPositionMenu(); + + if (this.get("focusmenu")) { + + this._menu.focus(); + + } + + } + else if (Overlay && oMenu && (oMenu instanceof Overlay)) { + + oMenu.show(); + oMenu.align("tl", "bl"); + + var nDisplayRegionHeight = getMenuDisplayRegionHeight(); + + nMenuHeight = oMenu.element.offsetHeight; + + + if (nDisplayRegionHeight < nMenuHeight) { + + oMenu.align("bl", "tl"); + + bMenuFlipped = true; + + nDisplayRegionHeight = getMenuDisplayRegionHeight(); + + if (nDisplayRegionHeight < nMenuHeight) { + + oMenu.align("tl", "bl"); + + } + + } + + } + + }, + + + /** + * @method _hideMenu + * @description Hides the button's menu. + * @protected + */ + _hideMenu: function () { + + var oMenu = this._menu; + + if (oMenu) { + + oMenu.hide(); + + } + + }, + + + + + // Protected event handlers + + + /** + * @method _onMouseOver + * @description "mouseover" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseOver: function (p_oEvent) { + + if (!this._hasMouseEventHandlers) { + + this.on("mouseout", this._onMouseOut); + this.on("mousedown", this._onMouseDown); + this.on("mouseup", this._onMouseUp); + + this._hasMouseEventHandlers = true; + + } + + this.addStateCSSClasses("hover"); + + if (this._activationButtonPressed) { + + this.addStateCSSClasses("active"); + + } + + + if (this._bOptionPressed) { + + this.addStateCSSClasses("activeoption"); + + } + + + if (this._activationButtonPressed || this._bOptionPressed) { + + Event.removeListener(document, "mouseup", this._onDocumentMouseUp); + + } + + }, + + + /** + * @method _onMouseOut + * @description "mouseout" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseOut: function (p_oEvent) { + + this.removeStateCSSClasses("hover"); + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + if (this._activationButtonPressed || this._bOptionPressed) { + + Event.on(document, "mouseup", this._onDocumentMouseUp, + null, this); + + } + + }, + + + /** + * @method _onDocumentMouseUp + * @description "mouseup" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onDocumentMouseUp: function (p_oEvent) { + + this._activationButtonPressed = false; + this._bOptionPressed = false; + + var sType = this.get("type"), + oTarget, + oMenuElement; + + if (sType == "menu" || sType == "split") { + + oTarget = Event.getTarget(p_oEvent); + oMenuElement = this._menu.element; + + if (oTarget != oMenuElement && + !Dom.isAncestor(oMenuElement, oTarget)) { + + this.removeStateCSSClasses((sType == "menu" ? + "active" : "activeoption")); + + this._hideMenu(); + + } + + } + + Event.removeListener(document, "mouseup", this._onDocumentMouseUp); + + }, + + + /** + * @method _onMouseDown + * @description "mousedown" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseDown: function (p_oEvent) { + + var sType, + oElement, + nX, + me; + + + function onMouseUp() { + + this._hideMenu(); + this.removeListener("mouseup", onMouseUp); + + } + + + if ((p_oEvent.which || p_oEvent.button) == 1) { + + + if (!this.hasFocus()) { + + this.focus(); + + } + + + sType = this.get("type"); + + + if (sType == "split") { + + oElement = this.get("element"); + nX = Event.getPageX(p_oEvent) - Dom.getX(oElement); + + if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) { + + this.fireEvent("option", p_oEvent); + + } + else { + + this.addStateCSSClasses("active"); + + this._activationButtonPressed = true; + + } + + } + else if (sType == "menu") { + + if (this.isActive()) { + + this._hideMenu(); + + this._activationButtonPressed = false; + + } + else { + + this._showMenu(p_oEvent); + + this._activationButtonPressed = true; + + } + + } + else { + + this.addStateCSSClasses("active"); + + this._activationButtonPressed = true; + + } + + + + if (sType == "split" || sType == "menu") { + + me = this; + + this._hideMenuTimerId = window.setTimeout(function () { + + me.on("mouseup", onMouseUp); + + }, 250); + + } + + } + + }, + + + /** + * @method _onMouseUp + * @description "mouseup" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseUp: function (p_oEvent) { + + var sType = this.get("type"); + + + if (this._hideMenuTimerId) { + + window.clearTimeout(this._hideMenuTimerId); + + } + + + if (sType == "checkbox" || sType == "radio") { + + this.set("checked", !(this.get("checked"))); + + } + + + this._activationButtonPressed = false; + + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + }, + + + /** + * @method _onFocus + * @description "focus" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onFocus: function (p_oEvent) { + + var oElement; + + this.addStateCSSClasses("focus"); + + if (this._activationKeyPressed) { + + this.addStateCSSClasses("active"); + + } + + m_oFocusedButton = this; + + + if (!this._hasKeyEventHandlers) { + + oElement = this._button; + + Event.on(oElement, "blur", this._onBlur, null, this); + Event.on(oElement, "keydown", this._onKeyDown, null, this); + Event.on(oElement, "keyup", this._onKeyUp, null, this); + + this._hasKeyEventHandlers = true; + + } + + + this.fireEvent("focus", p_oEvent); + + }, + + + /** + * @method _onBlur + * @description "blur" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onBlur: function (p_oEvent) { + + this.removeStateCSSClasses("focus"); + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + if (this._activationKeyPressed) { + + Event.on(document, "keyup", this._onDocumentKeyUp, null, this); + + } + + + m_oFocusedButton = null; + + this.fireEvent("blur", p_oEvent); + + }, + + + /** + * @method _onDocumentKeyUp + * @description "keyup" event handler for the document. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onDocumentKeyUp: function (p_oEvent) { + + if (this._isActivationKey(Event.getCharCode(p_oEvent))) { + + this._activationKeyPressed = false; + + Event.removeListener(document, "keyup", this._onDocumentKeyUp); + + } + + }, + + + /** + * @method _onKeyDown + * @description "keydown" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onKeyDown: function (p_oEvent) { + + var oMenu = this._menu; + + + if (this.get("type") == "split" && + this._isSplitButtonOptionKey(p_oEvent)) { + + this.fireEvent("option", p_oEvent); + + } + else if (this._isActivationKey(Event.getCharCode(p_oEvent))) { + + if (this.get("type") == "menu") { + + this._showMenu(p_oEvent); + + } + else { + + this._activationKeyPressed = true; + + this.addStateCSSClasses("active"); + + } + + } + + + if (oMenu && oMenu.cfg.getProperty("visible") && + Event.getCharCode(p_oEvent) == 27) { + + oMenu.hide(); + this.focus(); + + } + + }, + + + /** + * @method _onKeyUp + * @description "keyup" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onKeyUp: function (p_oEvent) { + + var sType; + + if (this._isActivationKey(Event.getCharCode(p_oEvent))) { + + sType = this.get("type"); + + if (sType == "checkbox" || sType == "radio") { + + this.set("checked", !(this.get("checked"))); + + } + + this._activationKeyPressed = false; + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + } + + }, + + + /** + * @method _onClick + * @description "click" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onClick: function (p_oEvent) { + + var sType = this.get("type"), + sTitle, + oForm, + oSrcElement, + oElement, + nX; + + + switch (sType) { + + case "radio": + case "checkbox": + + if (this.get("checked")) { + + sTitle = (sType == "radio") ? + this.RADIO_CHECKED_TITLE : + this.CHECKBOX_CHECKED_TITLE; + + } + else { + + sTitle = (sType == "radio") ? + this.RADIO_DEFAULT_TITLE : + this.CHECKBOX_DEFAULT_TITLE; + + } + + this.set("title", sTitle); + + break; + + case "submit": + + this.submitForm(); + + break; + + case "reset": + + oForm = this.getForm(); + + if (oForm) { + + oForm.reset(); + + } + + break; + + case "menu": + + sTitle = this._menu.cfg.getProperty("visible") ? + this.MENUBUTTON_MENU_VISIBLE_TITLE : + this.MENUBUTTON_DEFAULT_TITLE; + + this.set("title", sTitle); + + break; + + case "split": + + oElement = this.get("element"); + nX = Event.getPageX(p_oEvent) - Dom.getX(oElement); + + if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) { + + return false; + + } + else { + + this._hideMenu(); + + oSrcElement = this.get("srcelement"); + + if (oSrcElement && oSrcElement.type == "submit") { + + this.submitForm(); + + } + + } + + sTitle = this._menu.cfg.getProperty("visible") ? + this.SPLITBUTTON_OPTION_VISIBLE_TITLE : + this.SPLITBUTTON_DEFAULT_TITLE; + + this.set("title", sTitle); + + break; + + } + + }, + + + /** + * @method _onAppendTo + * @description "appendTo" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onAppendTo: function (p_oEvent) { + + /* + It is necessary to call "_addListenersToForm" using + "setTimeout" to make sure that the button's "form" property + returns a node reference. Sometimes, if you try to get the + reference immediately after appending the field, it is null. + */ + + var me = this; + + window.setTimeout(function () { + + me._addListenersToForm(); + + }, 0); + + }, + + + /** + * @method _onFormReset + * @description "reset" event handler for the button's form. + * @protected + * @param {Event} p_oEvent Object representing the DOM event + * object passed back by the event utility (YAHOO.util.Event). + */ + _onFormReset: function (p_oEvent) { + + var sType = this.get("type"), + oMenu = this._menu; + + if (sType == "checkbox" || sType == "radio") { + + this.resetValue("checked"); + + } + + + if (Menu && oMenu && (oMenu instanceof Menu)) { + + this.resetValue("selectedMenuItem"); + + } + + }, + + + /** + * @method _onDocumentMouseDown + * @description "mousedown" event handler for the document. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onDocumentMouseDown: function (p_oEvent) { + + var oTarget = Event.getTarget(p_oEvent), + oButtonElement = this.get("element"), + oMenuElement = this._menu.element; + + + if (oTarget != oButtonElement && + !Dom.isAncestor(oButtonElement, oTarget) && + oTarget != oMenuElement && + !Dom.isAncestor(oMenuElement, oTarget)) { + + this._hideMenu(); + + Event.removeListener(document, "mousedown", + this._onDocumentMouseDown); + + } + + }, + + + /** + * @method _onOption + * @description "option" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onOption: function (p_oEvent) { + + if (this.hasClass("yui-split-button-activeoption")) { + + this._hideMenu(); + + this._bOptionPressed = false; + + } + else { + + this._showMenu(p_oEvent); + + this._bOptionPressed = true; + + } + + }, + + + /** + * @method _onOverlayBeforeShow + * @description "beforeshow" event handler for the + * YAHOO.widget.Overlay instance + * serving as the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + */ + _onOverlayBeforeShow: function (p_sType) { + + var oMenu = this._menu; + + oMenu.render(this.get("element").parentNode); + + oMenu.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow); + + }, + + + /** + * @method _onMenuShow + * @description "show" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + */ + _onMenuShow: function (p_sType) { + + Event.on(document, "mousedown", this._onDocumentMouseDown, + null, this); + + var sTitle, + sState; + + if (this.get("type") == "split") { + + sTitle = this.SPLITBUTTON_OPTION_VISIBLE_TITLE; + sState = "activeoption"; + + } + else { + + sTitle = this.MENUBUTTON_MENU_VISIBLE_TITLE; + sState = "active"; + + } + + this.addStateCSSClasses(sState); + this.set("title", sTitle); + + }, + + + /** + * @method _onMenuHide + * @description "hide" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + */ + _onMenuHide: function (p_sType) { + + var oMenu = this._menu, + sTitle, + sState; + + + if (this.get("type") == "split") { + + sTitle = this.SPLITBUTTON_DEFAULT_TITLE; + sState = "activeoption"; + + } + else { + + sTitle = this.MENUBUTTON_DEFAULT_TITLE; + sState = "active"; + } + + + this.removeStateCSSClasses(sState); + this.set("title", sTitle); + + + if (this.get("type") == "split") { + + this._bOptionPressed = false; + + } + + }, + + + /** + * @method _onMenuKeyDown + * @description "keydown" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + */ + _onMenuKeyDown: function (p_sType, p_aArgs) { + + var oEvent = p_aArgs[0]; + + if (Event.getCharCode(oEvent) == 27) { + + this.focus(); + + if (this.get("type") == "split") { + + this._bOptionPressed = false; + + } + + } + + }, + + + /** + * @method _onMenuRender + * @description "render" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the + * event thatwas fired. + */ + _onMenuRender: function (p_sType) { + + var oButtonElement = this.get("element"), + oButtonParent = oButtonElement.parentNode, + oMenuElement = this._menu.element; + + + if (oButtonParent != oMenuElement.parentNode) { + + oButtonParent.appendChild(oMenuElement); + + } + + this.set("selectedMenuItem", this.get("selectedMenuItem")); + + }, + + + /** + * @method _onMenuItemSelected + * @description "selectedchange" event handler for each item in the + * button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + * @param {MenuItem} p_oItem Object representing the menu item that + * subscribed to the event. + */ + _onMenuItemSelected: function (p_sType, p_aArgs, p_oItem) { + + var bSelected = p_aArgs[0]; + + if (bSelected) { + + this.set("selectedMenuItem", p_oItem); + + } + + }, + + + /** + * @method _onMenuItemAdded + * @description "itemadded" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + * @param { + * YAHOO.widget.MenuItem} p_oItem Object representing the menu + * item that subscribed to the event. + */ + _onMenuItemAdded: function (p_sType, p_aArgs, p_oItem) { + + var oItem = p_aArgs[0]; + + oItem.cfg.subscribeToConfigEvent("selected", + this._onMenuItemSelected, oItem, this); + + }, + + + /** + * @method _onMenuClick + * @description "click" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + */ + _onMenuClick: function (p_sType, p_aArgs) { + + var oItem = p_aArgs[1], + oSrcElement; + + if (oItem) { + + oSrcElement = this.get("srcelement"); + + if (oSrcElement && oSrcElement.type == "submit") { + + this.submitForm(); + + } + + this._hideMenu(); + + } + + }, + + + + // Public methods + + + /** + * @method createButtonElement + * @description Creates the button's HTML elements. + * @param {String} p_sType String indicating the type of element + * to create. + * @return {HTMLElement} + */ + createButtonElement: function (p_sType) { + + var sNodeName = this.NODE_NAME, + oElement = document.createElement(sNodeName); + + oElement.innerHTML = "<" + sNodeName + " class=\"first-child\">" + + (p_sType == "link" ? "" : + "") + ""; + + return oElement; + + }, + + + /** + * @method addStateCSSClasses + * @description Appends state-specific CSS classes to the button's root + * DOM element. + */ + addStateCSSClasses: function (p_sState) { + + var sType = this.get("type"); + + if (Lang.isString(p_sState)) { + + if (p_sState != "activeoption") { + + this.addClass(this.CSS_CLASS_NAME + ("-" + p_sState)); + + } + + this.addClass("yui-" + sType + ("-button-" + p_sState)); + + } + + }, + + + /** + * @method removeStateCSSClasses + * @description Removes state-specific CSS classes to the button's root + * DOM element. + */ + removeStateCSSClasses: function (p_sState) { + + var sType = this.get("type"); + + if (Lang.isString(p_sState)) { + + this.removeClass(this.CSS_CLASS_NAME + ("-" + p_sState)); + this.removeClass("yui-" + sType + ("-button-" + p_sState)); + + } + + }, + + + /** + * @method createHiddenFields + * @description Creates the button's hidden form field and appends it + * to its parent form. + * @return {HTMLInputElement|Array} + */ + createHiddenFields: function () { + + this.removeHiddenFields(); + + var oForm = this.getForm(), + oButtonField, + sType, + bCheckable, + oMenu, + oMenuItem, + sName, + oValue, + oMenuField; + + + if (oForm && !this.get("disabled")) { + + sType = this.get("type"); + bCheckable = (sType == "checkbox" || sType == "radio"); + + + if (bCheckable || (m_oSubmitTrigger == this)) { + + this.logger.log("Creating hidden field."); + + oButtonField = createInputElement( + (bCheckable ? sType : "hidden"), + this.get("name"), + this.get("value"), + this.get("checked")); + + + if (oButtonField) { + + if (bCheckable) { + + oButtonField.style.display = "none"; + + } + + oForm.appendChild(oButtonField); + + } + + } + + + oMenu = this._menu; + + + if (Menu && oMenu && (oMenu instanceof Menu)) { + + this.logger.log("Creating hidden field for menu."); + + oMenuField = oMenu.srcElement; + oMenuItem = this.get("selectedMenuItem"); + + if (oMenuItem) { + + if (oMenuField && + oMenuField.nodeName.toUpperCase() == "SELECT") { + + oForm.appendChild(oMenuField); + oMenuField.selectedIndex = oMenuItem.index; + + } + else { + + oValue = (oMenuItem.value === null || + oMenuItem.value === "") ? + oMenuItem.cfg.getProperty("text") : + oMenuItem.value; + + sName = this.get("name"); + + if (oValue && sName) { + + oMenuField = createInputElement("hidden", + (sName + "_options"), + oValue); + + oForm.appendChild(oMenuField); + + } + + } + + } + + } + + + if (oButtonField && oMenuField) { + + this._hiddenFields = [oButtonField, oMenuField]; + + } + else if (!oButtonField && oMenuField) { + + this._hiddenFields = oMenuField; + + } + else if (oButtonField && !oMenuField) { + + this._hiddenFields = oButtonField; + + } + + + return this._hiddenFields; + + } + + }, + + + /** + * @method removeHiddenFields + * @description Removes the button's hidden form field(s) from its + * parent form. + */ + removeHiddenFields: function () { + + var oField = this._hiddenFields, + nFields, + i; + + function removeChild(p_oElement) { + + if (Dom.inDocument(p_oElement)) { + + p_oElement.parentNode.removeChild(p_oElement); + + } + + } + + + if (oField) { + + if (Lang.isArray(oField)) { + + nFields = oField.length; + + if (nFields > 0) { + + i = nFields - 1; + + do { + + removeChild(oField[i]); + + } + while (i--); + + } + + } + else { + + removeChild(oField); + + } + + this._hiddenFields = null; + + } + + }, + + + /** + * @method submitForm + * @description Submits the form to which the button belongs. Returns + * true if the form was submitted successfully, false if the submission + * was cancelled. + * @protected + * @return {Boolean} + */ + submitForm: function () { + + var oForm = this.getForm(), + + oSrcElement = this.get("srcelement"), + + /* + Boolean indicating if the event fired successfully + (was not cancelled by any handlers) + */ + + bSubmitForm = false, + + oEvent; + + + if (oForm) { + + if (this.get("type") == "submit" || + (oSrcElement && oSrcElement.type == "submit")) + { + + m_oSubmitTrigger = this; + + } + + + if (YAHOO.env.ua.ie) { + + bSubmitForm = oForm.fireEvent("onsubmit"); + + } + else { // Gecko, Opera, and Safari + + oEvent = document.createEvent("HTMLEvents"); + oEvent.initEvent("submit", true, true); + + bSubmitForm = oForm.dispatchEvent(oEvent); + + } + + + /* + In IE and Safari, dispatching a "submit" event to a form + WILL cause the form's "submit" event to fire, but WILL NOT + submit the form. Therefore, we need to call the "submit" + method as well. + */ + + if ((YAHOO.env.ua.ie || YAHOO.env.ua.webkit) && bSubmitForm) { + + oForm.submit(); + + } + + } + + return bSubmitForm; + + }, + + + /** + * @method init + * @description The Button class's initialization method. + * @param {String} p_oElement String specifying the id attribute of the + * <input>, <button>, + * <a>, or <span> element to + * be used to create the button. + * @param {HTMLInputElement|HTMLButtonElement| + * HTMLElement} p_oElement Object reference for the + * <input>, <button>, + * <a>, or <span> element to be + * used to create the button. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button. + * @param {Object} p_oAttributes Optional. Object literal specifying a + * set of configuration attributes used to create the button. + */ + init: function (p_oElement, p_oAttributes) { + + var sNodeName = p_oAttributes.type == "link" ? "a" : "button", + oSrcElement = p_oAttributes.srcelement, + oButton = p_oElement.getElementsByTagName(sNodeName)[0], + oInput; + + + if (!oButton) { + + oInput = p_oElement.getElementsByTagName("input")[0]; + + + if (oInput) { + + oButton = document.createElement("button"); + oButton.setAttribute("type", "button"); + + oInput.parentNode.replaceChild(oButton, oInput); + + } + + } + + this._button = oButton; + + + YAHOO.widget.Button.superclass.init.call(this, p_oElement, + p_oAttributes); + + + m_oButtons[this.get("id")] = this; + + + this.addClass(this.CSS_CLASS_NAME); + + this.addClass("yui-" + this.get("type") + "-button"); + + Event.on(this._button, "focus", this._onFocus, null, this); + this.on("mouseover", this._onMouseOver); + this.on("click", this._onClick); + this.on("appendTo", this._onAppendTo); + + + var oContainer = this.get("container"), + oElement = this.get("element"), + bElInDoc = Dom.inDocument(oElement), + oParentNode; + + + if (oContainer) { + + if (oSrcElement && oSrcElement != oElement) { + + oParentNode = oSrcElement.parentNode; + + if (oParentNode) { + + oParentNode.removeChild(oSrcElement); + + } + + } + + if (Lang.isString(oContainer)) { + + Event.onContentReady(oContainer, function () { + + this.appendTo(oContainer); + + }, null, this); + + } + else { + + this.appendTo(oContainer); + + } + + } + else if (!bElInDoc && oSrcElement && oSrcElement != oElement) { + + oParentNode = oSrcElement.parentNode; + + if (oParentNode) { + + this.fireEvent("beforeAppendTo", { + type: "beforeAppendTo", + target: oParentNode + }); + + oParentNode.replaceChild(oElement, oSrcElement); + + this.fireEvent("appendTo", { + type: "appendTo", + target: oParentNode + }); + + } + + } + else if (this.get("type") != "link" && bElInDoc && oSrcElement && + oSrcElement == oElement) { + + this._addListenersToForm(); + + } + + this.logger.log("Initialization completed."); + + }, + + + /** + * @method initAttributes + * @description Initializes all of the configuration attributes used to + * create the button. + * @param {Object} p_oAttributes Object literal specifying a set of + * configuration attributes used to create the button. + */ + initAttributes: function (p_oAttributes) { + + var oAttributes = p_oAttributes || {}; + + YAHOO.widget.Button.superclass.initAttributes.call(this, + oAttributes); + + + /** + * @attribute type + * @description String specifying the button's type. Possible + * values are: "push," "link," "submit," "reset," "checkbox," + * "radio," "menu," and "split." + * @default "push" + * @type String + */ + this.setAttributeConfig("type", { + + value: (oAttributes.type || "push"), + validator: Lang.isString, + writeOnce: true, + method: this._setType + + }); + + + /** + * @attribute label + * @description String specifying the button's text label + * or innerHTML. + * @default null + * @type String + */ + this.setAttributeConfig("label", { + + value: oAttributes.label, + validator: Lang.isString, + method: this._setLabel + + }); + + + /** + * @attribute value + * @description Object specifying the value for the button. + * @default null + * @type Object + */ + this.setAttributeConfig("value", { + + value: oAttributes.value + + }); + + + /** + * @attribute name + * @description String specifying the name for the button. + * @default null + * @type String + */ + this.setAttributeConfig("name", { + + value: oAttributes.name, + validator: Lang.isString + + }); + + + /** + * @attribute tabindex + * @description Number specifying the tabindex for the button. + * @default null + * @type Number + */ + this.setAttributeConfig("tabindex", { + + value: oAttributes.tabindex, + validator: Lang.isNumber, + method: this._setTabIndex + + }); + + + /** + * @attribute title + * @description String specifying the title for the button. + * @default null + * @type String + */ + this.configureAttribute("title", { + + value: oAttributes.title, + validator: Lang.isString, + method: this._setTitle + + }); + + + /** + * @attribute disabled + * @description Boolean indicating if the button should be disabled. + * (Disabled buttons are dimmed and will not respond to user input + * or fire events. Does not apply to button's of type "link.") + * @default false + * @type Boolean + */ + this.setAttributeConfig("disabled", { + + value: (oAttributes.disabled || false), + validator: Lang.isBoolean, + method: this._setDisabled + + }); + + + /** + * @attribute href + * @description String specifying the href for the button. Applies + * only to buttons of type "link." + * @type String + */ + this.setAttributeConfig("href", { + + value: oAttributes.href, + validator: Lang.isString, + method: this._setHref + + }); + + + /** + * @attribute target + * @description String specifying the target for the button. + * Applies only to buttons of type "link." + * @type String + */ + this.setAttributeConfig("target", { + + value: oAttributes.target, + validator: Lang.isString, + method: this._setTarget + + }); + + + /** + * @attribute checked + * @description Boolean indicating if the button is checked. + * Applies only to buttons of type "radio" and "checkbox." + * @default false + * @type Boolean + */ + this.setAttributeConfig("checked", { + + value: (oAttributes.checked || false), + validator: Lang.isBoolean, + method: this._setChecked + + }); + + + /** + * @attribute container + * @description HTML element reference or string specifying the id + * attribute of the HTML element that the button's markup should be + * rendered into. + * @type HTMLElement|String + * @default null + */ + this.setAttributeConfig("container", { + + value: oAttributes.container, + writeOnce: true + + }); + + + /** + * @attribute srcelement + * @description Object reference to the HTML element (either + * <input> or <span>) + * used to create the button. + * @type HTMLElement|String + * @default null + */ + this.setAttributeConfig("srcelement", { + + value: oAttributes.srcelement, + writeOnce: true + + }); + + + /** + * @attribute menu + * @description Object specifying the menu for the button. + * The value can be one of the following: + *
    + *
  • Object specifying a + * YAHOO.widget.Menu instance.
  • + *
  • Object specifying a + * YAHOO.widget.Overlay instance.
  • + *
  • String specifying the id attribute of the <div> + * element used to create the menu. By default the menu + * will be created as an instance of + * YAHOO.widget.Overlay. + * If the + * default CSS class name for YAHOO.widget.Menu is applied to + * the <div> element, it will be created as an + * instance of YAHOO.widget.Menu + * .
  • String specifying the id attribute of the + * <select> element used to create the menu. + *
  • Object specifying the <div> element + * used to create the menu.
  • + *
  • Object specifying the <select> element + * used to create the menu.
  • + *
  • Array of object literals, each representing a set of + * YAHOO.widget.MenuItem + * configuration attributes.
  • + *
  • Array of strings representing the text labels for each menu + * item in the menu.
  • + *
+ * @type YAHOO.widget.Menu|YAHOO.widget.Overlay|HTMLElement|String|Array + * @default null + */ + this.setAttributeConfig("menu", { + + value: null, + method: this._setMenu, + writeOnce: true + + }); + + + /** + * @attribute lazyloadmenu + * @description Boolean indicating the value to set for the + * "lazyload" + * configuration property of the button's menu. Setting + * "lazyloadmenu" to true will defer rendering of + * the button's menu until the first time it is made visible. + * If "lazyloadmenu" is set to false, the button's + * menu will be rendered immediately if the button is in the + * document, or in response to the button's "appendTo" event if + * the button is not yet in the document. In either case, the + * menu is rendered into the button's parent HTML element. + * This attribute does not apply if a + * YAHOO.widget.Menu or + * YAHOO.widget.Overlay + * instance is passed as the value of the button's "menu" + * configuration attribute. + * YAHOO.widget.Menu or + * YAHOO.widget.Overlay instances should be rendered before + * being set as the value for the "menu" configuration + * attribute. + * @default true + * @type Boolean + */ + this.setAttributeConfig("lazyloadmenu", { + + value: (oAttributes.lazyloadmenu === false ? false : true), + validator: Lang.isBoolean, + writeOnce: true + + }); + + + /** + * @attribute menuclassname + * @description String representing the CSS class name to be + * applied to the root element of the button's menu. + * @type String + * @default "yui-button-menu" + */ + this.setAttributeConfig("menuclassname", { + + value: (oAttributes.menuclassname || "yui-button-menu"), + validator: Lang.isString, + method: this._setMenuClassName, + writeOnce: true + + }); + + + /** + * @attribute selectedMenuItem + * @description Object representing the item in the button's menu + * that is currently selected. + * @type Number + * @default null + */ + this.setAttributeConfig("selectedMenuItem", { + + value: null, + method: this._setSelectedMenuItem + + }); + + + /** + * @attribute onclick + * @description Object literal representing the code to be executed + * when the button is clicked. Format:
{
+ * fn: Function, // The handler to call + * when the event fires.
obj: Object, + * // An object to pass back to the handler.
+ * scope: Object // The object to use + * for the scope of the handler.
}
+ * @type Object + * @default null + */ + this.setAttributeConfig("onclick", { + + value: oAttributes.onclick, + method: this._setOnClick + + }); + + + /** + * @attribute focusmenu + * @description Boolean indicating whether or not the button's menu + * should be focused when it is made visible. + * @type Boolean + * @default true + */ + this.setAttributeConfig("focusmenu", { + + value: (oAttributes.focusmenu === false ? false : true), + validator: Lang.isBoolean + + }); + + }, + + + /** + * @method focus + * @description Causes the button to receive the focus and fires the + * button's "focus" event. + */ + focus: function () { + + if (!this.get("disabled")) { + + this._button.focus(); + + } + + }, + + + /** + * @method blur + * @description Causes the button to lose focus and fires the button's + * "blur" event. + */ + blur: function () { + + if (!this.get("disabled")) { + + this._button.blur(); + + } + + }, + + + /** + * @method hasFocus + * @description Returns a boolean indicating whether or not the button + * has focus. + * @return {Boolean} + */ + hasFocus: function () { + + return (m_oFocusedButton == this); + + }, + + + /** + * @method isActive + * @description Returns a boolean indicating whether or not the button + * is active. + * @return {Boolean} + */ + isActive: function () { + + return this.hasClass(this.CSS_CLASS_NAME + "-active"); + + }, + + + /** + * @method getMenu + * @description Returns a reference to the button's menu. + * @return { + * YAHOO.widget.Overlay|YAHOO.widget.Menu} + */ + getMenu: function () { + + return this._menu; + + }, + + + /** + * @method getForm + * @description Returns a reference to the button's parent form. + * @return {HTMLFormElement} + */ + getForm: function () { + + return this._button.form; + + }, + + + /** + * @method getHiddenFields + * @description Returns an <input> element or + * array of form elements used to represent the button when its parent + * form is submitted. + * @return {HTMLInputElement|Array} + */ + getHiddenFields: function () { + + return this._hiddenFields; + + }, + + + /** + * @method destroy + * @description Removes the button's element from its parent element and + * removes all event handlers. + */ + destroy: function () { + + this.logger.log("Destroying ..."); + + var oElement = this.get("element"), + oParentNode = oElement.parentNode, + oMenu = this._menu, + aButtons; + + if (oMenu) { + + this.logger.log("Destroying menu."); + + if (m_oOverlayManager && m_oOverlayManager.find(oMenu)) { + + m_oOverlayManager.remove(oMenu); + + } + + oMenu.destroy(); + + } + + this.logger.log("Removing DOM event listeners."); + + Event.purgeElement(oElement); + Event.purgeElement(this._button); + Event.removeListener(document, "mouseup", this._onDocumentMouseUp); + Event.removeListener(document, "keyup", this._onDocumentKeyUp); + Event.removeListener(document, "mousedown", + this._onDocumentMouseDown); + + + var oForm = this.getForm(); + + if (oForm) { + + Event.removeListener(oForm, "reset", this._onFormReset); + Event.removeListener(oForm, "submit", this.createHiddenFields); + + } + + this.logger.log("Removing CustomEvent listeners."); + + this.unsubscribeAll(); + + if (oParentNode) { + + oParentNode.removeChild(oElement); + + } + + this.logger.log("Removing from document."); + + delete m_oButtons[this.get("id")]; + + aButtons = Dom.getElementsByClassName(this.CSS_CLASS_NAME, + this.NODE_NAME, oForm); + + if (Lang.isArray(aButtons) && aButtons.length === 0) { + + Event.removeListener(oForm, "keypress", + YAHOO.widget.Button.onFormKeyPress); + + } + + this.logger.log("Destroyed."); + + }, + + + fireEvent: function (p_sType , p_aArgs) { + + var sType = arguments[0]; + + // Disabled buttons should not respond to DOM events + + if (this.DOM_EVENTS[sType] && this.get("disabled")) { + + return; + + } + + return YAHOO.widget.Button.superclass.fireEvent.apply(this, arguments); + + }, + + + /** + * @method toString + * @description Returns a string representing the button. + * @return {String} + */ + toString: function () { + + return ("Button " + this.get("id")); + + } + + }); + + + /** + * @method YAHOO.widget.Button.onFormKeyPress + * @description "keypress" event handler for the button's form. + * @param {Event} p_oEvent Object representing the DOM event object passed + * back by the event utility (YAHOO.util.Event). + */ + YAHOO.widget.Button.onFormKeyPress = function (p_oEvent) { + + var oTarget = Event.getTarget(p_oEvent), + nCharCode = Event.getCharCode(p_oEvent), + sNodeName = oTarget.nodeName && oTarget.nodeName.toUpperCase(), + sType = oTarget.type, + + /* + Boolean indicating if the form contains any enabled or + disabled YUI submit buttons + */ + + bFormContainsYUIButtons = false, + + oButton, + + oYUISubmitButton, // The form's first, enabled YUI submit button + + /* + The form's first, enabled HTML submit button that precedes any + YUI submit button + */ + + oPrecedingSubmitButton, + + + /* + The form's first, enabled HTML submit button that follows a + YUI button + */ + + oFollowingSubmitButton; + + + function isSubmitButton(p_oElement) { + + var sId, + oSrcElement; + + switch (p_oElement.nodeName.toUpperCase()) { + + case "INPUT": + case "BUTTON": + + if (p_oElement.type == "submit" && !p_oElement.disabled) { + + if (!bFormContainsYUIButtons && + !oPrecedingSubmitButton) { + + oPrecedingSubmitButton = p_oElement; + + } + + if (oYUISubmitButton && !oFollowingSubmitButton) { + + oFollowingSubmitButton = p_oElement; + + } + + } + + break; + + + default: + + sId = p_oElement.id; + + if (sId) { + + oButton = m_oButtons[sId]; + + if (oButton) { + + bFormContainsYUIButtons = true; + + if (!oButton.get("disabled")) { + + oSrcElement = oButton.get("srcelement"); + + if (!oYUISubmitButton && + (oButton.get("type") == "submit" || + (oSrcElement && oSrcElement.type == "submit"))) + { + + oYUISubmitButton = oButton; + + } + + } + + } + + } + + break; + + } + + } + + + if (nCharCode == 13 && ((sNodeName == "INPUT" && (sType == "text" || + sType == "password" || sType == "checkbox" || sType == "radio" || + sType == "file")) || sNodeName == "SELECT")) + { + + Dom.getElementsBy(isSubmitButton, "*", this); + + + if (oPrecedingSubmitButton) { + + /* + Need to set focus to the first enabled submit button + to make sure that IE includes its name and value + in the form's data set. + */ + + oPrecedingSubmitButton.focus(); + + } + else if (!oPrecedingSubmitButton && oYUISubmitButton) { + + if (oFollowingSubmitButton) { + + /* + Need to call "preventDefault" to ensure that + the name and value of the regular submit button + following the YUI button doesn't get added to the + form's data set when it is submitted. + */ + + Event.preventDefault(p_oEvent); + + } + + oYUISubmitButton.submitForm(); + + } + + } + + }; + + + /** + * @method YAHOO.widget.Button.addHiddenFieldsToForm + * @description Searches the specified form and adds hidden fields for + * instances of YAHOO.widget.Button that are of type "radio," "checkbox," + * "menu," and "split." + * @param {HTMLFormElement} p_oForm Object reference + * for the form to search. + */ + YAHOO.widget.Button.addHiddenFieldsToForm = function (p_oForm) { + + var aButtons = Dom.getElementsByClassName( + YAHOO.widget.Button.prototype.CSS_CLASS_NAME, + "*", + p_oForm), + + nButtons = aButtons.length, + oButton, + sId, + i; + + if (nButtons > 0) { + + YAHOO.log("Form contains " + nButtons + " YUI buttons."); + + for (i = 0; i < nButtons; i++) { + + sId = aButtons[i].id; + + if (sId) { + + oButton = m_oButtons[sId]; + + if (oButton) { + + oButton.createHiddenFields(); + + } + + } + + } + + } + + }; + + + /** + * @method YAHOO.widget.Button.getButton + * @description Returns a button with the specified id. + * @param {String} p_sId String specifying the id of the root node of the + * HTML element representing the button to be retrieved. + * @return {YAHOO.widget.Button} + */ + YAHOO.widget.Button.getButton = function (p_sId) { + + var oButton = m_oButtons[p_sId]; + + if (oButton) { + + return oButton; + + } + + }; + + + // Events + + + /** + * @event focus + * @description Fires when the menu item receives focus. Passes back a + * single object representing the original DOM event object passed back by + * the event utility (YAHOO.util.Event) when the event was fired. See + * Element.addListener + * for more information on listening for this event. + * @type YAHOO.util.CustomEvent + */ + + + /** + * @event blur + * @description Fires when the menu item loses the input focus. Passes back + * a single object representing the original DOM event object passed back by + * the event utility (YAHOO.util.Event) when the event was fired. See + * Element.addListener for + * more information on listening for this event. + * @type YAHOO.util.CustomEvent + */ + + + /** + * @event option + * @description Fires when the user invokes the button's option. Passes + * back a single object representing the original DOM event (either + * "mousedown" or "keydown") that caused the "option" event to fire. See + * Element.addListener + * for more information on listening for this event. + * @type YAHOO.util.CustomEvent + */ + +})(); +(function () { + + // Shorthard for utilities + + var Dom = YAHOO.util.Dom, + Event = YAHOO.util.Event, + Lang = YAHOO.lang, + Button = YAHOO.widget.Button, + + // Private collection of radio buttons + + m_oButtons = {}; + + + + /** + * The ButtonGroup class creates a set of buttons that are mutually + * exclusive; checking one button in the set will uncheck all others in the + * button group. + * @param {String} p_oElement String specifying the id attribute of the + * <div> element of the button group. + * @param {HTMLDivElement} p_oElement Object + * specifying the <div> element of the button group. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button group. + * @param {Object} p_oAttributes Optional. Object literal specifying a set + * of configuration attributes used to create the button group. + * @namespace YAHOO.widget + * @class ButtonGroup + * @constructor + * @extends YAHOO.util.Element + */ + YAHOO.widget.ButtonGroup = function (p_oElement, p_oAttributes) { + + var fnSuperClass = YAHOO.widget.ButtonGroup.superclass.constructor, + sNodeName, + oElement, + sId; + + if (arguments.length == 1 && !Lang.isString(p_oElement) && + !p_oElement.nodeName) { + + if (!p_oElement.id) { + + sId = Dom.generateId(); + + p_oElement.id = sId; + + YAHOO.log("No value specified for the button group's \"id\"" + + " attribute. Setting button group id to \"" + sId + "\".", + "warn"); + + } + + this.logger = new YAHOO.widget.LogWriter("ButtonGroup " + sId); + + this.logger.log("No source HTML element. Building the button " + + "group using the set of configuration attributes."); + + fnSuperClass.call(this, (this._createGroupElement()), p_oElement); + + } + else if (Lang.isString(p_oElement)) { + + oElement = Dom.get(p_oElement); + + if (oElement) { + + if (oElement.nodeName.toUpperCase() == this.NODE_NAME) { + + this.logger = + new YAHOO.widget.LogWriter("ButtonGroup " + p_oElement); + + fnSuperClass.call(this, oElement, p_oAttributes); + + } + + } + + } + else { + + sNodeName = p_oElement.nodeName.toUpperCase(); + + if (sNodeName && sNodeName == this.NODE_NAME) { + + if (!p_oElement.id) { + + p_oElement.id = Dom.generateId(); + + YAHOO.log("No value specified for the button group's" + + " \"id\" attribute. Setting button group id " + + "to \"" + p_oElement.id + "\".", "warn"); + + } + + this.logger = + new YAHOO.widget.LogWriter("ButtonGroup " + p_oElement.id); + + fnSuperClass.call(this, p_oElement, p_oAttributes); + + } + + } + + }; + + + YAHOO.extend(YAHOO.widget.ButtonGroup, YAHOO.util.Element, { + + + // Protected properties + + + /** + * @property _buttons + * @description Array of buttons in the button group. + * @default null + * @protected + * @type Array + */ + _buttons: null, + + + + // Constants + + + /** + * @property NODE_NAME + * @description The name of the tag to be used for the button + * group's element. + * @default "DIV" + * @final + * @type String + */ + NODE_NAME: "DIV", + + + /** + * @property CSS_CLASS_NAME + * @description String representing the CSS class(es) to be applied + * to the button group's element. + * @default "yui-buttongroup" + * @final + * @type String + */ + CSS_CLASS_NAME: "yui-buttongroup", + + + + // Protected methods + + + /** + * @method _createGroupElement + * @description Creates the button group's element. + * @protected + * @return {HTMLDivElement} + */ + _createGroupElement: function () { + + var oElement = document.createElement(this.NODE_NAME); + + return oElement; + + }, + + + + // Protected attribute setter methods + + + /** + * @method _setDisabled + * @description Sets the value of the button groups's + * "disabled" attribute. + * @protected + * @param {Boolean} p_bDisabled Boolean indicating the value for + * the button group's "disabled" attribute. + */ + _setDisabled: function (p_bDisabled) { + + var nButtons = this.getCount(), + i; + + if (nButtons > 0) { + + i = nButtons - 1; + + do { + + this._buttons[i].set("disabled", p_bDisabled); + + } + while (i--); + + } + + }, + + + + // Protected event handlers + + + /** + * @method _onKeyDown + * @description "keydown" event handler for the button group. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onKeyDown: function (p_oEvent) { + + var oTarget = Event.getTarget(p_oEvent), + nCharCode = Event.getCharCode(p_oEvent), + sId = oTarget.parentNode.parentNode.id, + oButton = m_oButtons[sId], + nIndex = -1; + + + if (nCharCode == 37 || nCharCode == 38) { + + nIndex = (oButton.index === 0) ? + (this._buttons.length - 1) : (oButton.index - 1); + + } + else if (nCharCode == 39 || nCharCode == 40) { + + nIndex = (oButton.index === (this._buttons.length - 1)) ? + 0 : (oButton.index + 1); + + } + + + if (nIndex > -1) { + + this.check(nIndex); + this.getButton(nIndex).focus(); + + } + + }, + + + /** + * @method _onAppendTo + * @description "appendTo" event handler for the button group. + * @protected + * @param {Event} p_oEvent Object representing the event that was fired. + */ + _onAppendTo: function (p_oEvent) { + + var aButtons = this._buttons, + nButtons = aButtons.length, + i; + + for (i = 0; i < nButtons; i++) { + + aButtons[i].appendTo(this.get("element")); + + } + + }, + + + /** + * @method _onButtonCheckedChange + * @description "checkedChange" event handler for each button in the + * button group. + * @protected + * @param {Event} p_oEvent Object representing the event that was fired. + * @param {YAHOO.widget.Button} + * p_oButton Object representing the button that fired the event. + */ + _onButtonCheckedChange: function (p_oEvent, p_oButton) { + + var bChecked = p_oEvent.newValue, + oCheckedButton = this.get("checkedButton"); + + if (bChecked && oCheckedButton != p_oButton) { + + if (oCheckedButton) { + + oCheckedButton.set("checked", false, true); + + } + + this.set("checkedButton", p_oButton); + this.set("value", p_oButton.get("value")); + + } + else if (oCheckedButton && !oCheckedButton.set("checked")) { + + oCheckedButton.set("checked", true, true); + + } + + }, + + + + // Public methods + + + /** + * @method init + * @description The ButtonGroup class's initialization method. + * @param {String} p_oElement String specifying the id attribute of the + * <div> element of the button group. + * @param {HTMLDivElement} p_oElement Object + * specifying the <div> element of the button group. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button group. + * @param {Object} p_oAttributes Optional. Object literal specifying a + * set of configuration attributes used to create the button group. + */ + init: function (p_oElement, p_oAttributes) { + + this._buttons = []; + + YAHOO.widget.ButtonGroup.superclass.init.call(this, p_oElement, + p_oAttributes); + + this.addClass(this.CSS_CLASS_NAME); + + this.logger.log("Searching for child nodes with the class name " + + "\"yui-radio-button\" to add to the button group."); + + var aButtons = this.getElementsByClassName("yui-radio-button"); + + + if (aButtons.length > 0) { + + this.logger.log("Found " + aButtons.length + + " child nodes with the class name \"yui-radio-button.\"" + + " Attempting to add to button group."); + + this.addButtons(aButtons); + + } + + + this.logger.log("Searching for child nodes with the type of " + + " \"radio\" to add to the button group."); + + function isRadioButton(p_oElement) { + + return (p_oElement.type == "radio"); + + } + + aButtons = + Dom.getElementsBy(isRadioButton, "input", this.get("element")); + + + if (aButtons.length > 0) { + + this.logger.log("Found " + aButtons.length + " child nodes" + + " with the type of \"radio.\" Attempting to add to" + + " button group."); + + this.addButtons(aButtons); + + } + + this.on("keydown", this._onKeyDown); + this.on("appendTo", this._onAppendTo); + + + var oContainer = this.get("container"); + + if (oContainer) { + + if (Lang.isString(oContainer)) { + + Event.onContentReady(oContainer, function () { + + this.appendTo(oContainer); + + }, null, this); + + } + else { + + this.appendTo(oContainer); + + } + + } + + + this.logger.log("Initialization completed."); + + }, + + + /** + * @method initAttributes + * @description Initializes all of the configuration attributes used to + * create the button group. + * @param {Object} p_oAttributes Object literal specifying a set of + * configuration attributes used to create the button group. + */ + initAttributes: function (p_oAttributes) { + + var oAttributes = p_oAttributes || {}; + + YAHOO.widget.ButtonGroup.superclass.initAttributes.call( + this, oAttributes); + + + /** + * @attribute name + * @description String specifying the name for the button group. + * This name will be applied to each button in the button group. + * @default null + * @type String + */ + this.setAttributeConfig("name", { + + value: oAttributes.name, + validator: Lang.isString + + }); + + + /** + * @attribute disabled + * @description Boolean indicating if the button group should be + * disabled. Disabling the button group will disable each button + * in the button group. Disabled buttons are dimmed and will not + * respond to user input or fire events. + * @default false + * @type Boolean + */ + this.setAttributeConfig("disabled", { + + value: (oAttributes.disabled || false), + validator: Lang.isBoolean, + method: this._setDisabled + + }); + + + /** + * @attribute value + * @description Object specifying the value for the button group. + * @default null + * @type Object + */ + this.setAttributeConfig("value", { + + value: oAttributes.value + + }); + + + /** + * @attribute container + * @description HTML element reference or string specifying the id + * attribute of the HTML element that the button group's markup + * should be rendered into. + * @type HTMLElement|String + * @default null + */ + this.setAttributeConfig("container", { + + value: oAttributes.container, + writeOnce: true + + }); + + + /** + * @attribute checkedButton + * @description Reference for the button in the button group that + * is checked. + * @type {YAHOO.widget.Button} + * @default null + */ + this.setAttributeConfig("checkedButton", { + + value: null + + }); + + }, + + + /** + * @method addButton + * @description Adds the button to the button group. + * @param {YAHOO.widget.Button} + * p_oButton Object reference for the + * YAHOO.widget.Button instance to be added to the button group. + * @param {String} p_oButton String specifying the id attribute of the + * <input> or <span> element + * to be used to create the button to be added to the button group. + * @param {HTMLInputElement|HTMLElement} p_oButton Object reference for the + * <input> or <span> element + * to be used to create the button to be added to the button group. + * @param {Object} p_oButton Object literal specifying a set of + * YAHOO.widget.Button + * configuration attributes used to configure the button to be added to + * the button group. + * @return {YAHOO.widget.Button} + */ + addButton: function (p_oButton) { + + var oButton, + oButtonElement, + oGroupElement, + nIndex, + sButtonName, + sGroupName; + + + if (p_oButton instanceof Button && + p_oButton.get("type") == "radio") { + + oButton = p_oButton; + + } + else if (!Lang.isString(p_oButton) && !p_oButton.nodeName) { + + p_oButton.type = "radio"; + + oButton = new Button(p_oButton); + + } + else { + + oButton = new Button(p_oButton, { type: "radio" }); + + } + + + if (oButton) { + + nIndex = this._buttons.length; + sButtonName = oButton.get("name"); + sGroupName = this.get("name"); + + oButton.index = nIndex; + + this._buttons[nIndex] = oButton; + m_oButtons[oButton.get("id")] = oButton; + + + if (sButtonName != sGroupName) { + + oButton.set("name", sGroupName); + + } + + + if (this.get("disabled")) { + + oButton.set("disabled", true); + + } + + + if (oButton.get("checked")) { + + this.set("checkedButton", oButton); + + } + + + oButtonElement = oButton.get("element"); + oGroupElement = this.get("element"); + + if (oButtonElement.parentNode != oGroupElement) { + + oGroupElement.appendChild(oButtonElement); + + } + + + oButton.on("checkedChange", + this._onButtonCheckedChange, oButton, this); + + this.logger.log("Button " + oButton.get("id") + " added."); + + return oButton; + + } + + }, + + + /** + * @method addButtons + * @description Adds the array of buttons to the button group. + * @param {Array} p_aButtons Array of + * YAHOO.widget.Button instances to be added + * to the button group. + * @param {Array} p_aButtons Array of strings specifying the id + * attribute of the <input> or <span> + * elements to be used to create the buttons to be added to the + * button group. + * @param {Array} p_aButtons Array of object references for the + * <input> or <span> elements + * to be used to create the buttons to be added to the button group. + * @param {Array} p_aButtons Array of object literals, each containing + * a set of YAHOO.widget.Button + * configuration attributes used to configure each button to be added + * to the button group. + * @return {Array} + */ + addButtons: function (p_aButtons) { + + var nButtons, + oButton, + aButtons, + i; + + if (Lang.isArray(p_aButtons)) { + + nButtons = p_aButtons.length; + aButtons = []; + + if (nButtons > 0) { + + for (i = 0; i < nButtons; i++) { + + oButton = this.addButton(p_aButtons[i]); + + if (oButton) { + + aButtons[aButtons.length] = oButton; + + } + + } + + if (aButtons.length > 0) { + + this.logger.log(aButtons.length + " buttons added."); + + return aButtons; + + } + + } + + } + + }, + + + /** + * @method removeButton + * @description Removes the button at the specified index from the + * button group. + * @param {Number} p_nIndex Number specifying the index of the button + * to be removed from the button group. + */ + removeButton: function (p_nIndex) { + + var oButton = this.getButton(p_nIndex), + nButtons, + i; + + if (oButton) { + + this.logger.log("Removing button " + oButton.get("id") + "."); + + this._buttons.splice(p_nIndex, 1); + delete m_oButtons[oButton.get("id")]; + + oButton.removeListener("checkedChange", + this._onButtonCheckedChange); + + oButton.destroy(); + + + nButtons = this._buttons.length; + + if (nButtons > 0) { + + i = this._buttons.length - 1; + + do { + + this._buttons[i].index = i; + + } + while (i--); + + } + + this.logger.log("Button " + oButton.get("id") + " removed."); + + } + + }, + + + /** + * @method getButton + * @description Returns the button at the specified index. + * @param {Number} p_nIndex The index of the button to retrieve from the + * button group. + * @return {YAHOO.widget.Button} + */ + getButton: function (p_nIndex) { + + if (Lang.isNumber(p_nIndex)) { + + return this._buttons[p_nIndex]; + + } + + }, + + + /** + * @method getButtons + * @description Returns an array of the buttons in the button group. + * @return {Array} + */ + getButtons: function () { + + return this._buttons; + + }, + + + /** + * @method getCount + * @description Returns the number of buttons in the button group. + * @return {Number} + */ + getCount: function () { + + return this._buttons.length; + + }, + + + /** + * @method focus + * @description Sets focus to the button at the specified index. + * @param {Number} p_nIndex Number indicating the index of the button + * to focus. + */ + focus: function (p_nIndex) { + + var oButton, + nButtons, + i; + + if (Lang.isNumber(p_nIndex)) { + + oButton = this._buttons[p_nIndex]; + + if (oButton) { + + oButton.focus(); + + } + + } + else { + + nButtons = this.getCount(); + + for (i = 0; i < nButtons; i++) { + + oButton = this._buttons[i]; + + if (!oButton.get("disabled")) { + + oButton.focus(); + break; + + } + + } + + } + + }, + + + /** + * @method check + * @description Checks the button at the specified index. + * @param {Number} p_nIndex Number indicating the index of the button + * to check. + */ + check: function (p_nIndex) { + + var oButton = this.getButton(p_nIndex); + + if (oButton) { + + oButton.set("checked", true); + + } + + }, + + + /** + * @method destroy + * @description Removes the button group's element from its parent + * element and removes all event handlers. + */ + destroy: function () { + + this.logger.log("Destroying..."); + + var nButtons = this._buttons.length, + oElement = this.get("element"), + oParentNode = oElement.parentNode, + i; + + if (nButtons > 0) { + + i = this._buttons.length - 1; + + do { + + this._buttons[i].destroy(); + + } + while (i--); + + } + + this.logger.log("Removing DOM event handlers."); + + Event.purgeElement(oElement); + + this.logger.log("Removing from document."); + + oParentNode.removeChild(oElement); + + }, + + + /** + * @method toString + * @description Returns a string representing the button group. + * @return {String} + */ + toString: function () { + + return ("ButtonGroup " + this.get("id")); + + } + + }); + +})(); +YAHOO.register("button", YAHOO.widget.Button, {version: "2.5.0", build: "895"}); diff --git a/lib/yui/button/button-min.js b/lib/yui/button/button-min.js new file mode 100644 index 0000000000..e1d1b6df8f --- /dev/null +++ b/lib/yui/button/button-min.js @@ -0,0 +1,11 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +(function(){var G=YAHOO.util.Dom,L=YAHOO.util.Event,I=YAHOO.lang,B=YAHOO.widget.Overlay,J=YAHOO.widget.Menu,D={},K=null,E=null,C=null;function F(N,M,Q,O){var R,P;if(I.isString(N)&&I.isString(M)){if(YAHOO.env.ua.ie){P="0){T.label=P;}}}function A(O){var N=O.attributes,M=N.srcelement,Q=M.nodeName.toUpperCase(),P=this;if(Q==this.NODE_NAME){O.element=M;O.id=M.id;G.getElementsBy(function(R){switch(R.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":H.call(P,R,N);break;}},"*",M);}else{switch(Q){case"BUTTON":case"A":case"INPUT":H.call(this,M,N);break;}}}YAHOO.widget.Button=function(Q,N){if(!B&&YAHOO.widget.Overlay){B=YAHOO.widget.Overlay;}if(!J&&YAHOO.widget.Menu){J=YAHOO.widget.Menu;}var P=YAHOO.widget.Button.superclass.constructor,O,M;if(arguments.length==1&&!I.isString(Q)&&!Q.nodeName){if(!Q.id){Q.id=G.generateId();}P.call(this,(this.createButtonElement(Q.type)),Q);}else{O={element:null,attributes:(N||{})};if(I.isString(Q)){M=G.get(Q);if(M){if(!O.attributes.id){O.attributes.id=Q;}O.attributes.srcelement=M;A.call(this,O);if(!O.element){O.element=this.createButtonElement(O.attributes.type);}P.call(this,O.element,O.attributes);}}else{if(Q.nodeName){if(!O.attributes.id){if(Q.id){O.attributes.id=Q.id;}else{O.attributes.id=G.generateId();}}O.attributes.srcelement=Q;A.call(this,O);if(!O.element){O.element=this.createButtonElement(O.attributes.type);}P.call(this,O.element,O.attributes);}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked. Click to check.",RADIO_CHECKED_TITLE:"Checked. Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked. Click to check.",CHECKBOX_CHECKED_TITLE:"Checked. Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed. Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded. Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed. Click inside option region or press Ctrl + Shift + M to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded. Press Esc or Ctrl + Shift + M to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(M){if(M=="split"){this.on("option",this._onOption);}},_setLabel:function(M){this._button.innerHTML=M;var O,N;if(YAHOO.env.ua.gecko&&G.inDocument(this.get("element"))){N=this;O=this.CSS_CLASS_NAME;this.removeClass(O);window.setTimeout(function(){N.addClass(O);},0);}},_setTabIndex:function(M){this._button.tabIndex=M;},_setTitle:function(N){var M=N;if(this.get("type")!="link"){if(!M){switch(this.get("type")){case"radio":M=this.RADIO_DEFAULT_TITLE;break;case"checkbox":M=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":M=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":M=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":M=this.SUBMIT_TITLE;break;}}this._button.title=M;}},_setDisabled:function(M){if(this.get("type")!="link"){if(M){if(this._menu){this._menu.hide();}if(this.hasFocus()){this.blur();}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus");}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled");}}},_setHref:function(M){if(this.get("type")=="link"){this._button.href=M;}},_setTarget:function(M){if(this.get("type")=="link"){this._button.setAttribute("target",M);}},_setChecked:function(N){var O=this.get("type"),M;if(O=="checkbox"||O=="radio"){if(N){this.addStateCSSClasses("checked");M=(O=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{this.removeStateCSSClasses("checked");M=(O=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",M);}},_setMenu:function(W){var Q=this.get("lazyloadmenu"),T=this.get("element"),M,Y=false,Z,P,S,O,N,V,R;if(!B){return false;}if(J){M=J.prototype.CSS_CLASS_NAME;}function X(){Z.render(T.parentNode);this.removeListener("appendTo",X);}function U(){if(Z){G.addClass(Z.element,this.get("menuclassname"));G.addClass(Z.element,"yui-"+this.get("type")+"-button-menu");Z.showEvent.subscribe(this._onMenuShow,null,this);Z.hideEvent.subscribe(this._onMenuHide,null,this);Z.renderEvent.subscribe(this._onMenuRender,null,this);if(J&&Z instanceof J){Z.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);Z.subscribe("click",this._onMenuClick,this,true);Z.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);S=Z.srcElement;if(S&&S.nodeName.toUpperCase()=="SELECT"){S.style.display="none";S.parentNode.removeChild(S);}}else{if(B&&Z instanceof B){if(!K){K=new YAHOO.widget.OverlayManager();}K.register(Z);}}this._menu=Z;if(!Y){if(Q&&J&&!(Z instanceof J)){Z.beforeShowEvent.subscribe(this._onOverlayBeforeShow,null,this);}else{if(!Q){if(G.inDocument(T)){Z.render(T.parentNode); +}else{this.on("appendTo",X);}}}}}}if(W&&J&&(W instanceof J)){Z=W;O=Z.getItems();N=O.length;Y=true;if(N>0){R=N-1;do{V=O[R];if(V){V.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,V,this);}}while(R--);}U.call(this);}else{if(B&&W&&(W instanceof B)){Z=W;Y=true;Z.cfg.setProperty("visible",false);Z.cfg.setProperty("context",[T,"tl","bl"]);U.call(this);}else{if(J&&I.isArray(W)){this.on("appendTo",function(){Z=new J(G.generateId(),{lazyload:Q,itemdata:W});U.call(this);});}else{if(I.isString(W)){P=G.get(W);if(P){if(J&&G.hasClass(P,M)||P.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{if(B){Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}}else{if(W&&W.nodeName){if(J&&G.hasClass(W,M)||W.nodeName.toUpperCase()=="SELECT"){Z=new J(W,{lazyload:Q});U.call(this);}else{if(B){if(!W.id){G.generateId(W);}Z=new B(W,{visible:false,context:[T,"tl","bl"]});U.call(this);}}}}}}}},_setOnClick:function(M){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=M)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(M)&&I.isFunction(M.fn)){this.on("click",M.fn,M.obj,M.scope);this._onclickAttributeValue=M;}},_setSelectedMenuItem:function(N){var M=this._menu,O;if(J&&M&&M instanceof J){O=M.getItem(N);if(O&&!O.cfg.getProperty("selected")){O.cfg.setProperty("selected",true);}}},_isActivationKey:function(M){var Q=this.get("type"),N=(Q=="checkbox"||Q=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,P=N.length,O;if(P>0){O=P-1;do{if(M==N[O]){return true;}}while(O--);}},_isSplitButtonOptionKey:function(M){return(M.ctrlKey&&M.shiftKey&&L.getCharCode(M)==77);},_addListenersToForm:function(){var S=this.getForm(),R=YAHOO.widget.Button.onFormKeyPress,Q,M,P,O,N;if(S){L.on(S,"reset",this._onFormReset,null,this);L.on(S,"submit",this.createHiddenFields,null,this);M=this.get("srcelement");if(this.get("type")=="submit"||(M&&M.type=="submit")){P=L.getListeners(S,"keypress");Q=false;if(P){O=P.length;if(O>0){N=O-1;do{if(P[N].fn==R){Q=true;break;}}while(N--);}}if(!Q){L.on(S,"keypress",R);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var P=B.VIEWPORT_OFFSET,Y=this._menu,W=this,Z=W.get("element"),T=false,V=G.getY(Z),U=G.getDocumentScrollTop(),M,Q,b;if(U){V=V-U;}var O=V,N=(G.getViewportHeight()-(V+Z.offsetHeight));function S(){if(T){return(O-P);}else{return(N-P);}}function a(){var c=S();if(Q>c){M=Y.cfg.getProperty("minscrollheight");if(c>M){Y.cfg.setProperty("maxheight",c);if(T){Y.align("bl","tl");}}if(c"+(M=="link"?"":"")+"";return N;},addStateCSSClasses:function(M){var N=this.get("type");if(I.isString(M)){if(M!="activeoption"){this.addClass(this.CSS_CLASS_NAME+("-"+M));}this.addClass("yui-"+N+("-button-"+M));}},removeStateCSSClasses:function(M){var N=this.get("type");if(I.isString(M)){this.removeClass(this.CSS_CLASS_NAME+("-"+M));this.removeClass("yui-"+N+("-button-"+M));}},createHiddenFields:function(){this.removeHiddenFields();var R=this.getForm(),U,N,P,S,T,O,Q,M;if(R&&!this.get("disabled")){N=this.get("type");P=(N=="checkbox"||N=="radio");if(P||(E==this)){U=F((P?N:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(U){if(P){U.style.display="none";}R.appendChild(U);}}S=this._menu;if(J&&S&&(S instanceof J)){M=S.srcElement;T=this.get("selectedMenuItem");if(T){if(M&&M.nodeName.toUpperCase()=="SELECT"){R.appendChild(M);M.selectedIndex=T.index;}else{Q=(T.value===null||T.value==="")?T.cfg.getProperty("text"):T.value;O=this.get("name");if(Q&&O){M=F("hidden",(O+"_options"),Q);R.appendChild(M);}}}}if(U&&M){this._hiddenFields=[U,M];}else{if(!U&&M){this._hiddenFields=M;}else{if(U&&!M){this._hiddenFields=U;}}}return this._hiddenFields;}},removeHiddenFields:function(){var P=this._hiddenFields,N,O;function M(Q){if(G.inDocument(Q)){Q.parentNode.removeChild(Q);}}if(P){if(I.isArray(P)){N=P.length;if(N>0){O=N-1;do{M(P[O]);}while(O--);}}else{M(P);}this._hiddenFields=null;}},submitForm:function(){var P=this.getForm(),O=this.get("srcelement"),N=false,M;if(P){if(this.get("type")=="submit"||(O&&O.type=="submit")){E=this;}if(YAHOO.env.ua.ie){N=P.fireEvent("onsubmit");}else{M=document.createEvent("HTMLEvents");M.initEvent("submit",true,true);N=P.dispatchEvent(M);}if((YAHOO.env.ua.ie||YAHOO.env.ua.webkit)&&N){P.submit();}}return N;},init:function(M,T){var O=T.type=="link"?"a":"button",Q=T.srcelement,S=M.getElementsByTagName(O)[0],R;if(!S){R=M.getElementsByTagName("input")[0];if(R){S=document.createElement("button");S.setAttribute("type","button");R.parentNode.replaceChild(S,R);}}this._button=S;YAHOO.widget.Button.superclass.init.call(this,M,T); +D[this.get("id")]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");L.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("click",this._onClick);this.on("appendTo",this._onAppendTo);var V=this.get("container"),N=this.get("element"),U=G.inDocument(N),P;if(V){if(Q&&Q!=N){P=Q.parentNode;if(P){P.removeChild(Q);}}if(I.isString(V)){L.onContentReady(V,function(){this.appendTo(V);},null,this);}else{this.appendTo(V);}}else{if(!U&&Q&&Q!=N){P=Q.parentNode;if(P){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:P});P.replaceChild(N,Q);this.fireEvent("appendTo",{type:"appendTo",target:P});}}else{if(this.get("type")!="link"&&U&&Q&&Q==N){this._addListenersToForm();}}}},initAttributes:function(N){var M=N||{};YAHOO.widget.Button.superclass.initAttributes.call(this,M);this.setAttributeConfig("type",{value:(M.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:M.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:M.value});this.setAttributeConfig("name",{value:M.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:M.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:M.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(M.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:M.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:M.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(M.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:M.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:M.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(M.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(M.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("selectedMenuItem",{value:null,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:M.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(M.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){return this._button.form;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var O=this.get("element"),N=O.parentNode,M=this._menu,Q;if(M){if(K&&K.find(M)){K.remove(M);}M.destroy();}L.purgeElement(O);L.purgeElement(this._button);L.removeListener(document,"mouseup",this._onDocumentMouseUp);L.removeListener(document,"keyup",this._onDocumentKeyUp);L.removeListener(document,"mousedown",this._onDocumentMouseDown);var P=this.getForm();if(P){L.removeListener(P,"reset",this._onFormReset);L.removeListener(P,"submit",this.createHiddenFields);}this.unsubscribeAll();if(N){N.removeChild(O);}delete D[this.get("id")];Q=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,P);if(I.isArray(Q)&&Q.length===0){L.removeListener(P,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(N,M){var O=arguments[0];if(this.DOM_EVENTS[O]&&this.get("disabled")){return ;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(Q){var O=L.getTarget(Q),R=L.getCharCode(Q),P=O.nodeName&&O.nodeName.toUpperCase(),M=O.type,S=false,U,V,N,W;function T(Z){var Y,X;switch(Z.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(Z.type=="submit"&&!Z.disabled){if(!S&&!N){N=Z;}if(V&&!W){W=Z;}}break;default:Y=Z.id;if(Y){U=D[Y];if(U){S=true;if(!U.get("disabled")){X=U.get("srcelement");if(!V&&(U.get("type")=="submit"||(X&&X.type=="submit"))){V=U;}}}}break;}}if(R==13&&((P=="INPUT"&&(M=="text"||M=="password"||M=="checkbox"||M=="radio"||M=="file"))||P=="SELECT")){G.getElementsBy(T,"*",this);if(N){N.focus();}else{if(!N&&V){if(W){L.preventDefault(Q);}V.submitForm();}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(M){var R=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",M),P=R.length,Q,N,O;if(P>0){for(O=0;O0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus(); +}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);return L;}},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F0){return J;}}}},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){if(D.isNumber(F)){return this._buttons[F];}},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.5.0",build:"895"}); \ No newline at end of file diff --git a/lib/yui/button/button.js b/lib/yui/button/button.js new file mode 100644 index 0000000000..ff3a1aa0b9 --- /dev/null +++ b/lib/yui/button/button.js @@ -0,0 +1,4670 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.5.0 +*/ +/** +* @module button +* @description

The Button Control enables the creation of rich, graphical +* buttons that function like traditional HTML form buttons. Unlike +* tradition HTML form buttons, buttons created with the Button Control can have +* a label that is different from its value. With the inclusion of the optional +* Menu Control, the Button Control can also be +* used to create menu buttons and split buttons, controls that are not +* available natively in HTML. The Button Control can also be thought of as a +* way to create more visually engaging implementations of the browser's +* default radio-button and check-box controls.

+*

The Button Control supports the following types:

+*
+*
push
+*
Basic push button that can execute a user-specified command when +* pressed.
+*
link
+*
Navigates to a specified url when pressed.
+*
submit
+*
Submits the parent form when pressed.
+*
reset
+*
Resets the parent form when pressed.
+*
checkbox
+*
Maintains a "checked" state that can be toggled on and off.
+*
radio
+*
Maintains a "checked" state that can be toggled on and off. Use with +* the ButtonGroup class to create a set of controls that are mutually +* exclusive; checking one button in the set will uncheck all others in +* the group.
+*
menu
+*
When pressed will show/hide a menu.
+*
split
+*
Can execute a user-specified command or display a menu when pressed.
+*
+* @title Button +* @namespace YAHOO.widget +* @requires yahoo, dom, element, event +* @optional container, menu +*/ + + +(function () { + + + /** + * The Button class creates a rich, graphical button. + * @param {String} p_oElement String specifying the id attribute of the + * <input>, <button>, + * <a>, or <span> element to + * be used to create the button. + * @param {HTMLInputElement| + * HTMLButtonElement|HTMLElement} p_oElement Object reference for the + * <input>, <button>, + * <a>, or <span> element to be + * used to create the button. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button. + * @param {Object} p_oAttributes Optional. Object literal specifying a set + * of configuration attributes used to create the button. + * @namespace YAHOO.widget + * @class Button + * @constructor + * @extends YAHOO.util.Element + */ + + + + // Shorthard for utilities + + var Dom = YAHOO.util.Dom, + Event = YAHOO.util.Event, + Lang = YAHOO.lang, + Overlay = YAHOO.widget.Overlay, + Menu = YAHOO.widget.Menu, + + + // Private member variables + + m_oButtons = {}, // Collection of all Button instances + m_oOverlayManager = null, // YAHOO.widget.OverlayManager instance + m_oSubmitTrigger = null, // The button that submitted the form + m_oFocusedButton = null; // The button that has focus + + + + // Private methods + + + + /** + * @method createInputElement + * @description Creates an <input> element of the + * specified type. + * @private + * @param {String} p_sType String specifying the type of + * <input> element to create. + * @param {String} p_sName String specifying the name of + * <input> element to create. + * @param {String} p_sValue String specifying the value of + * <input> element to create. + * @param {String} p_bChecked Boolean specifying if the + * <input> element is to be checked. + * @return {HTMLInputElement} + */ + function createInputElement(p_sType, p_sName, p_sValue, p_bChecked) { + + var oInput, + sInput; + + if (Lang.isString(p_sType) && Lang.isString(p_sName)) { + + if (YAHOO.env.ua.ie) { + + /* + For IE it is necessary to create the element with the + "type," "name," "value," and "checked" properties set all + at once. + */ + + sInput = "<input> or <a>) that + * map to Button configuration attributes and sets them into a collection + * that is passed to the Button constructor. + * @private + * @param {HTMLInputElement|HTMLAnchorElement} p_oElement Object reference to the HTML + * element (either <input> or <span> + * ) used to create the button. + * @param {Object} p_oAttributes Object reference for the collection of + * configuration attributes used to create the button. + */ + function setAttributesFromSrcElement(p_oElement, p_oAttributes) { + + var sSrcElementNodeName = p_oElement.nodeName.toUpperCase(), + me = this, + oAttribute, + oRootNode, + sText; + + + /** + * @method setAttributeFromDOMAttribute + * @description Gets the value of the specified DOM attribute and sets it + * into the collection of configuration attributes used to configure + * the button. + * @private + * @param {String} p_sAttribute String representing the name of the + * attribute to retrieve from the DOM element. + */ + function setAttributeFromDOMAttribute(p_sAttribute) { + + if (!(p_sAttribute in p_oAttributes)) { + + /* + Need to use "getAttributeNode" instead of "getAttribute" + because using "getAttribute," IE will return the innerText + of a <button> for the value attribute + rather than the value of the "value" attribute. + */ + + oAttribute = p_oElement.getAttributeNode(p_sAttribute); + + + if (oAttribute && ("value" in oAttribute)) { + + + p_oAttributes[p_sAttribute] = oAttribute.value; + + } + + } + + } + + + /** + * @method setFormElementProperties + * @description Gets the value of the attributes from the form element + * and sets them into the collection of configuration attributes used to + * configure the button. + * @private + */ + function setFormElementProperties() { + + setAttributeFromDOMAttribute("type"); + + if (p_oAttributes.type == "button") { + + p_oAttributes.type = "push"; + + } + + if (!("disabled" in p_oAttributes)) { + + p_oAttributes.disabled = p_oElement.disabled; + + } + + setAttributeFromDOMAttribute("name"); + setAttributeFromDOMAttribute("value"); + setAttributeFromDOMAttribute("title"); + + } + + + switch (sSrcElementNodeName) { + + case "A": + + p_oAttributes.type = "link"; + + setAttributeFromDOMAttribute("href"); + setAttributeFromDOMAttribute("target"); + + break; + + case "INPUT": + + setFormElementProperties(); + + if (!("checked" in p_oAttributes)) { + + p_oAttributes.checked = p_oElement.checked; + + } + + break; + + case "BUTTON": + + setFormElementProperties(); + + oRootNode = p_oElement.parentNode.parentNode; + + if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-checked")) { + + p_oAttributes.checked = true; + + } + + if (Dom.hasClass(oRootNode, this.CSS_CLASS_NAME + "-disabled")) { + + p_oAttributes.disabled = true; + + } + + p_oElement.removeAttribute("value"); + + p_oElement.setAttribute("type", "button"); + + break; + + } + + p_oElement.removeAttribute("id"); + p_oElement.removeAttribute("name"); + + if (!("tabindex" in p_oAttributes)) { + + p_oAttributes.tabindex = p_oElement.tabIndex; + + } + + if (!("label" in p_oAttributes)) { + + // Set the "label" property + + sText = sSrcElementNodeName == "INPUT" ? + p_oElement.value : p_oElement.innerHTML; + + + if (sText && sText.length > 0) { + + p_oAttributes.label = sText; + + } + + } + + } + + + /** + * @method initConfig + * @description Initializes the set of configuration attributes that are + * used to instantiate the button. + * @private + * @param {Object} Object representing the button's set of + * configuration attributes. + */ + function initConfig(p_oConfig) { + + var oAttributes = p_oConfig.attributes, + oSrcElement = oAttributes.srcelement, + sSrcElementNodeName = oSrcElement.nodeName.toUpperCase(), + me = this; + + + if (sSrcElementNodeName == this.NODE_NAME) { + + p_oConfig.element = oSrcElement; + p_oConfig.id = oSrcElement.id; + + Dom.getElementsBy(function (p_oElement) { + + switch (p_oElement.nodeName.toUpperCase()) { + + case "BUTTON": + case "A": + case "INPUT": + + setAttributesFromSrcElement.call(me, p_oElement, + oAttributes); + + break; + + } + + }, "*", oSrcElement); + + } + else { + + switch (sSrcElementNodeName) { + + case "BUTTON": + case "A": + case "INPUT": + + setAttributesFromSrcElement.call(this, oSrcElement, + oAttributes); + + break; + + } + + } + + } + + + + // Constructor + + YAHOO.widget.Button = function (p_oElement, p_oAttributes) { + + if (!Overlay && YAHOO.widget.Overlay) { + + Overlay = YAHOO.widget.Overlay; + + } + + + if (!Menu && YAHOO.widget.Menu) { + + Menu = YAHOO.widget.Menu; + + } + + + var fnSuperClass = YAHOO.widget.Button.superclass.constructor, + oConfig, + oElement; + + if (arguments.length == 1 && !Lang.isString(p_oElement) && + !p_oElement.nodeName) { + + if (!p_oElement.id) { + + p_oElement.id = Dom.generateId(); + + + } + + + + fnSuperClass.call(this, + (this.createButtonElement(p_oElement.type)), + p_oElement); + + } + else { + + oConfig = { element: null, attributes: (p_oAttributes || {}) }; + + + if (Lang.isString(p_oElement)) { + + oElement = Dom.get(p_oElement); + + if (oElement) { + + if (!oConfig.attributes.id) { + + oConfig.attributes.id = p_oElement; + + } + + + + + oConfig.attributes.srcelement = oElement; + + initConfig.call(this, oConfig); + + + if (!oConfig.element) { + + + oConfig.element = + this.createButtonElement(oConfig.attributes.type); + + } + + fnSuperClass.call(this, oConfig.element, + oConfig.attributes); + + } + + } + else if (p_oElement.nodeName) { + + if (!oConfig.attributes.id) { + + if (p_oElement.id) { + + oConfig.attributes.id = p_oElement.id; + + } + else { + + oConfig.attributes.id = Dom.generateId(); + + + } + + } + + + + + + oConfig.attributes.srcelement = p_oElement; + + initConfig.call(this, oConfig); + + + if (!oConfig.element) { + + + oConfig.element = + this.createButtonElement(oConfig.attributes.type); + + } + + fnSuperClass.call(this, oConfig.element, oConfig.attributes); + + } + + } + + }; + + + + YAHOO.extend(YAHOO.widget.Button, YAHOO.util.Element, { + + + // Protected properties + + + /** + * @property _button + * @description Object reference to the button's internal + * <a> or <button> element. + * @default null + * @protected + * @type HTMLAnchorElement|HTMLButtonElement + */ + _button: null, + + + /** + * @property _menu + * @description Object reference to the button's menu. + * @default null + * @protected + * @type {YAHOO.widget.Overlay| + * YAHOO.widget.Menu} + */ + _menu: null, + + + /** + * @property _hiddenFields + * @description Object reference to the <input> + * element, or array of HTML form elements used to represent the button + * when its parent form is submitted. + * @default null + * @protected + * @type HTMLInputElement|Array + */ + _hiddenFields: null, + + + /** + * @property _onclickAttributeValue + * @description Object reference to the button's current value for the + * "onclick" configuration attribute. + * @default null + * @protected + * @type Object + */ + _onclickAttributeValue: null, + + + /** + * @property _activationKeyPressed + * @description Boolean indicating if the key(s) that toggle the button's + * "active" state have been pressed. + * @default false + * @protected + * @type Boolean + */ + _activationKeyPressed: false, + + + /** + * @property _activationButtonPressed + * @description Boolean indicating if the mouse button that toggles + * the button's "active" state has been pressed. + * @default false + * @protected + * @type Boolean + */ + _activationButtonPressed: false, + + + /** + * @property _hasKeyEventHandlers + * @description Boolean indicating if the button's "blur", "keydown" and + * "keyup" event handlers are assigned + * @default false + * @protected + * @type Boolean + */ + _hasKeyEventHandlers: false, + + + /** + * @property _hasMouseEventHandlers + * @description Boolean indicating if the button's "mouseout," + * "mousedown," and "mouseup" event handlers are assigned + * @default false + * @protected + * @type Boolean + */ + _hasMouseEventHandlers: false, + + + + // Constants + + + /** + * @property NODE_NAME + * @description The name of the node to be used for the button's + * root element. + * @default "SPAN" + * @final + * @type String + */ + NODE_NAME: "SPAN", + + + /** + * @property CHECK_ACTIVATION_KEYS + * @description Array of numbers representing keys that (when pressed) + * toggle the button's "checked" attribute. + * @default [32] + * @final + * @type Array + */ + CHECK_ACTIVATION_KEYS: [32], + + + /** + * @property ACTIVATION_KEYS + * @description Array of numbers representing keys that (when presed) + * toggle the button's "active" state. + * @default [13, 32] + * @final + * @type Array + */ + ACTIVATION_KEYS: [13, 32], + + + /** + * @property OPTION_AREA_WIDTH + * @description Width (in pixels) of the area of a split button that + * when pressed will display a menu. + * @default 20 + * @final + * @type Number + */ + OPTION_AREA_WIDTH: 20, + + + /** + * @property CSS_CLASS_NAME + * @description String representing the CSS class(es) to be applied to + * the button's root element. + * @default "yui-button" + * @final + * @type String + */ + CSS_CLASS_NAME: "yui-button", + + + /** + * @property RADIO_DEFAULT_TITLE + * @description String representing the default title applied to buttons + * of type "radio." + * @default "Unchecked. Click to check." + * @final + * @type String + */ + RADIO_DEFAULT_TITLE: "Unchecked. Click to check.", + + + /** + * @property RADIO_CHECKED_TITLE + * @description String representing the title applied to buttons of + * type "radio" when checked. + * @default "Checked. Click another button to uncheck" + * @final + * @type String + */ + RADIO_CHECKED_TITLE: "Checked. Click another button to uncheck", + + + /** + * @property CHECKBOX_DEFAULT_TITLE + * @description String representing the default title applied to + * buttons of type "checkbox." + * @default "Unchecked. Click to check." + * @final + * @type String + */ + CHECKBOX_DEFAULT_TITLE: "Unchecked. Click to check.", + + + /** + * @property CHECKBOX_CHECKED_TITLE + * @description String representing the title applied to buttons of type + * "checkbox" when checked. + * @default "Checked. Click to uncheck." + * @final + * @type String + */ + CHECKBOX_CHECKED_TITLE: "Checked. Click to uncheck.", + + + /** + * @property MENUBUTTON_DEFAULT_TITLE + * @description String representing the default title applied to + * buttons of type "menu." + * @default "Menu collapsed. Click to expand." + * @final + * @type String + */ + MENUBUTTON_DEFAULT_TITLE: "Menu collapsed. Click to expand.", + + + /** + * @property MENUBUTTON_MENU_VISIBLE_TITLE + * @description String representing the title applied to buttons of type + * "menu" when the button's menu is visible. + * @default "Menu expanded. Click or press Esc to collapse." + * @final + * @type String + */ + MENUBUTTON_MENU_VISIBLE_TITLE: + "Menu expanded. Click or press Esc to collapse.", + + + /** + * @property SPLITBUTTON_DEFAULT_TITLE + * @description String representing the default title applied to + * buttons of type "split." + * @default "Menu collapsed. Click inside option region or press + * Ctrl + Shift + M to show the menu." + * @final + * @type String + */ + SPLITBUTTON_DEFAULT_TITLE: ("Menu collapsed. Click inside option " + + "region or press Ctrl + Shift + M to show the menu."), + + + /** + * @property SPLITBUTTON_OPTION_VISIBLE_TITLE + * @description String representing the title applied to buttons of type + * "split" when the button's menu is visible. + * @default "Menu expanded. Press Esc or Ctrl + Shift + M to hide + * the menu." + * @final + * @type String + */ + SPLITBUTTON_OPTION_VISIBLE_TITLE: + "Menu expanded. Press Esc or Ctrl + Shift + M to hide the menu.", + + + /** + * @property SUBMIT_TITLE + * @description String representing the title applied to buttons of + * type "submit." + * @default "Click to submit form." + * @final + * @type String + */ + SUBMIT_TITLE: "Click to submit form.", + + + + // Protected attribute setter methods + + + /** + * @method _setType + * @description Sets the value of the button's "type" attribute. + * @protected + * @param {String} p_sType String indicating the value for the button's + * "type" attribute. + */ + _setType: function (p_sType) { + + if (p_sType == "split") { + + this.on("option", this._onOption); + + } + + }, + + + /** + * @method _setLabel + * @description Sets the value of the button's "label" attribute. + * @protected + * @param {String} p_sLabel String indicating the value for the button's + * "label" attribute. + */ + _setLabel: function (p_sLabel) { + + this._button.innerHTML = p_sLabel; + + /* + Remove and add the default class name from the root element + for Gecko to ensure that the button shrinkwraps to the label. + Without this the button will not be rendered at the correct + width when the label changes. The most likely cause for this + bug is button's use of the Gecko-specific CSS display type of + "-moz-inline-box" to simulate "inline-block" supported by IE, + Safari and Opera. + */ + + var sClass, + me; + + if (YAHOO.env.ua.gecko && Dom.inDocument(this.get("element"))) { + + me = this; + sClass = this.CSS_CLASS_NAME; + + this.removeClass(sClass); + + window.setTimeout(function () { + + me.addClass(sClass); + + }, 0); + + } + + }, + + + /** + * @method _setTabIndex + * @description Sets the value of the button's "tabindex" attribute. + * @protected + * @param {Number} p_nTabIndex Number indicating the value for the + * button's "tabindex" attribute. + */ + _setTabIndex: function (p_nTabIndex) { + + this._button.tabIndex = p_nTabIndex; + + }, + + + /** + * @method _setTitle + * @description Sets the value of the button's "title" attribute. + * @protected + * @param {String} p_nTabIndex Number indicating the value for + * the button's "title" attribute. + */ + _setTitle: function (p_sTitle) { + + var sTitle = p_sTitle; + + if (this.get("type") != "link") { + + if (!sTitle) { + + switch (this.get("type")) { + + case "radio": + + sTitle = this.RADIO_DEFAULT_TITLE; + + break; + + case "checkbox": + + sTitle = this.CHECKBOX_DEFAULT_TITLE; + + break; + + case "menu": + + sTitle = this.MENUBUTTON_DEFAULT_TITLE; + + break; + + case "split": + + sTitle = this.SPLITBUTTON_DEFAULT_TITLE; + + break; + + case "submit": + + sTitle = this.SUBMIT_TITLE; + + break; + + } + + } + + this._button.title = sTitle; + + } + + }, + + + /** + * @method _setDisabled + * @description Sets the value of the button's "disabled" attribute. + * @protected + * @param {Boolean} p_bDisabled Boolean indicating the value for + * the button's "disabled" attribute. + */ + _setDisabled: function (p_bDisabled) { + + if (this.get("type") != "link") { + + if (p_bDisabled) { + + if (this._menu) { + + this._menu.hide(); + + } + + if (this.hasFocus()) { + + this.blur(); + + } + + this._button.setAttribute("disabled", "disabled"); + + this.addStateCSSClasses("disabled"); + + this.removeStateCSSClasses("hover"); + this.removeStateCSSClasses("active"); + this.removeStateCSSClasses("focus"); + + } + else { + + this._button.removeAttribute("disabled"); + + this.removeStateCSSClasses("disabled"); + + } + + } + + }, + + + /** + * @method _setHref + * @description Sets the value of the button's "href" attribute. + * @protected + * @param {String} p_sHref String indicating the value for the button's + * "href" attribute. + */ + _setHref: function (p_sHref) { + + if (this.get("type") == "link") { + + this._button.href = p_sHref; + + } + + }, + + + /** + * @method _setTarget + * @description Sets the value of the button's "target" attribute. + * @protected + * @param {String} p_sTarget String indicating the value for the button's + * "target" attribute. + */ + _setTarget: function (p_sTarget) { + + if (this.get("type") == "link") { + + this._button.setAttribute("target", p_sTarget); + + } + + }, + + + /** + * @method _setChecked + * @description Sets the value of the button's "target" attribute. + * @protected + * @param {Boolean} p_bChecked Boolean indicating the value for + * the button's "checked" attribute. + */ + _setChecked: function (p_bChecked) { + + var sType = this.get("type"), + sTitle; + + if (sType == "checkbox" || sType == "radio") { + + if (p_bChecked) { + + this.addStateCSSClasses("checked"); + + sTitle = (sType == "radio") ? + this.RADIO_CHECKED_TITLE : + this.CHECKBOX_CHECKED_TITLE; + + } + else { + + this.removeStateCSSClasses("checked"); + + sTitle = (sType == "radio") ? + this.RADIO_DEFAULT_TITLE : + this.CHECKBOX_DEFAULT_TITLE; + + } + + this.set("title", sTitle); + + } + + }, + + + /** + * @method _setMenu + * @description Sets the value of the button's "menu" attribute. + * @protected + * @param {Object} p_oMenu Object indicating the value for the button's + * "menu" attribute. + */ + _setMenu: function (p_oMenu) { + + var bLazyLoad = this.get("lazyloadmenu"), + oButtonElement = this.get("element"), + sMenuCSSClassName, + + /* + Boolean indicating if the value of p_oMenu is an instance + of YAHOO.widget.Menu or YAHOO.widget.Overlay. + */ + + bInstance = false, + + + oMenu, + oMenuElement, + oSrcElement, + aItems, + nItems, + oItem, + i; + + + if (!Overlay) { + + + return false; + + } + + + if (Menu) { + + sMenuCSSClassName = Menu.prototype.CSS_CLASS_NAME; + + } + + + function onAppendTo() { + + oMenu.render(oButtonElement.parentNode); + + this.removeListener("appendTo", onAppendTo); + + } + + + function initMenu() { + + if (oMenu) { + + Dom.addClass(oMenu.element, this.get("menuclassname")); + Dom.addClass(oMenu.element, + "yui-" + this.get("type") + "-button-menu"); + + oMenu.showEvent.subscribe(this._onMenuShow, null, this); + oMenu.hideEvent.subscribe(this._onMenuHide, null, this); + oMenu.renderEvent.subscribe(this._onMenuRender, null, this); + + + if (Menu && oMenu instanceof Menu) { + + oMenu.keyDownEvent.subscribe(this._onMenuKeyDown, + this, true); + + oMenu.subscribe("click", this._onMenuClick, + this, true); + + oMenu.itemAddedEvent.subscribe(this._onMenuItemAdded, + this, true); + + oSrcElement = oMenu.srcElement; + + if (oSrcElement && + oSrcElement.nodeName.toUpperCase() == "SELECT") { + + oSrcElement.style.display = "none"; + oSrcElement.parentNode.removeChild(oSrcElement); + + } + + } + else if (Overlay && oMenu instanceof Overlay) { + + if (!m_oOverlayManager) { + + m_oOverlayManager = + new YAHOO.widget.OverlayManager(); + + } + + m_oOverlayManager.register(oMenu); + + } + + + this._menu = oMenu; + + + if (!bInstance) { + + if (bLazyLoad && Menu && !(oMenu instanceof Menu)) { + + /* + Mimic Menu's "lazyload" functionality by adding + a "beforeshow" event listener that renders the + Overlay instance before it is made visible by + the button. + */ + + oMenu.beforeShowEvent.subscribe( + this._onOverlayBeforeShow, null, this); + + } + else if (!bLazyLoad) { + + if (Dom.inDocument(oButtonElement)) { + + oMenu.render(oButtonElement.parentNode); + + } + else { + + this.on("appendTo", onAppendTo); + + } + + } + + } + + } + + } + + + if (p_oMenu && Menu && (p_oMenu instanceof Menu)) { + + oMenu = p_oMenu; + aItems = oMenu.getItems(); + nItems = aItems.length; + bInstance = true; + + + if (nItems > 0) { + + i = nItems - 1; + + do { + + oItem = aItems[i]; + + if (oItem) { + + oItem.cfg.subscribeToConfigEvent("selected", + this._onMenuItemSelected, + oItem, + this); + + } + + } + while (i--); + + } + + initMenu.call(this); + + } + else if (Overlay && p_oMenu && (p_oMenu instanceof Overlay)) { + + oMenu = p_oMenu; + bInstance = true; + + oMenu.cfg.setProperty("visible", false); + oMenu.cfg.setProperty("context", [oButtonElement, "tl", "bl"]); + + initMenu.call(this); + + } + else if (Menu && Lang.isArray(p_oMenu)) { + + this.on("appendTo", function () { + + oMenu = new Menu(Dom.generateId(), { lazyload: bLazyLoad, + itemdata: p_oMenu }); + + initMenu.call(this); + + }); + + } + else if (Lang.isString(p_oMenu)) { + + oMenuElement = Dom.get(p_oMenu); + + if (oMenuElement) { + + if (Menu && Dom.hasClass(oMenuElement, sMenuCSSClassName) || + oMenuElement.nodeName.toUpperCase() == "SELECT") { + + oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad }); + + initMenu.call(this); + + } + else if (Overlay) { + + oMenu = new Overlay(p_oMenu, { visible: false, + context: [oButtonElement, "tl", "bl"] }); + + initMenu.call(this); + + } + + } + + } + else if (p_oMenu && p_oMenu.nodeName) { + + if (Menu && Dom.hasClass(p_oMenu, sMenuCSSClassName) || + p_oMenu.nodeName.toUpperCase() == "SELECT") { + + oMenu = new Menu(p_oMenu, { lazyload: bLazyLoad }); + + initMenu.call(this); + + } + else if (Overlay) { + + if (!p_oMenu.id) { + + Dom.generateId(p_oMenu); + + } + + oMenu = new Overlay(p_oMenu, { visible: false, + context: [oButtonElement, "tl", "bl"] }); + + initMenu.call(this); + + } + + } + + }, + + + /** + * @method _setOnClick + * @description Sets the value of the button's "onclick" attribute. + * @protected + * @param {Object} p_oObject Object indicating the value for the button's + * "onclick" attribute. + */ + _setOnClick: function (p_oObject) { + + /* + Remove any existing listeners if a "click" event handler + has already been specified. + */ + + if (this._onclickAttributeValue && + (this._onclickAttributeValue != p_oObject)) { + + this.removeListener("click", this._onclickAttributeValue.fn); + + this._onclickAttributeValue = null; + + } + + + if (!this._onclickAttributeValue && + Lang.isObject(p_oObject) && + Lang.isFunction(p_oObject.fn)) { + + this.on("click", p_oObject.fn, p_oObject.obj, p_oObject.scope); + + this._onclickAttributeValue = p_oObject; + + } + + }, + + + /** + * @method _setSelectedMenuItem + * @description Sets the value of the button's + * "selectedMenuItem" attribute. + * @protected + * @param {Number} p_nIndex Number representing the index of the item + * in the button's menu that is currently selected. + */ + _setSelectedMenuItem: function (p_nIndex) { + + var oMenu = this._menu, + oMenuItem; + + + if (Menu && oMenu && oMenu instanceof Menu) { + + oMenuItem = oMenu.getItem(p_nIndex); + + + if (oMenuItem && !oMenuItem.cfg.getProperty("selected")) { + + oMenuItem.cfg.setProperty("selected", true); + + } + + } + + }, + + + // Protected methods + + + + /** + * @method _isActivationKey + * @description Determines if the specified keycode is one that toggles + * the button's "active" state. + * @protected + * @param {Number} p_nKeyCode Number representing the keycode to + * be evaluated. + * @return {Boolean} + */ + _isActivationKey: function (p_nKeyCode) { + + var sType = this.get("type"), + aKeyCodes = (sType == "checkbox" || sType == "radio") ? + this.CHECK_ACTIVATION_KEYS : this.ACTIVATION_KEYS, + + nKeyCodes = aKeyCodes.length, + i; + + if (nKeyCodes > 0) { + + i = nKeyCodes - 1; + + do { + + if (p_nKeyCode == aKeyCodes[i]) { + + return true; + + } + + } + while (i--); + + } + + }, + + + /** + * @method _isSplitButtonOptionKey + * @description Determines if the specified keycode is one that toggles + * the display of the split button's menu. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + * @return {Boolean} + */ + _isSplitButtonOptionKey: function (p_oEvent) { + + return (p_oEvent.ctrlKey && p_oEvent.shiftKey && + Event.getCharCode(p_oEvent) == 77); + + }, + + + /** + * @method _addListenersToForm + * @description Adds event handlers to the button's form. + * @protected + */ + _addListenersToForm: function () { + + var oForm = this.getForm(), + onFormKeyPress = YAHOO.widget.Button.onFormKeyPress, + bHasKeyPressListener, + oSrcElement, + aListeners, + nListeners, + i; + + + if (oForm) { + + Event.on(oForm, "reset", this._onFormReset, null, this); + Event.on(oForm, "submit", this.createHiddenFields, null, this); + + oSrcElement = this.get("srcelement"); + + + if (this.get("type") == "submit" || + (oSrcElement && oSrcElement.type == "submit")) + { + + aListeners = Event.getListeners(oForm, "keypress"); + bHasKeyPressListener = false; + + if (aListeners) { + + nListeners = aListeners.length; + + if (nListeners > 0) { + + i = nListeners - 1; + + do { + + if (aListeners[i].fn == onFormKeyPress) { + + bHasKeyPressListener = true; + break; + + } + + } + while (i--); + + } + + } + + + if (!bHasKeyPressListener) { + + Event.on(oForm, "keypress", onFormKeyPress); + + } + + } + + } + + }, + + + + /** + * @method _showMenu + * @description Shows the button's menu. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event) that triggered + * the display of the menu. + */ + _showMenu: function (p_oEvent) { + + if (YAHOO.widget.MenuManager) { + + YAHOO.widget.MenuManager.hideVisible(); + + } + + + if (m_oOverlayManager) { + + m_oOverlayManager.hideAll(); + + } + + + var nViewportOffset = Overlay.VIEWPORT_OFFSET, + + oMenu = this._menu, + oButton = this, + oButtonEL = oButton.get("element"), + bMenuFlipped = false, + nButtonY = Dom.getY(oButtonEL), + nScrollTop = Dom.getDocumentScrollTop(), + nMenuMinScrollHeight, + nMenuHeight, + oMenuShadow; + + + if (nScrollTop) { + + nButtonY = nButtonY - nScrollTop; + + } + + + var nTopRegion = nButtonY, + nBottomRegion = (Dom.getViewportHeight() - + (nButtonY + oButtonEL.offsetHeight)); + + + /* + Uses the Button's position to calculate the availble height + above and below it to display its corresponding Menu. + */ + + function getMenuDisplayRegionHeight() { + + if (bMenuFlipped) { + + return (nTopRegion - nViewportOffset); + + } + else { + + return (nBottomRegion - nViewportOffset); + + } + + } + + + + /* + Sets the Menu's "maxheight" configuration property and trys to + place the Menu in the best possible position (either above or + below its corresponding Button). + */ + + function sizeAndPositionMenu() { + + var nDisplayRegionHeight = getMenuDisplayRegionHeight(); + + + if (nMenuHeight > nDisplayRegionHeight) { + + nMenuMinScrollHeight = oMenu.cfg.getProperty("minscrollheight"); + + + if (nDisplayRegionHeight > nMenuMinScrollHeight) { + + oMenu.cfg.setProperty("maxheight", + nDisplayRegionHeight); + + + if (bMenuFlipped) { + + oMenu.align("bl", "tl"); + + } + + } + + + if (nDisplayRegionHeight < nMenuMinScrollHeight) { + + if (bMenuFlipped) { + + /* + All possible positions and values for the + "maxheight" configuration property have been + tried, but none were successful, so fall back + to the original size and position. + */ + + oMenu.cfg.setProperty("context", + [oButtonEL, "tl", "bl"], true); + + oMenu.align("tl", "bl"); + + } + else { + + oMenu.cfg.setProperty("context", + [oButtonEL, "bl", "tl"], true); + + oMenu.align("bl", "tl"); + + bMenuFlipped = true; + + return sizeAndPositionMenu(); + + } + + } + + } + + } + + + if (Menu && oMenu && (oMenu instanceof Menu)) { + + oMenu.cfg.applyConfig({ context: [oButtonEL, "tl", "bl"], + clicktohide: false, + visible: true }); + + oMenu.cfg.fireQueue(); + + oMenu.cfg.setProperty("maxheight", 0); + + oMenu.align("tl", "bl"); + + + /* + Stop the propagation of the event so that the MenuManager + doesn't blur the menu after it gets focus. + */ + + if (p_oEvent.type == "mousedown") { + + Event.stopPropagation(p_oEvent); + + } + + + nMenuHeight = oMenu.element.offsetHeight; + + oMenuShadow = oMenu.element.lastChild; + + sizeAndPositionMenu(); + + if (this.get("focusmenu")) { + + this._menu.focus(); + + } + + } + else if (Overlay && oMenu && (oMenu instanceof Overlay)) { + + oMenu.show(); + oMenu.align("tl", "bl"); + + var nDisplayRegionHeight = getMenuDisplayRegionHeight(); + + nMenuHeight = oMenu.element.offsetHeight; + + + if (nDisplayRegionHeight < nMenuHeight) { + + oMenu.align("bl", "tl"); + + bMenuFlipped = true; + + nDisplayRegionHeight = getMenuDisplayRegionHeight(); + + if (nDisplayRegionHeight < nMenuHeight) { + + oMenu.align("tl", "bl"); + + } + + } + + } + + }, + + + /** + * @method _hideMenu + * @description Hides the button's menu. + * @protected + */ + _hideMenu: function () { + + var oMenu = this._menu; + + if (oMenu) { + + oMenu.hide(); + + } + + }, + + + + + // Protected event handlers + + + /** + * @method _onMouseOver + * @description "mouseover" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseOver: function (p_oEvent) { + + if (!this._hasMouseEventHandlers) { + + this.on("mouseout", this._onMouseOut); + this.on("mousedown", this._onMouseDown); + this.on("mouseup", this._onMouseUp); + + this._hasMouseEventHandlers = true; + + } + + this.addStateCSSClasses("hover"); + + if (this._activationButtonPressed) { + + this.addStateCSSClasses("active"); + + } + + + if (this._bOptionPressed) { + + this.addStateCSSClasses("activeoption"); + + } + + + if (this._activationButtonPressed || this._bOptionPressed) { + + Event.removeListener(document, "mouseup", this._onDocumentMouseUp); + + } + + }, + + + /** + * @method _onMouseOut + * @description "mouseout" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseOut: function (p_oEvent) { + + this.removeStateCSSClasses("hover"); + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + if (this._activationButtonPressed || this._bOptionPressed) { + + Event.on(document, "mouseup", this._onDocumentMouseUp, + null, this); + + } + + }, + + + /** + * @method _onDocumentMouseUp + * @description "mouseup" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onDocumentMouseUp: function (p_oEvent) { + + this._activationButtonPressed = false; + this._bOptionPressed = false; + + var sType = this.get("type"), + oTarget, + oMenuElement; + + if (sType == "menu" || sType == "split") { + + oTarget = Event.getTarget(p_oEvent); + oMenuElement = this._menu.element; + + if (oTarget != oMenuElement && + !Dom.isAncestor(oMenuElement, oTarget)) { + + this.removeStateCSSClasses((sType == "menu" ? + "active" : "activeoption")); + + this._hideMenu(); + + } + + } + + Event.removeListener(document, "mouseup", this._onDocumentMouseUp); + + }, + + + /** + * @method _onMouseDown + * @description "mousedown" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseDown: function (p_oEvent) { + + var sType, + oElement, + nX, + me; + + + function onMouseUp() { + + this._hideMenu(); + this.removeListener("mouseup", onMouseUp); + + } + + + if ((p_oEvent.which || p_oEvent.button) == 1) { + + + if (!this.hasFocus()) { + + this.focus(); + + } + + + sType = this.get("type"); + + + if (sType == "split") { + + oElement = this.get("element"); + nX = Event.getPageX(p_oEvent) - Dom.getX(oElement); + + if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) { + + this.fireEvent("option", p_oEvent); + + } + else { + + this.addStateCSSClasses("active"); + + this._activationButtonPressed = true; + + } + + } + else if (sType == "menu") { + + if (this.isActive()) { + + this._hideMenu(); + + this._activationButtonPressed = false; + + } + else { + + this._showMenu(p_oEvent); + + this._activationButtonPressed = true; + + } + + } + else { + + this.addStateCSSClasses("active"); + + this._activationButtonPressed = true; + + } + + + + if (sType == "split" || sType == "menu") { + + me = this; + + this._hideMenuTimerId = window.setTimeout(function () { + + me.on("mouseup", onMouseUp); + + }, 250); + + } + + } + + }, + + + /** + * @method _onMouseUp + * @description "mouseup" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onMouseUp: function (p_oEvent) { + + var sType = this.get("type"); + + + if (this._hideMenuTimerId) { + + window.clearTimeout(this._hideMenuTimerId); + + } + + + if (sType == "checkbox" || sType == "radio") { + + this.set("checked", !(this.get("checked"))); + + } + + + this._activationButtonPressed = false; + + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + }, + + + /** + * @method _onFocus + * @description "focus" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onFocus: function (p_oEvent) { + + var oElement; + + this.addStateCSSClasses("focus"); + + if (this._activationKeyPressed) { + + this.addStateCSSClasses("active"); + + } + + m_oFocusedButton = this; + + + if (!this._hasKeyEventHandlers) { + + oElement = this._button; + + Event.on(oElement, "blur", this._onBlur, null, this); + Event.on(oElement, "keydown", this._onKeyDown, null, this); + Event.on(oElement, "keyup", this._onKeyUp, null, this); + + this._hasKeyEventHandlers = true; + + } + + + this.fireEvent("focus", p_oEvent); + + }, + + + /** + * @method _onBlur + * @description "blur" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onBlur: function (p_oEvent) { + + this.removeStateCSSClasses("focus"); + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + if (this._activationKeyPressed) { + + Event.on(document, "keyup", this._onDocumentKeyUp, null, this); + + } + + + m_oFocusedButton = null; + + this.fireEvent("blur", p_oEvent); + + }, + + + /** + * @method _onDocumentKeyUp + * @description "keyup" event handler for the document. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onDocumentKeyUp: function (p_oEvent) { + + if (this._isActivationKey(Event.getCharCode(p_oEvent))) { + + this._activationKeyPressed = false; + + Event.removeListener(document, "keyup", this._onDocumentKeyUp); + + } + + }, + + + /** + * @method _onKeyDown + * @description "keydown" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onKeyDown: function (p_oEvent) { + + var oMenu = this._menu; + + + if (this.get("type") == "split" && + this._isSplitButtonOptionKey(p_oEvent)) { + + this.fireEvent("option", p_oEvent); + + } + else if (this._isActivationKey(Event.getCharCode(p_oEvent))) { + + if (this.get("type") == "menu") { + + this._showMenu(p_oEvent); + + } + else { + + this._activationKeyPressed = true; + + this.addStateCSSClasses("active"); + + } + + } + + + if (oMenu && oMenu.cfg.getProperty("visible") && + Event.getCharCode(p_oEvent) == 27) { + + oMenu.hide(); + this.focus(); + + } + + }, + + + /** + * @method _onKeyUp + * @description "keyup" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onKeyUp: function (p_oEvent) { + + var sType; + + if (this._isActivationKey(Event.getCharCode(p_oEvent))) { + + sType = this.get("type"); + + if (sType == "checkbox" || sType == "radio") { + + this.set("checked", !(this.get("checked"))); + + } + + this._activationKeyPressed = false; + + if (this.get("type") != "menu") { + + this.removeStateCSSClasses("active"); + + } + + } + + }, + + + /** + * @method _onClick + * @description "click" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onClick: function (p_oEvent) { + + var sType = this.get("type"), + sTitle, + oForm, + oSrcElement, + oElement, + nX; + + + switch (sType) { + + case "radio": + case "checkbox": + + if (this.get("checked")) { + + sTitle = (sType == "radio") ? + this.RADIO_CHECKED_TITLE : + this.CHECKBOX_CHECKED_TITLE; + + } + else { + + sTitle = (sType == "radio") ? + this.RADIO_DEFAULT_TITLE : + this.CHECKBOX_DEFAULT_TITLE; + + } + + this.set("title", sTitle); + + break; + + case "submit": + + this.submitForm(); + + break; + + case "reset": + + oForm = this.getForm(); + + if (oForm) { + + oForm.reset(); + + } + + break; + + case "menu": + + sTitle = this._menu.cfg.getProperty("visible") ? + this.MENUBUTTON_MENU_VISIBLE_TITLE : + this.MENUBUTTON_DEFAULT_TITLE; + + this.set("title", sTitle); + + break; + + case "split": + + oElement = this.get("element"); + nX = Event.getPageX(p_oEvent) - Dom.getX(oElement); + + if ((oElement.offsetWidth - this.OPTION_AREA_WIDTH) < nX) { + + return false; + + } + else { + + this._hideMenu(); + + oSrcElement = this.get("srcelement"); + + if (oSrcElement && oSrcElement.type == "submit") { + + this.submitForm(); + + } + + } + + sTitle = this._menu.cfg.getProperty("visible") ? + this.SPLITBUTTON_OPTION_VISIBLE_TITLE : + this.SPLITBUTTON_DEFAULT_TITLE; + + this.set("title", sTitle); + + break; + + } + + }, + + + /** + * @method _onAppendTo + * @description "appendTo" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onAppendTo: function (p_oEvent) { + + /* + It is necessary to call "_addListenersToForm" using + "setTimeout" to make sure that the button's "form" property + returns a node reference. Sometimes, if you try to get the + reference immediately after appending the field, it is null. + */ + + var me = this; + + window.setTimeout(function () { + + me._addListenersToForm(); + + }, 0); + + }, + + + /** + * @method _onFormReset + * @description "reset" event handler for the button's form. + * @protected + * @param {Event} p_oEvent Object representing the DOM event + * object passed back by the event utility (YAHOO.util.Event). + */ + _onFormReset: function (p_oEvent) { + + var sType = this.get("type"), + oMenu = this._menu; + + if (sType == "checkbox" || sType == "radio") { + + this.resetValue("checked"); + + } + + + if (Menu && oMenu && (oMenu instanceof Menu)) { + + this.resetValue("selectedMenuItem"); + + } + + }, + + + /** + * @method _onDocumentMouseDown + * @description "mousedown" event handler for the document. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onDocumentMouseDown: function (p_oEvent) { + + var oTarget = Event.getTarget(p_oEvent), + oButtonElement = this.get("element"), + oMenuElement = this._menu.element; + + + if (oTarget != oButtonElement && + !Dom.isAncestor(oButtonElement, oTarget) && + oTarget != oMenuElement && + !Dom.isAncestor(oMenuElement, oTarget)) { + + this._hideMenu(); + + Event.removeListener(document, "mousedown", + this._onDocumentMouseDown); + + } + + }, + + + /** + * @method _onOption + * @description "option" event handler for the button. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onOption: function (p_oEvent) { + + if (this.hasClass("yui-split-button-activeoption")) { + + this._hideMenu(); + + this._bOptionPressed = false; + + } + else { + + this._showMenu(p_oEvent); + + this._bOptionPressed = true; + + } + + }, + + + /** + * @method _onOverlayBeforeShow + * @description "beforeshow" event handler for the + * YAHOO.widget.Overlay instance + * serving as the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + */ + _onOverlayBeforeShow: function (p_sType) { + + var oMenu = this._menu; + + oMenu.render(this.get("element").parentNode); + + oMenu.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow); + + }, + + + /** + * @method _onMenuShow + * @description "show" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + */ + _onMenuShow: function (p_sType) { + + Event.on(document, "mousedown", this._onDocumentMouseDown, + null, this); + + var sTitle, + sState; + + if (this.get("type") == "split") { + + sTitle = this.SPLITBUTTON_OPTION_VISIBLE_TITLE; + sState = "activeoption"; + + } + else { + + sTitle = this.MENUBUTTON_MENU_VISIBLE_TITLE; + sState = "active"; + + } + + this.addStateCSSClasses(sState); + this.set("title", sTitle); + + }, + + + /** + * @method _onMenuHide + * @description "hide" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + */ + _onMenuHide: function (p_sType) { + + var oMenu = this._menu, + sTitle, + sState; + + + if (this.get("type") == "split") { + + sTitle = this.SPLITBUTTON_DEFAULT_TITLE; + sState = "activeoption"; + + } + else { + + sTitle = this.MENUBUTTON_DEFAULT_TITLE; + sState = "active"; + } + + + this.removeStateCSSClasses(sState); + this.set("title", sTitle); + + + if (this.get("type") == "split") { + + this._bOptionPressed = false; + + } + + }, + + + /** + * @method _onMenuKeyDown + * @description "keydown" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + */ + _onMenuKeyDown: function (p_sType, p_aArgs) { + + var oEvent = p_aArgs[0]; + + if (Event.getCharCode(oEvent) == 27) { + + this.focus(); + + if (this.get("type") == "split") { + + this._bOptionPressed = false; + + } + + } + + }, + + + /** + * @method _onMenuRender + * @description "render" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the + * event thatwas fired. + */ + _onMenuRender: function (p_sType) { + + var oButtonElement = this.get("element"), + oButtonParent = oButtonElement.parentNode, + oMenuElement = this._menu.element; + + + if (oButtonParent != oMenuElement.parentNode) { + + oButtonParent.appendChild(oMenuElement); + + } + + this.set("selectedMenuItem", this.get("selectedMenuItem")); + + }, + + + /** + * @method _onMenuItemSelected + * @description "selectedchange" event handler for each item in the + * button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + * @param {MenuItem} p_oItem Object representing the menu item that + * subscribed to the event. + */ + _onMenuItemSelected: function (p_sType, p_aArgs, p_oItem) { + + var bSelected = p_aArgs[0]; + + if (bSelected) { + + this.set("selectedMenuItem", p_oItem); + + } + + }, + + + /** + * @method _onMenuItemAdded + * @description "itemadded" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + * @param { + * YAHOO.widget.MenuItem} p_oItem Object representing the menu + * item that subscribed to the event. + */ + _onMenuItemAdded: function (p_sType, p_aArgs, p_oItem) { + + var oItem = p_aArgs[0]; + + oItem.cfg.subscribeToConfigEvent("selected", + this._onMenuItemSelected, oItem, this); + + }, + + + /** + * @method _onMenuClick + * @description "click" event handler for the button's menu. + * @private + * @param {String} p_sType String representing the name of the event + * that was fired. + * @param {Array} p_aArgs Array of arguments sent when the event + * was fired. + */ + _onMenuClick: function (p_sType, p_aArgs) { + + var oItem = p_aArgs[1], + oSrcElement; + + if (oItem) { + + oSrcElement = this.get("srcelement"); + + if (oSrcElement && oSrcElement.type == "submit") { + + this.submitForm(); + + } + + this._hideMenu(); + + } + + }, + + + + // Public methods + + + /** + * @method createButtonElement + * @description Creates the button's HTML elements. + * @param {String} p_sType String indicating the type of element + * to create. + * @return {HTMLElement} + */ + createButtonElement: function (p_sType) { + + var sNodeName = this.NODE_NAME, + oElement = document.createElement(sNodeName); + + oElement.innerHTML = "<" + sNodeName + " class=\"first-child\">" + + (p_sType == "link" ? "" : + "") + ""; + + return oElement; + + }, + + + /** + * @method addStateCSSClasses + * @description Appends state-specific CSS classes to the button's root + * DOM element. + */ + addStateCSSClasses: function (p_sState) { + + var sType = this.get("type"); + + if (Lang.isString(p_sState)) { + + if (p_sState != "activeoption") { + + this.addClass(this.CSS_CLASS_NAME + ("-" + p_sState)); + + } + + this.addClass("yui-" + sType + ("-button-" + p_sState)); + + } + + }, + + + /** + * @method removeStateCSSClasses + * @description Removes state-specific CSS classes to the button's root + * DOM element. + */ + removeStateCSSClasses: function (p_sState) { + + var sType = this.get("type"); + + if (Lang.isString(p_sState)) { + + this.removeClass(this.CSS_CLASS_NAME + ("-" + p_sState)); + this.removeClass("yui-" + sType + ("-button-" + p_sState)); + + } + + }, + + + /** + * @method createHiddenFields + * @description Creates the button's hidden form field and appends it + * to its parent form. + * @return {HTMLInputElement|Array} + */ + createHiddenFields: function () { + + this.removeHiddenFields(); + + var oForm = this.getForm(), + oButtonField, + sType, + bCheckable, + oMenu, + oMenuItem, + sName, + oValue, + oMenuField; + + + if (oForm && !this.get("disabled")) { + + sType = this.get("type"); + bCheckable = (sType == "checkbox" || sType == "radio"); + + + if (bCheckable || (m_oSubmitTrigger == this)) { + + + oButtonField = createInputElement( + (bCheckable ? sType : "hidden"), + this.get("name"), + this.get("value"), + this.get("checked")); + + + if (oButtonField) { + + if (bCheckable) { + + oButtonField.style.display = "none"; + + } + + oForm.appendChild(oButtonField); + + } + + } + + + oMenu = this._menu; + + + if (Menu && oMenu && (oMenu instanceof Menu)) { + + + oMenuField = oMenu.srcElement; + oMenuItem = this.get("selectedMenuItem"); + + if (oMenuItem) { + + if (oMenuField && + oMenuField.nodeName.toUpperCase() == "SELECT") { + + oForm.appendChild(oMenuField); + oMenuField.selectedIndex = oMenuItem.index; + + } + else { + + oValue = (oMenuItem.value === null || + oMenuItem.value === "") ? + oMenuItem.cfg.getProperty("text") : + oMenuItem.value; + + sName = this.get("name"); + + if (oValue && sName) { + + oMenuField = createInputElement("hidden", + (sName + "_options"), + oValue); + + oForm.appendChild(oMenuField); + + } + + } + + } + + } + + + if (oButtonField && oMenuField) { + + this._hiddenFields = [oButtonField, oMenuField]; + + } + else if (!oButtonField && oMenuField) { + + this._hiddenFields = oMenuField; + + } + else if (oButtonField && !oMenuField) { + + this._hiddenFields = oButtonField; + + } + + + return this._hiddenFields; + + } + + }, + + + /** + * @method removeHiddenFields + * @description Removes the button's hidden form field(s) from its + * parent form. + */ + removeHiddenFields: function () { + + var oField = this._hiddenFields, + nFields, + i; + + function removeChild(p_oElement) { + + if (Dom.inDocument(p_oElement)) { + + p_oElement.parentNode.removeChild(p_oElement); + + } + + } + + + if (oField) { + + if (Lang.isArray(oField)) { + + nFields = oField.length; + + if (nFields > 0) { + + i = nFields - 1; + + do { + + removeChild(oField[i]); + + } + while (i--); + + } + + } + else { + + removeChild(oField); + + } + + this._hiddenFields = null; + + } + + }, + + + /** + * @method submitForm + * @description Submits the form to which the button belongs. Returns + * true if the form was submitted successfully, false if the submission + * was cancelled. + * @protected + * @return {Boolean} + */ + submitForm: function () { + + var oForm = this.getForm(), + + oSrcElement = this.get("srcelement"), + + /* + Boolean indicating if the event fired successfully + (was not cancelled by any handlers) + */ + + bSubmitForm = false, + + oEvent; + + + if (oForm) { + + if (this.get("type") == "submit" || + (oSrcElement && oSrcElement.type == "submit")) + { + + m_oSubmitTrigger = this; + + } + + + if (YAHOO.env.ua.ie) { + + bSubmitForm = oForm.fireEvent("onsubmit"); + + } + else { // Gecko, Opera, and Safari + + oEvent = document.createEvent("HTMLEvents"); + oEvent.initEvent("submit", true, true); + + bSubmitForm = oForm.dispatchEvent(oEvent); + + } + + + /* + In IE and Safari, dispatching a "submit" event to a form + WILL cause the form's "submit" event to fire, but WILL NOT + submit the form. Therefore, we need to call the "submit" + method as well. + */ + + if ((YAHOO.env.ua.ie || YAHOO.env.ua.webkit) && bSubmitForm) { + + oForm.submit(); + + } + + } + + return bSubmitForm; + + }, + + + /** + * @method init + * @description The Button class's initialization method. + * @param {String} p_oElement String specifying the id attribute of the + * <input>, <button>, + * <a>, or <span> element to + * be used to create the button. + * @param {HTMLInputElement|HTMLButtonElement| + * HTMLElement} p_oElement Object reference for the + * <input>, <button>, + * <a>, or <span> element to be + * used to create the button. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button. + * @param {Object} p_oAttributes Optional. Object literal specifying a + * set of configuration attributes used to create the button. + */ + init: function (p_oElement, p_oAttributes) { + + var sNodeName = p_oAttributes.type == "link" ? "a" : "button", + oSrcElement = p_oAttributes.srcelement, + oButton = p_oElement.getElementsByTagName(sNodeName)[0], + oInput; + + + if (!oButton) { + + oInput = p_oElement.getElementsByTagName("input")[0]; + + + if (oInput) { + + oButton = document.createElement("button"); + oButton.setAttribute("type", "button"); + + oInput.parentNode.replaceChild(oButton, oInput); + + } + + } + + this._button = oButton; + + + YAHOO.widget.Button.superclass.init.call(this, p_oElement, + p_oAttributes); + + + m_oButtons[this.get("id")] = this; + + + this.addClass(this.CSS_CLASS_NAME); + + this.addClass("yui-" + this.get("type") + "-button"); + + Event.on(this._button, "focus", this._onFocus, null, this); + this.on("mouseover", this._onMouseOver); + this.on("click", this._onClick); + this.on("appendTo", this._onAppendTo); + + + var oContainer = this.get("container"), + oElement = this.get("element"), + bElInDoc = Dom.inDocument(oElement), + oParentNode; + + + if (oContainer) { + + if (oSrcElement && oSrcElement != oElement) { + + oParentNode = oSrcElement.parentNode; + + if (oParentNode) { + + oParentNode.removeChild(oSrcElement); + + } + + } + + if (Lang.isString(oContainer)) { + + Event.onContentReady(oContainer, function () { + + this.appendTo(oContainer); + + }, null, this); + + } + else { + + this.appendTo(oContainer); + + } + + } + else if (!bElInDoc && oSrcElement && oSrcElement != oElement) { + + oParentNode = oSrcElement.parentNode; + + if (oParentNode) { + + this.fireEvent("beforeAppendTo", { + type: "beforeAppendTo", + target: oParentNode + }); + + oParentNode.replaceChild(oElement, oSrcElement); + + this.fireEvent("appendTo", { + type: "appendTo", + target: oParentNode + }); + + } + + } + else if (this.get("type") != "link" && bElInDoc && oSrcElement && + oSrcElement == oElement) { + + this._addListenersToForm(); + + } + + + }, + + + /** + * @method initAttributes + * @description Initializes all of the configuration attributes used to + * create the button. + * @param {Object} p_oAttributes Object literal specifying a set of + * configuration attributes used to create the button. + */ + initAttributes: function (p_oAttributes) { + + var oAttributes = p_oAttributes || {}; + + YAHOO.widget.Button.superclass.initAttributes.call(this, + oAttributes); + + + /** + * @attribute type + * @description String specifying the button's type. Possible + * values are: "push," "link," "submit," "reset," "checkbox," + * "radio," "menu," and "split." + * @default "push" + * @type String + */ + this.setAttributeConfig("type", { + + value: (oAttributes.type || "push"), + validator: Lang.isString, + writeOnce: true, + method: this._setType + + }); + + + /** + * @attribute label + * @description String specifying the button's text label + * or innerHTML. + * @default null + * @type String + */ + this.setAttributeConfig("label", { + + value: oAttributes.label, + validator: Lang.isString, + method: this._setLabel + + }); + + + /** + * @attribute value + * @description Object specifying the value for the button. + * @default null + * @type Object + */ + this.setAttributeConfig("value", { + + value: oAttributes.value + + }); + + + /** + * @attribute name + * @description String specifying the name for the button. + * @default null + * @type String + */ + this.setAttributeConfig("name", { + + value: oAttributes.name, + validator: Lang.isString + + }); + + + /** + * @attribute tabindex + * @description Number specifying the tabindex for the button. + * @default null + * @type Number + */ + this.setAttributeConfig("tabindex", { + + value: oAttributes.tabindex, + validator: Lang.isNumber, + method: this._setTabIndex + + }); + + + /** + * @attribute title + * @description String specifying the title for the button. + * @default null + * @type String + */ + this.configureAttribute("title", { + + value: oAttributes.title, + validator: Lang.isString, + method: this._setTitle + + }); + + + /** + * @attribute disabled + * @description Boolean indicating if the button should be disabled. + * (Disabled buttons are dimmed and will not respond to user input + * or fire events. Does not apply to button's of type "link.") + * @default false + * @type Boolean + */ + this.setAttributeConfig("disabled", { + + value: (oAttributes.disabled || false), + validator: Lang.isBoolean, + method: this._setDisabled + + }); + + + /** + * @attribute href + * @description String specifying the href for the button. Applies + * only to buttons of type "link." + * @type String + */ + this.setAttributeConfig("href", { + + value: oAttributes.href, + validator: Lang.isString, + method: this._setHref + + }); + + + /** + * @attribute target + * @description String specifying the target for the button. + * Applies only to buttons of type "link." + * @type String + */ + this.setAttributeConfig("target", { + + value: oAttributes.target, + validator: Lang.isString, + method: this._setTarget + + }); + + + /** + * @attribute checked + * @description Boolean indicating if the button is checked. + * Applies only to buttons of type "radio" and "checkbox." + * @default false + * @type Boolean + */ + this.setAttributeConfig("checked", { + + value: (oAttributes.checked || false), + validator: Lang.isBoolean, + method: this._setChecked + + }); + + + /** + * @attribute container + * @description HTML element reference or string specifying the id + * attribute of the HTML element that the button's markup should be + * rendered into. + * @type HTMLElement|String + * @default null + */ + this.setAttributeConfig("container", { + + value: oAttributes.container, + writeOnce: true + + }); + + + /** + * @attribute srcelement + * @description Object reference to the HTML element (either + * <input> or <span>) + * used to create the button. + * @type HTMLElement|String + * @default null + */ + this.setAttributeConfig("srcelement", { + + value: oAttributes.srcelement, + writeOnce: true + + }); + + + /** + * @attribute menu + * @description Object specifying the menu for the button. + * The value can be one of the following: + *
    + *
  • Object specifying a + * YAHOO.widget.Menu instance.
  • + *
  • Object specifying a + * YAHOO.widget.Overlay instance.
  • + *
  • String specifying the id attribute of the <div> + * element used to create the menu. By default the menu + * will be created as an instance of + * YAHOO.widget.Overlay. + * If the + * default CSS class name for YAHOO.widget.Menu is applied to + * the <div> element, it will be created as an + * instance of YAHOO.widget.Menu + * .
  • String specifying the id attribute of the + * <select> element used to create the menu. + *
  • Object specifying the <div> element + * used to create the menu.
  • + *
  • Object specifying the <select> element + * used to create the menu.
  • + *
  • Array of object literals, each representing a set of + * YAHOO.widget.MenuItem + * configuration attributes.
  • + *
  • Array of strings representing the text labels for each menu + * item in the menu.
  • + *
+ * @type YAHOO.widget.Menu|YAHOO.widget.Overlay|HTMLElement|String|Array + * @default null + */ + this.setAttributeConfig("menu", { + + value: null, + method: this._setMenu, + writeOnce: true + + }); + + + /** + * @attribute lazyloadmenu + * @description Boolean indicating the value to set for the + * "lazyload" + * configuration property of the button's menu. Setting + * "lazyloadmenu" to true will defer rendering of + * the button's menu until the first time it is made visible. + * If "lazyloadmenu" is set to false, the button's + * menu will be rendered immediately if the button is in the + * document, or in response to the button's "appendTo" event if + * the button is not yet in the document. In either case, the + * menu is rendered into the button's parent HTML element. + * This attribute does not apply if a + * YAHOO.widget.Menu or + * YAHOO.widget.Overlay + * instance is passed as the value of the button's "menu" + * configuration attribute. + * YAHOO.widget.Menu or + * YAHOO.widget.Overlay instances should be rendered before + * being set as the value for the "menu" configuration + * attribute. + * @default true + * @type Boolean + */ + this.setAttributeConfig("lazyloadmenu", { + + value: (oAttributes.lazyloadmenu === false ? false : true), + validator: Lang.isBoolean, + writeOnce: true + + }); + + + /** + * @attribute menuclassname + * @description String representing the CSS class name to be + * applied to the root element of the button's menu. + * @type String + * @default "yui-button-menu" + */ + this.setAttributeConfig("menuclassname", { + + value: (oAttributes.menuclassname || "yui-button-menu"), + validator: Lang.isString, + method: this._setMenuClassName, + writeOnce: true + + }); + + + /** + * @attribute selectedMenuItem + * @description Object representing the item in the button's menu + * that is currently selected. + * @type Number + * @default null + */ + this.setAttributeConfig("selectedMenuItem", { + + value: null, + method: this._setSelectedMenuItem + + }); + + + /** + * @attribute onclick + * @description Object literal representing the code to be executed + * when the button is clicked. Format:
{
+ * fn: Function, // The handler to call + * when the event fires.
obj: Object, + * // An object to pass back to the handler.
+ * scope: Object // The object to use + * for the scope of the handler.
}
+ * @type Object + * @default null + */ + this.setAttributeConfig("onclick", { + + value: oAttributes.onclick, + method: this._setOnClick + + }); + + + /** + * @attribute focusmenu + * @description Boolean indicating whether or not the button's menu + * should be focused when it is made visible. + * @type Boolean + * @default true + */ + this.setAttributeConfig("focusmenu", { + + value: (oAttributes.focusmenu === false ? false : true), + validator: Lang.isBoolean + + }); + + }, + + + /** + * @method focus + * @description Causes the button to receive the focus and fires the + * button's "focus" event. + */ + focus: function () { + + if (!this.get("disabled")) { + + this._button.focus(); + + } + + }, + + + /** + * @method blur + * @description Causes the button to lose focus and fires the button's + * "blur" event. + */ + blur: function () { + + if (!this.get("disabled")) { + + this._button.blur(); + + } + + }, + + + /** + * @method hasFocus + * @description Returns a boolean indicating whether or not the button + * has focus. + * @return {Boolean} + */ + hasFocus: function () { + + return (m_oFocusedButton == this); + + }, + + + /** + * @method isActive + * @description Returns a boolean indicating whether or not the button + * is active. + * @return {Boolean} + */ + isActive: function () { + + return this.hasClass(this.CSS_CLASS_NAME + "-active"); + + }, + + + /** + * @method getMenu + * @description Returns a reference to the button's menu. + * @return { + * YAHOO.widget.Overlay|YAHOO.widget.Menu} + */ + getMenu: function () { + + return this._menu; + + }, + + + /** + * @method getForm + * @description Returns a reference to the button's parent form. + * @return {HTMLFormElement} + */ + getForm: function () { + + return this._button.form; + + }, + + + /** + * @method getHiddenFields + * @description Returns an <input> element or + * array of form elements used to represent the button when its parent + * form is submitted. + * @return {HTMLInputElement|Array} + */ + getHiddenFields: function () { + + return this._hiddenFields; + + }, + + + /** + * @method destroy + * @description Removes the button's element from its parent element and + * removes all event handlers. + */ + destroy: function () { + + + var oElement = this.get("element"), + oParentNode = oElement.parentNode, + oMenu = this._menu, + aButtons; + + if (oMenu) { + + + if (m_oOverlayManager && m_oOverlayManager.find(oMenu)) { + + m_oOverlayManager.remove(oMenu); + + } + + oMenu.destroy(); + + } + + + Event.purgeElement(oElement); + Event.purgeElement(this._button); + Event.removeListener(document, "mouseup", this._onDocumentMouseUp); + Event.removeListener(document, "keyup", this._onDocumentKeyUp); + Event.removeListener(document, "mousedown", + this._onDocumentMouseDown); + + + var oForm = this.getForm(); + + if (oForm) { + + Event.removeListener(oForm, "reset", this._onFormReset); + Event.removeListener(oForm, "submit", this.createHiddenFields); + + } + + + this.unsubscribeAll(); + + if (oParentNode) { + + oParentNode.removeChild(oElement); + + } + + + delete m_oButtons[this.get("id")]; + + aButtons = Dom.getElementsByClassName(this.CSS_CLASS_NAME, + this.NODE_NAME, oForm); + + if (Lang.isArray(aButtons) && aButtons.length === 0) { + + Event.removeListener(oForm, "keypress", + YAHOO.widget.Button.onFormKeyPress); + + } + + + }, + + + fireEvent: function (p_sType , p_aArgs) { + + var sType = arguments[0]; + + // Disabled buttons should not respond to DOM events + + if (this.DOM_EVENTS[sType] && this.get("disabled")) { + + return; + + } + + return YAHOO.widget.Button.superclass.fireEvent.apply(this, arguments); + + }, + + + /** + * @method toString + * @description Returns a string representing the button. + * @return {String} + */ + toString: function () { + + return ("Button " + this.get("id")); + + } + + }); + + + /** + * @method YAHOO.widget.Button.onFormKeyPress + * @description "keypress" event handler for the button's form. + * @param {Event} p_oEvent Object representing the DOM event object passed + * back by the event utility (YAHOO.util.Event). + */ + YAHOO.widget.Button.onFormKeyPress = function (p_oEvent) { + + var oTarget = Event.getTarget(p_oEvent), + nCharCode = Event.getCharCode(p_oEvent), + sNodeName = oTarget.nodeName && oTarget.nodeName.toUpperCase(), + sType = oTarget.type, + + /* + Boolean indicating if the form contains any enabled or + disabled YUI submit buttons + */ + + bFormContainsYUIButtons = false, + + oButton, + + oYUISubmitButton, // The form's first, enabled YUI submit button + + /* + The form's first, enabled HTML submit button that precedes any + YUI submit button + */ + + oPrecedingSubmitButton, + + + /* + The form's first, enabled HTML submit button that follows a + YUI button + */ + + oFollowingSubmitButton; + + + function isSubmitButton(p_oElement) { + + var sId, + oSrcElement; + + switch (p_oElement.nodeName.toUpperCase()) { + + case "INPUT": + case "BUTTON": + + if (p_oElement.type == "submit" && !p_oElement.disabled) { + + if (!bFormContainsYUIButtons && + !oPrecedingSubmitButton) { + + oPrecedingSubmitButton = p_oElement; + + } + + if (oYUISubmitButton && !oFollowingSubmitButton) { + + oFollowingSubmitButton = p_oElement; + + } + + } + + break; + + + default: + + sId = p_oElement.id; + + if (sId) { + + oButton = m_oButtons[sId]; + + if (oButton) { + + bFormContainsYUIButtons = true; + + if (!oButton.get("disabled")) { + + oSrcElement = oButton.get("srcelement"); + + if (!oYUISubmitButton && + (oButton.get("type") == "submit" || + (oSrcElement && oSrcElement.type == "submit"))) + { + + oYUISubmitButton = oButton; + + } + + } + + } + + } + + break; + + } + + } + + + if (nCharCode == 13 && ((sNodeName == "INPUT" && (sType == "text" || + sType == "password" || sType == "checkbox" || sType == "radio" || + sType == "file")) || sNodeName == "SELECT")) + { + + Dom.getElementsBy(isSubmitButton, "*", this); + + + if (oPrecedingSubmitButton) { + + /* + Need to set focus to the first enabled submit button + to make sure that IE includes its name and value + in the form's data set. + */ + + oPrecedingSubmitButton.focus(); + + } + else if (!oPrecedingSubmitButton && oYUISubmitButton) { + + if (oFollowingSubmitButton) { + + /* + Need to call "preventDefault" to ensure that + the name and value of the regular submit button + following the YUI button doesn't get added to the + form's data set when it is submitted. + */ + + Event.preventDefault(p_oEvent); + + } + + oYUISubmitButton.submitForm(); + + } + + } + + }; + + + /** + * @method YAHOO.widget.Button.addHiddenFieldsToForm + * @description Searches the specified form and adds hidden fields for + * instances of YAHOO.widget.Button that are of type "radio," "checkbox," + * "menu," and "split." + * @param {HTMLFormElement} p_oForm Object reference + * for the form to search. + */ + YAHOO.widget.Button.addHiddenFieldsToForm = function (p_oForm) { + + var aButtons = Dom.getElementsByClassName( + YAHOO.widget.Button.prototype.CSS_CLASS_NAME, + "*", + p_oForm), + + nButtons = aButtons.length, + oButton, + sId, + i; + + if (nButtons > 0) { + + + for (i = 0; i < nButtons; i++) { + + sId = aButtons[i].id; + + if (sId) { + + oButton = m_oButtons[sId]; + + if (oButton) { + + oButton.createHiddenFields(); + + } + + } + + } + + } + + }; + + + /** + * @method YAHOO.widget.Button.getButton + * @description Returns a button with the specified id. + * @param {String} p_sId String specifying the id of the root node of the + * HTML element representing the button to be retrieved. + * @return {YAHOO.widget.Button} + */ + YAHOO.widget.Button.getButton = function (p_sId) { + + var oButton = m_oButtons[p_sId]; + + if (oButton) { + + return oButton; + + } + + }; + + + // Events + + + /** + * @event focus + * @description Fires when the menu item receives focus. Passes back a + * single object representing the original DOM event object passed back by + * the event utility (YAHOO.util.Event) when the event was fired. See + * Element.addListener + * for more information on listening for this event. + * @type YAHOO.util.CustomEvent + */ + + + /** + * @event blur + * @description Fires when the menu item loses the input focus. Passes back + * a single object representing the original DOM event object passed back by + * the event utility (YAHOO.util.Event) when the event was fired. See + * Element.addListener for + * more information on listening for this event. + * @type YAHOO.util.CustomEvent + */ + + + /** + * @event option + * @description Fires when the user invokes the button's option. Passes + * back a single object representing the original DOM event (either + * "mousedown" or "keydown") that caused the "option" event to fire. See + * Element.addListener + * for more information on listening for this event. + * @type YAHOO.util.CustomEvent + */ + +})(); +(function () { + + // Shorthard for utilities + + var Dom = YAHOO.util.Dom, + Event = YAHOO.util.Event, + Lang = YAHOO.lang, + Button = YAHOO.widget.Button, + + // Private collection of radio buttons + + m_oButtons = {}; + + + + /** + * The ButtonGroup class creates a set of buttons that are mutually + * exclusive; checking one button in the set will uncheck all others in the + * button group. + * @param {String} p_oElement String specifying the id attribute of the + * <div> element of the button group. + * @param {HTMLDivElement} p_oElement Object + * specifying the <div> element of the button group. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button group. + * @param {Object} p_oAttributes Optional. Object literal specifying a set + * of configuration attributes used to create the button group. + * @namespace YAHOO.widget + * @class ButtonGroup + * @constructor + * @extends YAHOO.util.Element + */ + YAHOO.widget.ButtonGroup = function (p_oElement, p_oAttributes) { + + var fnSuperClass = YAHOO.widget.ButtonGroup.superclass.constructor, + sNodeName, + oElement, + sId; + + if (arguments.length == 1 && !Lang.isString(p_oElement) && + !p_oElement.nodeName) { + + if (!p_oElement.id) { + + sId = Dom.generateId(); + + p_oElement.id = sId; + + + } + + + + fnSuperClass.call(this, (this._createGroupElement()), p_oElement); + + } + else if (Lang.isString(p_oElement)) { + + oElement = Dom.get(p_oElement); + + if (oElement) { + + if (oElement.nodeName.toUpperCase() == this.NODE_NAME) { + + + fnSuperClass.call(this, oElement, p_oAttributes); + + } + + } + + } + else { + + sNodeName = p_oElement.nodeName.toUpperCase(); + + if (sNodeName && sNodeName == this.NODE_NAME) { + + if (!p_oElement.id) { + + p_oElement.id = Dom.generateId(); + + + } + + + fnSuperClass.call(this, p_oElement, p_oAttributes); + + } + + } + + }; + + + YAHOO.extend(YAHOO.widget.ButtonGroup, YAHOO.util.Element, { + + + // Protected properties + + + /** + * @property _buttons + * @description Array of buttons in the button group. + * @default null + * @protected + * @type Array + */ + _buttons: null, + + + + // Constants + + + /** + * @property NODE_NAME + * @description The name of the tag to be used for the button + * group's element. + * @default "DIV" + * @final + * @type String + */ + NODE_NAME: "DIV", + + + /** + * @property CSS_CLASS_NAME + * @description String representing the CSS class(es) to be applied + * to the button group's element. + * @default "yui-buttongroup" + * @final + * @type String + */ + CSS_CLASS_NAME: "yui-buttongroup", + + + + // Protected methods + + + /** + * @method _createGroupElement + * @description Creates the button group's element. + * @protected + * @return {HTMLDivElement} + */ + _createGroupElement: function () { + + var oElement = document.createElement(this.NODE_NAME); + + return oElement; + + }, + + + + // Protected attribute setter methods + + + /** + * @method _setDisabled + * @description Sets the value of the button groups's + * "disabled" attribute. + * @protected + * @param {Boolean} p_bDisabled Boolean indicating the value for + * the button group's "disabled" attribute. + */ + _setDisabled: function (p_bDisabled) { + + var nButtons = this.getCount(), + i; + + if (nButtons > 0) { + + i = nButtons - 1; + + do { + + this._buttons[i].set("disabled", p_bDisabled); + + } + while (i--); + + } + + }, + + + + // Protected event handlers + + + /** + * @method _onKeyDown + * @description "keydown" event handler for the button group. + * @protected + * @param {Event} p_oEvent Object representing the DOM event object + * passed back by the event utility (YAHOO.util.Event). + */ + _onKeyDown: function (p_oEvent) { + + var oTarget = Event.getTarget(p_oEvent), + nCharCode = Event.getCharCode(p_oEvent), + sId = oTarget.parentNode.parentNode.id, + oButton = m_oButtons[sId], + nIndex = -1; + + + if (nCharCode == 37 || nCharCode == 38) { + + nIndex = (oButton.index === 0) ? + (this._buttons.length - 1) : (oButton.index - 1); + + } + else if (nCharCode == 39 || nCharCode == 40) { + + nIndex = (oButton.index === (this._buttons.length - 1)) ? + 0 : (oButton.index + 1); + + } + + + if (nIndex > -1) { + + this.check(nIndex); + this.getButton(nIndex).focus(); + + } + + }, + + + /** + * @method _onAppendTo + * @description "appendTo" event handler for the button group. + * @protected + * @param {Event} p_oEvent Object representing the event that was fired. + */ + _onAppendTo: function (p_oEvent) { + + var aButtons = this._buttons, + nButtons = aButtons.length, + i; + + for (i = 0; i < nButtons; i++) { + + aButtons[i].appendTo(this.get("element")); + + } + + }, + + + /** + * @method _onButtonCheckedChange + * @description "checkedChange" event handler for each button in the + * button group. + * @protected + * @param {Event} p_oEvent Object representing the event that was fired. + * @param {YAHOO.widget.Button} + * p_oButton Object representing the button that fired the event. + */ + _onButtonCheckedChange: function (p_oEvent, p_oButton) { + + var bChecked = p_oEvent.newValue, + oCheckedButton = this.get("checkedButton"); + + if (bChecked && oCheckedButton != p_oButton) { + + if (oCheckedButton) { + + oCheckedButton.set("checked", false, true); + + } + + this.set("checkedButton", p_oButton); + this.set("value", p_oButton.get("value")); + + } + else if (oCheckedButton && !oCheckedButton.set("checked")) { + + oCheckedButton.set("checked", true, true); + + } + + }, + + + + // Public methods + + + /** + * @method init + * @description The ButtonGroup class's initialization method. + * @param {String} p_oElement String specifying the id attribute of the + * <div> element of the button group. + * @param {HTMLDivElement} p_oElement Object + * specifying the <div> element of the button group. + * @param {Object} p_oElement Object literal specifying a set of + * configuration attributes used to create the button group. + * @param {Object} p_oAttributes Optional. Object literal specifying a + * set of configuration attributes used to create the button group. + */ + init: function (p_oElement, p_oAttributes) { + + this._buttons = []; + + YAHOO.widget.ButtonGroup.superclass.init.call(this, p_oElement, + p_oAttributes); + + this.addClass(this.CSS_CLASS_NAME); + + + var aButtons = this.getElementsByClassName("yui-radio-button"); + + + if (aButtons.length > 0) { + + + this.addButtons(aButtons); + + } + + + + function isRadioButton(p_oElement) { + + return (p_oElement.type == "radio"); + + } + + aButtons = + Dom.getElementsBy(isRadioButton, "input", this.get("element")); + + + if (aButtons.length > 0) { + + + this.addButtons(aButtons); + + } + + this.on("keydown", this._onKeyDown); + this.on("appendTo", this._onAppendTo); + + + var oContainer = this.get("container"); + + if (oContainer) { + + if (Lang.isString(oContainer)) { + + Event.onContentReady(oContainer, function () { + + this.appendTo(oContainer); + + }, null, this); + + } + else { + + this.appendTo(oContainer); + + } + + } + + + + }, + + + /** + * @method initAttributes + * @description Initializes all of the configuration attributes used to + * create the button group. + * @param {Object} p_oAttributes Object literal specifying a set of + * configuration attributes used to create the button group. + */ + initAttributes: function (p_oAttributes) { + + var oAttributes = p_oAttributes || {}; + + YAHOO.widget.ButtonGroup.superclass.initAttributes.call( + this, oAttributes); + + + /** + * @attribute name + * @description String specifying the name for the button group. + * This name will be applied to each button in the button group. + * @default null + * @type String + */ + this.setAttributeConfig("name", { + + value: oAttributes.name, + validator: Lang.isString + + }); + + + /** + * @attribute disabled + * @description Boolean indicating if the button group should be + * disabled. Disabling the button group will disable each button + * in the button group. Disabled buttons are dimmed and will not + * respond to user input or fire events. + * @default false + * @type Boolean + */ + this.setAttributeConfig("disabled", { + + value: (oAttributes.disabled || false), + validator: Lang.isBoolean, + method: this._setDisabled + + }); + + + /** + * @attribute value + * @description Object specifying the value for the button group. + * @default null + * @type Object + */ + this.setAttributeConfig("value", { + + value: oAttributes.value + + }); + + + /** + * @attribute container + * @description HTML element reference or string specifying the id + * attribute of the HTML element that the button group's markup + * should be rendered into. + * @type HTMLElement|String + * @default null + */ + this.setAttributeConfig("container", { + + value: oAttributes.container, + writeOnce: true + + }); + + + /** + * @attribute checkedButton + * @description Reference for the button in the button group that + * is checked. + * @type {YAHOO.widget.Button} + * @default null + */ + this.setAttributeConfig("checkedButton", { + + value: null + + }); + + }, + + + /** + * @method addButton + * @description Adds the button to the button group. + * @param {YAHOO.widget.Button} + * p_oButton Object reference for the + * YAHOO.widget.Button instance to be added to the button group. + * @param {String} p_oButton String specifying the id attribute of the + * <input> or <span> element + * to be used to create the button to be added to the button group. + * @param {HTMLInputElement|HTMLElement} p_oButton Object reference for the + * <input> or <span> element + * to be used to create the button to be added to the button group. + * @param {Object} p_oButton Object literal specifying a set of + * YAHOO.widget.Button + * configuration attributes used to configure the button to be added to + * the button group. + * @return {YAHOO.widget.Button} + */ + addButton: function (p_oButton) { + + var oButton, + oButtonElement, + oGroupElement, + nIndex, + sButtonName, + sGroupName; + + + if (p_oButton instanceof Button && + p_oButton.get("type") == "radio") { + + oButton = p_oButton; + + } + else if (!Lang.isString(p_oButton) && !p_oButton.nodeName) { + + p_oButton.type = "radio"; + + oButton = new Button(p_oButton); + + } + else { + + oButton = new Button(p_oButton, { type: "radio" }); + + } + + + if (oButton) { + + nIndex = this._buttons.length; + sButtonName = oButton.get("name"); + sGroupName = this.get("name"); + + oButton.index = nIndex; + + this._buttons[nIndex] = oButton; + m_oButtons[oButton.get("id")] = oButton; + + + if (sButtonName != sGroupName) { + + oButton.set("name", sGroupName); + + } + + + if (this.get("disabled")) { + + oButton.set("disabled", true); + + } + + + if (oButton.get("checked")) { + + this.set("checkedButton", oButton); + + } + + + oButtonElement = oButton.get("element"); + oGroupElement = this.get("element"); + + if (oButtonElement.parentNode != oGroupElement) { + + oGroupElement.appendChild(oButtonElement); + + } + + + oButton.on("checkedChange", + this._onButtonCheckedChange, oButton, this); + + + return oButton; + + } + + }, + + + /** + * @method addButtons + * @description Adds the array of buttons to the button group. + * @param {Array} p_aButtons Array of + * YAHOO.widget.Button instances to be added + * to the button group. + * @param {Array} p_aButtons Array of strings specifying the id + * attribute of the <input> or <span> + * elements to be used to create the buttons to be added to the + * button group. + * @param {Array} p_aButtons Array of object references for the + * <input> or <span> elements + * to be used to create the buttons to be added to the button group. + * @param {Array} p_aButtons Array of object literals, each containing + * a set of YAHOO.widget.Button + * configuration attributes used to configure each button to be added + * to the button group. + * @return {Array} + */ + addButtons: function (p_aButtons) { + + var nButtons, + oButton, + aButtons, + i; + + if (Lang.isArray(p_aButtons)) { + + nButtons = p_aButtons.length; + aButtons = []; + + if (nButtons > 0) { + + for (i = 0; i < nButtons; i++) { + + oButton = this.addButton(p_aButtons[i]); + + if (oButton) { + + aButtons[aButtons.length] = oButton; + + } + + } + + if (aButtons.length > 0) { + + + return aButtons; + + } + + } + + } + + }, + + + /** + * @method removeButton + * @description Removes the button at the specified index from the + * button group. + * @param {Number} p_nIndex Number specifying the index of the button + * to be removed from the button group. + */ + removeButton: function (p_nIndex) { + + var oButton = this.getButton(p_nIndex), + nButtons, + i; + + if (oButton) { + + + this._buttons.splice(p_nIndex, 1); + delete m_oButtons[oButton.get("id")]; + + oButton.removeListener("checkedChange", + this._onButtonCheckedChange); + + oButton.destroy(); + + + nButtons = this._buttons.length; + + if (nButtons > 0) { + + i = this._buttons.length - 1; + + do { + + this._buttons[i].index = i; + + } + while (i--); + + } + + + } + + }, + + + /** + * @method getButton + * @description Returns the button at the specified index. + * @param {Number} p_nIndex The index of the button to retrieve from the + * button group. + * @return {YAHOO.widget.Button} + */ + getButton: function (p_nIndex) { + + if (Lang.isNumber(p_nIndex)) { + + return this._buttons[p_nIndex]; + + } + + }, + + + /** + * @method getButtons + * @description Returns an array of the buttons in the button group. + * @return {Array} + */ + getButtons: function () { + + return this._buttons; + + }, + + + /** + * @method getCount + * @description Returns the number of buttons in the button group. + * @return {Number} + */ + getCount: function () { + + return this._buttons.length; + + }, + + + /** + * @method focus + * @description Sets focus to the button at the specified index. + * @param {Number} p_nIndex Number indicating the index of the button + * to focus. + */ + focus: function (p_nIndex) { + + var oButton, + nButtons, + i; + + if (Lang.isNumber(p_nIndex)) { + + oButton = this._buttons[p_nIndex]; + + if (oButton) { + + oButton.focus(); + + } + + } + else { + + nButtons = this.getCount(); + + for (i = 0; i < nButtons; i++) { + + oButton = this._buttons[i]; + + if (!oButton.get("disabled")) { + + oButton.focus(); + break; + + } + + } + + } + + }, + + + /** + * @method check + * @description Checks the button at the specified index. + * @param {Number} p_nIndex Number indicating the index of the button + * to check. + */ + check: function (p_nIndex) { + + var oButton = this.getButton(p_nIndex); + + if (oButton) { + + oButton.set("checked", true); + + } + + }, + + + /** + * @method destroy + * @description Removes the button group's element from its parent + * element and removes all event handlers. + */ + destroy: function () { + + + var nButtons = this._buttons.length, + oElement = this.get("element"), + oParentNode = oElement.parentNode, + i; + + if (nButtons > 0) { + + i = this._buttons.length - 1; + + do { + + this._buttons[i].destroy(); + + } + while (i--); + + } + + + Event.purgeElement(oElement); + + + oParentNode.removeChild(oElement); + + }, + + + /** + * @method toString + * @description Returns a string representing the button group. + * @return {String} + */ + toString: function () { + + return ("ButtonGroup " + this.get("id")); + + } + + }); + +})(); +YAHOO.register("button", YAHOO.widget.Button, {version: "2.5.0", build: "895"}); diff --git a/lib/yui/calendar/README b/lib/yui/calendar/README index 3c04748c14..9de846581b 100755 --- a/lib/yui/calendar/README +++ b/lib/yui/calendar/README @@ -1,110 +1,357 @@ Calendar Release Notes -*** version 2.3.0 *** - - - Added checks to select, selectCell, deselect and deselectCell methods to ensure the Calendar/Calendar group was not set to an invalid state by programmatically selecting unselectable dates or cells. - - Added new locale configuration properties for the Month/Year label used in the Calendar header (MY_LABEL_MONTH_POSITION, MY_LABEL_YEAR_POSITION, MY_LABEL_YEAR_SUFFIX, MY_LABEL_MONTH_SUFFIX). Japan is an example locale, where customization of the Month/Year label is required. - - Changed "first", "last" class names to "first-of-type", "last-of-type", to avoid collision with YUI Grids' use of the "first" class name. - - Added public isDateOOB method, to check if a given date is outside of the minimum/maximum configuration dates of the Calendar. - - Deprecated YAHOO.widget.Calendar.browser, refactored to use YAHOO.env.ua instead. - - Removed overflow:hidden from default Calendar/CalendarGroup container for non-IE6 browsers to fix clipping issue with IE7 when CalendarGroup was inside a box with a specific width. overflow:hidden is still required for IE6 with an iframe shim. - - Added Opera container width calculation fix to CalendarGroup.show method, to fix incorrect wrapping when using a CalendarGroup which is initially rendered hidden (display:none). Previously this fix was only applied on render. - -*** version 2.2.2 *** - - - Fixed problem with selected dates being shared across instances, when more than one Calendar/CalendarGroup was on the page - -*** version 2.2.1 *** - - - Fixed problem with selectCell adding duplicate selected date entries for dates which were already selected - - Fixed problem with CalendarGroup iframe shim not covering the CalendarGroup title area - - Removed javascript:void(null) from close button and cell links which was interrupting form submission and firing onbeforeunload in IE - - Fixed problem with CalendarGroup getSelectedDates returning invalid results, when used in conjunction with the "selected" Config property (either passed in the constructor config argument or set seperately after construction) - - Refactored Calendar and CalendarGroup to improve performance, especially when working with a large number of instances in IE6 - -*** version 2.2.0 *** - - - Image customization can now be done through CSS. Images for Close, Left and Right Arrows are now pulled in using CSS defined in calendar.css and by default use relative paths to the images in the same directory as calendar.css. - - Deprecated Calendar.IMG_ROOT and NAV_ARROW_LEFT, NAV_ARROW_RIGHT configuration properties. Customizations based on older releases which set these properties will still function as expected. - - Deprecated CalendarGroup.CSS_2UPCLOSE. Calendar's Style.CSS_CLOSE property now represents the new default CSS class (calclose) for the close button. CSS_2UPCLOSE is still applied along with CSS_CLOSE to the new markup for the close button to support existing customizations of the CSS_2UPCLOSE CSS class (close-icon) - - Fixed problem with Safari setting Calendar pages to incorrect dates if the pages spanned a year boundary in CalendarGroups with 3 or more pages, due to a bug in Safari's implementation of Date setMonth - - Fixed problem with CalendarGroup setMonth rendering Calendar pages with incorrect dates in all browsers if current pages spanned year boundary - - Fixed incorrect CalendarGroup logging statement in calendar-debug.js - - Fixed domEventMap support for Safari versions prior to 2.0.2, caused by hasOwnProperty not being supported - - Removed unused private property : _pageDate from Calendar class - -*** version 0.12.2 *** - - - Corrected documentation for clearTime function to reflect the change from midnight to noon - -*** version 0.12.1 *** - - - Calendar and CalendarGroup now automatically parse the argument passed to setMonth and setYear into an integer, eliminating potential concatenation bugs. - -*** version 0.12 *** - - - New documentation format implemented - - Calendar2up and Calendar_Core are now deprecated. Now, Calendar alone represents the single Calendar instance, and CalendarGroup represents an n-up instance, defaulting to 2up - - Added semantic style classes to Calendar elements to allow for custom styling solely using CSS. - - Remapped all configuration properties to use the Config object (familiar to those who use the Container collection of controls). Property names are the same as their previous counterparts, but wrapped into Calendar.cfg, allowing for runtime reconfiguration of most properties - - Added "title" property for setting the Calendar title - - Added "close" property for enabling and disabling the close icon - - Added "iframe" property for enabling an iframe shim in Internet Explorer 6 and below to fix the select bleed-through bug - - pageDate moved to property: "pagedate" - - selectedDates moved to property: "selected" - - minDate moved to property : "mindate", which accepts a JavaScript Date object like its predecessor, but also supports string dates - - maxDate moved to property : "maxdate", which accepts a JavaScript Date object like its predecessor, but also supports string dates - - Moved style declarations to initStyles function - - Optimized event handling in doSelectCell/doCellMouseOver/doCellMouseOut by only attaching the listener to the outer Calendar container, and only reacting to events on cells with the "selectable" CSS class. - - Added domEventMap field for applying DOM event listeners to cells containing specific class and tag combinations. - - Moved all cell DOM event attachment to applyListeners function - - Added getDateByCellId / getDateFieldsByCellId helper functions - - Corrected DateMath.getWeekNumber to comply with ISO week number handling - - Separated renderCellDefault style portions into styleCellDefault function for easy extension - - Deprecated onBeforeSelect. Created beforeSelectEvent which automatically subscribes to its deprecated predecessor. - - Deprecated onSelect. Created selectEvent, which automatically subscribes to its deprecated predecessor. - - Deprecated onBeforeDeselect. Created beforeSelectEvent which automatically subscribes to its deprecated predecessor. - - Deprecated onDeselect. Created beforeDeselectEvent, which automatically subscribes to its deprecated predecessor. - - Deprecated onChangePage. Created changePageEvent, which automatically subscribes to its deprecated predecessor. - - Deprecated onRender. Created renderEvent, which automatically subscribes to its deprecated predecessor. - - Deprecated onReset. Created resetEvent, which automatically subscribes to its deprecated predecessor. - - Deprecated onClear. Created clearEvent, which automatically subscribes to its deprecated predecessor. - - Corrected setMonth documentation to refer to 0-11 indexed months. - - Added show and hide methods to Calendar for setting the Calendar's display property. - - Optimized internal render classes to use innerHTML and string buffers - - Removed wireCustomEvents function - - Removed wireDefaultEvents function - - Removed doNextMonth / doPreviousMonth - - Removed all buildShell (header, body, footer) functions, since the Calendar shell is now built dynamically on each render - - Wired all CalendarGroup events and configuration properties to be properly delegated to Calendar - - Augmented CalendarGroup with all built-in renderers, label functions, hide, show, and initStyles, creating API transparency between Calendar and CalendarGroup. - - Made all tagName, createElement, and entity references XHTML compliant - - Fixed Daylight Saving Time bug for Brazilian time zone - -*** version 0.11.3 *** - - - Calendar_Core: Added arguments for selected/deselected dates to onSelect/onDeselect - - CalendarGroup: Fixed bug where selected dates passed to constructor were not represented in selectedDates - - Calendar2up: Now displays correctly in Opera 9 - -*** version 0.11.0 *** - - - DateMath: DateMath.add now properly adds weeks - - DateMath: between() function added - - DateMath: getWeekNumber() fixed to take starting day of week into account - - All references to Calendar's built in CSS class handlers are removed, replaced with calls to Dom utility (addClass, removeClass) - - Several CSS class constants now have clearer names - - All CSS classes are now properly namespaced to avoid CSS conflicts - - Fixed table:hover bug in CSS - - Calendar no longer requires the container ID and variable name to match in order for month navigation to function properly - - Calendar month navigation arrows are now represented as background images - -*** version 0.10.0 *** - - - Major performance improvements from attaching DOM events to associated table cells only once, when the Calendar shell is built - - DOM events for mouseover/mouseout are now fired for all browsers (not just Internet Explorer) - - Reset functionality bug fixed for 2-up Calendar view - -*** version 0.9.0 *** - -* Initial release +*** version 2.5.0 *** + ++ Prevent default event handling in CalendarNavigator enter key + listener, to prevent automatic form submission when using Calendar + inside a form. + ++ Added workaround to DateMath.add and subtract for Safari 2 (webkit) + bug in Date.setDate(n) which doesn't handle value of n less than -128 + or greater than 127 correctly. + + See: http://brianary.blogspot.com/2006/03/safari-date-bug.html + ++ Added border, padding and margin rules to Calendar Sam Skin to + protect Sam Skin's look and feel when Calendar is used with + YUI base.css + +*** version 2.4.0 *** + ++ Added CalendarNavigator (year selector) feature to allow the user to + jump to a year/month directly without having to scroll through months + sequentially. + + The feature is enabled/configured using the "navigator" configuration + property. + ++ Added Custom Events: + + showNav/beforeShowNav + hideNav/beforeHideNav, + renderNav/beforeRenderNav + + To Calendar/CalendarGroup, in support of the CalendarNavigator + functionality. + ++ Added Custom Events: + + show/beforeShow + hide/beforeHide + + To Calendar and CalendarGroup. Returning false from a + beforeShow/beforeHide listener can be used to prevent the Calendar + from being shown/hidden respectively. + ++ Added Public Methods: + + getCellIndex(date) [ Calendar ] + getCalendarPage(date) [ CalendarGroup ] + toDate(dateArray) [ Calendar/CalendarGroup ] + removeRenderers() [ Calendar/CalendarGroup ] + ++ The Calendar/CalendarGroup constructor is now more flexible: + + * It no longer requires an "id" argument. + + In it's simplest form, a Calendar/CalendarGroup can be + constructed by simply providing a container id or reference. + + var cal = new YAHOO.widget.Calendar("container"); + -or- + var containerDiv = YAHOO.util.Dom.get("container"); + var cal = new YAHOO.widget.Calendar(containerDiv); + + An id for the Calendar does not need to be provided, and will be + generated from the container id by appending an "_t" suffix to the + container id if only the container is provided. + + * The container argument can be either a string, representing the + id of the container, or an HTMLElement referring to the container + element itself, as suggested in the example above. + + * If an HTMLElement is provided for the container argument and the + element does not have an id, one will be generated for it using + YAHOO.util.Dom.generateId(). + + * The older form of Calendar/CalendarGroup signature, expecting + both an id and containerId is still supported and works as it did + prior to 2.4.0. + ++ Fixed performance issue, where the same custom renderer was being + applied multiple times to the same cell. + ++ Added getDate(year, month, date) factory method to the DateMath utility, + which can be used to create JavaScript Date instances for years less + than 100. + + The default Date(year, month, date) constructor implementations across + browsers, assume that if year < 100, the caller is referring to the + nineteen hundreds, and the year is set to 19xx instead of xx (as with + the deprecated setYear method). However Date.setFullYear(xx) can + be used to set dates below 100. The above factory method provides a + construction mechanism consistent with setFullYear. + ++ Changed Calendar/CalendarGroup/DateMath code to use the DateMath.getDate + method, so that 2 digit years are not assumed to be in the 1900's. + + NOTE: Calendar's API already expects 4 digit date strings when referring + to years after 999. + +*** version 2.3.1 *** + ++ Changed Calendar/CalendarGroup to render an empty title bar element + when "close" is set to true, but "title" has not been set, to allow Sam + Skin to render a title bar correctly. + +*** version 2.3.0 *** + ++ Added checks to select, selectCell, deselect and deselectCell methods + to ensure the Calendar/Calendar group was not set to an invalid state + by programmatically selecting unselectable dates or cells. + ++ Added new locale configuration properties for the Month/Year label + used in the Calendar header (MY_LABEL_MONTH_POSITION, + MY_LABEL_YEAR_POSITION, MY_LABEL_YEAR_SUFFIX, MY_LABEL_MONTH_SUFFIX). + Japan is an example locale, where customization of the Month/Year + label is required. + ++ Changed "first", "last" class names to "first-of-type", "last-of-type", + to avoid collision with YUI Grids' use of the "first" class name. + ++ Added public isDateOOB method, to check if a given date is outside of + the minimum/maximum configuration dates of the Calendar. + ++ Deprecated YAHOO.widget.Calendar.browser, refactored to use + YAHOO.env.ua instead. + ++ Removed overflow:hidden from default Calendar/CalendarGroup container + for non-IE6 browsers to fix clipping issue with IE7 when CalendarGroup + was inside a box with a specific width. overflow:hidden is still + required for IE6 with an iframe shim. + ++ Added Opera container width calculation fix to CalendarGroup.show + method, to fix incorrect wrapping when using a CalendarGroup which is + initially rendered hidden (display:none). Previously this fix was + only applied on render. + +*** version 2.2.2 *** + ++ Fixed problem with selected dates being shared across instances, when + more than one Calendar/CalendarGroup was on the page + +*** version 2.2.1 *** + ++ Fixed problem with selectCell adding duplicate selected date entries + for dates which were already selected + ++ Fixed problem with CalendarGroup iframe shim not covering the + CalendarGroup title area + ++ Removed javascript:void(null) from close button and cell links which + was interrupting form submission and firing onbeforeunload in IE + ++ Fixed problem with CalendarGroup getSelectedDates returning invalid + results, when used in conjunction with the "selected" Config property + (either passed in the constructor config argument or set seperately + after construction) + ++ Refactored Calendar and CalendarGroup to improve performance, + especially when working with a large number of instances in + IE6 + +*** version 2.2.0 *** + ++ Image customization can now be done through CSS. Images for Close, + Left and Right Arrows are now pulled in using CSS defined in + calendar.css and by default use relative paths to the images in + the same directory as calendar.css. + ++ Deprecated Calendar.IMG_ROOT and NAV_ARROW_LEFT, NAV_ARROW_RIGHT + configuration properties. Customizations based on older releases + which set these properties will still function as expected. + ++ Deprecated CalendarGroup.CSS_2UPCLOSE. Calendar's Style.CSS_CLOSE + property now represents the new default CSS class (calclose) for + the close button. CSS_2UPCLOSE is still applied along with + CSS_CLOSE to the new markup for the close button to support existing + customizations of the CSS_2UPCLOSE CSS class (close-icon) + ++ Fixed problem with Safari setting Calendar pages to incorrect dates + if the pages spanned a year boundary in CalendarGroups with 3 or more + pages, due to a bug in Safari's implementation of Date setMonth + ++ Fixed problem with CalendarGroup setMonth rendering Calendar pages + with incorrect dates in all browsers if current pages spanned year + boundary + ++ Fixed incorrect CalendarGroup logging statement in calendar-debug.js + ++ Fixed domEventMap support for Safari versions prior to 2.0.2, + caused by hasOwnProperty not being supported + ++ Removed unused private property : _pageDate from Calendar class + +*** version 0.12.2 *** + ++ Corrected documentation for clearTime function to reflect the + change from midnight to noon + +*** version 0.12.1 *** + ++ Calendar and CalendarGroup now automatically parse the argument + passed to setMonth and setYear into an integer, eliminating + potential concatenation bugs. + +*** version 0.12 *** + ++ New documentation format implemented + ++ Calendar2up and Calendar_Core are now deprecated. Now, Calendar alone + represents the single Calendar instance, and CalendarGroup represents + an n-up instance, defaulting to 2up + ++ Added semantic style classes to Calendar elements to allow for + custom styling solely using CSS. + ++ Remapped all configuration properties to use the Config object + (familiar to those who use the Container collection of controls). + Property names are the same as their previous counterparts, but + wrapped into Calendar.cfg, allowing for runtime reconfiguration of + most properties + ++ Added "title" property for setting the Calendar title + ++ Added "close" property for enabling and disabling the close icon + ++ Added "iframe" property for enabling an iframe shim in Internet + Explorer 6 and below to fix the select bleed-through bug + ++ pageDate moved to property: "pagedate" + ++ selectedDates moved to property: "selected" + ++ minDate moved to property : "mindate", which accepts a JavaScript + Date object like its predecessor, but also supports string dates + ++ maxDate moved to property : "maxdate", which accepts a JavaScript + Date object like its predecessor, but also supports string dates + ++ Moved style declarations to initStyles function + ++ Optimized event handling in doSelectCell/doCellMouseOver/ + doCellMouseOut by only attaching the listener to the outer + Calendar container, and only reacting to events on cells with + the "selectable" CSS class. + ++ Added domEventMap field for applying DOM event listeners to cells + containing specific class and tag combinations. + ++ Moved all cell DOM event attachment to applyListeners function + ++ Added getDateByCellId / getDateFieldsByCellId helper functions + ++ Corrected DateMath.getWeekNumber to comply with ISO week number + handling + ++ Separated renderCellDefault style portions into styleCellDefault + function for easy extension + ++ Deprecated onBeforeSelect. Created beforeSelectEvent which + automatically subscribes to its deprecated predecessor. + ++ Deprecated onSelect. Created selectEvent, which automatically + subscribes to its deprecated predecessor. + ++ Deprecated onBeforeDeselect. Created beforeSelectEvent which + automatically subscribes to its deprecated predecessor. + ++ Deprecated onDeselect. Created beforeDeselectEvent, which + automatically subscribes to its deprecated predecessor. + ++ Deprecated onChangePage. Created changePageEvent, which automatically + subscribes to its deprecated predecessor. + ++ Deprecated onRender. Created renderEvent, which automatically + subscribes to its deprecated predecessor. + ++ Deprecated onReset. Created resetEvent, which automatically + subscribes to its deprecated predecessor. + ++ Deprecated onClear. Created clearEvent, which automatically + subscribes to its deprecated predecessor. + ++ Corrected setMonth documentation to refer to 0-11 indexed months. + ++ Added show and hide methods to Calendar for setting the Calendar's + display property. + ++ Optimized internal render classes to use innerHTML and string buffers + ++ Removed wireCustomEvents function + ++ Removed wireDefaultEvents function + ++ Removed doNextMonth / doPreviousMonth + ++ Removed all buildShell (header, body, footer) functions, since + the Calendar shell is now built dynamically on each render + ++ Wired all CalendarGroup events and configuration properties to + be properly delegated to Calendar + ++ Augmented CalendarGroup with all built-in renderers, label functions, + hide, show, and initStyles, creating API transparency between Calendar + and CalendarGroup. + ++ Made all tagName, createElement, and entity references XHTML compliant + ++ Fixed Daylight Saving Time bug for Brazilian time zone + +*** version 0.11.3 *** + ++ Calendar_Core: Added arguments for selected/deselected dates to + onSelect/onDeselect + ++ CalendarGroup: Fixed bug where selected dates passed to constructor + were not represented in selectedDates + ++ Calendar2up: Now displays correctly in Opera 9 + +*** version 0.11.0 *** + ++ DateMath: DateMath.add now properly adds weeks + ++ DateMath: between() function added + ++ DateMath: getWeekNumber() fixed to take starting day of week into + account + ++ All references to Calendar's built in CSS class handlers are + removed, replaced with calls to Dom utility (addClass, removeClass) + ++ Several CSS class constants now have clearer names + ++ All CSS classes are now properly namespaced to avoid CSS conflicts + ++ Fixed table:hover bug in CSS + ++ Calendar no longer requires the container ID and variable name to + match in order for month navigation to function properly + ++ Calendar month navigation arrows are now represented as + background images + +*** version 0.10.0 *** + ++ Major performance improvements from attaching DOM events to + associated table cells only once, when the Calendar shell is built + ++ DOM events for mouseover/mouseout are now fired for all browsers + (not just Internet Explorer) + ++ Reset functionality bug fixed for 2-up Calendar view + +*** version 0.9.0 *** + +* Initial release \ No newline at end of file diff --git a/lib/yui/calendar/assets/calendar-core.css b/lib/yui/calendar/assets/calendar-core.css index d25fd0427f..294405181c 100755 --- a/lib/yui/calendar/assets/calendar-core.css +++ b/lib/yui/calendar/assets/calendar-core.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ /** * CORE @@ -83,6 +83,44 @@ version: 2.3.0 text-align:center; } +/* CalendarNavigator */ +.yui-calcontainer .yui-cal-nav-mask { + position:absolute; + z-index:2; + margin:0; + padding:0; + width:100%; + height:100%; + _width:0; /* IE6, IE7 quirks - width/height set programmatically to match container */ + _height:0; + left:0; + top:0; + display:none; +} + +/* NAVIGATOR BOUNDING BOX */ +.yui-calcontainer .yui-cal-nav { + position:absolute; + z-index:3; + top:0; + display:none; +} + +/* NAVIGATOR BUTTONS (based on button-core.css) */ +.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn { + display: -moz-inline-box; /* Gecko */ + display: inline-block; /* IE, Opera and Safari */ +} + +.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button { + display: block; + *display: inline-block; /* IE */ + *overflow: visible; /* Remove superfluous padding for IE */ + border: none; + background-color: transparent; + cursor: pointer; +} + /* Specific changes for calendar running under fonts/reset */ .yui-calendar .calbody a:hover {background:inherit;} p#clear {clear:left; padding-top:10px;} \ No newline at end of file diff --git a/lib/yui/calendar/assets/calendar.css b/lib/yui/calendar/assets/calendar.css index 377b93191d..26975d21dd 100755 --- a/lib/yui/calendar/assets/calendar.css +++ b/lib/yui/calendar/assets/calendar.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ .yui-calcontainer { position:relative; @@ -91,7 +91,7 @@ version: 2.3.0 top:2px; bottom:0; width:9px; - height:12px; + height:12px; left:2px; z-index:1; background: url("callt.gif") no-repeat; @@ -200,6 +200,115 @@ version: 2.3.0 border-right-width:2px; } +/* CalendarNavigator */ +.yui-calendar a.calnav { + _position:relative; + padding-left:2px; + padding-right:2px; + text-decoration:none; + color:#000; +} + +.yui-calendar a.calnav:hover { + border:1px solid #003366; + background-color:#6699cc; + background: url(calgrad.png) repeat-x; + color:#fff; + cursor:pointer; +} + +.yui-calcontainer .yui-cal-nav-mask { + position:absolute; + z-index:2; + display:none; + + margin:0; + padding:0; + + left:0; + top:0; + width:100%; + height:100%; + _width:0; /* IE6, IE7 Quirks - width/height set programmatically to match container */ + _height:0; + + background-color:#000; + opacity:0.25; + *filter:alpha(opacity=25); +} + +.yui-calcontainer .yui-cal-nav { + position:absolute; + z-index:3; + display:none; + + padding:0; + top:1.5em; + left:50%; + width:12em; + margin-left:-6em; + + border:1px solid #7B9EBD; + background-color:#F7F9FB; + font-size:93%; +} + +.yui-calcontainer.withtitle .yui-cal-nav { + top:3.5em; +} + +.yui-calcontainer .yui-cal-nav-y, +.yui-calcontainer .yui-cal-nav-m, +.yui-calcontainer .yui-cal-nav-b { + padding:2px 5px 2px 5px; +} + +.yui-calcontainer .yui-cal-nav-b { + text-align:center; +} + +.yui-calcontainer .yui-cal-nav-e { + margin-top:2px; + padding:2px; + background-color:#EDF5FF; + border-top:1px solid black; + display:none; +} + +.yui-calcontainer .yui-cal-nav label { + display:block; + font-weight:bold; +} + +.yui-calcontainer .yui-cal-nav-mc { + width:100%; + _width:auto; /* IE6 doesn't like width 100% */ +} + +.yui-calcontainer .yui-cal-nav-y input.yui-invalid { + background-color:#FFEE69; + border: 1px solid #000; +} + +.yui-calcontainer .yui-cal-nav-yc { + width:3em; +} + +.yui-calcontainer .yui-cal-nav-b button { + font-size:93%; + text-decoration:none; + cursor: pointer; + background-color: #79b2ea; + border: 1px solid #003366; + border-top-color:#FFF; + border-left-color:#FFF; + margin:1px; +} + +.yui-calcontainer .yui-cal-nav-b .yui-default button { + /* not implemented */ +} + /* Specific changes for calendar running under fonts/reset */ .yui-calendar .calbody a:hover {background:inherit;} p#clear {clear:left; padding-top:10px;} diff --git a/lib/yui/calendar/assets/calgrad.png b/lib/yui/calendar/assets/calgrad.png new file mode 100644 index 0000000000..9be3d958c7 Binary files /dev/null and b/lib/yui/calendar/assets/calgrad.png differ diff --git a/lib/yui/calendar/assets/skins/sam/calendar-skin.css b/lib/yui/calendar/assets/skins/sam/calendar-skin.css index 66a6df4b11..2cb9a73b36 100755 --- a/lib/yui/calendar/assets/skins/sam/calendar-skin.css +++ b/lib/yui/calendar/assets/skins/sam/calendar-skin.css @@ -1,8 +1,8 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ /** * SAM @@ -79,6 +79,7 @@ version: 2.3.0 border-collapse:collapse; font:100% sans-serif; text-align:center; + margin:0; } /* NAVBAR BOUNDING BOX */ @@ -86,6 +87,7 @@ version: 2.3.0 background:transparent; border:none; vertical-align:middle; + padding:0; } /* NAVBAR TEXT CONTAINER */ @@ -129,6 +131,11 @@ version: 2.3.0 height:2em; } +.yui-skin-sam .yui-calendar .calweekdayrow th { + padding:0; + border:none; +} + /* WEEKDAY (Su, Mo, Tu...) HEADER CELLS */ .yui-skin-sam .yui-calendar .calweekdaycell { color:#000; @@ -148,16 +155,17 @@ version: 2.3.0 font-size:85%; font-style:normal; font-weight:normal; + border:none; } .yui-skin-sam .yui-calendar .calrowhead { text-align:right; - padding-right:2px; + padding:0 2px 0 0; } .yui-skin-sam .yui-calendar .calrowfoot { text-align:left; - padding-left:2px; + padding:0 0 0 2px; } /* NORMAL CELLS */ @@ -228,4 +236,126 @@ version: 2.3.0 .yui-skin-sam .yui-calendar td.calcell.highlight1 { background-color:#ccff99; } .yui-skin-sam .yui-calendar td.calcell.highlight2 { background-color:#99ccff; } .yui-skin-sam .yui-calendar td.calcell.highlight3 { background-color:#ffcccc; } -.yui-skin-sam .yui-calendar td.calcell.highlight4 { background-color:#ccff99; } \ No newline at end of file +.yui-skin-sam .yui-calendar td.calcell.highlight4 { background-color:#ccff99; } + +/* CalendarNavigator */ + +/* MONTH/YEAR LABEL */ +.yui-skin-sam .yui-calendar a.calnav { + border: 1px solid #f2f2f2; + padding:0 4px; + text-decoration:none; + color:#000; + zoom:1; +} + +.yui-skin-sam .yui-calendar a.calnav:hover { + background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0; + border-color:#A0A0A0; + cursor:pointer; +} + +/* NAVIGATOR MASK */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask { + background-color:#000; + opacity:0.25; + *filter:alpha(opacity=25); /* IE */ +} + +/* NAVIGATOR BOUNDING BOX */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav { + font-family:arial,helvetica,clean,sans-serif; + font-size:93%; + border:1px solid #808080; + left:50%; + margin-left:-7em; + width:14em; + padding:0; + top:2.5em; + background-color:#f2f2f2; +} + +.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav { + top:4.5em; +} + +/* NAVIGATOR BOUNDING BOX */ +.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav { + width:16em; + margin-left:-8em; +} + +/* NAVIGATOR YEAR/MONTH/BUTTON/ERROR BOUNDING BLOCKS */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav-y, +.yui-skin-sam .yui-calcontainer .yui-cal-nav-m, +.yui-skin-sam .yui-calcontainer .yui-cal-nav-b { + padding:5px 10px 5px 10px; +} + +.yui-skin-sam .yui-calcontainer .yui-cal-nav-b { + text-align:center; +} + +.yui-skin-sam .yui-calcontainer .yui-cal-nav-e { + margin-top:5px; + padding:5px; + background-color:#EDF5FF; + border-top:1px solid black; + display:none; +} + +/* NAVIGATOR LABELS */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav label { + display:block; + font-weight:bold; +} + +/* NAVIGATOR MONTH CONTROL */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc { + width:100%; + _width:auto; /* IE6, IE7 Quirks don't handle 100% well */ +} + +/* NAVIGATOR MONTH CONTROL, VALIDATION ERROR */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid { + background-color:#FFEE69; + border: 1px solid #000; +} + +/* NAVIGATOR YEAR CONTROL */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc { + width:4em; +} + +/* NAVIGATOR BUTTONS */ + +/* BUTTON WRAPPER */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn { + border:1px solid #808080; + background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0; + background-color:#ccc; + margin: auto .15em; +} + +/* BUTTON (based on button-skin.css) */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button { + padding:0 8px; + font-size:93%; + line-height: 2; /* ~24px */ + *line-height: 1.7; /* For IE */ + min-height: 2em; /* For Gecko */ + *min-height: auto; /* For IE */ + color: #000; +} + +/* DEFAULT BUTTONS */ +/* NOTE: IE6 will only pickup the yui-default specifier from the multiple class specifier */ +.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default { + border:1px solid #304369; + background-color: #426fd9; + background: url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px; +} + +.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button { + color:#fff; +} diff --git a/lib/yui/calendar/assets/skins/sam/calendar.css b/lib/yui/calendar/assets/skins/sam/calendar.css index 2b6d11a196..53d4a7bd72 100755 --- a/lib/yui/calendar/assets/skins/sam/calendar.css +++ b/lib/yui/calendar/assets/skins/sam/calendar.css @@ -1,7 +1,7 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ -.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding-right:2px;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding-left:2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;} +.yui-calcontainer{position:relative;float:left;_overflow:hidden;}.yui-calcontainer iframe{position:absolute;border:none;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0px;top:0px;}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px;}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative;}.yui-calcontainer .title{position:relative;z-index:1;}.yui-calcontainer .close-icon{position:absolute;z-index:1;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;}.yui-calendar .calnavright{position:absolute;z-index:1;}.yui-calendar .calheader{position:relative;width:100%;text-align:center;}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none;}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block;}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:none;background-color:transparent;cursor:pointer;}.yui-calendar .calbody a:hover{background:inherit;}p#clear{clear:left;padding-top:10px;}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px;}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px;}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:none;padding:10px 5px 10px 5px;margin:0;}.yui-skin-sam .yui-calcontainer .title{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #cccccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left;}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px;}.yui-skin-sam .yui-calcontainer.withtitle{padding-top:0;}.yui-skin-sam .yui-calcontainer .calclose{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0;}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:none;vertical-align:middle;padding:0;}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center;}.yui-skin-sam .yui-calendar .calheader img{border:none;}.yui-skin-sam .yui-calendar .calnavleft{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calnavright{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer;}.yui-skin-sam .yui-calendar .calweekdayrow{height:2em;}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:none;}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em;}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2;}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:none;}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0;}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px;}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #cccccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap;}.yui-skin-sam .yui-calendar td.calcell a{color:#0066cc;display:block;height:100%;text-decoration:none;}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000;}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff;}.yui-skin-sam .yui-calendar td.calcell.oom{background-color:#cccccc;color:#a6a6a6;cursor:default;}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000;}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer;}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff;}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0;}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through;}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#ccff99;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#99ccff;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#ffcccc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#ccff99;}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom:1;}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-color:#A0A0A0;cursor:pointer;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:0.25;*filter:alpha(opacity=25);}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2;}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em;}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#EDF5FF;border-top:1px solid black;display:none;}.yui-skin-sam .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#FFEE69;border:1px solid #000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px;}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff;} diff --git a/lib/yui/calendar/calendar-debug.js b/lib/yui/calendar/calendar-debug.js index 47a54b3d7d..621b403db5 100755 --- a/lib/yui/calendar/calendar-debug.js +++ b/lib/yui/calendar/calendar-debug.js @@ -1,8 +1,8 @@ /* -Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt -version: 2.3.0 +version: 2.5.0 */ (function () { @@ -18,26 +18,20 @@ version: 2.3.0 * @param {Object} owner The owner Object to which this Config Object belongs */ YAHOO.util.Config = function (owner) { - + if (owner) { - this.init(owner); - - } - - if (!owner) { - - YAHOO.log("No owner specified for Config object", "error"); - } - + + if (!owner) { YAHOO.log("No owner specified for Config object", "error", "Config"); } + }; var Lang = YAHOO.lang, - CustomEvent = YAHOO.util.CustomEvent, + CustomEvent = YAHOO.util.CustomEvent, Config = YAHOO.util.Config; - + /** * Constant representing the CustomEvent type for the config changed event. @@ -157,7 +151,7 @@ version: 2.3.0 * @param {value} Object The value of the correct type for the property */ fireEvent: function ( key, value ) { - YAHOO.log("Firing Config event: " + key + "=" + value, "info"); + YAHOO.log("Firing Config event: " + key + "=" + value, "info", "Config"); var property = this.config[key]; if (property && property.event) { @@ -174,7 +168,7 @@ version: 2.3.0 */ addProperty: function ( key, propertyObject ) { key = key.toLowerCase(); - YAHOO.log("Added property: " + key, "info"); + YAHOO.log("Added property: " + key, "info", "Config"); this.config[key] = propertyObject; @@ -252,11 +246,11 @@ version: 2.3.0 !Lang.isUndefined(this.initialConfig[key])) { this.setProperty(key, this.initialConfig[key]); + + return true; } - return true; - } else { return false; @@ -279,7 +273,7 @@ version: 2.3.0 var property; key = key.toLowerCase(); - YAHOO.log("setProperty: " + key + "=" + value, "info"); + YAHOO.log("setProperty: " + key + "=" + value, "info", "Config"); if (this.queueInProgress && ! silent) { // Currently running through a queue... @@ -318,7 +312,7 @@ version: 2.3.0 queueProperty: function (key, value) { key = key.toLowerCase(); - YAHOO.log("queueProperty: " + key + "=" + value, "info"); + YAHOO.log("queueProperty: " + key + "=" + value, "info", "Config"); var property = this.config[key], foundDuplicate = false, @@ -358,7 +352,7 @@ version: 2.3.0 if (queueItem) { queueItemKey = queueItem[0]; queueItemValue = queueItem[1]; - + if (queueItemKey == key) { /* @@ -386,38 +380,38 @@ version: 2.3.0 } if (property.supercedes) { - + sLen = property.supercedes.length; - + for (s = 0; s < sLen; s++) { - + supercedesCheck = property.supercedes[s]; qLen = this.eventQueue.length; - + for (q = 0; q < qLen; q++) { queueItemCheck = this.eventQueue[q]; - + if (queueItemCheck) { queueItemCheckKey = queueItemCheck[0]; queueItemCheckValue = queueItemCheck[1]; - + if (queueItemCheckKey == supercedesCheck.toLowerCase() ) { - + this.eventQueue.push([queueItemCheckKey, queueItemCheckValue]); - + this.eventQueue[q] = null; break; - + } } } } } - YAHOO.log("Config event queue: " + this.outputEventQueue(), "info"); - + YAHOO.log("Config event queue: " + this.outputEventQueue(), "info", "Config"); + return true; } else { return false; @@ -465,13 +459,23 @@ version: 2.3.0 */ applyConfig: function (userConfig, init) { - var prop; - + var sKey, + oConfig; + if (init) { - this.initialConfig = userConfig; + oConfig = {}; + for (sKey in userConfig) { + if (Lang.hasOwnProperty(userConfig, sKey)) { + oConfig[sKey.toLowerCase()] = userConfig[sKey]; + } + } + this.initialConfig = oConfig; } - for (prop in userConfig) { - this.queueProperty(prop, userConfig[prop]); + + for (sKey in userConfig) { + if (Lang.hasOwnProperty(userConfig, sKey)) { + this.queueProperty(sKey, userConfig[sKey]); + } } }, @@ -539,19 +543,12 @@ version: 2.3.0 var property = this.config[key.toLowerCase()]; if (property && property.event) { - if (!Config.alreadySubscribed(property.event, handler, obj)) { - property.event.subscribe(handler, obj, override); - } - return true; - } else { - return false; - } }, @@ -671,28 +668,20 @@ version: 2.3.0 i; if (nSubscribers > 0) { - i = nSubscribers - 1; - do { - subsc = evt.subscribers[i]; - if (subsc && subsc.obj == obj && subsc.fn == fn) { - return true; - - } - + } } while (i--); - } - + return false; - + }; - + YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider); }()); @@ -764,7 +753,6 @@ YAHOO.widget.DateMath = { var newMonth = date.getMonth() + amount; var years = 0; - if (newMonth < 0) { while (newMonth < 0) { newMonth += 12; @@ -776,23 +764,55 @@ YAHOO.widget.DateMath = { years += 1; } } - + d.setMonth(newMonth); d.setFullYear(date.getFullYear() + years); break; case this.DAY: - d.setDate(date.getDate() + amount); + this._addDays(d, amount); + // d.setDate(date.getDate() + amount); break; case this.YEAR: d.setFullYear(date.getFullYear() + amount); break; case this.WEEK: - d.setDate(date.getDate() + (amount * 7)); + this._addDays(d, (amount * 7)); + // d.setDate(date.getDate() + (amount * 7)); break; } return d; }, + /** + * Private helper method to account for bug in Safari 2 (webkit < 420) + * when Date.setDate(n) is called with n less than -128 or greater than 127. + *

+ * Fix approach and original findings are available here: + * http://brianary.blogspot.com/2006/03/safari-date-bug.html + *

+ * @method _addDays + * @param {Date} d JavaScript date object + * @param {Number} nDays The number of days to add to the date object (can be negative) + * @private + */ + _addDays : function(d, nDays) { + if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420) { + if (nDays < 0) { + // Ensure we don't go below -128 (getDate() is always 1 to 31, so we won't go above 127) + for(var min = -128; nDays < min; nDays -= min) { + d.setDate(d.getDate() + min); + } + } else { + // Ensure we don't go above 96 + 31 = 127 + for(var max = 96; nDays > max; nDays -= max) { + d.setDate(d.getDate() + max); + } + } + // nDays should be remainder between -128 and 96 + } + d.setDate(d.getDate() + nDays); + }, + /** * Subtracts the specified amount of time from the this instance. * @method subtract @@ -860,7 +880,7 @@ YAHOO.widget.DateMath = { * @return {Date} January 1 of the calendar year specified. */ getJan1 : function(calendarYear) { - return new Date(calendarYear,0,1); + return this.getDate(calendarYear,0,1); }, /** @@ -896,7 +916,7 @@ YAHOO.widget.DateMath = { date = this.clearTime(date); var nearestThurs = new Date(date.getTime() + (4 * this.ONE_DAY_MS) - ((date.getDay()) * this.ONE_DAY_MS)); - var jan1 = new Date(nearestThurs.getFullYear(),0,1); + var jan1 = this.getDate(nearestThurs.getFullYear(),0,1); var dayOfYear = ((nearestThurs.getTime() - jan1.getTime()) / this.ONE_DAY_MS) - 1; var weekNum = Math.ceil((dayOfYear)/ 7); @@ -940,7 +960,7 @@ YAHOO.widget.DateMath = { * @return {Date} The JavaScript Date representing the first day of the month */ findMonthStart : function(date) { - var start = new Date(date.getFullYear(), date.getMonth(), 1); + var start = this.getDate(date.getFullYear(), date.getMonth(), 1); return start; }, @@ -966,14 +986,46 @@ YAHOO.widget.DateMath = { clearTime : function(date) { date.setHours(12,0,0,0); return date; + }, + + /** + * Returns a new JavaScript Date object, representing the given year, month and date. Time fields (hr, min, sec, ms) on the new Date object + * are set to 0. The method allows Date instances to be created with the a year less than 100. "new Date(year, month, date)" implementations + * set the year to 19xx if a year (xx) which is less than 100 is provided. + *

+ * NOTE:Validation on argument values is not performed. It is the caller's responsibility to ensure + * arguments are valid as per the ECMAScript-262 Date object specification for the new Date(year, month[, date]) constructor. + *

+ * @method getDate + * @param {Number} y Year. + * @param {Number} m Month index from 0 (Jan) to 11 (Dec). + * @param {Number} d (optional) Date from 1 to 31. If not provided, defaults to 1. + * @return {Date} The JavaScript date object with year, month, date set as provided. + */ + getDate : function(y, m, d) { + var dt = null; + if (YAHOO.lang.isUndefined(d)) { + d = 1; + } + if (y >= 100) { + dt = new Date(y, m, d); + } else { + dt = new Date(); + dt.setFullYear(y); + dt.setMonth(m); + dt.setDate(d); + dt.setHours(0,0,0,0); + } + return dt; } }; /** -* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month or multi-month interface. Calendars are generated entirely via script and can be navigated without any page refreshes. +* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month or +* multi-month interface. Calendars are generated entirely via script and can be navigated without any page refreshes. * @module calendar -* @title Calendar -* @namespace YAHOO.widget +* @title Calendar +* @namespace YAHOO.widget * @requires yahoo,dom,event */ @@ -985,18 +1037,39 @@ YAHOO.widget.DateMath = { *

To construct the placeholder for the calendar widget, the code is as * follows: *

-* <div id="cal1Container"></div> +* <div id="calContainer"></div> +* +*

+*

+* NOTE: As of 2.4.0, the constructor's ID argument is optional. +* The Calendar can be constructed by simply providing a container ID string, +* or a reference to a container DIV HTMLElement (the element needs to exist +* in the document). +* +* E.g.: +*

+* var c = new YAHOO.widget.Calendar("calContainer", configOptions); +* +* or: +* +* var containerDiv = YAHOO.util.Dom.get("calContainer"); +* var c = new YAHOO.widget.Calendar(containerDiv, configOptions); * *

+*

+* If not provided, the ID will be generated from the container DIV ID by adding an "_t" suffix. +* For example if an ID is not provided, and the container's ID is "calContainer", the Calendar's ID will be set to "calContainer_t". +*

+* * @namespace YAHOO.widget * @class Calendar * @constructor -* @param {String} id The id of the table element that will represent the calendar widget -* @param {String} containerId The id of the container div element that will wrap the calendar table -* @param {Object} config The configuration object containing the Calendar's arguments +* @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional. +* @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document. +* @param {Object} config optional The configuration object containing the initial configuration values for the Calendar. */ YAHOO.widget.Calendar = function(id, containerId, config) { - this.init(id, containerId, config); + this.init.apply(this, arguments); }; /** @@ -1153,7 +1226,8 @@ YAHOO.widget.Calendar._DEFAULT_CONFIG = { MY_LABEL_MONTH_POSITION:{key:"my_label_month_position", value:1}, MY_LABEL_YEAR_POSITION:{key:"my_label_year_position", value:2}, MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix", value:" "}, - MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""} + MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""}, + NAV: {key:"navigator", value: null} }; /** @@ -1173,7 +1247,17 @@ YAHOO.widget.Calendar._EVENT_TYPES = { BEFORE_RENDER : "beforeRender", RENDER : "render", RESET : "reset", - CLEAR : "clear" + CLEAR : "clear", + BEFORE_HIDE : "beforeHide", + HIDE : "hide", + BEFORE_SHOW : "beforeShow", + SHOW : "show", + BEFORE_HIDE_NAV : "beforeHideNav", + HIDE_NAV : "hideNav", + BEFORE_SHOW_NAV : "beforeShowNav", + SHOW_NAV : "showNav", + BEFORE_RENDER_NAV : "beforeRenderNav", + RENDER_NAV : "renderNav" }; /** @@ -1206,6 +1290,7 @@ YAHOO.widget.Calendar._STYLES = { CSS_CONTAINER : "yui-calcontainer", CSS_NAV_LEFT : "calnavleft", CSS_NAV_RIGHT : "calnavright", + CSS_NAV : "calnav", CSS_CLOSE : "calclose", CSS_CELL_TOP : "calcelltop", CSS_CELL_LEFT : "calcellleft", @@ -1249,7 +1334,7 @@ YAHOO.widget.Calendar.prototype = { * @type HTMLTableCellElement[] */ cells : null, - + /** * The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D]. * @property cellDates @@ -1258,12 +1343,19 @@ YAHOO.widget.Calendar.prototype = { cellDates : null, /** - * The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page. + * The id that uniquely identifies this Calendar. * @property id * @type String */ id : null, + /** + * The unique id associated with the Calendar's container + * @property containerId + * @type String + */ + containerId: null, + /** * The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered. * @property oDomContainer @@ -1293,6 +1385,14 @@ YAHOO.widget.Calendar.prototype = { */ _renderStack : null, + /** + * A reference to the CalendarNavigator instance created for this Calendar. + * Will be null if the "navigator" configuration property has not been set + * @property oNavigator + * @type CalendarNavigator + */ + oNavigator : null, + /** * The private list of initially selected dates. * @property _selectedDates @@ -1306,3674 +1406,5416 @@ YAHOO.widget.Calendar.prototype = { * @property domEventMap * @type Object */ - domEventMap : null -}; - - - -/** -* Initializes the Calendar widget. -* @method init -* @param {String} id The id of the table element that will represent the calendar widget -* @param {String} containerId The id of the container div element that will wrap the calendar table -* @param {Object} config The configuration object containing the Calendar's arguments -*/ -YAHOO.widget.Calendar.prototype.init = function(id, containerId, config) { - this.logger = new YAHOO.widget.LogWriter("Calendar " + id); - this.initEvents(); - this.today = new Date(); - YAHOO.widget.DateMath.clearTime(this.today); - - this.id = id; - this.oDomContainer = document.getElementById(containerId); - if (! this.oDomContainer) { this.logger.log("No valid container present.", "error"); } - - /** - * The Config object used to hold the configuration variables for the Calendar - * @property cfg - * @type YAHOO.util.Config - */ - this.cfg = new YAHOO.util.Config(this); - - /** - * The local object which contains the Calendar's options - * @property Options - * @type Object - */ - this.Options = {}; - - /** - * The local object which contains the Calendar's locale settings - * @property Locale - * @type Object - */ - this.Locale = {}; - - this.initStyles(); - - YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER); - YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE); - - this.cellDates = []; - this.cells = []; - this.renderStack = []; - this._renderStack = []; - - this.setupConfig(); - - if (config) { - this.cfg.applyConfig(config, true); - } - - this.cfg.fireQueue(); -}; - -/** -* Default Config listener for the iframe property. If the iframe config property is set to true, -* renders the built-in IFRAME shim if the container is relatively or absolutely positioned. -* -* @method configIframe -*/ -YAHOO.widget.Calendar.prototype.configIframe = function(type, args, obj) { - var useIframe = args[0]; - - if (!this.parent) { - if (YAHOO.util.Dom.inDocument(this.oDomContainer)) { - if (useIframe) { - var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position"); - - if (pos == "absolute" || pos == "relative") { - - if (!YAHOO.util.Dom.inDocument(this.iframe)) { - this.iframe = document.createElement("iframe"); - this.iframe.src = "javascript:false;"; - - YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0"); - - if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) { - YAHOO.util.Dom.addClass(this.iframe, "fixedsize"); - } - - this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild); - } - } - } else { - if (this.iframe) { - if (this.iframe.parentNode) { - this.iframe.parentNode.removeChild(this.iframe); + domEventMap : null, + + /** + * Protected helper used to parse Calendar constructor/init arguments. + * + * As of 2.4.0, Calendar supports a simpler constructor + * signature. This method reconciles arguments + * received in the pre 2.4.0 and 2.4.0 formats. + * + * @protected + * @method _parseArgs + * @param {Array} Function "arguments" array + * @return {Object} Object with id, container, config properties containing + * the reconciled argument values. + **/ + _parseArgs : function(args) { + /* + 2.4.0 Constructors signatures + + new Calendar(String) + new Calendar(HTMLElement) + new Calendar(String, ConfigObject) + new Calendar(HTMLElement, ConfigObject) + + Pre 2.4.0 Constructor signatures + + new Calendar(String, String) + new Calendar(String, HTMLElement) + new Calendar(String, String, ConfigObject) + new Calendar(String, HTMLElement, ConfigObject) + */ + var nArgs = {id:null, container:null, config:null}; + + if (args && args.length && args.length > 0) { + switch (args.length) { + case 1: + nArgs.id = null; + nArgs.container = args[0]; + nArgs.config = null; + break; + case 2: + if (YAHOO.lang.isObject(args[1]) && !args[1].tagName && !(args[1] instanceof String)) { + nArgs.id = null; + nArgs.container = args[0]; + nArgs.config = args[1]; + } else { + nArgs.id = args[0]; + nArgs.container = args[1]; + nArgs.config = null; } - this.iframe = null; - } + break; + default: // 3+ + nArgs.id = args[0]; + nArgs.container = args[1]; + nArgs.config = args[2]; + break; } + } else { + this.logger.log("Invalid constructor/init arguments", "error"); } - } -}; + return nArgs; + }, -/** -* Default handler for the "title" property -* @method configTitle -*/ -YAHOO.widget.Calendar.prototype.configTitle = function(type, args, obj) { - var title = args[0]; - var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key); - - var titleDiv; + /** + * Initializes the Calendar widget. + * @method init + * + * @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional. + * @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document. + * @param {Object} config optional The configuration object containing the initial configuration values for the Calendar. + */ + init : function(id, container, config) { + // Normalize 2.4.0, pre 2.4.0 args + var nArgs = this._parseArgs(arguments); - if (title && title !== "") { - titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div"); - titleDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE; - titleDiv.innerHTML = title; - this.oDomContainer.insertBefore(titleDiv, this.oDomContainer.firstChild); - YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle"); - } else { - titleDiv = YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null; + id = nArgs.id; + container = nArgs.container; + config = nArgs.config; + + this.oDomContainer = YAHOO.util.Dom.get(container); + if (!this.oDomContainer) { this.logger.log("Container not found in document.", "error"); } - if (titleDiv) { - YAHOO.util.Event.purgeElement(titleDiv); - this.oDomContainer.removeChild(titleDiv); + if (!this.oDomContainer.id) { + this.oDomContainer.id = YAHOO.util.Dom.generateId(); } - if (! close) { - YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle"); + if (!id) { + id = this.oDomContainer.id + "_t"; } - } -}; -/** -* Default handler for the "close" property -* @method configClose -*/ -YAHOO.widget.Calendar.prototype.configClose = function(type, args, obj) { - var close = args[0]; - var title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key); - - var DEPR_CLOSE_PATH = "us/my/bn/x_d.gif"; + this.id = id; + this.containerId = this.oDomContainer.id; - var linkClose; + this.logger = new YAHOO.widget.LogWriter("Calendar " + this.id); + this.initEvents(); - if (close === true) { - linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || document.createElement("a"); - linkClose.href = "#"; - linkClose.className = "link-close"; - YAHOO.util.Event.addListener(linkClose, "click", function(e, cal) {cal.hide(); YAHOO.util.Event.preventDefault(e); }, this); - - if (YAHOO.widget.Calendar.IMG_ROOT !== null) { - var imgClose = document.createElement("img"); - imgClose.src = YAHOO.widget.Calendar.IMG_ROOT + DEPR_CLOSE_PATH; - imgClose.className = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE; - linkClose.appendChild(imgClose); - } else { - linkClose.innerHTML = ''; - } - - this.oDomContainer.appendChild(linkClose); - YAHOO.util.Dom.addClass(this.oDomContainer, "withtitle"); - } else { - linkClose = YAHOO.util.Dom.getElementsByClassName("link-close", "a", this.oDomContainer)[0] || null; - if (linkClose) { - YAHOO.util.Event.purgeElement(linkClose); - this.oDomContainer.removeChild(linkClose); - } - if (! title || title === "") { - YAHOO.util.Dom.removeClass(this.oDomContainer, "withtitle"); - } - } -}; + this.today = new Date(); + YAHOO.widget.DateMath.clearTime(this.today); -/** -* Initializes Calendar's built-in CustomEvents -* @method initEvents -*/ -YAHOO.widget.Calendar.prototype.initEvents = function() { + /** + * The Config object used to hold the configuration variables for the Calendar + * @property cfg + * @type YAHOO.util.Config + */ + this.cfg = new YAHOO.util.Config(this); - var defEvents = YAHOO.widget.Calendar._EVENT_TYPES; + /** + * The local object which contains the Calendar's options + * @property Options + * @type Object + */ + this.Options = {}; - /** - * Fired before a selection is made - * @event beforeSelectEvent - */ - this.beforeSelectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_SELECT); + /** + * The local object which contains the Calendar's locale settings + * @property Locale + * @type Object + */ + this.Locale = {}; - /** - * Fired when a selection is made - * @event selectEvent - * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD]. - */ - this.selectEvent = new YAHOO.util.CustomEvent(defEvents.SELECT); + this.initStyles(); - /** - * Fired before a selection is made - * @event beforeDeselectEvent - */ - this.beforeDeselectEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_DESELECT); + YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER); + YAHOO.util.Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE); - /** - * Fired when a selection is made - * @event deselectEvent - * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD]. - */ - this.deselectEvent = new YAHOO.util.CustomEvent(defEvents.DESELECT); + this.cellDates = []; + this.cells = []; + this.renderStack = []; + this._renderStack = []; - /** - * Fired when the Calendar page is changed - * @event changePageEvent - */ - this.changePageEvent = new YAHOO.util.CustomEvent(defEvents.CHANGE_PAGE); + this.setupConfig(); - /** - * Fired before the Calendar is rendered - * @event beforeRenderEvent - */ - this.beforeRenderEvent = new YAHOO.util.CustomEvent(defEvents.BEFORE_RENDER); + if (config) { + this.cfg.applyConfig(config, true); + } - /** - * Fired when the Calendar is rendered - * @event renderEvent - */ - this.renderEvent = new YAHOO.util.CustomEvent(defEvents.RENDER); + this.cfg.fireQueue(); + }, /** - * Fired when the Calendar is reset - * @event resetEvent + * Default Config listener for the iframe property. If the iframe config property is set to true, + * renders the built-in IFRAME shim if the container is relatively or absolutely positioned. + * + * @method configIframe */ - this.resetEvent = new YAHOO.util.CustomEvent(defEvents.RESET); + configIframe : function(type, args, obj) { + var useIframe = args[0]; + + if (!this.parent) { + if (YAHOO.util.Dom.inDocument(this.oDomContainer)) { + if (useIframe) { + var pos = YAHOO.util.Dom.getStyle(this.oDomContainer, "position"); + + if (pos == "absolute" || pos == "relative") { + + if (!YAHOO.util.Dom.inDocument(this.iframe)) { + this.iframe = document.createElement("iframe"); + this.iframe.src = "javascript:false;"; + + YAHOO.util.Dom.setStyle(this.iframe, "opacity", "0"); + + if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) { + YAHOO.util.Dom.addClass(this.iframe, "fixedsize"); + } + + this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild); + } + } + } else { + if (this.iframe) { + if (this.iframe.parentNode) { + this.iframe.parentNode.removeChild(this.iframe); + } + this.iframe = null; + } + } + } + } + }, /** - * Fired when the Calendar is cleared - * @event clearEvent + * Default handler for the "title" property + * @method configTitle */ - this.clearEvent = new YAHOO.util.CustomEvent(defEvents.CLEAR); - - this.beforeSelectEvent.subscribe(this.onBeforeSelect, this, true); - this.selectEvent.subscribe(this.onSelect, this, true); - this.beforeDeselectEvent.subscribe(this.onBeforeDeselect, this, true); - this.deselectEvent.subscribe(this.onDeselect, this, true); - this.changePageEvent.subscribe(this.onChangePage, this, true); - this.renderEvent.subscribe(this.onRender, this, true); - this.resetEvent.subscribe(this.onReset, this, true); - this.clearEvent.subscribe(this.onClear, this, true); -}; - -/** -* The default event function that is attached to a date link within a calendar cell -* when the calendar is rendered. -* @method doSelectCell -* @param {DOMEvent} e The event -* @param {Calendar} cal A reference to the calendar passed by the Event utility -*/ -YAHOO.widget.Calendar.prototype.doSelectCell = function(e, cal) { - var cell,index,d,date; - - var target = YAHOO.util.Event.getTarget(e); - var tagName = target.tagName.toLowerCase(); - var defSelector = false; - - while (tagName != "td" && ! YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) { + configTitle : function(type, args, obj) { + var title = args[0]; - if (!defSelector && tagName == "a" && YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) { - defSelector = true; - } - - target = target.parentNode; - tagName = target.tagName.toLowerCase(); - if (tagName == "html") { - return; + // "" disables title bar + if (title) { + this.createTitleBar(title); + } else { + var close = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key); + if (!close) { + this.removeTitleBar(); + } else { + this.createTitleBar(" "); + } } - } - - if (defSelector) { - // Stop link href navigation for default renderer - YAHOO.util.Event.preventDefault(e); - } - - cell = target; - - if (YAHOO.util.Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) { - index = cell.id.split("cell")[1]; - d = cal.cellDates[index]; - date = new Date(d[0],d[1]-1,d[2]); + }, - var link; - - cal.logger.log("Selecting cell " + index + " via click", "info"); - if (cal.Options.MULTI_SELECT) { - link = cell.getElementsByTagName("a")[0]; - if (link) { - link.blur(); + /** + * Default handler for the "close" property + * @method configClose + */ + configClose : function(type, args, obj) { + var close = args[0], + title = this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key); + + if (close) { + if (!title) { + this.createTitleBar(" "); } - - var cellDate = cal.cellDates[index]; - var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate); - - if (cellDateIndex > -1) { - cal.deselectCell(index); - } else { - cal.selectCell(index); - } - + this.createCloseButton(); } else { - link = cell.getElementsByTagName("a")[0]; - if (link) { - link.blur(); + this.removeCloseButton(); + if (!title) { + this.removeTitleBar(); } - cal.selectCell(index); } - } -}; - -/** -* The event that is executed when the user hovers over a cell -* @method doCellMouseOver -* @param {DOMEvent} e The event -* @param {Calendar} cal A reference to the calendar passed by the Event utility -*/ -YAHOO.widget.Calendar.prototype.doCellMouseOver = function(e, cal) { - var target; - if (e) { - target = YAHOO.util.Event.getTarget(e); - } else { - target = this; - } - - while (target.tagName.toLowerCase() != "td") { - target = target.parentNode; - if (target.tagName.toLowerCase() == "html") { - return; - } - } - - if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) { - YAHOO.util.Dom.addClass(target, cal.Style.CSS_CELL_HOVER); - } -}; - -/** -* The event that is executed when the user moves the mouse out of a cell -* @method doCellMouseOut -* @param {DOMEvent} e The event -* @param {Calendar} cal A reference to the calendar passed by the Event utility -*/ -YAHOO.widget.Calendar.prototype.doCellMouseOut = function(e, cal) { - var target; - if (e) { - target = YAHOO.util.Event.getTarget(e); - } else { - target = this; - } - - while (target.tagName.toLowerCase() != "td") { - target = target.parentNode; - if (target.tagName.toLowerCase() == "html") { - return; - } - } - - if (YAHOO.util.Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) { - YAHOO.util.Dom.removeClass(target, cal.Style.CSS_CELL_HOVER); - } -}; - -YAHOO.widget.Calendar.prototype.setupConfig = function() { - - var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; - - /** - * The month/year representing the current visible Calendar date (mm/yyyy) - * @config pagedate - * @type String - * @default today's date - */ - this.cfg.addProperty(defCfg.PAGEDATE.key, { value:new Date(), handler:this.configPageDate } ); - - /** - * The date or range of dates representing the current Calendar selection - * @config selected - * @type String - * @default [] - */ - this.cfg.addProperty(defCfg.SELECTED.key, { value:[], handler:this.configSelected } ); - - /** - * The title to display above the Calendar's month header - * @config title - * @type String - * @default "" - */ - this.cfg.addProperty(defCfg.TITLE.key, { value:defCfg.TITLE.value, handler:this.configTitle } ); - - /** - * Whether or not a close button should be displayed for this Calendar - * @config close - * @type Boolean - * @default false - */ - this.cfg.addProperty(defCfg.CLOSE.key, { value:defCfg.CLOSE.value, handler:this.configClose } ); - - /** - * Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below. - * This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be - * enabled if required. - * - * @config iframe - * @type Boolean - * @default true for IE6 and below, false for all other browsers - */ - this.cfg.addProperty(defCfg.IFRAME.key, { value:defCfg.IFRAME.value, handler:this.configIframe, validator:this.cfg.checkBoolean } ); - - /** - * The minimum selectable date in the current Calendar (mm/dd/yyyy) - * @config mindate - * @type String - * @default null - */ - this.cfg.addProperty(defCfg.MINDATE.key, { value:defCfg.MINDATE.value, handler:this.configMinDate } ); - - /** - * The maximum selectable date in the current Calendar (mm/dd/yyyy) - * @config maxdate - * @type String - * @default null - */ - this.cfg.addProperty(defCfg.MAXDATE.key, { value:defCfg.MAXDATE.value, handler:this.configMaxDate } ); - - - // Options properties - - /** - * True if the Calendar should allow multiple selections. False by default. - * @config MULTI_SELECT - * @type Boolean - * @default false - */ - this.cfg.addProperty(defCfg.MULTI_SELECT.key, { value:defCfg.MULTI_SELECT.value, handler:this.configOptions, validator:this.cfg.checkBoolean } ); - - /** - * The weekday the week begins on. Default is 0 (Sunday). - * @config START_WEEKDAY - * @type number - * @default 0 - */ - this.cfg.addProperty(defCfg.START_WEEKDAY.key, { value:defCfg.START_WEEKDAY.value, handler:this.configOptions, validator:this.cfg.checkNumber } ); - - /** - * True if the Calendar should show weekday labels. True by default. - * @config SHOW_WEEKDAYS - * @type Boolean - * @default true - */ - this.cfg.addProperty(defCfg.SHOW_WEEKDAYS.key, { value:defCfg.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } ); - - /** - * True if the Calendar should show week row headers. False by default. - * @config SHOW_WEEK_HEADER - * @type Boolean - * @default false - */ - this.cfg.addProperty(defCfg.SHOW_WEEK_HEADER.key, { value:defCfg.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } ); - - /** - * True if the Calendar should show week row footers. False by default. - * @config SHOW_WEEK_FOOTER - * @type Boolean - * @default false - */ - this.cfg.addProperty(defCfg.SHOW_WEEK_FOOTER.key,{ value:defCfg.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:this.cfg.checkBoolean } ); - - /** - * True if the Calendar should suppress weeks that are not a part of the current month. False by default. - * @config HIDE_BLANK_WEEKS - * @type Boolean - * @default false - */ - this.cfg.addProperty(defCfg.HIDE_BLANK_WEEKS.key, { value:defCfg.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:this.cfg.checkBoolean } ); - - /** - * The image that should be used for the left navigation arrow. - * @config NAV_ARROW_LEFT - * @type String - * @deprecated You can customize the image by overriding the default CSS class for the left arrow - "calnavleft" - * @default null - */ - this.cfg.addProperty(defCfg.NAV_ARROW_LEFT.key, { value:defCfg.NAV_ARROW_LEFT.value, handler:this.configOptions } ); - - /** - * The image that should be used for the right navigation arrow. - * @config NAV_ARROW_RIGHT - * @type String - * @deprecated You can customize the image by overriding the default CSS class for the right arrow - "calnavright" - * @default null - */ - this.cfg.addProperty(defCfg.NAV_ARROW_RIGHT.key, { value:defCfg.NAV_ARROW_RIGHT.value, handler:this.configOptions } ); - - // Locale properties - - /** - * The short month labels for the current locale. - * @config MONTHS_SHORT - * @type String[] - * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] - */ - this.cfg.addProperty(defCfg.MONTHS_SHORT.key, { value:defCfg.MONTHS_SHORT.value, handler:this.configLocale } ); - - /** - * The long month labels for the current locale. - * @config MONTHS_LONG - * @type String[] - * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" - */ - this.cfg.addProperty(defCfg.MONTHS_LONG.key, { value:defCfg.MONTHS_LONG.value, handler:this.configLocale } ); - - /** - * The 1-character weekday labels for the current locale. - * @config WEEKDAYS_1CHAR - * @type String[] - * @default ["S", "M", "T", "W", "T", "F", "S"] - */ - this.cfg.addProperty(defCfg.WEEKDAYS_1CHAR.key, { value:defCfg.WEEKDAYS_1CHAR.value, handler:this.configLocale } ); - - /** - * The short weekday labels for the current locale. - * @config WEEKDAYS_SHORT - * @type String[] - * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] - */ - this.cfg.addProperty(defCfg.WEEKDAYS_SHORT.key, { value:defCfg.WEEKDAYS_SHORT.value, handler:this.configLocale } ); - - /** - * The medium weekday labels for the current locale. - * @config WEEKDAYS_MEDIUM - * @type String[] - * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] - */ - this.cfg.addProperty(defCfg.WEEKDAYS_MEDIUM.key, { value:defCfg.WEEKDAYS_MEDIUM.value, handler:this.configLocale } ); - - /** - * The long weekday labels for the current locale. - * @config WEEKDAYS_LONG - * @type String[] - * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] - */ - this.cfg.addProperty(defCfg.WEEKDAYS_LONG.key, { value:defCfg.WEEKDAYS_LONG.value, handler:this.configLocale } ); - - /** - * Refreshes the locale values used to build the Calendar. - * @method refreshLocale - * @private - */ - var refreshLocale = function() { - this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key); - this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key); - }; - - this.cfg.subscribeToConfigEvent(defCfg.START_WEEKDAY.key, refreshLocale, this, true); - this.cfg.subscribeToConfigEvent(defCfg.MONTHS_SHORT.key, refreshLocale, this, true); - this.cfg.subscribeToConfigEvent(defCfg.MONTHS_LONG.key, refreshLocale, this, true); - this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_1CHAR.key, refreshLocale, this, true); - this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_SHORT.key, refreshLocale, this, true); - this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_MEDIUM.key, refreshLocale, this, true); - this.cfg.subscribeToConfigEvent(defCfg.WEEKDAYS_LONG.key, refreshLocale, this, true); - - /** - * The setting that determines which length of month labels should be used. Possible values are "short" and "long". - * @config LOCALE_MONTHS - * @type String - * @default "long" - */ - this.cfg.addProperty(defCfg.LOCALE_MONTHS.key, { value:defCfg.LOCALE_MONTHS.value, handler:this.configLocaleValues } ); - - /** - * The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long". - * @config LOCALE_WEEKDAYS - * @type String - * @default "short" - */ - this.cfg.addProperty(defCfg.LOCALE_WEEKDAYS.key, { value:defCfg.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } ); - - /** - * The value used to delimit individual dates in a date string passed to various Calendar functions. - * @config DATE_DELIMITER - * @type String - * @default "," - */ - this.cfg.addProperty(defCfg.DATE_DELIMITER.key, { value:defCfg.DATE_DELIMITER.value, handler:this.configLocale } ); - - /** - * The value used to delimit date fields in a date string passed to various Calendar functions. - * @config DATE_FIELD_DELIMITER - * @type String - * @default "/" - */ - this.cfg.addProperty(defCfg.DATE_FIELD_DELIMITER.key, { value:defCfg.DATE_FIELD_DELIMITER.value, handler:this.configLocale } ); - - /** - * The value used to delimit date ranges in a date string passed to various Calendar functions. - * @config DATE_RANGE_DELIMITER - * @type String - * @default "-" - */ - this.cfg.addProperty(defCfg.DATE_RANGE_DELIMITER.key, { value:defCfg.DATE_RANGE_DELIMITER.value, handler:this.configLocale } ); - - /** - * The position of the month in a month/year date string - * @config MY_MONTH_POSITION - * @type Number - * @default 1 - */ - this.cfg.addProperty(defCfg.MY_MONTH_POSITION.key, { value:defCfg.MY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the year in a month/year date string - * @config MY_YEAR_POSITION - * @type Number - * @default 2 - */ - this.cfg.addProperty(defCfg.MY_YEAR_POSITION.key, { value:defCfg.MY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the month in a month/day date string - * @config MD_MONTH_POSITION - * @type Number - * @default 1 - */ - this.cfg.addProperty(defCfg.MD_MONTH_POSITION.key, { value:defCfg.MD_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the day in a month/year date string - * @config MD_DAY_POSITION - * @type Number - * @default 2 - */ - this.cfg.addProperty(defCfg.MD_DAY_POSITION.key, { value:defCfg.MD_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the month in a month/day/year date string - * @config MDY_MONTH_POSITION - * @type Number - * @default 1 - */ - this.cfg.addProperty(defCfg.MDY_MONTH_POSITION.key, { value:defCfg.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the day in a month/day/year date string - * @config MDY_DAY_POSITION - * @type Number - * @default 2 - */ - this.cfg.addProperty(defCfg.MDY_DAY_POSITION.key, { value:defCfg.MDY_DAY_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the year in a month/day/year date string - * @config MDY_YEAR_POSITION - * @type Number - * @default 3 - */ - this.cfg.addProperty(defCfg.MDY_YEAR_POSITION.key, { value:defCfg.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the month in the month year label string used as the Calendar header - * @config MY_LABEL_MONTH_POSITION - * @type Number - * @default 1 - */ - this.cfg.addProperty(defCfg.MY_LABEL_MONTH_POSITION.key, { value:defCfg.MY_LABEL_MONTH_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); - - /** - * The position of the year in the month year label string used as the Calendar header - * @config MY_LABEL_YEAR_POSITION - * @type Number - * @default 2 - */ - this.cfg.addProperty(defCfg.MY_LABEL_YEAR_POSITION.key, { value:defCfg.MY_LABEL_YEAR_POSITION.value, handler:this.configLocale, validator:this.cfg.checkNumber } ); + }, /** - * The suffix used after the month when rendering the Calendar header - * @config MY_LABEL_MONTH_SUFFIX - * @type String - * @default " " + * Initializes Calendar's built-in CustomEvents + * @method initEvents */ - this.cfg.addProperty(defCfg.MY_LABEL_MONTH_SUFFIX.key, { value:defCfg.MY_LABEL_MONTH_SUFFIX.value, handler:this.configLocale } ); + initEvents : function() { - /** - * The suffix used after the year when rendering the Calendar header - * @config MY_LABEL_YEAR_SUFFIX - * @type String - * @default "" - */ - this.cfg.addProperty(defCfg.MY_LABEL_YEAR_SUFFIX.key, { value:defCfg.MY_LABEL_YEAR_SUFFIX.value, handler:this.configLocale } ); -}; - -/** -* The default handler for the "pagedate" property -* @method configPageDate -*/ -YAHOO.widget.Calendar.prototype.configPageDate = function(type, args, obj) { - this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key, this._parsePageDate(args[0]), true); -}; - -/** -* The default handler for the "mindate" property -* @method configMinDate -*/ -YAHOO.widget.Calendar.prototype.configMinDate = function(type, args, obj) { - var val = args[0]; - if (YAHOO.lang.isString(val)) { - val = this._parseDate(val); - this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key, new Date(val[0],(val[1]-1),val[2])); - } -}; - -/** -* The default handler for the "maxdate" property -* @method configMaxDate -*/ -YAHOO.widget.Calendar.prototype.configMaxDate = function(type, args, obj) { - var val = args[0]; - if (YAHOO.lang.isString(val)) { - val = this._parseDate(val); - this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key, new Date(val[0],(val[1]-1),val[2])); - } -}; - -/** -* The default handler for the "selected" property -* @method configSelected -*/ -YAHOO.widget.Calendar.prototype.configSelected = function(type, args, obj) { - var selected = args[0]; - var cfgSelected = YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key; + var defEvents = YAHOO.widget.Calendar._EVENT_TYPES; - if (selected) { - if (YAHOO.lang.isString(selected)) { - this.cfg.setProperty(cfgSelected, this._parseDates(selected), true); - } - } - if (! this._selectedDates) { - this._selectedDates = this.cfg.getProperty(cfgSelected); - } -}; - -/** -* The default handler for all configuration options properties -* @method configOptions -*/ -YAHOO.widget.Calendar.prototype.configOptions = function(type, args, obj) { - this.Options[type.toUpperCase()] = args[0]; -}; - -/** -* The default handler for all configuration locale properties -* @method configLocale -*/ -YAHOO.widget.Calendar.prototype.configLocale = function(type, args, obj) { - var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; - this.Locale[type.toUpperCase()] = args[0]; - - this.cfg.refireEvent(defCfg.LOCALE_MONTHS.key); - this.cfg.refireEvent(defCfg.LOCALE_WEEKDAYS.key); -}; - -/** -* The default handler for all configuration locale field length properties -* @method configLocaleValues -*/ -YAHOO.widget.Calendar.prototype.configLocaleValues = function(type, args, obj) { - var defCfg = YAHOO.widget.Calendar._DEFAULT_CONFIG; - - type = type.toLowerCase(); - var val = args[0]; - - switch (type) { - case defCfg.LOCALE_MONTHS.key: - switch (val) { - case YAHOO.widget.Calendar.SHORT: - this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_SHORT.key).concat(); - break; - case YAHOO.widget.Calendar.LONG: - this.Locale.LOCALE_MONTHS = this.cfg.getProperty(defCfg.MONTHS_LONG.key).concat(); - break; - } - break; - case defCfg.LOCALE_WEEKDAYS.key: - switch (val) { - case YAHOO.widget.Calendar.ONE_CHAR: - this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_1CHAR.key).concat(); - break; - case YAHOO.widget.Calendar.SHORT: - this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_SHORT.key).concat(); - break; - case YAHOO.widget.Calendar.MEDIUM: - this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_MEDIUM.key).concat(); - break; - case YAHOO.widget.Calendar.LONG: - this.Locale.LOCALE_WEEKDAYS = this.cfg.getProperty(defCfg.WEEKDAYS_LONG.key).concat(); - break; - } - - var START_WEEKDAY = this.cfg.getProperty(defCfg.START_WEEKDAY.key); - - if (START_WEEKDAY > 0) { - for (var w=0;w