diff --git a/lib/yui/animation/animation-debug.js b/lib/yui/animation/animation-debug.js new file mode 100644 index 00000000..13638e94 --- /dev/null +++ b/lib/yui/animation/animation-debug.js @@ -0,0 +1,1396 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +(function() { + +var Y = YAHOO.util; + +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +*/ + +/** + * The animation module provides allows effects to be added to HTMLElements. + * @module animation + * @requires yahoo, event, dom + */ + +/** + * + * Base animation class that provides the interface for building animated effects. + *

Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);

+ * @class Anim + * @namespace YAHOO.util + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + +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); +}; + +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; + return (this.constructor.NAME + ': ' + id); + }, + + patterns: { // cached for performance + noNegatives: /width|height|opacity|padding/i, // keep at zero or above + offsetAttribute: /^((width|height)|(top|left))$/, // use offsetValue as default + defaultUnit: /width|height|top$|bottom$|left$|right$/i, // use 'px' by default + offsetUnit: /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset + }, + + /** + * Returns the value computed by the animation's "method". + * @method doMethod + * @param {String} attr The name of the attribute. + * @param {Number} start The value this attribute should start from for this animation. + * @param {Number} end The value this attribute should end at for this animation. + * @return {Number} The Value to be applied to the attribute. + */ + doMethod: function(attr, start, end) { + return this.method(this.currentFrame, start, end - start, this.totalFrames); + }, + + /** + * Applies a value to an attribute. + * @method setAttribute + * @param {String} attr The name of the attribute. + * @param {Number} val The value to be applied to the attribute. + * @param {String} unit The unit ('px', '%', etc.) of the value. + */ + setAttribute: function(attr, val, unit) { + var el = this.getEl(); + if ( this.patterns.noNegatives.test(attr) ) { + val = (val > 0) ? val : 0; + } + + if (attr in el && !('style' in el && attr in el.style)) { + el[attr] = val; + } else { + Y.Dom.setStyle(el, attr, val + unit); + } + }, + + /** + * Returns current value of the attribute. + * @method getAttribute + * @param {String} attr The name of the attribute. + * @return {Number} val The current value of the attribute. + */ + getAttribute: function(attr) { + var el = this.getEl(); + var val = Y.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] ); // top or left + var box = !!( a[2] ); // width or height + + if ('style' in el) { + // use offsets for width/height and abs pos top/left + 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; + } + } else if (attr in el) { + val = el[attr]; + } + + return val; + }, + + /** + * Returns the unit to use when none is supplied. + * @method getDefaultUnit + * @param {attr} attr The name of the attribute. + * @return {String} The default unit to be used. + */ + getDefaultUnit: function(attr) { + if ( this.patterns.defaultUnit.test(attr) ) { + return 'px'; + } + + return ''; + }, + + /** + * Sets the actual values to be used during the animation. Should only be needed for subclass use. + * @method setRuntimeAttribute + * @param {Object} attr The attribute object + * @private + */ + 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; // note return; nothing to animate to + } + + start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr); + + // To beats by, per SMIL 2.1 spec + 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; i < len; ++i) { + end[i] = start[i] + attributes[attr]['by'][i] * 1; // times 1 to cast "by" + } + } else { + end = start + attributes[attr]['by'] * 1; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + + // set units if needed + this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ? + attributes[attr]['unit'] : this.getDefaultUnit(attr); + return true; + }, + + /** + * Constructor for Anim instance. + * @method init + * @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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + init: function(el, attributes, duration, method) { + /** + * Whether or not the animation is running. + * @property isAnimated + * @private + * @type Boolean + */ + var isAnimated = false; + + /** + * A Date object that is created when the animation begins. + * @property startTime + * @private + * @type Date + */ + var startTime = null; + + /** + * The number of frames this animation was able to execute. + * @property actualFrames + * @private + * @type Int + */ + var actualFrames = 0; + + /** + * The element to be animated. + * @property el + * @private + * @type HTMLElement + */ + el = Y.Dom.get(el); + + /** + * The collection of attributes to be animated. + * Each attribute must have at least a "to" or "by" defined in order to animate. + * If "to" is supplied, the animation will end with the attribute at that value. + * If "by" is supplied, the animation will end at that value plus its starting value. + * If both are supplied, "to" is used, and "by" is ignored. + * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values). + * @property attributes + * @type Object + */ + this.attributes = attributes || {}; + + /** + * The length of the animation. Defaults to "1" (second). + * @property duration + * @type Number + */ + this.duration = !YAHOO.lang.isUndefined(duration) ? duration : 1; + + /** + * The method that will provide values to the attribute(s) during the animation. + * Defaults to "YAHOO.util.Easing.easeNone". + * @property method + * @type Function + */ + this.method = method || Y.Easing.easeNone; + + /** + * Whether or not the duration should be treated as seconds. + * Defaults to true. + * @property useSeconds + * @type Boolean + */ + this.useSeconds = true; // default to seconds + + /** + * The location of the current animation on the timeline. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property currentFrame + * @type Int + */ + this.currentFrame = 0; + + /** + * The total number of frames to be executed. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property totalFrames + * @type Int + */ + this.totalFrames = Y.AnimMgr.fps; + + /** + * Changes the animated element + * @method setEl + */ + this.setEl = function(element) { + el = Y.Dom.get(element); + }; + + /** + * Returns a reference to the animated element. + * @method getEl + * @return {HTMLElement} + */ + this.getEl = function() { return el; }; + + /** + * Checks whether the element is currently animated. + * @method isAnimated + * @return {Boolean} current value of isAnimated. + */ + this.isAnimated = function() { + return isAnimated; + }; + + /** + * Returns the animation start time. + * @method getStartTime + * @return {Date} current value of startTime. + */ + this.getStartTime = function() { + return startTime; + }; + + this.runtimeAttributes = {}; + + var logger = {}; + logger.log = function() {YAHOO.log.apply(window, arguments)}; + + logger.log('creating new instance of ' + this); + + /** + * Starts the animation by registering it with the animation manager. + * @method animate + */ + this.animate = function() { + if ( this.isAnimated() ) { + return false; + } + + this.currentFrame = 0; + + this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration; + + if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration + this.totalFrames = 1; + } + Y.AnimMgr.registerElement(this); + return true; + }; + + /** + * Stops the animation. Normally called by AnimMgr when animation completes. + * @method stop + * @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(); + } + Y.AnimMgr.stop(this); + }; + + var onStart = function() { + this.onStart.fire(); + + this.runtimeAttributes = {}; + for (var attr in this.attributes) { + this.setRuntimeAttribute(attr); + } + + isAnimated = true; + actualFrames = 0; + startTime = new Date(); + }; + + /** + * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s). + * @private + */ + + var onTween = function() { + var data = { + duration: new Date() - this.getStartTime(), + currentFrame: this.currentFrame + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', currentFrame: ' + data.currentFrame + ); + }; + + this.onTween.fire(data); + + var runtimeAttributes = this.runtimeAttributes; + + for (var attr in runtimeAttributes) { + this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + } + + actualFrames += 1; + }; + + var onComplete = function() { + var actual_duration = (new Date() - startTime) / 1000 ; + + var data = { + duration: actual_duration, + frames: actualFrames, + fps: actualFrames / actual_duration + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', frames: ' + data.frames + + ', fps: ' + data.fps + ); + }; + + isAnimated = false; + actualFrames = 0; + this.onComplete.fire(data); + }; + + /** + * Custom event that fires after onStart, useful in subclassing + * @private + */ + 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 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 Y.CustomEvent('tween', this); + + /** + * Custom event that fires after onTween + * @private + */ + 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 Y.CustomEvent('complete', this); + /** + * Custom event that fires after onComplete + * @private + */ + this._onComplete = new Y.CustomEvent('_complete', this, true); + + this._onStart.subscribe(onStart); + this._onTween.subscribe(onTween); + this._onComplete.subscribe(onComplete); + } +}; + + Y.Anim = Anim; +})(); +/** + * Handles animation queueing and threading. + * Used by Anim and subclasses. + * @class AnimMgr + * @namespace YAHOO.util + */ +YAHOO.util.AnimMgr = new function() { + /** + * Reference to the animation Interval. + * @property thread + * @private + * @type Int + */ + var thread = null; + + /** + * The current queue of registered animation objects. + * @property queue + * @private + * @type Array + */ + var queue = []; + + /** + * The number of active animations. + * @property tweenCount + * @private + * @type Int + */ + var tweenCount = 0; + + /** + * Base frame rate (frames per second). + * Arbitrarily high for better x-browser calibration (slower browsers drop more frames). + * @property fps + * @type Int + * + */ + this.fps = 1000; + + /** + * Interval delay in milliseconds, defaults to fastest possible. + * @property delay + * @type Int + * + */ + this.delay = 1; + + /** + * Adds an animation instance to the animation queue. + * All animation instances must be registered in order to animate. + * @method registerElement + * @param {object} tween The Anim instance to be be registered + */ + this.registerElement = function(tween) { + queue[queue.length] = tween; + tweenCount += 1; + tween._onStart.fire(); + this.start(); + }; + + /** + * removes an animation instance from the animation queue. + * All animation instances must be registered in order to animate. + * @method unRegister + * @param {object} tween The Anim instance to be be registered + * @param {Int} index The index of the Anim instance + * @private + */ + this.unRegister = function(tween, index) { + index = index || getIndex(tween); + if (!tween.isAnimated() || index === -1) { + return false; + } + + tween._onComplete.fire(); + queue.splice(index, 1); + + tweenCount -= 1; + if (tweenCount <= 0) { + this.stop(); + } + + return true; + }; + + /** + * Starts the animation thread. + * Only one thread can run at a time. + * @method start + */ + this.start = function() { + if (thread === null) { + thread = setInterval(this.run, this.delay); + } + }; + + /** + * Stops the animation thread or a specific animation instance. + * @method stop + * @param {object} tween A specific Anim instance to stop (optional) + * If no instance given, Manager stops thread and all animations. + */ + this.stop = function(tween) { + if (!tween) { + clearInterval(thread); + + for (var i = 0, len = queue.length; i < len; ++i) { + this.unRegister(queue[0], 0); + } + + queue = []; + thread = null; + tweenCount = 0; + } + else { + this.unRegister(tween); + } + }; + + /** + * Called per Interval to handle each animation frame. + * @method run + */ + this.run = function() { + for (var i = 0, len = queue.length; i < len; ++i) { + var tween = queue[i]; + if ( !tween || !tween.isAnimated() ) { continue; } + + if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null) + { + tween.currentFrame += 1; + + if (tween.useSeconds) { + correctFrame(tween); + } + tween._onTween.fire(); + } + else { YAHOO.util.AnimMgr.stop(tween, i); } + } + }; + + var getIndex = function(anim) { + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[i] === anim) { + return i; // note return; + } + } + return -1; + }; + + /** + * On the fly frame correction to keep animation on time. + * @method correctFrame + * @private + * @param {Object} tween The Anim instance being corrected. + */ + var correctFrame = function(tween) { + var frames = tween.totalFrames; + var frame = tween.currentFrame; + var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames); + var elapsed = (new Date() - tween.getStartTime()); + var tweak = 0; + + if (elapsed < tween.duration * 1000) { // check if falling behind + tweak = Math.round((elapsed / expected - 1) * tween.currentFrame); + } else { // went over duration, so jump to end + tweak = frames - (frame + 1); + } + if (tweak > 0 && isFinite(tweak)) { // adjust if needed + if (tween.currentFrame + tweak >= frames) {// dont go past last frame + tweak = frames - (frame + 1); + } + + tween.currentFrame += tweak; + } + }; + this._queue = queue; + this._getIndex = getIndex; +}; +/** + * Used to calculate Bezier splines for any number of control points. + * @class Bezier + * @namespace YAHOO.util + * + */ +YAHOO.util.Bezier = new function() { + /** + * Get the current position of the animated element based on t. + * Each point is an array of "x" and "y" values (0 = x, 1 = y) + * At least 2 points are required (start and end). + * First point is start. Last point is end. + * Additional control points are optional. + * @method getPosition + * @param {Array} points An array containing Bezier points + * @param {Number} t A number between 0 and 1 which is the basis for determining current position + * @return {Array} An array containing int x and y member data + */ + this.getPosition = function(points, t) { + var n = points.length; + var tmp = []; + + for (var i = 0; i < n; ++i){ + tmp[i] = [points[i][0], points[i][1]]; // save input + } + + for (var j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; +}; +(function() { +/** + * Anim subclass for color transitions. + *

Usage: var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut); Color values can be specified with either 112233, #112233, + * [255,255,255], or rgb(255,255,255)

+ * @class ColorAnim + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @constructor + * @extends YAHOO.util.Anim + * @param {HTMLElement | String} 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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + var ColorAnim = function(el, attributes, duration, method) { + ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + ColorAnim.NAME = 'ColorAnim'; + + ColorAnim.DEFAULT_BGCOLOR = '#fff'; + // shorthand + var Y = YAHOO.util; + 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; + proto.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i; + proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; // need rgba for safari + + /** + * Attempts to parse the given string and return a 3-tuple. + * @method parseColor + * @param {String} s The string to parse. + * @return {Array} The 3-tuple of rgb values. + */ + proto.parseColor = function(s) { + if (s.length == 3) { return s; } + + var c = this.patterns.hex.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ]; + } + + c = this.patterns.rgb.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ]; + } + + c = this.patterns.hex3.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ]; + } + + return null; + }; + + proto.getAttribute = function(attr) { + var el = this.getEl(); + if (this.patterns.color.test(attr) ) { + var val = YAHOO.util.Dom.getStyle(el, attr); + + var that = this; + if (this.patterns.transparent.test(val)) { // bgcolor default + var parent = YAHOO.util.Dom.getAncestorBy(el, function(node) { + return !that.patterns.transparent.test(val); + }); + + if (parent) { + val = Y.Dom.getStyle(parent, attr); + } else { + val = ColorAnim.DEFAULT_BGCOLOR; + } + } + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val; + + if ( this.patterns.color.test(attr) ) { + val = []; + for (var i = 0, len = start.length; i < len; ++i) { + val[i] = superclass.doMethod.call(this, attr, start[i], end[i]); + } + + val = 'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')'; + } + else { + val = superclass.doMethod.call(this, attr, start, end); + } + + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + superclass.setRuntimeAttribute.call(this, attr); + + if ( this.patterns.color.test(attr) ) { + var attributes = this.attributes; + var start = this.parseColor(this.runtimeAttributes[attr].start); + var end = this.parseColor(this.runtimeAttributes[attr].end); + // fix colors if going "by" + if ( typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined' ) { + end = this.parseColor(attributes[attr].by); + + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + end[i]; + } + } + + this.runtimeAttributes[attr].start = start; + 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. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * 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. +*/ + +/** + * Singleton that determines how an animation proceeds from start to end. + * @class Easing + * @namespace YAHOO.util +*/ + +YAHOO.util.Easing = { + + /** + * Uniform speed between points. + * @method easeNone + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeNone: function (t, b, c, d) { + return c*t/d + b; + }, + + /** + * Begins slowly and accelerates towards end. + * @method easeIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeIn: function (t, b, c, d) { + return c*(t/=d)*t + b; + }, + + /** + * Begins quickly and decelerates towards end. + * @method easeOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOut: function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + + /** + * Begins slowly and decelerates towards end. + * @method easeBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBoth: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t + b; + } + + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + + /** + * Begins slowly and accelerates towards end. + * @method easeInStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeInStrong: function (t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + + /** + * Begins quickly and decelerates towards end. + * @method easeOutStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOutStrong: function (t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + + /** + * Begins slowly and decelerates towards end. + * @method easeBothStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBothStrong: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t*t*t + b; + } + + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + + /** + * Snap in elastic effect. + * @method elasticIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + + elasticIn: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + + /** + * Snap out elastic effect. + * @method elasticOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticOut: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p / 4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + + /** + * Snap both elastic effect. + * @method elasticBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticBoth: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + + if ( (t /= d/2) == 2 ) { + return b+c; + } + + if (!p) { + p = d*(.3*1.5); + } + + if ( !a || a < Math.abs(c) ) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + if (t < 1) { + return -.5*(a*Math.pow(2,10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + } + return a*Math.pow(2,-10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + + + /** + * Backtracks slightly, then reverses direction and moves to end. + * @method backIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backIn: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + + /** + * Overshoots end, then reverses and comes back to end. + * @method backOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backOut: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + + /** + * Backtracks slightly, then reverses direction, overshoots end, + * then reverses and comes back to end. + * @method backBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backBoth: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + + if ((t /= d/2 ) < 1) { + return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + } + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + + /** + * Bounce off of start. + * @method bounceIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceIn: function (t, b, c, d) { + return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b; + }, + + /** + * Bounces off end. + * @method bounceOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceOut: function (t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + }, + + /** + * Bounces off start and end. + * @method bounceBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceBoth: function (t, b, c, d) { + if (t < d/2) { + return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b; + } + return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}; + +(function() { +/** + * Anim subclass for moving elements along a path defined by the "points" + * member of "attributes". All "points" are arrays with x, y coordinates. + *

Usage: var myAnim = new YAHOO.util.Motion(el, { points: { to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);

+ * @class Motion + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + var Motion = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + Motion.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + + Motion.NAME = 'Motion'; + + // shorthand + var Y = YAHOO.util; + YAHOO.extend(Motion, Y.ColorAnim); + + var superclass = Motion.superclass; + var proto = Motion.prototype; + + proto.patterns.points = /^points$/i; + + proto.setAttribute = function(attr, val, unit) { + if ( this.patterns.points.test(attr) ) { + unit = unit || 'px'; + superclass.setAttribute.call(this, 'left', val[0], unit); + superclass.setAttribute.call(this, 'top', val[1], unit); + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; + + proto.getAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var val = [ + superclass.getAttribute.call(this, 'left'), + superclass.getAttribute.call(this, 'top') + ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if ( this.patterns.points.test(attr) ) { + var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100; + val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t); + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var el = this.getEl(); + var attributes = this.attributes; + var start; + var control = attributes['points']['control'] || []; + var end; + var i, len; + + if (control.length > 0 && !(control[0] instanceof Array) ) { // could be single point or array of points + control = [control]; + } else { // break reference to attributes.points.control + var tmp = []; + for (i = 0, len = control.length; i< len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + } + + if (Y.Dom.getStyle(el, 'position') == 'static') { // default to relative + Y.Dom.setStyle(el, 'position', 'relative'); + } + + if ( isset(attributes['points']['from']) ) { + Y.Dom.setXY(el, attributes['points']['from']); // set position to from point + } + else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to current position + + start = this.getAttribute('points'); // get actual top & left + + // TO beats BY, per SMIL 2.1 spec + if ( isset(attributes['points']['to']) ) { + end = translateValues.call(this, attributes['points']['to'], start); + + var pageXY = Y.Dom.getXY(this.getEl()); + for (i = 0, len = control.length; i < len; ++i) { + control[i] = translateValues.call(this, control[i], start); + } + + + } else if ( isset(attributes['points']['by']) ) { + end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ]; + + for (i = 0, len = control.length; i < len; ++i) { + control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; + } + } + + this.runtimeAttributes[attr] = [start]; + + if (control.length > 0) { + 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'); + }; + + Y.Motion = Motion; +})(); +(function() { +/** + * Anim subclass for scrolling elements to a position defined by the "scroll" + * member of "attributes". All "scroll" members are arrays with x, y scroll positions. + *

Usage: var myAnim = new YAHOO.util.Scroll(el, { scroll: { to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);

+ * @class Scroll + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @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. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + var Scroll = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + Scroll.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + Scroll.NAME = 'Scroll'; + + // shorthand + var Y = YAHOO.util; + YAHOO.extend(Scroll, Y.ColorAnim); + + var superclass = Scroll.superclass; + var proto = Scroll.prototype; + + 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); + } + }; + + Y.Scroll = Scroll; +})(); +YAHOO.register("animation", YAHOO.util.Anim, {version: "2.8.1", build: "19"}); diff --git a/lib/yui/animation/animation-min.js b/lib/yui/animation/animation-min.js new file mode 100644 index 00000000..7ea80553 --- /dev/null +++ b/lib/yui/animation/animation-min.js @@ -0,0 +1,23 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +(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,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0;}if(C in D&&!("style" in D&&C in D.style)){D[C]=F;}else{B.Dom.setStyle(D,C,F+E);}},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("style" in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}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;}};this._queue=B;this._getIndex=E;};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;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.8.1",build:"19"}); \ No newline at end of file diff --git a/lib/yui/animation/animation.js b/lib/yui/animation/animation.js new file mode 100644 index 00000000..ebc8e87c --- /dev/null +++ b/lib/yui/animation/animation.js @@ -0,0 +1,1392 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +(function() { + +var Y = YAHOO.util; + +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +*/ + +/** + * The animation module provides allows effects to be added to HTMLElements. + * @module animation + * @requires yahoo, event, dom + */ + +/** + * + * Base animation class that provides the interface for building animated effects. + *

Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);

+ * @class Anim + * @namespace YAHOO.util + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + +var Anim = function(el, attributes, duration, method) { + if (!el) { + } + this.init(el, attributes, duration, method); +}; + +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; + return (this.constructor.NAME + ': ' + id); + }, + + patterns: { // cached for performance + noNegatives: /width|height|opacity|padding/i, // keep at zero or above + offsetAttribute: /^((width|height)|(top|left))$/, // use offsetValue as default + defaultUnit: /width|height|top$|bottom$|left$|right$/i, // use 'px' by default + offsetUnit: /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset + }, + + /** + * Returns the value computed by the animation's "method". + * @method doMethod + * @param {String} attr The name of the attribute. + * @param {Number} start The value this attribute should start from for this animation. + * @param {Number} end The value this attribute should end at for this animation. + * @return {Number} The Value to be applied to the attribute. + */ + doMethod: function(attr, start, end) { + return this.method(this.currentFrame, start, end - start, this.totalFrames); + }, + + /** + * Applies a value to an attribute. + * @method setAttribute + * @param {String} attr The name of the attribute. + * @param {Number} val The value to be applied to the attribute. + * @param {String} unit The unit ('px', '%', etc.) of the value. + */ + setAttribute: function(attr, val, unit) { + var el = this.getEl(); + if ( this.patterns.noNegatives.test(attr) ) { + val = (val > 0) ? val : 0; + } + + if (attr in el && !('style' in el && attr in el.style)) { + el[attr] = val; + } else { + Y.Dom.setStyle(el, attr, val + unit); + } + }, + + /** + * Returns current value of the attribute. + * @method getAttribute + * @param {String} attr The name of the attribute. + * @return {Number} val The current value of the attribute. + */ + getAttribute: function(attr) { + var el = this.getEl(); + var val = Y.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] ); // top or left + var box = !!( a[2] ); // width or height + + if ('style' in el) { + // use offsets for width/height and abs pos top/left + 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; + } + } else if (attr in el) { + val = el[attr]; + } + + return val; + }, + + /** + * Returns the unit to use when none is supplied. + * @method getDefaultUnit + * @param {attr} attr The name of the attribute. + * @return {String} The default unit to be used. + */ + getDefaultUnit: function(attr) { + if ( this.patterns.defaultUnit.test(attr) ) { + return 'px'; + } + + return ''; + }, + + /** + * Sets the actual values to be used during the animation. Should only be needed for subclass use. + * @method setRuntimeAttribute + * @param {Object} attr The attribute object + * @private + */ + 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; // note return; nothing to animate to + } + + start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr); + + // To beats by, per SMIL 2.1 spec + 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; i < len; ++i) { + end[i] = start[i] + attributes[attr]['by'][i] * 1; // times 1 to cast "by" + } + } else { + end = start + attributes[attr]['by'] * 1; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + + // set units if needed + this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ? + attributes[attr]['unit'] : this.getDefaultUnit(attr); + return true; + }, + + /** + * Constructor for Anim instance. + * @method init + * @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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + init: function(el, attributes, duration, method) { + /** + * Whether or not the animation is running. + * @property isAnimated + * @private + * @type Boolean + */ + var isAnimated = false; + + /** + * A Date object that is created when the animation begins. + * @property startTime + * @private + * @type Date + */ + var startTime = null; + + /** + * The number of frames this animation was able to execute. + * @property actualFrames + * @private + * @type Int + */ + var actualFrames = 0; + + /** + * The element to be animated. + * @property el + * @private + * @type HTMLElement + */ + el = Y.Dom.get(el); + + /** + * The collection of attributes to be animated. + * Each attribute must have at least a "to" or "by" defined in order to animate. + * If "to" is supplied, the animation will end with the attribute at that value. + * If "by" is supplied, the animation will end at that value plus its starting value. + * If both are supplied, "to" is used, and "by" is ignored. + * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values). + * @property attributes + * @type Object + */ + this.attributes = attributes || {}; + + /** + * The length of the animation. Defaults to "1" (second). + * @property duration + * @type Number + */ + this.duration = !YAHOO.lang.isUndefined(duration) ? duration : 1; + + /** + * The method that will provide values to the attribute(s) during the animation. + * Defaults to "YAHOO.util.Easing.easeNone". + * @property method + * @type Function + */ + this.method = method || Y.Easing.easeNone; + + /** + * Whether or not the duration should be treated as seconds. + * Defaults to true. + * @property useSeconds + * @type Boolean + */ + this.useSeconds = true; // default to seconds + + /** + * The location of the current animation on the timeline. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property currentFrame + * @type Int + */ + this.currentFrame = 0; + + /** + * The total number of frames to be executed. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property totalFrames + * @type Int + */ + this.totalFrames = Y.AnimMgr.fps; + + /** + * Changes the animated element + * @method setEl + */ + this.setEl = function(element) { + el = Y.Dom.get(element); + }; + + /** + * Returns a reference to the animated element. + * @method getEl + * @return {HTMLElement} + */ + this.getEl = function() { return el; }; + + /** + * Checks whether the element is currently animated. + * @method isAnimated + * @return {Boolean} current value of isAnimated. + */ + this.isAnimated = function() { + return isAnimated; + }; + + /** + * Returns the animation start time. + * @method getStartTime + * @return {Date} current value of startTime. + */ + this.getStartTime = function() { + return startTime; + }; + + this.runtimeAttributes = {}; + + + + /** + * Starts the animation by registering it with the animation manager. + * @method animate + */ + this.animate = function() { + if ( this.isAnimated() ) { + return false; + } + + this.currentFrame = 0; + + this.totalFrames = ( this.useSeconds ) ? Math.ceil(Y.AnimMgr.fps * this.duration) : this.duration; + + if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration + this.totalFrames = 1; + } + Y.AnimMgr.registerElement(this); + return true; + }; + + /** + * Stops the animation. Normally called by AnimMgr when animation completes. + * @method stop + * @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(); + } + Y.AnimMgr.stop(this); + }; + + var onStart = function() { + this.onStart.fire(); + + this.runtimeAttributes = {}; + for (var attr in this.attributes) { + this.setRuntimeAttribute(attr); + } + + isAnimated = true; + actualFrames = 0; + startTime = new Date(); + }; + + /** + * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s). + * @private + */ + + var onTween = function() { + var data = { + duration: new Date() - this.getStartTime(), + currentFrame: this.currentFrame + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', currentFrame: ' + data.currentFrame + ); + }; + + this.onTween.fire(data); + + var runtimeAttributes = this.runtimeAttributes; + + for (var attr in runtimeAttributes) { + this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + } + + actualFrames += 1; + }; + + var onComplete = function() { + var actual_duration = (new Date() - startTime) / 1000 ; + + var data = { + duration: actual_duration, + frames: actualFrames, + fps: actualFrames / actual_duration + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', frames: ' + data.frames + + ', fps: ' + data.fps + ); + }; + + isAnimated = false; + actualFrames = 0; + this.onComplete.fire(data); + }; + + /** + * Custom event that fires after onStart, useful in subclassing + * @private + */ + 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 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 Y.CustomEvent('tween', this); + + /** + * Custom event that fires after onTween + * @private + */ + 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 Y.CustomEvent('complete', this); + /** + * Custom event that fires after onComplete + * @private + */ + this._onComplete = new Y.CustomEvent('_complete', this, true); + + this._onStart.subscribe(onStart); + this._onTween.subscribe(onTween); + this._onComplete.subscribe(onComplete); + } +}; + + Y.Anim = Anim; +})(); +/** + * Handles animation queueing and threading. + * Used by Anim and subclasses. + * @class AnimMgr + * @namespace YAHOO.util + */ +YAHOO.util.AnimMgr = new function() { + /** + * Reference to the animation Interval. + * @property thread + * @private + * @type Int + */ + var thread = null; + + /** + * The current queue of registered animation objects. + * @property queue + * @private + * @type Array + */ + var queue = []; + + /** + * The number of active animations. + * @property tweenCount + * @private + * @type Int + */ + var tweenCount = 0; + + /** + * Base frame rate (frames per second). + * Arbitrarily high for better x-browser calibration (slower browsers drop more frames). + * @property fps + * @type Int + * + */ + this.fps = 1000; + + /** + * Interval delay in milliseconds, defaults to fastest possible. + * @property delay + * @type Int + * + */ + this.delay = 1; + + /** + * Adds an animation instance to the animation queue. + * All animation instances must be registered in order to animate. + * @method registerElement + * @param {object} tween The Anim instance to be be registered + */ + this.registerElement = function(tween) { + queue[queue.length] = tween; + tweenCount += 1; + tween._onStart.fire(); + this.start(); + }; + + /** + * removes an animation instance from the animation queue. + * All animation instances must be registered in order to animate. + * @method unRegister + * @param {object} tween The Anim instance to be be registered + * @param {Int} index The index of the Anim instance + * @private + */ + this.unRegister = function(tween, index) { + index = index || getIndex(tween); + if (!tween.isAnimated() || index === -1) { + return false; + } + + tween._onComplete.fire(); + queue.splice(index, 1); + + tweenCount -= 1; + if (tweenCount <= 0) { + this.stop(); + } + + return true; + }; + + /** + * Starts the animation thread. + * Only one thread can run at a time. + * @method start + */ + this.start = function() { + if (thread === null) { + thread = setInterval(this.run, this.delay); + } + }; + + /** + * Stops the animation thread or a specific animation instance. + * @method stop + * @param {object} tween A specific Anim instance to stop (optional) + * If no instance given, Manager stops thread and all animations. + */ + this.stop = function(tween) { + if (!tween) { + clearInterval(thread); + + for (var i = 0, len = queue.length; i < len; ++i) { + this.unRegister(queue[0], 0); + } + + queue = []; + thread = null; + tweenCount = 0; + } + else { + this.unRegister(tween); + } + }; + + /** + * Called per Interval to handle each animation frame. + * @method run + */ + this.run = function() { + for (var i = 0, len = queue.length; i < len; ++i) { + var tween = queue[i]; + if ( !tween || !tween.isAnimated() ) { continue; } + + if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null) + { + tween.currentFrame += 1; + + if (tween.useSeconds) { + correctFrame(tween); + } + tween._onTween.fire(); + } + else { YAHOO.util.AnimMgr.stop(tween, i); } + } + }; + + var getIndex = function(anim) { + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[i] === anim) { + return i; // note return; + } + } + return -1; + }; + + /** + * On the fly frame correction to keep animation on time. + * @method correctFrame + * @private + * @param {Object} tween The Anim instance being corrected. + */ + var correctFrame = function(tween) { + var frames = tween.totalFrames; + var frame = tween.currentFrame; + var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames); + var elapsed = (new Date() - tween.getStartTime()); + var tweak = 0; + + if (elapsed < tween.duration * 1000) { // check if falling behind + tweak = Math.round((elapsed / expected - 1) * tween.currentFrame); + } else { // went over duration, so jump to end + tweak = frames - (frame + 1); + } + if (tweak > 0 && isFinite(tweak)) { // adjust if needed + if (tween.currentFrame + tweak >= frames) {// dont go past last frame + tweak = frames - (frame + 1); + } + + tween.currentFrame += tweak; + } + }; + this._queue = queue; + this._getIndex = getIndex; +}; +/** + * Used to calculate Bezier splines for any number of control points. + * @class Bezier + * @namespace YAHOO.util + * + */ +YAHOO.util.Bezier = new function() { + /** + * Get the current position of the animated element based on t. + * Each point is an array of "x" and "y" values (0 = x, 1 = y) + * At least 2 points are required (start and end). + * First point is start. Last point is end. + * Additional control points are optional. + * @method getPosition + * @param {Array} points An array containing Bezier points + * @param {Number} t A number between 0 and 1 which is the basis for determining current position + * @return {Array} An array containing int x and y member data + */ + this.getPosition = function(points, t) { + var n = points.length; + var tmp = []; + + for (var i = 0; i < n; ++i){ + tmp[i] = [points[i][0], points[i][1]]; // save input + } + + for (var j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; +}; +(function() { +/** + * Anim subclass for color transitions. + *

Usage: var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut); Color values can be specified with either 112233, #112233, + * [255,255,255], or rgb(255,255,255)

+ * @class ColorAnim + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @constructor + * @extends YAHOO.util.Anim + * @param {HTMLElement | String} 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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + var ColorAnim = function(el, attributes, duration, method) { + ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + ColorAnim.NAME = 'ColorAnim'; + + ColorAnim.DEFAULT_BGCOLOR = '#fff'; + // shorthand + var Y = YAHOO.util; + 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; + proto.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i; + proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; // need rgba for safari + + /** + * Attempts to parse the given string and return a 3-tuple. + * @method parseColor + * @param {String} s The string to parse. + * @return {Array} The 3-tuple of rgb values. + */ + proto.parseColor = function(s) { + if (s.length == 3) { return s; } + + var c = this.patterns.hex.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ]; + } + + c = this.patterns.rgb.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ]; + } + + c = this.patterns.hex3.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ]; + } + + return null; + }; + + proto.getAttribute = function(attr) { + var el = this.getEl(); + if (this.patterns.color.test(attr) ) { + var val = YAHOO.util.Dom.getStyle(el, attr); + + var that = this; + if (this.patterns.transparent.test(val)) { // bgcolor default + var parent = YAHOO.util.Dom.getAncestorBy(el, function(node) { + return !that.patterns.transparent.test(val); + }); + + if (parent) { + val = Y.Dom.getStyle(parent, attr); + } else { + val = ColorAnim.DEFAULT_BGCOLOR; + } + } + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val; + + if ( this.patterns.color.test(attr) ) { + val = []; + for (var i = 0, len = start.length; i < len; ++i) { + val[i] = superclass.doMethod.call(this, attr, start[i], end[i]); + } + + val = 'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')'; + } + else { + val = superclass.doMethod.call(this, attr, start, end); + } + + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + superclass.setRuntimeAttribute.call(this, attr); + + if ( this.patterns.color.test(attr) ) { + var attributes = this.attributes; + var start = this.parseColor(this.runtimeAttributes[attr].start); + var end = this.parseColor(this.runtimeAttributes[attr].end); + // fix colors if going "by" + if ( typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined' ) { + end = this.parseColor(attributes[attr].by); + + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + end[i]; + } + } + + this.runtimeAttributes[attr].start = start; + 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. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * 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. +*/ + +/** + * Singleton that determines how an animation proceeds from start to end. + * @class Easing + * @namespace YAHOO.util +*/ + +YAHOO.util.Easing = { + + /** + * Uniform speed between points. + * @method easeNone + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeNone: function (t, b, c, d) { + return c*t/d + b; + }, + + /** + * Begins slowly and accelerates towards end. + * @method easeIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeIn: function (t, b, c, d) { + return c*(t/=d)*t + b; + }, + + /** + * Begins quickly and decelerates towards end. + * @method easeOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOut: function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + + /** + * Begins slowly and decelerates towards end. + * @method easeBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBoth: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t + b; + } + + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + + /** + * Begins slowly and accelerates towards end. + * @method easeInStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeInStrong: function (t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + + /** + * Begins quickly and decelerates towards end. + * @method easeOutStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOutStrong: function (t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + + /** + * Begins slowly and decelerates towards end. + * @method easeBothStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBothStrong: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t*t*t + b; + } + + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + + /** + * Snap in elastic effect. + * @method elasticIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + + elasticIn: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + + /** + * Snap out elastic effect. + * @method elasticOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticOut: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p / 4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + + /** + * Snap both elastic effect. + * @method elasticBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticBoth: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + + if ( (t /= d/2) == 2 ) { + return b+c; + } + + if (!p) { + p = d*(.3*1.5); + } + + if ( !a || a < Math.abs(c) ) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + if (t < 1) { + return -.5*(a*Math.pow(2,10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + } + return a*Math.pow(2,-10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + + + /** + * Backtracks slightly, then reverses direction and moves to end. + * @method backIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backIn: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + + /** + * Overshoots end, then reverses and comes back to end. + * @method backOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backOut: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + + /** + * Backtracks slightly, then reverses direction, overshoots end, + * then reverses and comes back to end. + * @method backBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backBoth: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + + if ((t /= d/2 ) < 1) { + return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + } + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + + /** + * Bounce off of start. + * @method bounceIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceIn: function (t, b, c, d) { + return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b; + }, + + /** + * Bounces off end. + * @method bounceOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceOut: function (t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + }, + + /** + * Bounces off start and end. + * @method bounceBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceBoth: function (t, b, c, d) { + if (t < d/2) { + return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b; + } + return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}; + +(function() { +/** + * Anim subclass for moving elements along a path defined by the "points" + * member of "attributes". All "points" are arrays with x, y coordinates. + *

Usage: var myAnim = new YAHOO.util.Motion(el, { points: { to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);

+ * @class Motion + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @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. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + var Motion = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + Motion.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + + Motion.NAME = 'Motion'; + + // shorthand + var Y = YAHOO.util; + YAHOO.extend(Motion, Y.ColorAnim); + + var superclass = Motion.superclass; + var proto = Motion.prototype; + + proto.patterns.points = /^points$/i; + + proto.setAttribute = function(attr, val, unit) { + if ( this.patterns.points.test(attr) ) { + unit = unit || 'px'; + superclass.setAttribute.call(this, 'left', val[0], unit); + superclass.setAttribute.call(this, 'top', val[1], unit); + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; + + proto.getAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var val = [ + superclass.getAttribute.call(this, 'left'), + superclass.getAttribute.call(this, 'top') + ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if ( this.patterns.points.test(attr) ) { + var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100; + val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t); + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var el = this.getEl(); + var attributes = this.attributes; + var start; + var control = attributes['points']['control'] || []; + var end; + var i, len; + + if (control.length > 0 && !(control[0] instanceof Array) ) { // could be single point or array of points + control = [control]; + } else { // break reference to attributes.points.control + var tmp = []; + for (i = 0, len = control.length; i< len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + } + + if (Y.Dom.getStyle(el, 'position') == 'static') { // default to relative + Y.Dom.setStyle(el, 'position', 'relative'); + } + + if ( isset(attributes['points']['from']) ) { + Y.Dom.setXY(el, attributes['points']['from']); // set position to from point + } + else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to current position + + start = this.getAttribute('points'); // get actual top & left + + // TO beats BY, per SMIL 2.1 spec + if ( isset(attributes['points']['to']) ) { + end = translateValues.call(this, attributes['points']['to'], start); + + var pageXY = Y.Dom.getXY(this.getEl()); + for (i = 0, len = control.length; i < len; ++i) { + control[i] = translateValues.call(this, control[i], start); + } + + + } else if ( isset(attributes['points']['by']) ) { + end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ]; + + for (i = 0, len = control.length; i < len; ++i) { + control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; + } + } + + this.runtimeAttributes[attr] = [start]; + + if (control.length > 0) { + 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'); + }; + + Y.Motion = Motion; +})(); +(function() { +/** + * Anim subclass for scrolling elements to a position defined by the "scroll" + * member of "attributes". All "scroll" members are arrays with x, y scroll positions. + *

Usage: var myAnim = new YAHOO.util.Scroll(el, { scroll: { to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);

+ * @class Scroll + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @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. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @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) + */ + var Scroll = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + Scroll.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + Scroll.NAME = 'Scroll'; + + // shorthand + var Y = YAHOO.util; + YAHOO.extend(Scroll, Y.ColorAnim); + + var superclass = Scroll.superclass; + var proto = Scroll.prototype; + + 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); + } + }; + + Y.Scroll = Scroll; +})(); +YAHOO.register("animation", YAHOO.util.Anim, {version: "2.8.1", build: "19"}); diff --git a/lib/yui/assets/skins/sam/ajax-loader.gif b/lib/yui/assets/skins/sam/ajax-loader.gif new file mode 100644 index 00000000..fe2cd23b Binary files /dev/null and b/lib/yui/assets/skins/sam/ajax-loader.gif differ diff --git a/lib/yui/assets/skins/sam/asc.gif b/lib/yui/assets/skins/sam/asc.gif new file mode 100644 index 00000000..a1fe7385 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 new file mode 100644 index 00000000..33e9d1de --- /dev/null +++ b/lib/yui/assets/skins/sam/autocomplete.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.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;list-style:none;zoom:1;}.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/back-h.png b/lib/yui/assets/skins/sam/back-h.png new file mode 100644 index 00000000..5f69f4e2 Binary files /dev/null and b/lib/yui/assets/skins/sam/back-h.png differ diff --git a/lib/yui/assets/skins/sam/back-v.png b/lib/yui/assets/skins/sam/back-v.png new file mode 100644 index 00000000..658574a9 Binary files /dev/null and b/lib/yui/assets/skins/sam/back-v.png differ diff --git a/lib/yui/assets/skins/sam/bar-h.png b/lib/yui/assets/skins/sam/bar-h.png new file mode 100644 index 00000000..fea13b15 Binary files /dev/null and b/lib/yui/assets/skins/sam/bar-h.png differ diff --git a/lib/yui/assets/skins/sam/bar-v.png b/lib/yui/assets/skins/sam/bar-v.png new file mode 100644 index 00000000..2efd664d Binary files /dev/null and b/lib/yui/assets/skins/sam/bar-v.png differ diff --git a/lib/yui/assets/skins/sam/bg-h.gif b/lib/yui/assets/skins/sam/bg-h.gif new file mode 100644 index 00000000..99628891 Binary files /dev/null and b/lib/yui/assets/skins/sam/bg-h.gif differ diff --git a/lib/yui/assets/skins/sam/bg-v.gif b/lib/yui/assets/skins/sam/bg-v.gif new file mode 100644 index 00000000..8e287cd5 Binary files /dev/null and b/lib/yui/assets/skins/sam/bg-v.gif differ diff --git a/lib/yui/assets/skins/sam/blankimage.png b/lib/yui/assets/skins/sam/blankimage.png new file mode 100644 index 00000000..b87bb248 Binary files /dev/null and b/lib/yui/assets/skins/sam/blankimage.png differ diff --git a/lib/yui/assets/skins/sam/button.css b/lib/yui/assets/skins/sam/button.css new file mode 100644 index 00000000..81e5e35f --- /dev/null +++ b/lib/yui/assets/skins/sam/button.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{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:1.875;*padding-bottom:1px;}.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-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-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-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,.yui-skin-sam .yui-button-disabled a:visited{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 new file mode 100644 index 00000000..93561b72 --- /dev/null +++ b/lib/yui/assets/skins/sam/calendar.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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:0;top:0;}.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;text-indent:-10000em;overflow:hidden;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.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 #ccc;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 #ccc;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:#06c;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:#ccc;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:#cf9;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9;}.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:.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/carousel.css b/lib/yui/assets/skins/sam/carousel.css new file mode 100644 index 00000000..874e4785 --- /dev/null +++ b/lib/yui/assets/skins/sam/carousel.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;text-align:center;}.yui-carousel-element li{border:1px solid #ccc;list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width{min-width:115px;}.yui-carousel-element{overflow:hidden;position:relative;margin:0 auto;padding:0;text-align:left;*margin:0;}.yui-carousel-horizontal .yui-carousel-element{width:320000px;}.yui-carousel-vertical .yui-carousel-element{height:320000px;}.yui-skin-sam .yui-carousel-nav select{position:static;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{position:static;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-skin-sam .yui-carousel-nav ul li a{display:block;width:100%;height:100%;text-indent:-10000px;text-align:left;overflow:hidden;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;} diff --git a/lib/yui/assets/skins/sam/check0.gif b/lib/yui/assets/skins/sam/check0.gif new file mode 100644 index 00000000..193028b9 Binary files /dev/null and b/lib/yui/assets/skins/sam/check0.gif differ diff --git a/lib/yui/assets/skins/sam/check1.gif b/lib/yui/assets/skins/sam/check1.gif new file mode 100644 index 00000000..7d9ceba3 Binary files /dev/null and b/lib/yui/assets/skins/sam/check1.gif differ diff --git a/lib/yui/assets/skins/sam/check2.gif b/lib/yui/assets/skins/sam/check2.gif new file mode 100644 index 00000000..18131759 Binary files /dev/null and b/lib/yui/assets/skins/sam/check2.gif differ diff --git a/lib/yui/assets/skins/sam/colorpicker.css b/lib/yui/assets/skins/sam/colorpicker.css new file mode 100644 index 00000000..f930c639 --- /dev/null +++ b/lib/yui/assets/skins/sam/colorpicker.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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:0 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:0 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:0;left:0;}.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:0!important;}.yui-picker-controls .bd{height:100px;border-width:0!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:.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 new file mode 100644 index 00000000..fc0fb17f --- /dev/null +++ b/lib/yui/assets/skins/sam/container.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel{position:relative;}.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,.yui-effect-fade .yui-tt-shadow{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0!important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.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 .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 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom: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-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.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 new file mode 100644 index 00000000..9b04c26e --- /dev/null +++ b/lib/yui/assets/skins/sam/datatable.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-skin-sam .yui-dt-mask{position:absolute;z-index:9500;}.yui-dt-tmp{position:absolute;left:-9000px;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-scrollable tbody{-moz-outline:none;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam thead .yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none;}.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:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center;}.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 tr.yui-dt-first td{border-top:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap;}.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-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-dt-message{background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable table{border:none;}.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;background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7F7F7F;}.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;}tbody .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-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;background-color:#fff;}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;} diff --git a/lib/yui/assets/skins/sam/desc.gif b/lib/yui/assets/skins/sam/desc.gif new file mode 100644 index 00000000..c114f290 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 new file mode 100644 index 00000000..85fda0bb Binary files /dev/null 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 new file mode 100644 index 00000000..1c674316 Binary files /dev/null and b/lib/yui/assets/skins/sam/dt-arrow-up.png differ diff --git a/lib/yui/assets/skins/sam/editor-knob.gif b/lib/yui/assets/skins/sam/editor-knob.gif new file mode 100644 index 00000000..03feab3b Binary files /dev/null and b/lib/yui/assets/skins/sam/editor-knob.gif differ diff --git a/lib/yui/assets/skins/sam/editor-sprite-active.gif b/lib/yui/assets/skins/sam/editor-sprite-active.gif new file mode 100644 index 00000000..3e9d4200 Binary files /dev/null and b/lib/yui/assets/skins/sam/editor-sprite-active.gif differ diff --git a/lib/yui/assets/skins/sam/editor-sprite.gif b/lib/yui/assets/skins/sam/editor-sprite.gif new file mode 100644 index 00000000..02042fa1 Binary files /dev/null and b/lib/yui/assets/skins/sam/editor-sprite.gif differ diff --git a/lib/yui/assets/skins/sam/editor.css b/lib/yui/assets/skins/sam/editor.css new file mode 100644 index 00000000..610b3efa --- /dev/null +++ b/lib/yui/assets/skins/sam/editor.css @@ -0,0 +1,10 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.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-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;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;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.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;font-size:0;}.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;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;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:.25em 0 .25em .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 .gecko form{overflow:auto;}.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{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} +.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;text-indent:52px;font-size:0;}.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:0;text-indent:0;font-size:75%;}.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:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.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:.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-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.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-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.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:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .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:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.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;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.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:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.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;position:relative;}.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:0;}.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 .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.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-strikethrough span.yui-toolbar-icon{background-position:0 -108px;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-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;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:0;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;position:absolute;}.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 .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.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;_width:198px;}.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:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} 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 00000000..3ef7909d Binary files /dev/null and b/lib/yui/assets/skins/sam/header_background.png differ diff --git a/lib/yui/assets/skins/sam/hue_bg.png b/lib/yui/assets/skins/sam/hue_bg.png new file mode 100644 index 00000000..d9bcdeb5 Binary files /dev/null and b/lib/yui/assets/skins/sam/hue_bg.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 00000000..8b70fb92 --- /dev/null +++ b/lib/yui/assets/skins/sam/imagecropper.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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;border:0;}.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 00000000..f8dbee2b --- /dev/null +++ b/lib/yui/assets/skins/sam/layout.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-layout-loading{visibility:hidden;}body.yui-layout{overflow:hidden;position:relative;padding:0;margin:0;}.yui-layout-doc{position:relative;overflow:hidden;padding:0;margin:0;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;}.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%;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout .yui-layout-noscroll div.yui-layout-bd{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;}.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:0;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.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{display:none;zoom:1;}.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{zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;position:absolute;zoom:1;}.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;margin:0;}.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;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r{right:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;zoom:1;}.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:0;display:block;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;zoom:1;} 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 00000000..d6fce3c7 Binary files /dev/null and b/lib/yui/assets/skins/sam/layout_sprite.png differ diff --git a/lib/yui/assets/skins/sam/loading.gif b/lib/yui/assets/skins/sam/loading.gif new file mode 100644 index 00000000..0bbf3bc0 Binary files /dev/null and b/lib/yui/assets/skins/sam/loading.gif differ diff --git a/lib/yui/assets/skins/sam/logger.css b/lib/yui/assets/skins/sam/logger.css new file mode 100644 index 00000000..f71ebb5d --- /dev/null +++ b/lib/yui/assets/skins/sam/logger.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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-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-button-arrow-disabled.png b/lib/yui/assets/skins/sam/menu-button-arrow-disabled.png new file mode 100644 index 00000000..8cef2abb Binary files /dev/null and b/lib/yui/assets/skins/sam/menu-button-arrow-disabled.png differ diff --git a/lib/yui/assets/skins/sam/menu-button-arrow.png b/lib/yui/assets/skins/sam/menu-button-arrow.png new file mode 100644 index 00000000..f03dfee4 Binary files /dev/null and b/lib/yui/assets/skins/sam/menu-button-arrow.png differ diff --git a/lib/yui/assets/skins/sam/menu.css b/lib/yui/assets/skins/sam/menu.css new file mode 100644 index 00000000..06fe68f4 --- /dev/null +++ b/lib/yui/assets/skins/sam/menu.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.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-overlay.yui-force-redraw{margin-bottom:1px;}.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 .yuimenubaritemlabel:visited{color:#000;}.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,.yui-skin-sam .yuimenubaritemlabel-disabled:visited{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{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.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:visited{color:#000;}.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,.yui-skin-sam .yuimenuitemlabel-disabled:visited{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 00000000..030941c9 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 00000000..6c161223 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 00000000..1437a4f4 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 00000000..5d5b9985 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 00000000..ea4f6602 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 00000000..427d60a3 Binary files /dev/null and b/lib/yui/assets/skins/sam/menuitem_submenuindicator_disabled.png differ diff --git a/lib/yui/assets/skins/sam/paginator.css b/lib/yui/assets/skins/sam/paginator.css new file mode 100644 index 00000000..53c95421 --- /dev/null +++ b/lib/yui/assets/skins/sam/paginator.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-skin-sam .yui-pg-container{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1;}.yui-skin-sam .yui-pg-pages{padding:0;}.yui-skin-sam .yui-pg-current{padding:3px 0;}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0;}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6;}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:none;font-weight:bold;padding:3px 6px;}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0;}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0;}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em;} diff --git a/lib/yui/assets/skins/sam/picker_mask.png b/lib/yui/assets/skins/sam/picker_mask.png new file mode 100644 index 00000000..f8d91932 Binary files /dev/null and b/lib/yui/assets/skins/sam/picker_mask.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 00000000..2c9ea77c --- /dev/null +++ b/lib/yui/assets/skins/sam/profilerviewer.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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/progressbar.css b/lib/yui/assets/skins/sam/progressbar.css new file mode 100644 index 00000000..5d2fe4d6 --- /dev/null +++ b/lib/yui/assets/skins/sam/progressbar.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-pb-bar,.yui-pb-mask{width:100%;height:100%;}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:none;margin:0;text-align:left;}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2;}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute;}.yui-pb-tl{background-position:top left;}.yui-pb-tr{background-position:top right;left:50%;}.yui-pb-bl{background-position:bottom left;top:50%;}.yui-pb-br{background-position:bottom right;left:50%;top:50%;}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1;}.yui-pb-ltr .yui-pb-bar{_position:static;}.yui-pb-rtl .yui-pb-bar{background-position:right;}.yui-pb-btt .yui-pb-bar{background-position:left bottom;}.yui-pb-bar{background-color:blue;}.yui-pb{border:thin solid #808080;}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0;}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(back-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(back-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-bar{background-color:transparent;}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(bar-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(bar-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px;}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto;}.yui-skin-sam .yui-pb-range{color:#a6a6a6;} diff --git a/lib/yui/assets/skins/sam/resize.css b/lib/yui/assets/skins/sam/resize.css new file mode 100644 index 00000000..b40410f0 --- /dev/null +++ b/lib/yui/assets/skins/sam/resize.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;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;color:#000;}.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-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-r{right:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-b{bottom:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-br{right:-8px;bottom:-8px;} diff --git a/lib/yui/assets/skins/sam/simpleeditor.css b/lib/yui/assets/skins/sam/simpleeditor.css new file mode 100644 index 00000000..610b3efa --- /dev/null +++ b/lib/yui/assets/skins/sam/simpleeditor.css @@ -0,0 +1,10 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.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-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;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;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.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;font-size:0;}.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;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;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:.25em 0 .25em .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 .gecko form{overflow:auto;}.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{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} +.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;text-indent:52px;font-size:0;}.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:0;text-indent:0;font-size:75%;}.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:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.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:.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-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.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-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.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:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .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:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.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;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.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:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.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;position:relative;}.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:0;}.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 .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.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-strikethrough span.yui-toolbar-icon{background-position:0 -108px;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-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;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:0;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;position:absolute;}.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 .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.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;_width:198px;}.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:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} diff --git a/lib/yui/assets/skins/sam/skin.css b/lib/yui/assets/skins/sam/skin.css new file mode 100644 index 00000000..fd9b524a --- /dev/null +++ b/lib/yui/assets/skins/sam/skin.css @@ -0,0 +1,36 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.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;list-style:none;zoom:1;}.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-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;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{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:1.875;*padding-bottom:1px;}.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-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-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-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,.yui-skin-sam .yui-button-disabled a:visited{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:0;top:0;}.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;text-indent:-10000em;overflow:hidden;}.yui-calendar{position:relative;}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden;}.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 #ccc;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 #ccc;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:#06c;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:#ccc;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:#cf9;}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf;}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc;}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9;}.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:.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-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;text-align:center;}.yui-carousel-element li{border:1px solid #ccc;list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width{min-width:115px;}.yui-carousel-element{overflow:hidden;position:relative;margin:0 auto;padding:0;text-align:left;*margin:0;}.yui-carousel-horizontal .yui-carousel-element{width:320000px;}.yui-carousel-vertical .yui-carousel-element{height:320000px;}.yui-skin-sam .yui-carousel-nav select{position:static;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{position:static;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.yui-skin-sam .yui-carousel-nav ul li a{display:block;width:100%;height:100%;text-indent:-10000px;text-align:left;overflow:hidden;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(ajax-loader.gif) no-repeat 50% 50%;position:absolute;text-indent:-150px;} +.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:0 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:0 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:0;left:0;}.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:0!important;}.yui-picker-controls .bd{height:100px;border-width:0!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:.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{position:relative;}.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,.yui-effect-fade .yui-tt-shadow{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0!important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.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 .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 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom: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-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.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-skin-sam .yui-dt-mask{position:absolute;z-index:9500;}.yui-dt-tmp{position:absolute;left:-9000px;}.yui-dt-scrollable .yui-dt-bd{overflow:auto;}.yui-dt-scrollable .yui-dt-hd{overflow:hidden;position:relative;}.yui-dt-scrollable .yui-dt-bd thead tr,.yui-dt-scrollable .yui-dt-bd thead th{position:absolute;left:-1500px;}.yui-dt-scrollable tbody{-moz-outline:none;}.yui-skin-sam thead .yui-dt-sortable{cursor:pointer;}.yui-skin-sam thead .yui-dt-draggable{cursor:move;}.yui-dt-coltarget{position:absolute;z-index:999;}.yui-dt-hd{zoom:1;}th.yui-dt-resizeable .yui-dt-resizerliner{position:relative;}.yui-dt-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}.yui-dt-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0);}th.yui-dt-hidden .yui-dt-liner,td.yui-dt-hidden .yui-dt-liner,th.yui-dt-hidden .yui-dt-resizer{display:none;}.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:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7F7F7F;}.yui-skin-sam .yui-dt thead{border-spacing:0;}.yui-skin-sam .yui-dt caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center;}.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 tr.yui-dt-first td{border-top:1px solid #7F7F7F;}.yui-skin-sam .yui-dt th .yui-dt-liner{white-space:nowrap;}.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-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-dt-message{background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable table{border:none;}.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;background-color:#FFF;}.yui-skin-sam .yui-dt-scrollable .yui-dt-data tr.yui-dt-last td{border-bottom:1px solid #7F7F7F;}.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;}tbody .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-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;background-color:#fff;}.yui-skin-sam .yui-dt-selected{border:1px solid #fff;background-color:#fff;} +.yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.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-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;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;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.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;font-size:0;}.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;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;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:.25em 0 .25em .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 .gecko form{overflow:auto;}.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{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} +.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;text-indent:52px;font-size:0;}.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:0;text-indent:0;font-size:75%;}.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:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.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:.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-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.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-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.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:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .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:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.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;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.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:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.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;position:relative;}.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:0;}.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 .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.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-strikethrough span.yui-toolbar-icon{background-position:0 -108px;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-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;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:0;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;position:absolute;}.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 .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.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;_width:198px;}.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:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} +.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;border:0;}.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;overflow:hidden;padding:0;margin:0;}.yui-layout-unit{height:50px;width:50px;padding:0;margin:0;float:none;z-index:0;}.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%;}.yui-layout div.yui-layout-bd{position:absolute;top:0;left:0;zoom:1;width:100%;}.yui-layout .yui-layout-noscroll div.yui-layout-bd{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;}.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:0;}.yui-layout .yui-layout-wrap{height:100%;width:100%;position:absolute;left:0;}.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{display:none;zoom:1;}.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{zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-l{width:5px;height:100%;top:0;left:0;zoom:1;}.yui-skin-sam .yui-layout .yui-resize-proxy .yui-layout-handle-r{width:5px;top:0;right:0;height:100%;position:absolute;zoom:1;}.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;margin:0;}.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;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-r{right:0;top:0;background-image:none;zoom:1;}.yui-skin-sam .yui-layout-unit .yui-resize-handle-l{left:0;top:0;background-image:none;zoom:1;}.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:0;display:block;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;zoom:1;} +.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-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{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.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-overlay.yui-force-redraw{margin-bottom:1px;}.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 .yuimenubaritemlabel:visited{color:#000;}.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,.yui-skin-sam .yuimenubaritemlabel-disabled:visited{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{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.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:visited{color:#000;}.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,.yui-skin-sam .yuimenuitemlabel-disabled:visited{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-pg-container{display:block;margin:6px 0;white-space:nowrap;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous,.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last,.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-pages,.yui-skin-sam .yui-pg-page{display:inline-block;font-family:arial,helvetica,clean,sans-serif;padding:3px 6px;zoom:1;}.yui-skin-sam .yui-pg-pages{padding:0;}.yui-skin-sam .yui-pg-current{padding:3px 0;}.yui-skin-sam a.yui-pg-first:link,.yui-skin-sam a.yui-pg-first:visited,.yui-skin-sam a.yui-pg-first:active,.yui-skin-sam a.yui-pg-first:hover,.yui-skin-sam a.yui-pg-previous:link,.yui-skin-sam a.yui-pg-previous:visited,.yui-skin-sam a.yui-pg-previous:active,.yui-skin-sam a.yui-pg-previous:hover,.yui-skin-sam a.yui-pg-next:link,.yui-skin-sam a.yui-pg-next:visited,.yui-skin-sam a.yui-pg-next:active,.yui-skin-sam a.yui-pg-next:hover,.yui-skin-sam a.yui-pg-last:link,.yui-skin-sam a.yui-pg-last:visited,.yui-skin-sam a.yui-pg-last:active,.yui-skin-sam a.yui-pg-last:hover,.yui-skin-sam a.yui-pg-page:link,.yui-skin-sam a.yui-pg-page:visited,.yui-skin-sam a.yui-pg-page:active,.yui-skin-sam a.yui-pg-page:hover{color:#06c;text-decoration:underline;outline:0;}.yui-skin-sam span.yui-pg-first,.yui-skin-sam span.yui-pg-previous,.yui-skin-sam span.yui-pg-next,.yui-skin-sam span.yui-pg-last{color:#a6a6a6;}.yui-skin-sam .yui-pg-page{background-color:#fff;border:1px solid #CBCBCB;padding:2px 6px;text-decoration:none;}.yui-skin-sam .yui-pg-current-page{background-color:transparent;border:none;font-weight:bold;padding:3px 6px;}.yui-skin-sam .yui-pg-page{margin-left:1px;margin-right:1px;}.yui-skin-sam .yui-pg-first,.yui-skin-sam .yui-pg-previous{padding-left:0;}.yui-skin-sam .yui-pg-next,.yui-skin-sam .yui-pg-last{padding-right:0;}.yui-skin-sam .yui-pg-current,.yui-skin-sam .yui-pg-rpp-options{margin-left:1em;margin-right:1em;} +.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-pb-bar,.yui-pb-mask{width:100%;height:100%;}.yui-pb{position:relative;top:0;left:0;width:200px;height:20px;padding:0;border:none;margin:0;text-align:left;}.yui-pb-mask{position:absolute;top:0;left:0;z-index:2;}.yui-pb-mask div{width:50%;height:50%;background-repeat:no-repeat;padding:0;position:absolute;}.yui-pb-tl{background-position:top left;}.yui-pb-tr{background-position:top right;left:50%;}.yui-pb-bl{background-position:bottom left;top:50%;}.yui-pb-br{background-position:bottom right;left:50%;top:50%;}.yui-pb-bar{margin:0;position:absolute;left:0;top:0;z-index:1;}.yui-pb-ltr .yui-pb-bar{_position:static;}.yui-pb-rtl .yui-pb-bar{background-position:right;}.yui-pb-btt .yui-pb-bar{background-position:left bottom;}.yui-pb-bar{background-color:blue;}.yui-pb{border:thin solid #808080;}.yui-skin-sam .yui-pb{background-color:transparent;border:solid #808080;border-width:1px 0;}.yui-skin-sam .yui-pb-rtl,.yui-skin-sam .yui-pb-ltr{background-image:url(back-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb,.yui-skin-sam .yui-pb-btt{background-image:url(back-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-bar{background-color:transparent;}.yui-skin-sam .yui-pb-ltr .yui-pb-bar,.yui-skin-sam .yui-pb-rtl .yui-pb-bar{background-image:url(bar-h.png);background-repeat:repeat-x;}.yui-skin-sam .yui-pb-ttb .yui-pb-bar,.yui-skin-sam .yui-pb-btt .yui-pb-bar{background-image:url(bar-v.png);background-repeat:repeat-y;}.yui-skin-sam .yui-pb-mask{border:solid #808080;border-width:0 1px;margin:0 -1px;}.yui-skin-sam .yui-pb-caption{color:#000;text-align:center;margin:0 auto;}.yui-skin-sam .yui-pb-range{color:#a6a6a6;} +.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;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;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;color:#000;}.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-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-r{right:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-b{bottom:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-br{right:-8px;bottom:-8px;} +.yui-busy{cursor:wait!important;}.yui-toolbar-container fieldset,.yui-editor-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-skin-sam .yui-toolbar-container .yui-button button,.yui-skin-sam .yui-toolbar-container .yui-button a,.yui-skin-sam .yui-toolbar-container .yui-button a:visited{font-size:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a:visited,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton button,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a:visited{font-size:12px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{font-size:0;line-height:0;padding:0;}.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-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;margin-right:.5em;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;padding:0;height:18px;margin:.2em 0 .2em .1em;display:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:45px;*height:50px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;display:block;}.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;font-size:0;}.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;height:100%;width:100%;position:absolute;top:0;left:0;opacity:.5;filter:alpha(opacity=50);}.yui-editor-container iframe{border:0;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:.25em 0 .25em .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 .gecko form{overflow:auto;}.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{margin-bottom:.75em;}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;float:none;} +.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;text-indent:52px;font-size:0;}.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:0;text-indent:0;font-size:75%;}.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:0 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0;}.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:.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-group-undoredo h3,.yui-toolbar-group-insertitem h3,.yui-toolbar-group-indentlist h3{width:68px;}.yui-toolbar-group-indentlist2 h3{width:122px;}.yui-toolbar-group-alignment h3{width:130px;}.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-editor-container .draggable .yui-toolbar-titlebar{cursor:move;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000;font-weight:bold;margin:0;padding:.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:.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em .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:.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .collapsed{background:url(sprite.png) no-repeat 0 -350px;}.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;_font-size:0;margin:0;border-color:#808080;color:#f2f2f2;border-style:solid;border-width:1px 0;zoom:1;}.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:0;line-height:2;display:block;color:#000;overflow:hidden;white-space:nowrap;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a,.yui-skin-sam .yui-toolbar-container .yui-toolbar-select a{font-size:12px;}.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;position:relative;}.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:0;}.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 .yui-toolbar-container .yui-button-menu .yui-menu-body-scrolled{position:relative;}.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-strikethrough span.yui-toolbar-icon{background-position:0 -108px;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-undo span.yui-toolbar-icon{background-position:0 -1326px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-redo span.yui-toolbar-icon{background-position:0 -1355px;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:0;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;position:absolute;}.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 .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:.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;_width:198px;}.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:#fff;}.yui-editor-blankimage{background-image:url(blankimage.png);}.yui-skin-sam .yui-editor-container .yui-resize-handle-br{height:11px;width:11px;background-position:-20px -60px;background-color:transparent;} +.yui-h-slider,.yui-v-slider,.yui-region-slider{position:relative;}.yui-h-slider .yui-slider-thumb,.yui-v-slider .yui-slider-thumb,.yui-region-slider .yui-slider-thumb{position:absolute;cursor:default;}.yui-skin-sam .yui-h-slider{background:url(bg-h.gif) no-repeat 5px 0;height:28px;width:228px;}.yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}.yui-skin-sam .yui-v-slider{background:url(bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;} +.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em;}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden;}.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,.yui-navset .yui-content div{zoom:1;}.yui-navset .yui-content:after{content:'';display:block;clear:both;}.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;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin: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 .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:.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:.35em .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:.25em .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 .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 .16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin: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:.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 .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 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;} +table.ygtvtable{margin-bottom:0;border:none;border-collapse:collapse;}td.ygtvcell{border:none;padding:0;}a.ygtvspacer{text-decoration:none;outline-style:none;display:block;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{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,.ygtvtphh{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;cursor:pointer;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat;}.ygtvlmh,.ygtvlmhh{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,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer;}.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;}* html .ygtvchildren{height:2%;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer;}.ygtvcontent{cursor:default;}.ygtvspacer{height:22px;width:18px;}.ygtvfocus{background-color:#c0e0e0;border:none;}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0;}.ygtvfocus a{outline-style:none;}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat;}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000;}.ygtv-edit-TextNode{width:190px;}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.ygtv-edit-DateNode .ygtvok{display:none;}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto;}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white;}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver;}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0;}.ygtv-highlight .ygtvcontent{padding-right:1em;}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(check0.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0;}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(check1.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat;} + diff --git a/lib/yui/assets/skins/sam/slider.css b/lib/yui/assets/skins/sam/slider.css new file mode 100644 index 00000000..ba41bf4d --- /dev/null +++ b/lib/yui/assets/skins/sam/slider.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-h-slider,.yui-v-slider,.yui-region-slider{position:relative;}.yui-h-slider .yui-slider-thumb,.yui-v-slider .yui-slider-thumb,.yui-region-slider .yui-slider-thumb{position:absolute;cursor:default;}.yui-skin-sam .yui-h-slider{background:url(bg-h.gif) no-repeat 5px 0;height:28px;width:228px;}.yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}.yui-skin-sam .yui-v-slider{background:url(bg-v.gif) no-repeat 12px 0;height:228px;width:48px;}.yui-skin-sam .yui-region-slider{height:228px;width:228px;} diff --git a/lib/yui/assets/skins/sam/split-button-arrow-active.png b/lib/yui/assets/skins/sam/split-button-arrow-active.png new file mode 100644 index 00000000..fa58c503 Binary files /dev/null and b/lib/yui/assets/skins/sam/split-button-arrow-active.png differ diff --git a/lib/yui/assets/skins/sam/split-button-arrow-disabled.png b/lib/yui/assets/skins/sam/split-button-arrow-disabled.png new file mode 100644 index 00000000..0a6a82c6 Binary files /dev/null and b/lib/yui/assets/skins/sam/split-button-arrow-disabled.png differ diff --git a/lib/yui/assets/skins/sam/split-button-arrow-focus.png b/lib/yui/assets/skins/sam/split-button-arrow-focus.png new file mode 100644 index 00000000..167d71eb Binary files /dev/null and b/lib/yui/assets/skins/sam/split-button-arrow-focus.png differ diff --git a/lib/yui/assets/skins/sam/split-button-arrow-hover.png b/lib/yui/assets/skins/sam/split-button-arrow-hover.png new file mode 100644 index 00000000..167d71eb Binary files /dev/null and b/lib/yui/assets/skins/sam/split-button-arrow-hover.png differ diff --git a/lib/yui/assets/skins/sam/split-button-arrow.png b/lib/yui/assets/skins/sam/split-button-arrow.png new file mode 100644 index 00000000..b33a93ff Binary files /dev/null and b/lib/yui/assets/skins/sam/split-button-arrow.png differ diff --git a/lib/yui/assets/skins/sam/sprite.png b/lib/yui/assets/skins/sam/sprite.png new file mode 100644 index 00000000..73634d6a Binary files /dev/null and b/lib/yui/assets/skins/sam/sprite.png differ diff --git a/lib/yui/assets/skins/sam/sprite.psd b/lib/yui/assets/skins/sam/sprite.psd new file mode 100644 index 00000000..fff2c347 Binary files /dev/null and b/lib/yui/assets/skins/sam/sprite.psd differ diff --git a/lib/yui/assets/skins/sam/tabview.css b/lib/yui/assets/skins/sam/tabview.css new file mode 100644 index 00000000..b9568e5a --- /dev/null +++ b/lib/yui/assets/skins/sam/tabview.css @@ -0,0 +1,8 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em;}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden;}.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,.yui-navset .yui-content div{zoom:1;}.yui-navset .yui-content:after{content:'';display:block;clear:both;}.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;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin: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 .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:.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:.35em .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:.25em .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 .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 .16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin: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:.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 .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 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-loading.gif b/lib/yui/assets/skins/sam/treeview-loading.gif new file mode 100644 index 00000000..0bbf3bc0 Binary files /dev/null and b/lib/yui/assets/skins/sam/treeview-loading.gif differ diff --git a/lib/yui/assets/skins/sam/treeview-sprite.gif b/lib/yui/assets/skins/sam/treeview-sprite.gif new file mode 100644 index 00000000..8fb3f013 Binary files /dev/null and b/lib/yui/assets/skins/sam/treeview-sprite.gif differ diff --git a/lib/yui/assets/skins/sam/treeview.css b/lib/yui/assets/skins/sam/treeview.css new file mode 100644 index 00000000..e0c0c1f1 --- /dev/null +++ b/lib/yui/assets/skins/sam/treeview.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +table.ygtvtable{margin-bottom:0;border:none;border-collapse:collapse;}td.ygtvcell{border:none;padding:0;}a.ygtvspacer{text-decoration:none;outline-style:none;display:block;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{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,.ygtvtphh{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;cursor:pointer;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat;}.ygtvlmh,.ygtvlmhh{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,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer;}.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;}* html .ygtvchildren{height:2%;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer;}.ygtvcontent{cursor:default;}.ygtvspacer{height:22px;width:18px;}.ygtvfocus{background-color:#c0e0e0;border:none;}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0;}.ygtvfocus a{outline-style:none;}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat;}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000;}.ygtv-edit-TextNode{width:190px;}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.ygtv-edit-DateNode .ygtvok{display:none;}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto;}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white;}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver;}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0;}.ygtv-highlight .ygtvcontent{padding-right:1em;}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(check0.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0;}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(check1.gif) no-repeat;}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat;} diff --git a/lib/yui/assets/skins/sam/wait.gif b/lib/yui/assets/skins/sam/wait.gif new file mode 100644 index 00000000..471c1a4f 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 new file mode 100644 index 00000000..049d5fc4 --- /dev/null +++ b/lib/yui/assets/skins/sam/yuitest.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ + diff --git a/lib/yui/autocomplete/assets/autocomplete-core.css b/lib/yui/autocomplete/assets/autocomplete-core.css new file mode 100644 index 00000000..46ec7485 --- /dev/null +++ b/lib/yui/autocomplete/assets/autocomplete-core.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +/* 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 new file mode 100644 index 00000000..ceaa2a58 --- /dev/null +++ b/lib/yui/autocomplete/assets/skins/sam/autocomplete-skin.css @@ -0,0 +1,57 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +/* 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 container iframe */ +.yui-skin-sam .yui-ac iframe { + opacity:0;filter: alpha(opacity=0); + padding-right:.3em; padding-bottom:.3em; /* Bug 2026798: extend iframe to shim the shadow */ +} + +/* 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;list-style:none; + zoom:1; /* For IE to trigger mouse events on LI */ +} + +/* 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 new file mode 100644 index 00000000..33e9d1de --- /dev/null +++ b/lib/yui/autocomplete/assets/skins/sam/autocomplete.css @@ -0,0 +1,7 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +.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:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.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;list-style:none;zoom:1;}.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 new file mode 100644 index 00000000..ddc8aefe --- /dev/null +++ b/lib/yui/autocomplete/autocomplete-debug.js @@ -0,0 +1,3009 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.8.1 +*/ +///////////////////////////////////////////////////////////////////////////// +// +// YAHOO.widget.DataSource Backwards Compatibility +// +///////////////////////////////////////////////////////////////////////////// + +YAHOO.widget.DS_JSArray = YAHOO.util.LocalDataSource; + +YAHOO.widget.DS_JSFunction = YAHOO.util.FunctionDataSource; + +YAHOO.widget.DS_XHR = function(sScriptURI, aSchema, oConfigs) { + var DS = new YAHOO.util.XHRDataSource(sScriptURI, oConfigs); + DS._aDeprecatedSchema = aSchema; + return DS; +}; + +YAHOO.widget.DS_ScriptNode = function(sScriptURI, aSchema, oConfigs) { + var DS = new YAHOO.util.ScriptNodeDataSource(sScriptURI, oConfigs); + DS._aDeprecatedSchema = aSchema; + return DS; +}; + +YAHOO.widget.DS_XHR.TYPE_JSON = YAHOO.util.DataSourceBase.TYPE_JSON; +YAHOO.widget.DS_XHR.TYPE_XML = YAHOO.util.DataSourceBase.TYPE_XML; +YAHOO.widget.DS_XHR.TYPE_FLAT = YAHOO.util.DataSourceBase.TYPE_TEXT; + +// TODO: widget.DS_ScriptNode.scriptCallbackParam + + + + /** + * The AutoComplete control provides the front-end logic for text-entry suggestion and + * completion functionality. + * + * @module autocomplete + * @requires yahoo, dom, event, datasource + * @optional animation + * @namespace YAHOO.widget + * @title AutoComplete Widget + */ + +/****************************************************************************/ +/****************************************************************************/ +/****************************************************************************/ + +/** + * The AutoComplete class provides the customizable functionality of a plug-and-play DHTML + * auto completion widget. Some key features: + *
    + *
  • Navigate with up/down arrow keys and/or mouse to pick a selection
  • + *
  • The drop down container can "roll down" or "fly out" via configurable + * animation
  • + *
  • UI look-and-feel customizable through CSS, including container + * attributes, borders, position, fonts, etc
  • + *
+ * + * @class AutoComplete + * @constructor + * @param elInput {HTMLElement} DOM element reference of an input field. + * @param elInput {String} String ID of an input field. + * @param elContainer {HTMLElement} DOM element reference of an existing DIV. + * @param elContainer {String} String ID of an existing DIV. + * @param oDataSource {YAHOO.widget.DataSource} DataSource instance. + * @param oConfigs {Object} (optional) Object literal of configuration params. + */ +YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { + if(elInput && elContainer && oDataSource) { + // Validate DataSource + if(oDataSource && YAHOO.lang.isFunction(oDataSource.sendRequest)) { + this.dataSource = oDataSource; + } + else { + YAHOO.log("Could not instantiate AutoComplete due to an invalid DataSource", "error", this.toString()); + return; + } + + // YAHOO.widget.DataSource schema backwards compatibility + // Converted deprecated schema into supported schema + // First assume key data is held in position 0 of results array + this.key = 0; + var schema = oDataSource.responseSchema; + // An old school schema has been defined in the deprecated DataSource constructor + if(oDataSource._aDeprecatedSchema) { + var aDeprecatedSchema = oDataSource._aDeprecatedSchema; + if(YAHOO.lang.isArray(aDeprecatedSchema)) { + + if((oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_JSON) || + (oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_UNKNOWN)) { // Used to default to unknown + // Store the resultsList + schema.resultsList = aDeprecatedSchema[0]; + // Store the key + this.key = aDeprecatedSchema[1]; + // Only resultsList and key are defined, so grab all the data + schema.fields = (aDeprecatedSchema.length < 3) ? null : aDeprecatedSchema.slice(1); + } + else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_XML) { + schema.resultNode = aDeprecatedSchema[0]; + this.key = aDeprecatedSchema[1]; + schema.fields = aDeprecatedSchema.slice(1); + } + else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_TEXT) { + schema.recordDelim = aDeprecatedSchema[0]; + schema.fieldDelim = aDeprecatedSchema[1]; + } + oDataSource.responseSchema = schema; + } + } + + // Validate input element + if(YAHOO.util.Dom.inDocument(elInput)) { + if(YAHOO.lang.isString(elInput)) { + this._sName = "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput; + this._elTextbox = document.getElementById(elInput); + } + else { + this._sName = (elInput.id) ? + "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput.id: + "instance" + YAHOO.widget.AutoComplete._nIndex; + this._elTextbox = elInput; + } + 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()); + return; + } + + // Validate container element + if(YAHOO.util.Dom.inDocument(elContainer)) { + if(YAHOO.lang.isString(elContainer)) { + this._elContainer = document.getElementById(elContainer); + } + else { + this._elContainer = elContainer; + } + 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._elContainer.parentNode; + var elTag = elParent.tagName.toLowerCase(); + if(elTag == "div") { + YAHOO.util.Dom.addClass(elParent, "yui-ac"); + } + else { + YAHOO.log("Could not find the wrapper element for skinning", "warn", this.toString()); + } + } + else { + YAHOO.log("Could not instantiate AutoComplete due to an invalid container element", "error", this.toString()); + return; + } + + // Default applyLocalFilter setting is to enable for local sources + if(this.dataSource.dataType === YAHOO.util.DataSourceBase.TYPE_LOCAL) { + this.applyLocalFilter = true; + } + + // Set any config params passed in to override defaults + if(oConfigs && (oConfigs.constructor == Object)) { + for(var sConfig in oConfigs) { + if(sConfig) { + this[sConfig] = oConfigs[sConfig]; + } + } + } + + // Initialization sequence + this._initContainerEl(); + this._initProps(); + this._initListEl(); + this._initContainerHelperEls(); + + // Set up events + var oSelf = this; + var elTextbox = this._elTextbox; + + // Dom events + 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(elContainer,"mouseover",oSelf._onContainerMouseover,oSelf); + YAHOO.util.Event.addListener(elContainer,"mouseout",oSelf._onContainerMouseout,oSelf); + YAHOO.util.Event.addListener(elContainer,"click",oSelf._onContainerClick,oSelf); + YAHOO.util.Event.addListener(elContainer,"scroll",oSelf._onContainerScroll,oSelf); + YAHOO.util.Event.addListener(elContainer,"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); + 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.containerPopulateEvent = new YAHOO.util.CustomEvent("containerPopulate", 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); + this.textboxChangeEvent = new YAHOO.util.CustomEvent("textboxChange", this); + + // Finish up + elTextbox.setAttribute("autocomplete","off"); + YAHOO.widget.AutoComplete._nIndex++; + YAHOO.log("AutoComplete initialized","info",this.toString()); + } + // Required arguments were not found + else { + YAHOO.log("Could not instantiate AutoComplete due invalid arguments", "error", this.toString()); + } +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Public member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * The DataSource object that encapsulates the data used for auto completion. + * This object should be an inherited object from YAHOO.widget.DataSource. + * + * @property dataSource + * @type YAHOO.widget.DataSource + */ +YAHOO.widget.AutoComplete.prototype.dataSource = null; + +/** + * By default, results from local DataSources will pass through the filterResults + * method to apply a client-side matching algorithm. + * + * @property applyLocalFilter + * @type Boolean + * @default true for local arrays and json, otherwise false + */ +YAHOO.widget.AutoComplete.prototype.applyLocalFilter = null; + +/** + * When applyLocalFilter is true, the local filtering algorthim can have case sensitivity + * enabled. + * + * @property queryMatchCase + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.queryMatchCase = false; + +/** + * When applyLocalFilter is true, results can be locally filtered to return + * matching strings that "contain" the query string rather than simply "start with" + * the query string. + * + * @property queryMatchContains + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.queryMatchContains = false; + +/** + * Enables query subset matching. When the DataSource's cache is enabled and queryMatchSubset is + * true, substrings of queries will return matching cached results. For + * instance, if the first query is for "abc" susequent queries that start with + * "abc", like "abcd", will be queried against the cache, and not the live data + * source. Recommended only for DataSources that return comprehensive results + * for queries with very few characters. + * + * @property queryMatchSubset + * @type Boolean + * @default false + * + */ +YAHOO.widget.AutoComplete.prototype.queryMatchSubset = false; + +/** + * Number of characters that must be entered before querying for results. A negative value + * effectively turns off the widget. A value of 0 allows queries of null or empty string + * values. + * + * @property minQueryLength + * @type Number + * @default 1 + */ +YAHOO.widget.AutoComplete.prototype.minQueryLength = 1; + +/** + * Maximum number of results to display in results container. + * + * @property maxResultsDisplayed + * @type Number + * @default 10 + */ +YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed = 10; + +/** + * Number of seconds to delay before submitting a query request. If a query + * request is received before a previous one has completed its delay, the + * previous request is cancelled and the new request is set to the delay. If + * typeAhead is also enabled, this value must always be less than the typeAheadDelay + * in order to avoid certain race conditions. + * + * @property queryDelay + * @type Number + * @default 0.2 + */ +YAHOO.widget.AutoComplete.prototype.queryDelay = 0.2; + +/** + * If typeAhead is true, number of seconds to delay before updating input with + * typeAhead value. In order to prevent certain race conditions, this value must + * always be greater than the queryDelay. + * + * @property typeAheadDelay + * @type Number + * @default 0.5 + */ +YAHOO.widget.AutoComplete.prototype.typeAheadDelay = 0.5; + +/** + * When IME usage is detected or interval detection is explicitly enabled, + * AutoComplete will detect the input value at the given interval and send a + * query if the value has changed. + * + * @property queryInterval + * @type Number + * @default 500 + */ +YAHOO.widget.AutoComplete.prototype.queryInterval = 500; + +/** + * Class name of a highlighted item within results container. + * + * @property highlightClassName + * @type String + * @default "yui-ac-highlight" + */ +YAHOO.widget.AutoComplete.prototype.highlightClassName = "yui-ac-highlight"; + +/** + * Class name of a pre-highlighted item within results container. + * + * @property prehighlightClassName + * @type String + */ +YAHOO.widget.AutoComplete.prototype.prehighlightClassName = null; + +/** + * Query delimiter. A single character separator for multiple delimited + * selections. Multiple delimiter characteres may be defined as an array of + * strings. A null value or empty string indicates that query results cannot + * be delimited. This feature is not recommended if you need forceSelection to + * be true. + * + * @property delimChar + * @type String | String[] + */ +YAHOO.widget.AutoComplete.prototype.delimChar = null; + +/** + * Whether or not the first item in results container should be automatically highlighted + * on expand. + * + * @property autoHighlight + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.autoHighlight = true; + +/** + * If autohighlight is enabled, whether or not the input field should be automatically updated + * with the first query result as the user types, auto-selecting the substring portion + * of the first result that the user has not yet typed. + * + * @property typeAhead + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.typeAhead = false; + +/** + * Whether or not to animate the expansion/collapse of the results container in the + * horizontal direction. + * + * @property animHoriz + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.animHoriz = false; + +/** + * Whether or not to animate the expansion/collapse of the results container in the + * vertical direction. + * + * @property animVert + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.animVert = true; + +/** + * Speed of container expand/collapse animation, in seconds.. + * + * @property animSpeed + * @type Number + * @default 0.3 + */ +YAHOO.widget.AutoComplete.prototype.animSpeed = 0.3; + +/** + * Whether or not to force the user's selection to match one of the query + * results. Enabling this feature essentially transforms the input field into a + * <select> field. This feature is not recommended with delimiter character(s) + * defined. + * + * @property forceSelection + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.forceSelection = false; + +/** + * Whether or not to allow browsers to cache user-typed input in the input + * field. Disabling this feature will prevent the widget from setting the + * autocomplete="off" on the input field. When autocomplete="off" + * and users click the back button after form submission, user-typed input can + * be prefilled by the browser from its cache. This caching of user input may + * not be desired for sensitive data, such as credit card numbers, in which + * case, implementers should consider setting allowBrowserAutocomplete to false. + * + * @property allowBrowserAutocomplete + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete = true; + +/** + * Enabling this feature prevents the toggling of the container to a collapsed state. + * Setting to true does not automatically trigger the opening of the container. + * Implementers are advised to pre-load the container with an explicit "sendQuery()" call. + * + * @property alwaysShowContainer + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.alwaysShowContainer = false; + +/** + * Whether or not to use an iFrame to layer over Windows form elements in + * IE. Set to true only when the results container will be on top of a + * <select> field in IE and thus exposed to the IE z-index bug (i.e., + * 5.5 < IE < 7). + * + * @property useIFrame + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.useIFrame = false; + +/** + * Whether or not the results container should have a shadow. + * + * @property useShadow + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.useShadow = false; + +/** + * Whether or not the input field should be updated with selections. + * + * @property suppressInputUpdate + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.suppressInputUpdate = false; + +/** + * For backward compatibility to pre-2.6.0 formatResults() signatures, setting + * resultsTypeList to true will take each object literal result returned by + * DataSource and flatten into an array. + * + * @property resultTypeList + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.resultTypeList = true; + +/** + * For XHR DataSources, AutoComplete will automatically insert a "?" between the server URI and + * the "query" param/value pair. To prevent this behavior, implementers should + * set this value to false. To more fully customize the query syntax, implementers + * should override the generateRequest() method. + * + * @property queryQuestionMark + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.queryQuestionMark = true; + +/** + * If true, before each time the container expands, the container element will be + * positioned to snap to the bottom-left corner of the input element. If + * autoSnapContainer is set to false, this positioning will not be done. + * + * @property autoSnapContainer + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.autoSnapContainer = true; + +///////////////////////////////////////////////////////////////////////////// +// +// Public methods +// +///////////////////////////////////////////////////////////////////////////// + + /** + * Public accessor to the unique name of the AutoComplete instance. + * + * @method toString + * @return {String} Unique name of the AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.toString = function() { + return "AutoComplete " + this._sName; +}; + + /** + * Returns DOM reference to input element. + * + * @method getInputEl + * @return {HTMLELement} DOM reference to input element. + */ +YAHOO.widget.AutoComplete.prototype.getInputEl = function() { + return this._elTextbox; +}; + + /** + * Returns DOM reference to container element. + * + * @method getContainerEl + * @return {HTMLELement} DOM reference to container element. + */ +YAHOO.widget.AutoComplete.prototype.getContainerEl = function() { + return this._elContainer; +}; + + /** + * Returns true if widget instance is currently active. + * + * @method isFocused + * @return {Boolean} Returns true if widget instance is currently active. + */ +YAHOO.widget.AutoComplete.prototype.isFocused = function() { + return this._bFocused; +}; + + /** + * Returns true if container is in an expanded state, false otherwise. + * + * @method isContainerOpen + * @return {Boolean} Returns true if container is in an expanded state, false otherwise. + */ +YAHOO.widget.AutoComplete.prototype.isContainerOpen = function() { + return this._bContainerOpen; +}; + +/** + * Public accessor to the <ul> element that displays query results within the results container. + * + * @method getListEl + * @return {HTMLElement[]} Reference to <ul> element within the results container. + */ +YAHOO.widget.AutoComplete.prototype.getListEl = function() { + return this._elList; +}; + +/** + * Public accessor to the matching string associated with a given <li> result. + * + * @method getListItemMatch + * @param elListItem {HTMLElement} Reference to <LI> element. + * @return {String} Matching string. + */ +YAHOO.widget.AutoComplete.prototype.getListItemMatch = function(elListItem) { + if(elListItem._sResultMatch) { + return elListItem._sResultMatch; + } + else { + return null; + } +}; + +/** + * Public accessor to the result data associated with a given <li> result. + * + * @method getListItemData + * @param elListItem {HTMLElement} Reference to <LI> element. + * @return {Object} Result data. + */ +YAHOO.widget.AutoComplete.prototype.getListItemData = function(elListItem) { + if(elListItem._oResultData) { + return elListItem._oResultData; + } + else { + return null; + } +}; + +/** + * Public accessor to the index of the associated with a given <li> result. + * + * @method getListItemIndex + * @param elListItem {HTMLElement} Reference to <LI> element. + * @return {Number} Index. + */ +YAHOO.widget.AutoComplete.prototype.getListItemIndex = function(elListItem) { + if(YAHOO.lang.isNumber(elListItem._nItemIndex)) { + return elListItem._nItemIndex; + } + else { + return null; + } +}; + +/** + * Sets HTML markup for the results container header. This markup will be + * inserted within a <div> tag with a class of "yui-ac-hd". + * + * @method setHeader + * @param sHeader {String} HTML markup for results container header. + */ +YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) { + if(this._elHeader) { + var elHeader = this._elHeader; + if(sHeader) { + elHeader.innerHTML = sHeader; + elHeader.style.display = ""; + } + else { + elHeader.innerHTML = ""; + elHeader.style.display = "none"; + } + } +}; + +/** + * Sets HTML markup for the results container footer. This markup will be + * inserted within a <div> tag with a class of "yui-ac-ft". + * + * @method setFooter + * @param sFooter {String} HTML markup for results container footer. + */ +YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) { + if(this._elFooter) { + var elFooter = this._elFooter; + if(sFooter) { + elFooter.innerHTML = sFooter; + elFooter.style.display = ""; + } + else { + elFooter.innerHTML = ""; + elFooter.style.display = "none"; + } + } +}; + +/** + * Sets HTML markup for the results container body. This markup will be + * inserted within a <div> tag with a class of "yui-ac-bd". + * + * @method setBody + * @param sBody {String} HTML markup for results container body. + */ +YAHOO.widget.AutoComplete.prototype.setBody = function(sBody) { + if(this._elBody) { + var elBody = this._elBody; + YAHOO.util.Event.purgeElement(elBody, true); + if(sBody) { + elBody.innerHTML = sBody; + elBody.style.display = ""; + } + else { + elBody.innerHTML = ""; + elBody.style.display = "none"; + } + this._elList = null; + } +}; + +/** +* A function that converts an AutoComplete query into a request value which is then +* passed to the DataSource's sendRequest method in order to retrieve data for +* the query. By default, returns a String with the syntax: "query={query}" +* Implementers can customize this method for custom request syntaxes. +* +* @method generateRequest +* @param sQuery {String} Query string +* @return {MIXED} Request +*/ +YAHOO.widget.AutoComplete.prototype.generateRequest = function(sQuery) { + var dataType = this.dataSource.dataType; + + // Transform query string in to a request for remote data + // By default, local data doesn't need a transformation, just passes along the query as is. + if(dataType === YAHOO.util.DataSourceBase.TYPE_XHR) { + // By default, XHR GET requests look like "{scriptURI}?{scriptQueryParam}={sQuery}&{scriptQueryAppend}" + if(!this.dataSource.connMethodPost) { + sQuery = (this.queryQuestionMark ? "?" : "") + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + + (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : ""); + } + // By default, XHR POST bodies are sent to the {scriptURI} like "{scriptQueryParam}={sQuery}&{scriptQueryAppend}" + else { + sQuery = (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + + (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : ""); + } + } + // By default, remote script node requests look like "{scriptURI}&{scriptCallbackParam}={callbackString}&{scriptQueryParam}={sQuery}&{scriptQueryAppend}" + else if(dataType === YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE) { + sQuery = "&" + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + + (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : ""); + } + + return sQuery; +}; + +/** + * Makes query request to the DataSource. + * + * @method sendQuery + * @param sQuery {String} Query string. + */ +YAHOO.widget.AutoComplete.prototype.sendQuery = function(sQuery) { + // Activate focus for a new interaction + this._bFocused = true; + + // Adjust programatically sent queries to look like they were input by user + // when delimiters are enabled + var newQuery = (this.delimChar) ? this._elTextbox.value + sQuery : sQuery; + this._sendQuery(newQuery); +}; + +/** + * Snaps container to bottom-left corner of input element + * + * @method snapContainer + */ +YAHOO.widget.AutoComplete.prototype.snapContainer = function() { + var oTextbox = this._elTextbox, + pos = YAHOO.util.Dom.getXY(oTextbox); + pos[1] += YAHOO.util.Dom.get(oTextbox).offsetHeight + 2; + YAHOO.util.Dom.setXY(this._elContainer,pos); +}; + +/** + * Expands container. + * + * @method expandContainer + */ +YAHOO.widget.AutoComplete.prototype.expandContainer = function() { + this._toggleContainer(true); +}; + +/** + * Collapses container. + * + * @method collapseContainer + */ +YAHOO.widget.AutoComplete.prototype.collapseContainer = function() { + this._toggleContainer(false); +}; + +/** + * Clears entire list of suggestions. + * + * @method clearList + */ +YAHOO.widget.AutoComplete.prototype.clearList = function() { + var allItems = this._elList.childNodes, + i=allItems.length-1; + for(; i>-1; i--) { + allItems[i].style.display = "none"; + } +}; + +/** + * Handles subset matching for when queryMatchSubset is enabled. + * + * @method getSubsetMatches + * @param sQuery {String} Query string. + * @return {Object} oParsedResponse or null. + */ +YAHOO.widget.AutoComplete.prototype.getSubsetMatches = function(sQuery) { + var subQuery, oCachedResponse, subRequest; + // Loop through substrings of each cached element's query property... + for(var i = sQuery.length; i >= this.minQueryLength ; i--) { + subRequest = this.generateRequest(sQuery.substr(0,i)); + this.dataRequestEvent.fire(this, subQuery, subRequest); + YAHOO.log("Searching for query subset \"" + subQuery + "\" in cache", "info", this.toString()); + + // If a substring of the query is found in the cache + oCachedResponse = this.dataSource.getCachedResponse(subRequest); + if(oCachedResponse) { + YAHOO.log("Found match for query subset \"" + subQuery + "\": " + YAHOO.lang.dump(oCachedResponse), "info", this.toString()); + return this.filterResults.apply(this.dataSource, [sQuery, oCachedResponse, oCachedResponse, {scope:this}]); + } + } + YAHOO.log("Did not find subset match for query subset \"" + sQuery + "\"" , "info", this.toString()); + return null; +}; + +/** + * Executed by DataSource (within DataSource scope via doBeforeParseData()) to + * handle responseStripAfter cleanup. + * + * @method preparseRawResponse + * @param sQuery {String} Query string. + * @return {Object} oParsedResponse or null. + */ +YAHOO.widget.AutoComplete.prototype.preparseRawResponse = function(oRequest, oFullResponse, oCallback) { + var nEnd = ((this.responseStripAfter !== "") && (oFullResponse.indexOf)) ? + oFullResponse.indexOf(this.responseStripAfter) : -1; + if(nEnd != -1) { + oFullResponse = oFullResponse.substring(0,nEnd); + } + return oFullResponse; +}; + +/** + * Executed by DataSource (within DataSource scope via doBeforeCallback()) to + * filter results through a simple client-side matching algorithm. + * + * @method filterResults + * @param sQuery {String} Original request. + * @param oFullResponse {Object} Full response object. + * @param oParsedResponse {Object} Parsed response object. + * @param oCallback {Object} Callback object. + * @return {Object} Filtered response object. + */ + +YAHOO.widget.AutoComplete.prototype.filterResults = function(sQuery, oFullResponse, oParsedResponse, oCallback) { + // If AC has passed a query string value back to itself, grab it + if(oCallback && oCallback.argument && oCallback.argument.query) { + sQuery = oCallback.argument.query; + } + + // Only if a query string is available to match against + if(sQuery && sQuery !== "") { + // First make a copy of the oParseResponse + oParsedResponse = YAHOO.widget.AutoComplete._cloneObject(oParsedResponse); + + var oAC = oCallback.scope, + oDS = this, + allResults = oParsedResponse.results, // the array of results + filteredResults = [], // container for filtered results, + nMax = oAC.maxResultsDisplayed, // max to find + bMatchCase = (oDS.queryMatchCase || oAC.queryMatchCase), // backward compat + bMatchContains = (oDS.queryMatchContains || oAC.queryMatchContains); // backward compat + + // Loop through each result object... + for(var i=0, len=allResults.length; i -1))) { + // Stash the match + filteredResults.push(oResult); + } + } + + // Filter no more if maxResultsDisplayed is reached + if(len>nMax && filteredResults.length===nMax) { + break; + } + } + oParsedResponse.results = filteredResults; + YAHOO.log("Filtered " + filteredResults.length + " results against query \"" + sQuery + "\": " + YAHOO.lang.dump(filteredResults), "info", this.toString()); + } + else { + YAHOO.log("Did not filter results against query", "info", this.toString()); + } + + return oParsedResponse; +}; + +/** + * Handles response for display. This is the callback function method passed to + * YAHOO.util.DataSourceBase#sendRequest so results from the DataSource are + * returned to the AutoComplete instance. + * + * @method handleResponse + * @param sQuery {String} Original request. + * @param oResponse {Object} Response object. + * @param oPayload {MIXED} (optional) Additional argument(s) + */ +YAHOO.widget.AutoComplete.prototype.handleResponse = function(sQuery, oResponse, oPayload) { + if((this instanceof YAHOO.widget.AutoComplete) && this._sName) { + this._populateList(sQuery, oResponse, oPayload); + } +}; + +/** + * Overridable method called before container is loaded with result data. + * + * @method doBeforeLoadData + * @param sQuery {String} Original request. + * @param oResponse {Object} Response object. + * @param oPayload {MIXED} (optional) Additional argument(s) + * @return {Boolean} Return true to continue loading data, false to cancel. + */ +YAHOO.widget.AutoComplete.prototype.doBeforeLoadData = function(sQuery, oResponse, oPayload) { + return true; +}; + +/** + * Overridable method that returns HTML markup for one result to be populated + * as innerHTML of an <LI> element. + * + * @method formatResult + * @param oResultData {Object} Result data object. + * @param sQuery {String} The corresponding query string. + * @param sResultMatch {HTMLElement} The current query string. + * @return {String} HTML markup of formatted result data. + */ +YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultData, sQuery, sResultMatch) { + var sMarkup = (sResultMatch) ? sResultMatch : ""; + return sMarkup; +}; + +/** + * Overridable method called before container expands allows implementers to access data + * and DOM elements. + * + * @method doBeforeExpandContainer + * @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(elTextbox, elContainer, sQuery, aResults) { + return true; +}; + + +/** + * Nulls out the entire AutoComplete instance and related objects, removes attached + * event listeners, and clears out DOM elements inside the container. After + * calling this method, the instance reference should be expliclitly nulled by + * implementer, as in myAutoComplete = null. Use with caution! + * + * @method destroy + */ +YAHOO.widget.AutoComplete.prototype.destroy = function() { + var instanceName = this.toString(); + var elInput = this._elTextbox; + var elContainer = this._elContainer; + + // Unhook custom events + this.textboxFocusEvent.unsubscribeAll(); + this.textboxKeyEvent.unsubscribeAll(); + this.dataRequestEvent.unsubscribeAll(); + this.dataReturnEvent.unsubscribeAll(); + this.dataErrorEvent.unsubscribeAll(); + this.containerPopulateEvent.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(); + this.textboxChangeEvent.unsubscribeAll(); + + // Unhook DOM events + YAHOO.util.Event.purgeElement(elInput, true); + YAHOO.util.Event.purgeElement(elContainer, true); + + // Remove DOM elements + elContainer.innerHTML = ""; + + // Null out objects + for(var key in this) { + if(YAHOO.lang.hasOwnProperty(this, key)) { + this[key] = null; + } + } + + YAHOO.log("AutoComplete instance destroyed: " + instanceName); +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Public events +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Fired when the input field receives focus. + * + * @event textboxFocusEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.textboxFocusEvent = null; + +/** + * Fired when the input field receives key input. + * + * @event textboxKeyEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param nKeycode {Number} The keycode number. + */ +YAHOO.widget.AutoComplete.prototype.textboxKeyEvent = null; + +/** + * Fired when the AutoComplete instance makes a request to the DataSource. + * + * @event dataRequestEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param oRequest {Object} The request. + */ +YAHOO.widget.AutoComplete.prototype.dataRequestEvent = null; + +/** + * Fired when the AutoComplete instance receives query results from the data + * source. + * + * @event dataReturnEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param aResults {Object[]} Results array. + */ +YAHOO.widget.AutoComplete.prototype.dataReturnEvent = null; + +/** + * Fired when the AutoComplete instance does not receive query results from the + * DataSource due to an error. + * + * @event dataErrorEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param oResponse {Object} The response object, if available. + */ +YAHOO.widget.AutoComplete.prototype.dataErrorEvent = null; + +/** + * Fired when the results container is populated. + * + * @event containerPopulateEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.containerPopulateEvent = null; + +/** + * Fired when the results container is expanded. + * + * @event containerExpandEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.containerExpandEvent = null; + +/** + * Fired when the input field has been prefilled by the type-ahead + * feature. + * + * @event typeAheadEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param sPrefill {String} The prefill string. + */ +YAHOO.widget.AutoComplete.prototype.typeAheadEvent = null; + +/** + * Fired when result item has been moused over. + * + * @event itemMouseOverEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item moused to. + */ +YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent = null; + +/** + * Fired when result item has been moused out. + * + * @event itemMouseOutEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item moused from. + */ +YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent = null; + +/** + * Fired when result item has been arrowed to. + * + * @event itemArrowToEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item arrowed to. + */ +YAHOO.widget.AutoComplete.prototype.itemArrowToEvent = null; + +/** + * Fired when result item has been arrowed away from. + * + * @event itemArrowFromEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item arrowed from. + */ +YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent = null; + +/** + * Fired when an item is selected via mouse click, ENTER key, or TAB key. + * + * @event itemSelectEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The selected <li> element item. + * @param oData {Object} The data returned for the item, either as an object, + * or mapped from the schema into an array. + */ +YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null; + +/** + * Fired when a user selection does not match any of the displayed result items. + * + * @event unmatchedItemSelectEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sSelection {String} The selected string. + */ +YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null; + +/** + * Fired if forceSelection is enabled and the user's input has been cleared + * because it did not match one of the returned query results. + * + * @event selectionEnforceEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sClearedValue {String} The cleared value (including delimiters if applicable). + */ +YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent = null; + +/** + * Fired when the results container is collapsed. + * + * @event containerCollapseEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.containerCollapseEvent = null; + +/** + * Fired when the input field loses focus. + * + * @event textboxBlurEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.textboxBlurEvent = null; + +/** + * Fired when the input field value has changed when it loses focus. + * + * @event textboxChangeEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.textboxChangeEvent = null; + +///////////////////////////////////////////////////////////////////////////// +// +// Private member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Internal class variable to index multiple AutoComplete instances. + * + * @property _nIndex + * @type Number + * @default 0 + * @private + */ +YAHOO.widget.AutoComplete._nIndex = 0; + +/** + * Name of AutoComplete instance. + * + * @property _sName + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sName = null; + +/** + * Text input field DOM element. + * + * @property _elTextbox + * @type HTMLElement + * @private + */ +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 widget instance is currently active. If query results come back + * but the user has already moved on, do not proceed with auto complete behavior. + * + * @property _bFocused + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bFocused = false; + +/** + * Animation instance for container expand/collapse. + * + * @property _oAnim + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._oAnim = null; + +/** + * Whether or not the results container is currently open. + * + * @property _bContainerOpen + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bContainerOpen = false; + +/** + * Whether or not the mouse is currently over the results + * container. This is necessary in order to prevent clicks on container items + * from being text input field blur events. + * + * @property _bOverContainer + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bOverContainer = false; + +/** + * Internal reference to <ul> elements that contains query results within the + * results container. + * + * @property _elList + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elList = null; + +/* + * Array of <li> elements references that contain query results within the + * results container. + * + * @property _aListItemEls + * @type HTMLElement[] + * @private + */ +//YAHOO.widget.AutoComplete.prototype._aListItemEls = null; + +/** + * Number of <li> elements currently displayed in results container. + * + * @property _nDisplayedItems + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nDisplayedItems = 0; + +/* + * Internal count of <li> elements displayed and hidden in results container. + * + * @property _maxResultsDisplayed + * @type Number + * @private + */ +//YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed = 0; + +/** + * Current query string + * + * @property _sCurQuery + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sCurQuery = null; + +/** + * Selections from previous queries (for saving delimited queries). + * + * @property _sPastSelections + * @type String + * @default "" + * @private + */ +YAHOO.widget.AutoComplete.prototype._sPastSelections = ""; + +/** + * Stores initial input value used to determine if textboxChangeEvent should be fired. + * + * @property _sInitInputValue + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sInitInputValue = null; + +/** + * Pointer to the currently highlighted <li> element in the container. + * + * @property _elCurListItem + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elCurListItem = null; + +/** + * Pointer to the currently pre-highlighted <li> element in the container. + * + * @property _elCurPrehighlightItem + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elCurPrehighlightItem = null; + +/** + * Whether or not an item has been selected since the container was populated + * with results. Reset to false by _populateList, and set to true when item is + * selected. + * + * @property _bItemSelected + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bItemSelected = false; + +/** + * Key code of the last key pressed in textbox. + * + * @property _nKeyCode + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nKeyCode = null; + +/** + * Delay timeout ID. + * + * @property _nDelayID + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nDelayID = -1; + +/** + * TypeAhead delay timeout ID. + * + * @property _nTypeAheadDelayID + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID = -1; + +/** + * Src to iFrame used when useIFrame = true. Supports implementations over SSL + * as well. + * + * @property _iFrameSrc + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._iFrameSrc = "javascript:false;"; + +/** + * For users typing via certain IMEs, queries must be triggered by intervals, + * since key events yet supported across all browsers for all IMEs. + * + * @property _queryInterval + * @type Object + * @private + */ +YAHOO.widget.AutoComplete.prototype._queryInterval = null; + +/** + * Internal tracker to last known textbox value, used to determine whether or not + * to trigger a query via interval for certain IME users. + * + * @event _sLastTextboxValue + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sLastTextboxValue = null; + +///////////////////////////////////////////////////////////////////////////// +// +// Private methods +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Updates and validates latest public config properties. + * + * @method __initProps + * @private + */ +YAHOO.widget.AutoComplete.prototype._initProps = function() { + // Correct any invalid values + 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 typeAheadDelay = this.typeAheadDelay; + if(!YAHOO.lang.isNumber(typeAheadDelay) || (typeAheadDelay < 0)) { + this.typeAheadDelay = 0.2; + } + var delimChar = this.delimChar; + if(YAHOO.lang.isString(delimChar) && (delimChar.length > 0)) { + 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._elContent, {}, this.animSpeed); + } + else { + this._oAnim.duration = this.animSpeed; + } + } + if(this.forceSelection && delimChar) { + YAHOO.log("The forceSelection feature has been enabled with delimChar defined.","warn", this.toString()); + } +}; + +/** + * Initializes the results container helpers if they are enabled and do + * not exist + * + * @method _initContainerHelperEls + * @private + */ +YAHOO.widget.AutoComplete.prototype._initContainerHelperEls = function() { + if(this.useShadow && !this._elShadow) { + var elShadow = document.createElement("div"); + elShadow.className = "yui-ac-shadow"; + elShadow.style.width = 0; + elShadow.style.height = 0; + 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 = 0; + elIFrame.style.height = 0; + elIFrame.style.padding = 0; + elIFrame.tabIndex = -1; + elIFrame.role = "presentation"; + elIFrame.title = "Presentational iframe shim"; + this._elIFrame = this._elContainer.appendChild(elIFrame); + } +}; + +/** + * Initializes the results container once at object creation + * + * @method _initContainerEl + * @private + */ +YAHOO.widget.AutoComplete.prototype._initContainerEl = function() { + YAHOO.util.Dom.addClass(this._elContainer, "yui-ac-container"); + + if(!this._elContent) { + // The elContent div is assigned DOM listeners and + // 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()); + } +}; + +/** + * Clears out contents of container body and creates up to + * YAHOO.widget.AutoComplete#maxResultsDisplayed <li> elements in an + * <ul> element. + * + * @method _initListEl + * @private + */ +YAHOO.widget.AutoComplete.prototype._initListEl = function() { + var nListLength = this.maxResultsDisplayed, + elList = this._elList || document.createElement("ul"), + elListItem; + + while(elList.childNodes.length < nListLength) { + elListItem = document.createElement("li"); + elListItem.style.display = "none"; + elListItem._nItemIndex = elList.childNodes.length; + elList.appendChild(elListItem); + } + if(!this._elList) { + var elBody = this._elBody; + YAHOO.util.Event.purgeElement(elBody, true); + elBody.innerHTML = ""; + this._elList = elBody.appendChild(elList); + } + + this._elBody.style.display = ""; +}; + +/** + * Focuses input field. + * + * @method _focus + * @private + */ +YAHOO.widget.AutoComplete.prototype._focus = function() { + // http://developer.mozilla.org/en/docs/index.php?title=Key-navigable_custom_DHTML_widgets + var oSelf = this; + setTimeout(function() { + try { + oSelf._elTextbox.focus(); + } + catch(e) { + } + },0); +}; + +/** + * Enables interval detection for IME support. + * + * @method _enableIntervalDetection + * @private + */ +YAHOO.widget.AutoComplete.prototype._enableIntervalDetection = function() { + var oSelf = this; + if(!oSelf._queryInterval && oSelf.queryInterval) { + oSelf._queryInterval = setInterval(function() { oSelf._onInterval(); }, oSelf.queryInterval); + YAHOO.log("Interval set", "info", this.toString()); + } +}; + +/** + * Enables interval detection for a less performant but brute force mechanism to + * detect input values at an interval set by queryInterval and send queries if + * input value has changed. Needed to support right-click+paste or shift+insert + * edge cases. Please note that intervals are cleared at the end of each interaction, + * so enableIntervalDetection must be called for each new interaction. The + * recommended approach is to call it in response to textboxFocusEvent. + * + * @method enableIntervalDetection + */ +YAHOO.widget.AutoComplete.prototype.enableIntervalDetection = + YAHOO.widget.AutoComplete.prototype._enableIntervalDetection; + +/** + * Enables query triggers based on text input detection by intervals (rather + * than by key events). + * + * @method _onInterval + * @private + */ +YAHOO.widget.AutoComplete.prototype._onInterval = function() { + var currValue = this._elTextbox.value; + var lastValue = this._sLastTextboxValue; + if(currValue != lastValue) { + this._sLastTextboxValue = currValue; + this._sendQuery(currValue); + } +}; + +/** + * Cancels text input detection by intervals. + * + * @method _clearInterval + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._clearInterval = function() { + if(this._queryInterval) { + clearInterval(this._queryInterval); + this._queryInterval = null; + YAHOO.log("Interval cleared", "info", this.toString()); + } +}; + +/** + * Whether or not key is functional or should be ignored. Note that the right + * arrow key is NOT an ignored key since it triggers queries for certain intl + * charsets. + * + * @method _isIgnoreKey + * @param nKeycode {Number} Code of key pressed. + * @return {Boolean} True if key should be ignored, false otherwise. + * @private + */ +YAHOO.widget.AutoComplete.prototype._isIgnoreKey = function(nKeyCode) { + if((nKeyCode == 9) || (nKeyCode == 13) || // tab, enter + (nKeyCode == 16) || (nKeyCode == 17) || // shift, ctl + (nKeyCode >= 18 && nKeyCode <= 20) || // alt, pause/break,caps lock + (nKeyCode == 27) || // esc + (nKeyCode >= 33 && nKeyCode <= 35) || // page up,page down,end + /*(nKeyCode >= 36 && nKeyCode <= 38) || // home,left,up + (nKeyCode == 40) || // down*/ + (nKeyCode >= 36 && nKeyCode <= 40) || // home,left,up, right, down + (nKeyCode >= 44 && nKeyCode <= 45) || // print screen,insert + (nKeyCode == 229) // Bug 2041973: Korean XP fires 2 keyup events, the key and 229 + ) { + return true; + } + return false; +}; + +/** + * Makes query request to the DataSource. + * + * @method _sendQuery + * @param sQuery {String} Query string. + * @private + */ +YAHOO.widget.AutoComplete.prototype._sendQuery = function(sQuery) { + // Widget has been effectively turned off + if(this.minQueryLength < 0) { + this._toggleContainer(false); + YAHOO.log("Property minQueryLength is less than 0", "info", this.toString()); + return; + } + // Delimiter has been enabled + if(this.delimChar) { + var extraction = this._extractQuery(sQuery); + // Here is the query itself + sQuery = extraction.query; + // ...and save the rest of the string for later + this._sPastSelections = extraction.previous; + } + + // Don't search queries that are too short + if((sQuery && (sQuery.length < this.minQueryLength)) || (!sQuery && this.minQueryLength > 0)) { + if(this._nDelayID != -1) { + clearTimeout(this._nDelayID); + } + this._toggleContainer(false); + YAHOO.log("Query \"" + sQuery + "\" is too short", "info", this.toString()); + return; + } + + sQuery = encodeURIComponent(sQuery); + this._nDelayID = -1; // Reset timeout ID because request is being made + + // Subset matching + if(this.dataSource.queryMatchSubset || this.queryMatchSubset) { // backward compat + var oResponse = this.getSubsetMatches(sQuery); + if(oResponse) { + this.handleResponse(sQuery, oResponse, {query: sQuery}); + return; + } + } + + if(this.dataSource.responseStripAfter) { + this.dataSource.doBeforeParseData = this.preparseRawResponse; + } + if(this.applyLocalFilter) { + this.dataSource.doBeforeCallback = this.filterResults; + } + + var sRequest = this.generateRequest(sQuery); + this.dataRequestEvent.fire(this, sQuery, sRequest); + YAHOO.log("Sending query \"" + sRequest + "\"", "info", this.toString()); + + this.dataSource.sendRequest(sRequest, { + success : this.handleResponse, + failure : this.handleResponse, + scope : this, + argument: { + query: sQuery + } + }); +}; + +/** + * Populates the given <li> element with return value from formatResult(). + * + * @method _populateListItem + * @param elListItem {HTMLElement} The LI element. + * @param oResult {Object} The result object. + * @param sCurQuery {String} The query string. + * @private + */ +YAHOO.widget.AutoComplete.prototype._populateListItem = function(elListItem, oResult, sQuery) { + elListItem.innerHTML = this.formatResult(oResult, sQuery, elListItem._sResultMatch); +}; + +/** + * Populates the array of <li> elements in the container with query + * results. + * + * @method _populateList + * @param sQuery {String} Original request. + * @param oResponse {Object} Response object. + * @param oPayload {MIXED} (optional) Additional argument(s) + * @private + */ +YAHOO.widget.AutoComplete.prototype._populateList = function(sQuery, oResponse, oPayload) { + // Clear previous timeout + if(this._nTypeAheadDelayID != -1) { + clearTimeout(this._nTypeAheadDelayID); + } + + sQuery = (oPayload && oPayload.query) ? oPayload.query : sQuery; + + // Pass data through abstract method for any transformations + var ok = this.doBeforeLoadData(sQuery, oResponse, oPayload); + + // Data is ok + if(ok && !oResponse.error) { + this.dataReturnEvent.fire(this, sQuery, oResponse.results); + + // Continue only if instance is still active (i.e., user hasn't already moved on) + if(this._bFocused) { + // Store state for this interaction + var sCurQuery = decodeURIComponent(sQuery); + this._sCurQuery = sCurQuery; + this._bItemSelected = false; + + var allResults = oResponse.results, + nItemsToShow = Math.min(allResults.length,this.maxResultsDisplayed), + sMatchKey = (this.dataSource.responseSchema.fields) ? + (this.dataSource.responseSchema.fields[0].key || this.dataSource.responseSchema.fields[0]) : 0; + + if(nItemsToShow > 0) { + // Make sure container and helpers are ready to go + if(!this._elList || (this._elList.childNodes.length < nItemsToShow)) { + this._initListEl(); + } + this._initContainerHelperEls(); + + var allListItemEls = this._elList.childNodes; + // Fill items with data from the bottom up + for(var i = nItemsToShow-1; i >= 0; i--) { + var elListItem = allListItemEls[i], + oResult = allResults[i]; + + // Backward compatibility + if(this.resultTypeList) { + // Results need to be converted back to an array + var aResult = []; + // Match key is first + aResult[0] = (YAHOO.lang.isString(oResult)) ? oResult : oResult[sMatchKey] || oResult[this.key]; + // Add additional data to the result array + var fields = this.dataSource.responseSchema.fields; + if(YAHOO.lang.isArray(fields) && (fields.length > 1)) { + for(var k=1, len=fields.length; k= nItemsToShow; j--) { + extraListItem = allListItemEls[j]; + extraListItem.style.display = "none"; + } + } + + this._nDisplayedItems = nItemsToShow; + + this.containerPopulateEvent.fire(this, sQuery, allResults); + + // Highlight the first item + if(this.autoHighlight) { + var elFirstListItem = this._elList.firstChild; + this._toggleHighlight(elFirstListItem,"to"); + this.itemArrowToEvent.fire(this, elFirstListItem); + YAHOO.log("Arrowed to first item", "info", this.toString()); + this._typeAhead(elFirstListItem,sQuery); + } + // Unhighlight any previous time + else { + this._toggleHighlight(this._elCurListItem,"from"); + } + + // Pre-expansion stuff + ok = this._doBeforeExpandContainer(this._elTextbox, this._elContainer, sQuery, allResults); + + // Expand the container + this._toggleContainer(ok); + } + else { + this._toggleContainer(false); + } + + YAHOO.log("Container populated with " + nItemsToShow + " list items", "info", this.toString()); + return; + } + } + // Error + else { + this.dataErrorEvent.fire(this, sQuery, oResponse); + } + + YAHOO.log("Could not populate list", "info", this.toString()); +}; + +/** + * Called before container expands, by default snaps container to the + * bottom-left corner of the input element, then calls public overrideable method. + * + * @method _doBeforeExpandContainer + * @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. + * @private + */ +YAHOO.widget.AutoComplete.prototype._doBeforeExpandContainer = function(elTextbox, elContainer, sQuery, aResults) { + if(this.autoSnapContainer) { + this.snapContainer(); + } + + return this.doBeforeExpandContainer(elTextbox, elContainer, sQuery, aResults); +}; + +/** + * When forceSelection is true and the user attempts + * leave the text input box without selecting an item from the query results, + * the user selection is cleared. + * + * @method _clearSelection + * @private + */ +YAHOO.widget.AutoComplete.prototype._clearSelection = function() { + var extraction = (this.delimChar) ? this._extractQuery(this._elTextbox.value) : + {previous:"",query:this._elTextbox.value}; + this._elTextbox.value = extraction.previous; + this.selectionEnforceEvent.fire(this, extraction.query); + YAHOO.log("Selection enforced", "info", this.toString()); +}; + +/** + * Whether or not user-typed value in the text input box matches any of the + * query results. + * + * @method _textMatchesOption + * @return {HTMLElement} Matching list item element if user-input text matches + * a result, null otherwise. + * @private + */ +YAHOO.widget.AutoComplete.prototype._textMatchesOption = function() { + var elMatch = null; + + for(var i=0; i= 0; i--) { + nNewIndex = sQuery.lastIndexOf(aDelimChar[i]); + if(nNewIndex > nDelimIndex) { + nDelimIndex = nNewIndex; + } + } + // If we think the last delimiter is a space (" "), make sure it is NOT + // a false positive by also checking the char directly before it + if(aDelimChar[i] == " ") { + for (var j = aDelimChar.length-1; j >= 0; j--) { + if(sQuery[nDelimIndex - 1] == aDelimChar[j]) { + nDelimIndex--; + break; + } + } + } + // A delimiter has been found in the query so extract the latest query from past selections + if(nDelimIndex > -1) { + nQueryStart = nDelimIndex + 1; + // Trim any white space from the beginning... + while(sQuery.charAt(nQueryStart) == " ") { + nQueryStart += 1; + } + // ...and save the rest of the string for later + sPrevious = sQuery.substring(0,nQueryStart); + // Here is the query itself + sQuery = sQuery.substr(nQueryStart); + } + // No delimiter found in the query, so there are no selections from past queries + else { + sPrevious = ""; + } + + return { + previous: sPrevious, + query: sQuery + }; +}; + +/** + * Syncs results container with its helpers. + * + * @method _toggleContainerHelpers + * @param bShow {Boolean} True if container is expanded, false if collapsed + * @private + */ +YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) { + var width = this._elContent.offsetWidth + "px"; + var height = this._elContent.offsetHeight + "px"; + + if(this.useIFrame && this._elIFrame) { + var elIFrame = this._elIFrame; + if(bShow) { + elIFrame.style.width = width; + elIFrame.style.height = height; + elIFrame.style.padding = ""; + YAHOO.log("Iframe expanded", "info", this.toString()); + } + else { + elIFrame.style.width = 0; + elIFrame.style.height = 0; + elIFrame.style.padding = 0; + YAHOO.log("Iframe collapsed", "info", this.toString()); + } + } + if(this.useShadow && this._elShadow) { + var elShadow = this._elShadow; + if(bShow) { + elShadow.style.width = width; + elShadow.style.height = height; + YAHOO.log("Shadow expanded", "info", this.toString()); + } + else { + elShadow.style.width = 0; + elShadow.style.height = 0; + YAHOO.log("Shadow collapsed", "info", this.toString()); + } + } +}; + +/** + * Animates expansion or collapse of the container. + * + * @method _toggleContainer + * @param bShow {Boolean} True if container should be expanded, false if container should be collapsed + * @private + */ +YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { + YAHOO.log("Toggling container " + ((bShow) ? "open" : "closed"), "info", this.toString()); + + var elContainer = this._elContainer; + + // If implementer has container always open and it's already open, don't mess with it + // Container is initialized with display "none" so it may need to be shown first time through + if(this.alwaysShowContainer && this._bContainerOpen) { + return; + } + + // Reset states + if(!bShow) { + this._toggleHighlight(this._elCurListItem,"from"); + this._nDisplayedItems = 0; + this._sCurQuery = null; + + // Container is already closed, so don't bother with changing the UI + if(this._elContent.style.display == "none") { + return; + } + } + + // If animation is enabled... + var oAnim = this._oAnim; + if(oAnim && oAnim.getEl() && (this.animHoriz || this.animVert)) { + if(oAnim.isAnimated()) { + oAnim.stop(true); + } + + // Clone container to grab current size offscreen + var oClone = this._elContent.cloneNode(true); + elContainer.appendChild(oClone); + oClone.style.top = "-9000px"; + oClone.style.width = ""; + oClone.style.height = ""; + oClone.style.display = ""; + + // Current size of the container is the EXPANDED size + var wExp = oClone.offsetWidth; + var hExp = oClone.offsetHeight; + + // Calculate COLLAPSED sizes based on horiz and vert anim + var wColl = (this.animHoriz) ? 0 : wExp; + var hColl = (this.animVert) ? 0 : hExp; + + // Set animation sizes + oAnim.attributes = (bShow) ? + {width: { to: wExp }, height: { to: hExp }} : + {width: { to: wColl}, height: { to: hColl }}; + + // If opening anew, set to a collapsed size... + if(bShow && !this._bContainerOpen) { + this._elContent.style.width = wColl+"px"; + this._elContent.style.height = hColl+"px"; + } + // Else, set it to its last known size. + else { + this._elContent.style.width = wExp+"px"; + this._elContent.style.height = hExp+"px"; + } + + elContainer.removeChild(oClone); + oClone = null; + + var oSelf = this; + var onAnimComplete = function() { + // Finish the collapse + oAnim.onComplete.unsubscribeAll(); + + if(bShow) { + oSelf._toggleContainerHelpers(true); + oSelf._bContainerOpen = bShow; + oSelf.containerExpandEvent.fire(oSelf); + YAHOO.log("Container expanded", "info", oSelf.toString()); + } + else { + oSelf._elContent.style.display = "none"; + oSelf._bContainerOpen = bShow; + oSelf.containerCollapseEvent.fire(oSelf); + YAHOO.log("Container collapsed", "info", oSelf.toString()); + } + }; + + // Display container and animate it + this._toggleContainerHelpers(false); // Bug 1424486: Be early to hide, late to show; + this._elContent.style.display = ""; + oAnim.onComplete.subscribe(onAnimComplete); + oAnim.animate(); + } + // Else don't animate, just show or hide + else { + if(bShow) { + this._elContent.style.display = ""; + this._toggleContainerHelpers(true); + this._bContainerOpen = bShow; + this.containerExpandEvent.fire(this); + YAHOO.log("Container expanded", "info", this.toString()); + } + else { + this._toggleContainerHelpers(false); + this._elContent.style.display = "none"; + this._bContainerOpen = bShow; + this.containerCollapseEvent.fire(this); + YAHOO.log("Container collapsed", "info", this.toString()); + } + } + +}; + +/** + * Toggles the highlight on or off for an item in the container, and also cleans + * up highlighting of any previous item. + * + * @method _toggleHighlight + * @param elNewListItem {HTMLElement} The <li> element item to receive highlight behavior. + * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off. + * @private + */ +YAHOO.widget.AutoComplete.prototype._toggleHighlight = function(elNewListItem, sType) { + if(elNewListItem) { + var sHighlight = this.highlightClassName; + if(this._elCurListItem) { + // Remove highlight from old item + YAHOO.util.Dom.removeClass(this._elCurListItem, sHighlight); + this._elCurListItem = null; + } + + if((sType == "to") && sHighlight) { + // Apply highlight to new item + YAHOO.util.Dom.addClass(elNewListItem, sHighlight); + this._elCurListItem = elNewListItem; + } + } +}; + +/** + * Toggles the pre-highlight on or off for an item in the container, and also cleans + * up pre-highlighting of any previous item. + * + * @method _togglePrehighlight + * @param elNewListItem {HTMLElement} The <li> element item to receive highlight behavior. + * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off. + * @private + */ +YAHOO.widget.AutoComplete.prototype._togglePrehighlight = function(elNewListItem, sType) { + var sPrehighlight = this.prehighlightClassName; + + if(this._elCurPrehighlightItem) { + YAHOO.util.Dom.removeClass(this._elCurPrehighlightItem, sPrehighlight); + } + if(elNewListItem == this._elCurListItem) { + return; + } + + if((sType == "mouseover") && sPrehighlight) { + // Apply prehighlight to new item + YAHOO.util.Dom.addClass(elNewListItem, sPrehighlight); + this._elCurPrehighlightItem = elNewListItem; + } + else { + // Remove prehighlight from old item + YAHOO.util.Dom.removeClass(elNewListItem, sPrehighlight); + } +}; + +/** + * Updates the text input box value with selected query result. If a delimiter + * has been defined, then the value gets appended with the delimiter. + * + * @method _updateValue + * @param elListItem {HTMLElement} The <li> element item with which to update the value. + * @private + */ +YAHOO.widget.AutoComplete.prototype._updateValue = function(elListItem) { + if(!this.suppressInputUpdate) { + var elTextbox = this._elTextbox; + var sDelimChar = (this.delimChar) ? (this.delimChar[0] || this.delimChar) : null; + var sResultMatch = elListItem._sResultMatch; + + // Calculate the new value + var sNewValue = ""; + if(sDelimChar) { + // Preserve selections from past queries + sNewValue = this._sPastSelections; + // Add new selection plus delimiter + sNewValue += sResultMatch + sDelimChar; + if(sDelimChar != " ") { + sNewValue += " "; + } + } + else { + sNewValue = sResultMatch; + } + + // Update input field + elTextbox.value = sNewValue; + + // Scroll to bottom of textarea if necessary + if(elTextbox.type == "textarea") { + elTextbox.scrollTop = elTextbox.scrollHeight; + } + + // Move cursor to end + var end = elTextbox.value.length; + this._selectText(elTextbox,end,end); + + this._elCurListItem = elListItem; + } +}; + +/** + * Selects a result item from the container + * + * @method _selectItem + * @param elListItem {HTMLElement} The selected <li> element item. + * @private + */ +YAHOO.widget.AutoComplete.prototype._selectItem = function(elListItem) { + this._bItemSelected = true; + this._updateValue(elListItem); + this._sPastSelections = this._elTextbox.value; + this._clearInterval(); + this.itemSelectEvent.fire(this, elListItem, elListItem._oResultData); + YAHOO.log("Item selected: " + YAHOO.lang.dump(elListItem._oResultData), "info", this.toString()); + this._toggleContainer(false); +}; + +/** + * If an item is highlighted in the container, the right arrow key jumps to the + * end of the textbox and selects the highlighted item, otherwise the container + * is closed. + * + * @method _jumpSelection + * @private + */ +YAHOO.widget.AutoComplete.prototype._jumpSelection = function() { + if(this._elCurListItem) { + this._selectItem(this._elCurListItem); + } + else { + this._toggleContainer(false); + } +}; + +/** + * Triggered by up and down arrow keys, changes the current highlighted + * <li> element item. Scrolls container if necessary. + * + * @method _moveSelection + * @param nKeyCode {Number} Code of key pressed. + * @private + */ +YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) { + if(this._bContainerOpen) { + // Determine current item's id number + var elCurListItem = this._elCurListItem, + nCurItemIndex = -1; + + if(elCurListItem) { + nCurItemIndex = elCurListItem._nItemIndex; + } + + var nNewItemIndex = (nKeyCode == 40) ? + (nCurItemIndex + 1) : (nCurItemIndex - 1); + + // Out of bounds + if(nNewItemIndex < -2 || nNewItemIndex >= this._nDisplayedItems) { + return; + } + + if(elCurListItem) { + // Unhighlight current item + this._toggleHighlight(elCurListItem, "from"); + this.itemArrowFromEvent.fire(this, elCurListItem); + YAHOO.log("Item arrowed from: " + elCurListItem._nItemIndex, "info", this.toString()); + } + if(nNewItemIndex == -1) { + // Go back to query (remove type-ahead string) + if(this.delimChar) { + this._elTextbox.value = this._sPastSelections + this._sCurQuery; + } + else { + this._elTextbox.value = this._sCurQuery; + } + return; + } + if(nNewItemIndex == -2) { + // Close container + this._toggleContainer(false); + return; + } + + var elNewListItem = this._elList.childNodes[nNewItemIndex], + + // Scroll the container if necessary + elContent = this._elContent, + sOF = YAHOO.util.Dom.getStyle(elContent,"overflow"), + sOFY = YAHOO.util.Dom.getStyle(elContent,"overflowY"), + scrollOn = ((sOF == "auto") || (sOF == "scroll") || (sOFY == "auto") || (sOFY == "scroll")); + if(scrollOn && (nNewItemIndex > -1) && + (nNewItemIndex < this._nDisplayedItems)) { + // User is keying down + if(nKeyCode == 40) { + // Bottom of selected item is below scroll area... + if((elNewListItem.offsetTop+elNewListItem.offsetHeight) > (elContent.scrollTop + elContent.offsetHeight)) { + // Set bottom of scroll area to bottom of selected item + elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight; + } + // Bottom of selected item is above scroll area... + else if((elNewListItem.offsetTop+elNewListItem.offsetHeight) < elContent.scrollTop) { + // Set top of selected item to top of scroll area + elContent.scrollTop = elNewListItem.offsetTop; + + } + } + // User is keying up + else { + // Top of selected item is above scroll area + if(elNewListItem.offsetTop < elContent.scrollTop) { + // Set top of scroll area to top of selected item + this._elContent.scrollTop = elNewListItem.offsetTop; + } + // Top of selected item is below scroll area + else if(elNewListItem.offsetTop > (elContent.scrollTop + elContent.offsetHeight)) { + // Set bottom of selected item to bottom of scroll area + this._elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight; + } + } + } + + this._toggleHighlight(elNewListItem, "to"); + this.itemArrowToEvent.fire(this, elNewListItem); + YAHOO.log("Item arrowed to " + elNewListItem._nItemIndex, "info", this.toString()); + if(this.typeAhead) { + this._updateValue(elNewListItem); + } + } +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Private event handlers +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Handles container mouseover events. + * + * @method _onContainerMouseover + * @param v {HTMLEvent} The mouseover event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerMouseover = function(v,oSelf) { + var elTarget = YAHOO.util.Event.getTarget(v); + var elTag = elTarget.nodeName.toLowerCase(); + while(elTarget && (elTag != "table")) { + switch(elTag) { + case "body": + return; + case "li": + if(oSelf.prehighlightClassName) { + oSelf._togglePrehighlight(elTarget,"mouseover"); + } + else { + oSelf._toggleHighlight(elTarget,"to"); + } + + oSelf.itemMouseOverEvent.fire(oSelf, elTarget); + YAHOO.log("Item moused over " + elTarget._nItemIndex, "info", oSelf.toString()); + break; + case "div": + if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) { + oSelf._bOverContainer = true; + return; + } + break; + default: + break; + } + + elTarget = elTarget.parentNode; + if(elTarget) { + elTag = elTarget.nodeName.toLowerCase(); + } + } +}; + +/** + * Handles container mouseout events. + * + * @method _onContainerMouseout + * @param v {HTMLEvent} The mouseout event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerMouseout = function(v,oSelf) { + var elTarget = YAHOO.util.Event.getTarget(v); + var elTag = elTarget.nodeName.toLowerCase(); + while(elTarget && (elTag != "table")) { + switch(elTag) { + case "body": + return; + case "li": + if(oSelf.prehighlightClassName) { + oSelf._togglePrehighlight(elTarget,"mouseout"); + } + else { + oSelf._toggleHighlight(elTarget,"from"); + } + + oSelf.itemMouseOutEvent.fire(oSelf, elTarget); + YAHOO.log("Item moused out " + elTarget._nItemIndex, "info", oSelf.toString()); + break; + case "ul": + oSelf._toggleHighlight(oSelf._elCurListItem,"to"); + break; + case "div": + if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) { + oSelf._bOverContainer = false; + return; + } + break; + default: + break; + } + + elTarget = elTarget.parentNode; + if(elTarget) { + elTag = elTarget.nodeName.toLowerCase(); + } + } +}; + +/** + * Handles container click events. + * + * @method _onContainerClick + * @param v {HTMLEvent} The click event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerClick = function(v,oSelf) { + var elTarget = YAHOO.util.Event.getTarget(v); + var elTag = elTarget.nodeName.toLowerCase(); + while(elTarget && (elTag != "table")) { + switch(elTag) { + case "body": + return; + case "li": + // In case item has not been moused over + oSelf._toggleHighlight(elTarget,"to"); + oSelf._selectItem(elTarget); + return; + default: + break; + } + + elTarget = elTarget.parentNode; + if(elTarget) { + elTag = elTarget.nodeName.toLowerCase(); + } + } +}; + + +/** + * Handles container scroll events. + * + * @method _onContainerScroll + * @param v {HTMLEvent} The scroll event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerScroll = function(v,oSelf) { + oSelf._focus(); +}; + +/** + * Handles container resize events. + * + * @method _onContainerResize + * @param v {HTMLEvent} The resize event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerResize = function(v,oSelf) { + oSelf._toggleContainerHelpers(oSelf._bContainerOpen); +}; + + +/** + * Handles textbox keydown events of functional keys, mainly for UI behavior. + * + * @method _onTextboxKeyDown + * @param v {HTMLEvent} The keydown event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown = function(v,oSelf) { + var nKeyCode = v.keyCode; + + // Clear timeout + if(oSelf._nTypeAheadDelayID != -1) { + clearTimeout(oSelf._nTypeAheadDelayID); + } + + switch (nKeyCode) { + case 9: // tab + if(!YAHOO.env.ua.opera && (navigator.userAgent.toLowerCase().indexOf("mac") == -1) || (YAHOO.env.ua.webkit>420)) { + // select an item or clear out + if(oSelf._elCurListItem) { + if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } + } + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + case 13: // enter + if(!YAHOO.env.ua.opera && (navigator.userAgent.toLowerCase().indexOf("mac") == -1) || (YAHOO.env.ua.webkit>420)) { + if(oSelf._elCurListItem) { + if(oSelf._nKeyCode != nKeyCode) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } + } + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + case 27: // esc + oSelf._toggleContainer(false); + return; + case 39: // right + oSelf._jumpSelection(); + break; + case 38: // up + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + oSelf._moveSelection(nKeyCode); + } + break; + case 40: // down + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + oSelf._moveSelection(nKeyCode); + } + break; + default: + oSelf._bItemSelected = false; + oSelf._toggleHighlight(oSelf._elCurListItem, "from"); + + oSelf.textboxKeyEvent.fire(oSelf, nKeyCode); + YAHOO.log("Textbox keyed", "info", oSelf.toString()); + break; + } + + if(nKeyCode === 18){ + oSelf._enableIntervalDetection(); + } + oSelf._nKeyCode = nKeyCode; +}; + +/** + * Handles textbox keypress events. + * @method _onTextboxKeyPress + * @param v {HTMLEvent} The keypress event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress = function(v,oSelf) { + var nKeyCode = v.keyCode; + + // Expose only to non SF3 (bug 1978549) Mac browsers (bug 790337) and Opera browsers (bug 583531), + // where stopEvent is ineffective on keydown events + if(YAHOO.env.ua.opera || (navigator.userAgent.toLowerCase().indexOf("mac") != -1) && (YAHOO.env.ua.webkit < 420)) { + switch (nKeyCode) { + case 9: // tab + // select an item or clear out + if(oSelf._bContainerOpen) { + if(oSelf.delimChar) { + YAHOO.util.Event.stopEvent(v); + } + if(oSelf._elCurListItem) { + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + case 13: // enter + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + if(oSelf._elCurListItem) { + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + default: + break; + } + } + + //TODO: (?) limit only to non-IE, non-Mac-FF for Korean IME support (bug 811948) + // Korean IME detected + else if(nKeyCode == 229) { + oSelf._enableIntervalDetection(); + } +}; + +/** + * Handles textbox keyup events to trigger queries. + * + * @method _onTextboxKeyUp + * @param v {HTMLEvent} The keyup event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp = function(v,oSelf) { + var sText = this.value; //string in textbox + + // Check to see if any of the public properties have been updated + oSelf._initProps(); + + // Filter out chars that don't trigger queries + var nKeyCode = v.keyCode; + if(oSelf._isIgnoreKey(nKeyCode)) { + return; + } + + // Clear previous timeout + if(oSelf._nDelayID != -1) { + clearTimeout(oSelf._nDelayID); + } + + // Set new timeout + oSelf._nDelayID = setTimeout(function(){ + oSelf._sendQuery(sText); + },(oSelf.queryDelay * 1000)); +}; + +/** + * Handles text input box receiving focus. + * + * @method _onTextboxFocus + * @param v {HTMLEvent} The focus event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxFocus = function (v,oSelf) { + // Start of a new interaction + if(!oSelf._bFocused) { + oSelf._elTextbox.setAttribute("autocomplete","off"); + oSelf._bFocused = true; + oSelf._sInitInputValue = oSelf._elTextbox.value; + oSelf.textboxFocusEvent.fire(oSelf); + YAHOO.log("Textbox focused", "info", oSelf.toString()); + } +}; + +/** + * Handles text input box losing focus. + * + * @method _onTextboxBlur + * @param v {HTMLEvent} The focus event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxBlur = function (v,oSelf) { + // Is a true blur + if(!oSelf._bOverContainer || (oSelf._nKeyCode == 9)) { + // Current query needs to be validated as a selection + if(!oSelf._bItemSelected) { + var elMatchListItem = oSelf._textMatchesOption(); + // Container is closed or current query doesn't match any result + if(!oSelf._bContainerOpen || (oSelf._bContainerOpen && (elMatchListItem === 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); + YAHOO.log("Unmatched item selected: " + oSelf._sCurQuery, "info", oSelf.toString()); + } + } + // Container is open and current query matches a result + else { + // Force a selection when textbox is blurred with a match + if(oSelf.forceSelection) { + oSelf._selectItem(elMatchListItem); + } + } + } + + oSelf._clearInterval(); + oSelf._bFocused = false; + if(oSelf._sInitInputValue !== oSelf._elTextbox.value) { + oSelf.textboxChangeEvent.fire(oSelf); + } + oSelf.textboxBlurEvent.fire(oSelf); + YAHOO.log("Textbox blurred", "info", oSelf.toString()); + + oSelf._toggleContainer(false); + } + // Not a true blur if it was a selection via mouse click + else { + oSelf._focus(); + } +}; + +/** + * Handles window unload event. + * + * @method _onWindowUnload + * @param v {HTMLEvent} The unload event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onWindowUnload = function(v,oSelf) { + if(oSelf && oSelf._elTextbox && oSelf.allowBrowserAutocomplete) { + oSelf._elTextbox.setAttribute("autocomplete","on"); + } +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Deprecated for Backwards Compatibility +// +///////////////////////////////////////////////////////////////////////////// +/** + * @method doBeforeSendQuery + * @deprecated Use generateRequest. + */ +YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery = function(sQuery) { + return this.generateRequest(sQuery); +}; + +/** + * @method getListItems + * @deprecated Use getListEl().childNodes. + */ +YAHOO.widget.AutoComplete.prototype.getListItems = function() { + var allListItemEls = [], + els = this._elList.childNodes; + for(var i=els.length-1; i>=0; i--) { + allListItemEls[i] = els[i]; + } + return allListItemEls; +}; + +///////////////////////////////////////////////////////////////////////// +// +// Private static methods +// +///////////////////////////////////////////////////////////////////////// + +/** + * Clones object literal or array of object literals. + * + * @method AutoComplete._cloneObject + * @param o {Object} Object. + * @private + * @static + */ +YAHOO.widget.AutoComplete._cloneObject = function(o) { + if(!YAHOO.lang.isValue(o)) { + return o; + } + + var copy = {}; + + if(YAHOO.lang.isFunction(o)) { + copy = o; + } + else if(YAHOO.lang.isArray(o)) { + var array = []; + for(var i=0,len=o.length;i-1;A--){B[A].style.display="none";}};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(E){var D,C,A;for(var B=E.length;B>=this.minQueryLength;B--){A=this.generateRequest(E.substr(0,B));this.dataRequestEvent.fire(this,D,A);C=this.dataSource.getCachedResponse(A);if(C){return this.filterResults.apply(this.dataSource,[E,C,C,{scope:this}]);}}return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(C,B,A){var D=((this.responseStripAfter!=="")&&(B.indexOf))?B.indexOf(this.responseStripAfter):-1;if(D!=-1){B=B.substring(0,D);}return B;};YAHOO.widget.AutoComplete.prototype.filterResults=function(K,M,Q,L){if(L&&L.argument&&L.argument.query){K=L.argument.query;}if(K&&K!==""){Q=YAHOO.widget.AutoComplete._cloneObject(Q);var I=L.scope,P=this,C=Q.results,N=[],B=I.maxResultsDisplayed,J=(P.queryMatchCase||I.queryMatchCase),A=(P.queryMatchContains||I.queryMatchContains);for(var D=0,H=C.length;D-1))){N.push(F);}}if(H>B&&N.length===B){break;}}Q.results=N;}else{}return Q;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(C,A,B){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(C,A,B);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(C,A,B){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,D,A){var C=(A)?A:"";return C;};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true;};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.containerPopulateEvent.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();this.textboxChangeEvent.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.containerPopulateEvent=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.prototype.textboxChangeEvent=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=false;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=null;YAHOO.widget.AutoComplete.prototype._elCurPrehighlightItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-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 E=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(E)||(E<1)){this.maxResultsDisplayed=10;}var F=this.queryDelay;if(!YAHOO.lang.isNumber(F)||(F<0)){this.queryDelay=0.2;}var C=this.typeAheadDelay;if(!YAHOO.lang.isNumber(C)||(C<0)){this.typeAheadDelay=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 D=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(D)||(D<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._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";A.style.width=0;A.style.height=0;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=0;B.style.height=0;B.style.padding=0;B.tabIndex=-1;B.role="presentation";B.title="Presentational iframe shim";this._elIFrame=this._elContainer.appendChild(B);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=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._initListEl=function(){var C=this.maxResultsDisplayed,A=this._elList||document.createElement("ul"),B;while(A.childNodes.length=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)||(A==229)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(D){if(this.minQueryLength<0){this._toggleContainer(false);return;}if(this.delimChar){var A=this._extractQuery(D);D=A.query;this._sPastSelections=A.previous;}if((D&&(D.length0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);return;}D=encodeURIComponent(D);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var C=this.getSubsetMatches(D);if(C){this.handleResponse(D,C,{query:D});return; +}}if(this.dataSource.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}var B=this.generateRequest(D);this.dataRequestEvent.fire(this,D,B);this.dataSource.sendRequest(B,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:D}});};YAHOO.widget.AutoComplete.prototype._populateListItem=function(B,A,C){B.innerHTML=this.formatResult(A,C,B._sResultMatch);};YAHOO.widget.AutoComplete.prototype._populateList=function(K,F,C){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}K=(C&&C.query)?C.query:K;var H=this.doBeforeLoadData(K,F,C);if(H&&!F.error){this.dataReturnEvent.fire(this,K,F.results);if(this._bFocused){var M=decodeURIComponent(K);this._sCurQuery=M;this._bItemSelected=false;var R=F.results,A=Math.min(R.length,this.maxResultsDisplayed),J=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(A>0){if(!this._elList||(this._elList.childNodes.length=0;Q--){var P=I[Q],E=R[Q];if(this.resultTypeList){var B=[];B[0]=(YAHOO.lang.isString(E))?E:E[J]||E[this.key];var L=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(L)&&(L.length>1)){for(var N=1,S=L.length;N=A;O--){G=I[O];G.style.display="none";}}this._nDisplayedItems=A;this.containerPopulateEvent.fire(this,K,R);if(this.autoHighlight){var D=this._elList.firstChild;this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);this._typeAhead(D,K);}else{this._toggleHighlight(this._elCurListItem,"from");}H=this._doBeforeExpandContainer(this._elTextbox,this._elContainer,K,R);this._toggleContainer(H);}else{this._toggleContainer(false);}return;}}else{this.dataErrorEvent.fire(this,K,F);}};YAHOO.widget.AutoComplete.prototype._doBeforeExpandContainer=function(D,A,C,B){if(this.autoSnapContainer){this.snapContainer();}return this.doBeforeExpandContainer(D,A,C,B);};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var A=(this.delimChar)?this._extractQuery(this._elTextbox.value):{previous:"",query:this._elTextbox.value};this._elTextbox.value=A.previous;this.selectionEnforceEvent.fire(this,A.query);};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var A=null;for(var B=0;B=0;B--){G=H.lastIndexOf(C[B]);if(G>F){F=G;}}if(C[B]==" "){for(var A=C.length-1;A>=0;A--){if(H[F-1]==C[A]){F--;break;}}}if(F>-1){E=F+1;while(H.charAt(E)==" "){E+=1;}D=H.substring(0,E);H=H.substr(E);}else{D="";}return{previous:D,query:H};};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(D){var E=this._elContent.offsetWidth+"px";var B=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var C=this._elIFrame;if(D){C.style.width=E;C.style.height=B;C.style.padding="";}else{C.style.width=0;C.style.height=0;C.style.padding=0;}}if(this.useShadow&&this._elShadow){var A=this._elShadow;if(D){A.style.width=E;A.style.height=B;}else{A.style.width=0;A.style.height=0;}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(I){var D=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return;}if(!I){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(this._elContent.style.display=="none"){return;}}var A=this._oAnim;if(A&&A.getEl()&&(this.animHoriz||this.animVert)){if(A.isAnimated()){A.stop(true);}var G=this._elContent.cloneNode(true);D.appendChild(G);G.style.top="-9000px";G.style.width="";G.style.height="";G.style.display="";var F=G.offsetWidth;var C=G.offsetHeight;var B=(this.animHoriz)?0:F;var E=(this.animVert)?0:C;A.attributes=(I)?{width:{to:F},height:{to:C}}:{width:{to:B},height:{to:E}};if(I&&!this._bContainerOpen){this._elContent.style.width=B+"px";this._elContent.style.height=E+"px";}else{this._elContent.style.width=F+"px";this._elContent.style.height=C+"px";}D.removeChild(G);G=null;var H=this;var J=function(){A.onComplete.unsubscribeAll();if(I){H._toggleContainerHelpers(true);H._bContainerOpen=I;H.containerExpandEvent.fire(H);}else{H._elContent.style.display="none";H._bContainerOpen=I;H.containerCollapseEvent.fire(H);}};this._toggleContainerHelpers(false);this._elContent.style.display="";A.onComplete.subscribe(J);A.animate();}else{if(I){this._elContent.style.display="";this._toggleContainerHelpers(true);this._bContainerOpen=I;this.containerExpandEvent.fire(this);}else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=I;this.containerCollapseEvent.fire(this);}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){if(A){var B=this.highlightClassName; +if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,B);this._elCurListItem=null;}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._elCurListItem=A;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(B,C){var A=this.prehighlightClassName;if(this._elCurPrehighlightItem){YAHOO.util.Dom.removeClass(this._elCurPrehighlightItem,A);}if(B==this._elCurListItem){return;}if((C=="mouseover")&&A){YAHOO.util.Dom.addClass(B,A);this._elCurPrehighlightItem=B;}else{YAHOO.util.Dom.removeClass(B,A);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(C){if(!this.suppressInputUpdate){var F=this._elTextbox;var E=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=C._sResultMatch;var D="";if(E){D=this._sPastSelections;D+=B+E;if(E!=" "){D+=" ";}}else{D=B;}F.value=D;if(F.type=="textarea"){F.scrollTop=F.scrollHeight;}var A=F.value.length;this._selectText(F,A,A);this._elCurListItem=C;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._sPastSelections=this._elTextbox.value;this._clearInterval();this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurListItem){this._selectItem(this._elCurListItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var H=this._elCurListItem,D=-1;if(H){D=H._nItemIndex;}var E=(G==40)?(D+1):(D-1);if(E<-2||E>=this._nDisplayedItems){return;}if(H){this._toggleHighlight(H,"from");this.itemArrowFromEvent.fire(this,H);}if(E==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}else{this._elTextbox.value=this._sCurQuery;}return;}if(E==-2){this._toggleContainer(false);return;}var F=this._elList.childNodes[E],B=this._elContent,C=YAHOO.util.Dom.getStyle(B,"overflow"),I=YAHOO.util.Dom.getStyle(B,"overflowY"),A=((C=="auto")||(C=="scroll")||(I=="auto")||(I=="scroll"));if(A&&(E>-1)&&(E(B.scrollTop+B.offsetHeight)){B.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}else{if((F.offsetTop+F.offsetHeight)(B.scrollTop+B.offsetHeight)){this._elContent.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}}}}this._toggleHighlight(F,"to");this.itemArrowToEvent.fire(this,F);if(this.typeAhead){this._updateValue(F);}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseover");}else{C._toggleHighlight(D,"to");}C.itemMouseOverEvent.fire(C,D);break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=true;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseout");}else{C._toggleHighlight(D,"from");}C.itemMouseOutEvent.fire(C,D);break;case"ul":C._toggleHighlight(C._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=false;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":C._toggleHighlight(D,"to");C._selectItem(D);return;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._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;if(B._nTypeAheadDelayID!=-1){clearTimeout(B._nTypeAheadDelayID);}switch(C){case 9:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 27:B._toggleContainer(false);return;case 39:B._jumpSelection();break;case 38:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;case 40:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;default:B._bItemSelected=false;B._toggleHighlight(B._elCurListItem,"from");B.textboxKeyEvent.fire(B,C);break;}if(C===18){B._enableIntervalDetection();}B._nKeyCode=C;};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(C){case 9:if(B._bContainerOpen){if(B.delimChar){YAHOO.util.Event.stopEvent(A);}if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;default:break;}}else{if(C==229){B._enableIntervalDetection();}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(A,C){var B=this.value;C._initProps();var D=A.keyCode;if(C._isIgnoreKey(D)){return; +}if(C._nDelayID!=-1){clearTimeout(C._nDelayID);}C._nDelayID=setTimeout(function(){C._sendQuery(B);},(C.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){if(!B._bFocused){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;B._sInitInputValue=B._elTextbox.value;B.textboxFocusEvent.fire(B);}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,C){if(!C._bOverContainer||(C._nKeyCode==9)){if(!C._bItemSelected){var B=C._textMatchesOption();if(!C._bContainerOpen||(C._bContainerOpen&&(B===null))){if(C.forceSelection){C._clearSelection();}else{C.unmatchedItemSelectEvent.fire(C,C._sCurQuery);}}else{if(C.forceSelection){C._selectItem(B);}}}C._clearInterval();C._bFocused=false;if(C._sInitInputValue!==C._elTextbox.value){C.textboxChangeEvent.fire(C);}C.textboxBlurEvent.fire(C);C._toggleContainer(false);}else{C._focus();}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return this.generateRequest(A);};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var C=[],B=this._elList.childNodes;for(var A=B.length-1;A>=0;A--){C[A]=B[A];}return C;};YAHOO.widget.AutoComplete._cloneObject=function(D){if(!YAHOO.lang.isValue(D)){return D;}var F={};if(YAHOO.lang.isFunction(D)){F=D;}else{if(YAHOO.lang.isArray(D)){var E=[];for(var C=0,B=D.length;C + *
  • Navigate with up/down arrow keys and/or mouse to pick a selection
  • + *
  • The drop down container can "roll down" or "fly out" via configurable + * animation
  • + *
  • UI look-and-feel customizable through CSS, including container + * attributes, borders, position, fonts, etc
  • + * + * + * @class AutoComplete + * @constructor + * @param elInput {HTMLElement} DOM element reference of an input field. + * @param elInput {String} String ID of an input field. + * @param elContainer {HTMLElement} DOM element reference of an existing DIV. + * @param elContainer {String} String ID of an existing DIV. + * @param oDataSource {YAHOO.widget.DataSource} DataSource instance. + * @param oConfigs {Object} (optional) Object literal of configuration params. + */ +YAHOO.widget.AutoComplete = function(elInput,elContainer,oDataSource,oConfigs) { + if(elInput && elContainer && oDataSource) { + // Validate DataSource + if(oDataSource && YAHOO.lang.isFunction(oDataSource.sendRequest)) { + this.dataSource = oDataSource; + } + else { + return; + } + + // YAHOO.widget.DataSource schema backwards compatibility + // Converted deprecated schema into supported schema + // First assume key data is held in position 0 of results array + this.key = 0; + var schema = oDataSource.responseSchema; + // An old school schema has been defined in the deprecated DataSource constructor + if(oDataSource._aDeprecatedSchema) { + var aDeprecatedSchema = oDataSource._aDeprecatedSchema; + if(YAHOO.lang.isArray(aDeprecatedSchema)) { + + if((oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_JSON) || + (oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_UNKNOWN)) { // Used to default to unknown + // Store the resultsList + schema.resultsList = aDeprecatedSchema[0]; + // Store the key + this.key = aDeprecatedSchema[1]; + // Only resultsList and key are defined, so grab all the data + schema.fields = (aDeprecatedSchema.length < 3) ? null : aDeprecatedSchema.slice(1); + } + else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_XML) { + schema.resultNode = aDeprecatedSchema[0]; + this.key = aDeprecatedSchema[1]; + schema.fields = aDeprecatedSchema.slice(1); + } + else if(oDataSource.responseType === YAHOO.util.DataSourceBase.TYPE_TEXT) { + schema.recordDelim = aDeprecatedSchema[0]; + schema.fieldDelim = aDeprecatedSchema[1]; + } + oDataSource.responseSchema = schema; + } + } + + // Validate input element + if(YAHOO.util.Dom.inDocument(elInput)) { + if(YAHOO.lang.isString(elInput)) { + this._sName = "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput; + this._elTextbox = document.getElementById(elInput); + } + else { + this._sName = (elInput.id) ? + "instance" + YAHOO.widget.AutoComplete._nIndex + " " + elInput.id: + "instance" + YAHOO.widget.AutoComplete._nIndex; + this._elTextbox = elInput; + } + YAHOO.util.Dom.addClass(this._elTextbox, "yui-ac-input"); + } + else { + return; + } + + // Validate container element + if(YAHOO.util.Dom.inDocument(elContainer)) { + if(YAHOO.lang.isString(elContainer)) { + this._elContainer = document.getElementById(elContainer); + } + else { + this._elContainer = elContainer; + } + if(this._elContainer.style.display == "none") { + } + + // For skinning + var elParent = this._elContainer.parentNode; + var elTag = elParent.tagName.toLowerCase(); + if(elTag == "div") { + YAHOO.util.Dom.addClass(elParent, "yui-ac"); + } + else { + } + } + else { + return; + } + + // Default applyLocalFilter setting is to enable for local sources + if(this.dataSource.dataType === YAHOO.util.DataSourceBase.TYPE_LOCAL) { + this.applyLocalFilter = true; + } + + // Set any config params passed in to override defaults + if(oConfigs && (oConfigs.constructor == Object)) { + for(var sConfig in oConfigs) { + if(sConfig) { + this[sConfig] = oConfigs[sConfig]; + } + } + } + + // Initialization sequence + this._initContainerEl(); + this._initProps(); + this._initListEl(); + this._initContainerHelperEls(); + + // Set up events + var oSelf = this; + var elTextbox = this._elTextbox; + + // Dom events + 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(elContainer,"mouseover",oSelf._onContainerMouseover,oSelf); + YAHOO.util.Event.addListener(elContainer,"mouseout",oSelf._onContainerMouseout,oSelf); + YAHOO.util.Event.addListener(elContainer,"click",oSelf._onContainerClick,oSelf); + YAHOO.util.Event.addListener(elContainer,"scroll",oSelf._onContainerScroll,oSelf); + YAHOO.util.Event.addListener(elContainer,"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); + 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.containerPopulateEvent = new YAHOO.util.CustomEvent("containerPopulate", 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); + this.textboxChangeEvent = new YAHOO.util.CustomEvent("textboxChange", this); + + // Finish up + elTextbox.setAttribute("autocomplete","off"); + YAHOO.widget.AutoComplete._nIndex++; + } + // Required arguments were not found + else { + } +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Public member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * The DataSource object that encapsulates the data used for auto completion. + * This object should be an inherited object from YAHOO.widget.DataSource. + * + * @property dataSource + * @type YAHOO.widget.DataSource + */ +YAHOO.widget.AutoComplete.prototype.dataSource = null; + +/** + * By default, results from local DataSources will pass through the filterResults + * method to apply a client-side matching algorithm. + * + * @property applyLocalFilter + * @type Boolean + * @default true for local arrays and json, otherwise false + */ +YAHOO.widget.AutoComplete.prototype.applyLocalFilter = null; + +/** + * When applyLocalFilter is true, the local filtering algorthim can have case sensitivity + * enabled. + * + * @property queryMatchCase + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.queryMatchCase = false; + +/** + * When applyLocalFilter is true, results can be locally filtered to return + * matching strings that "contain" the query string rather than simply "start with" + * the query string. + * + * @property queryMatchContains + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.queryMatchContains = false; + +/** + * Enables query subset matching. When the DataSource's cache is enabled and queryMatchSubset is + * true, substrings of queries will return matching cached results. For + * instance, if the first query is for "abc" susequent queries that start with + * "abc", like "abcd", will be queried against the cache, and not the live data + * source. Recommended only for DataSources that return comprehensive results + * for queries with very few characters. + * + * @property queryMatchSubset + * @type Boolean + * @default false + * + */ +YAHOO.widget.AutoComplete.prototype.queryMatchSubset = false; + +/** + * Number of characters that must be entered before querying for results. A negative value + * effectively turns off the widget. A value of 0 allows queries of null or empty string + * values. + * + * @property minQueryLength + * @type Number + * @default 1 + */ +YAHOO.widget.AutoComplete.prototype.minQueryLength = 1; + +/** + * Maximum number of results to display in results container. + * + * @property maxResultsDisplayed + * @type Number + * @default 10 + */ +YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed = 10; + +/** + * Number of seconds to delay before submitting a query request. If a query + * request is received before a previous one has completed its delay, the + * previous request is cancelled and the new request is set to the delay. If + * typeAhead is also enabled, this value must always be less than the typeAheadDelay + * in order to avoid certain race conditions. + * + * @property queryDelay + * @type Number + * @default 0.2 + */ +YAHOO.widget.AutoComplete.prototype.queryDelay = 0.2; + +/** + * If typeAhead is true, number of seconds to delay before updating input with + * typeAhead value. In order to prevent certain race conditions, this value must + * always be greater than the queryDelay. + * + * @property typeAheadDelay + * @type Number + * @default 0.5 + */ +YAHOO.widget.AutoComplete.prototype.typeAheadDelay = 0.5; + +/** + * When IME usage is detected or interval detection is explicitly enabled, + * AutoComplete will detect the input value at the given interval and send a + * query if the value has changed. + * + * @property queryInterval + * @type Number + * @default 500 + */ +YAHOO.widget.AutoComplete.prototype.queryInterval = 500; + +/** + * Class name of a highlighted item within results container. + * + * @property highlightClassName + * @type String + * @default "yui-ac-highlight" + */ +YAHOO.widget.AutoComplete.prototype.highlightClassName = "yui-ac-highlight"; + +/** + * Class name of a pre-highlighted item within results container. + * + * @property prehighlightClassName + * @type String + */ +YAHOO.widget.AutoComplete.prototype.prehighlightClassName = null; + +/** + * Query delimiter. A single character separator for multiple delimited + * selections. Multiple delimiter characteres may be defined as an array of + * strings. A null value or empty string indicates that query results cannot + * be delimited. This feature is not recommended if you need forceSelection to + * be true. + * + * @property delimChar + * @type String | String[] + */ +YAHOO.widget.AutoComplete.prototype.delimChar = null; + +/** + * Whether or not the first item in results container should be automatically highlighted + * on expand. + * + * @property autoHighlight + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.autoHighlight = true; + +/** + * If autohighlight is enabled, whether or not the input field should be automatically updated + * with the first query result as the user types, auto-selecting the substring portion + * of the first result that the user has not yet typed. + * + * @property typeAhead + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.typeAhead = false; + +/** + * Whether or not to animate the expansion/collapse of the results container in the + * horizontal direction. + * + * @property animHoriz + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.animHoriz = false; + +/** + * Whether or not to animate the expansion/collapse of the results container in the + * vertical direction. + * + * @property animVert + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.animVert = true; + +/** + * Speed of container expand/collapse animation, in seconds.. + * + * @property animSpeed + * @type Number + * @default 0.3 + */ +YAHOO.widget.AutoComplete.prototype.animSpeed = 0.3; + +/** + * Whether or not to force the user's selection to match one of the query + * results. Enabling this feature essentially transforms the input field into a + * <select> field. This feature is not recommended with delimiter character(s) + * defined. + * + * @property forceSelection + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.forceSelection = false; + +/** + * Whether or not to allow browsers to cache user-typed input in the input + * field. Disabling this feature will prevent the widget from setting the + * autocomplete="off" on the input field. When autocomplete="off" + * and users click the back button after form submission, user-typed input can + * be prefilled by the browser from its cache. This caching of user input may + * not be desired for sensitive data, such as credit card numbers, in which + * case, implementers should consider setting allowBrowserAutocomplete to false. + * + * @property allowBrowserAutocomplete + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete = true; + +/** + * Enabling this feature prevents the toggling of the container to a collapsed state. + * Setting to true does not automatically trigger the opening of the container. + * Implementers are advised to pre-load the container with an explicit "sendQuery()" call. + * + * @property alwaysShowContainer + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.alwaysShowContainer = false; + +/** + * Whether or not to use an iFrame to layer over Windows form elements in + * IE. Set to true only when the results container will be on top of a + * <select> field in IE and thus exposed to the IE z-index bug (i.e., + * 5.5 < IE < 7). + * + * @property useIFrame + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.useIFrame = false; + +/** + * Whether or not the results container should have a shadow. + * + * @property useShadow + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.useShadow = false; + +/** + * Whether or not the input field should be updated with selections. + * + * @property suppressInputUpdate + * @type Boolean + * @default false + */ +YAHOO.widget.AutoComplete.prototype.suppressInputUpdate = false; + +/** + * For backward compatibility to pre-2.6.0 formatResults() signatures, setting + * resultsTypeList to true will take each object literal result returned by + * DataSource and flatten into an array. + * + * @property resultTypeList + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.resultTypeList = true; + +/** + * For XHR DataSources, AutoComplete will automatically insert a "?" between the server URI and + * the "query" param/value pair. To prevent this behavior, implementers should + * set this value to false. To more fully customize the query syntax, implementers + * should override the generateRequest() method. + * + * @property queryQuestionMark + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.queryQuestionMark = true; + +/** + * If true, before each time the container expands, the container element will be + * positioned to snap to the bottom-left corner of the input element. If + * autoSnapContainer is set to false, this positioning will not be done. + * + * @property autoSnapContainer + * @type Boolean + * @default true + */ +YAHOO.widget.AutoComplete.prototype.autoSnapContainer = true; + +///////////////////////////////////////////////////////////////////////////// +// +// Public methods +// +///////////////////////////////////////////////////////////////////////////// + + /** + * Public accessor to the unique name of the AutoComplete instance. + * + * @method toString + * @return {String} Unique name of the AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.toString = function() { + return "AutoComplete " + this._sName; +}; + + /** + * Returns DOM reference to input element. + * + * @method getInputEl + * @return {HTMLELement} DOM reference to input element. + */ +YAHOO.widget.AutoComplete.prototype.getInputEl = function() { + return this._elTextbox; +}; + + /** + * Returns DOM reference to container element. + * + * @method getContainerEl + * @return {HTMLELement} DOM reference to container element. + */ +YAHOO.widget.AutoComplete.prototype.getContainerEl = function() { + return this._elContainer; +}; + + /** + * Returns true if widget instance is currently active. + * + * @method isFocused + * @return {Boolean} Returns true if widget instance is currently active. + */ +YAHOO.widget.AutoComplete.prototype.isFocused = function() { + return this._bFocused; +}; + + /** + * Returns true if container is in an expanded state, false otherwise. + * + * @method isContainerOpen + * @return {Boolean} Returns true if container is in an expanded state, false otherwise. + */ +YAHOO.widget.AutoComplete.prototype.isContainerOpen = function() { + return this._bContainerOpen; +}; + +/** + * Public accessor to the <ul> element that displays query results within the results container. + * + * @method getListEl + * @return {HTMLElement[]} Reference to <ul> element within the results container. + */ +YAHOO.widget.AutoComplete.prototype.getListEl = function() { + return this._elList; +}; + +/** + * Public accessor to the matching string associated with a given <li> result. + * + * @method getListItemMatch + * @param elListItem {HTMLElement} Reference to <LI> element. + * @return {String} Matching string. + */ +YAHOO.widget.AutoComplete.prototype.getListItemMatch = function(elListItem) { + if(elListItem._sResultMatch) { + return elListItem._sResultMatch; + } + else { + return null; + } +}; + +/** + * Public accessor to the result data associated with a given <li> result. + * + * @method getListItemData + * @param elListItem {HTMLElement} Reference to <LI> element. + * @return {Object} Result data. + */ +YAHOO.widget.AutoComplete.prototype.getListItemData = function(elListItem) { + if(elListItem._oResultData) { + return elListItem._oResultData; + } + else { + return null; + } +}; + +/** + * Public accessor to the index of the associated with a given <li> result. + * + * @method getListItemIndex + * @param elListItem {HTMLElement} Reference to <LI> element. + * @return {Number} Index. + */ +YAHOO.widget.AutoComplete.prototype.getListItemIndex = function(elListItem) { + if(YAHOO.lang.isNumber(elListItem._nItemIndex)) { + return elListItem._nItemIndex; + } + else { + return null; + } +}; + +/** + * Sets HTML markup for the results container header. This markup will be + * inserted within a <div> tag with a class of "yui-ac-hd". + * + * @method setHeader + * @param sHeader {String} HTML markup for results container header. + */ +YAHOO.widget.AutoComplete.prototype.setHeader = function(sHeader) { + if(this._elHeader) { + var elHeader = this._elHeader; + if(sHeader) { + elHeader.innerHTML = sHeader; + elHeader.style.display = ""; + } + else { + elHeader.innerHTML = ""; + elHeader.style.display = "none"; + } + } +}; + +/** + * Sets HTML markup for the results container footer. This markup will be + * inserted within a <div> tag with a class of "yui-ac-ft". + * + * @method setFooter + * @param sFooter {String} HTML markup for results container footer. + */ +YAHOO.widget.AutoComplete.prototype.setFooter = function(sFooter) { + if(this._elFooter) { + var elFooter = this._elFooter; + if(sFooter) { + elFooter.innerHTML = sFooter; + elFooter.style.display = ""; + } + else { + elFooter.innerHTML = ""; + elFooter.style.display = "none"; + } + } +}; + +/** + * Sets HTML markup for the results container body. This markup will be + * inserted within a <div> tag with a class of "yui-ac-bd". + * + * @method setBody + * @param sBody {String} HTML markup for results container body. + */ +YAHOO.widget.AutoComplete.prototype.setBody = function(sBody) { + if(this._elBody) { + var elBody = this._elBody; + YAHOO.util.Event.purgeElement(elBody, true); + if(sBody) { + elBody.innerHTML = sBody; + elBody.style.display = ""; + } + else { + elBody.innerHTML = ""; + elBody.style.display = "none"; + } + this._elList = null; + } +}; + +/** +* A function that converts an AutoComplete query into a request value which is then +* passed to the DataSource's sendRequest method in order to retrieve data for +* the query. By default, returns a String with the syntax: "query={query}" +* Implementers can customize this method for custom request syntaxes. +* +* @method generateRequest +* @param sQuery {String} Query string +* @return {MIXED} Request +*/ +YAHOO.widget.AutoComplete.prototype.generateRequest = function(sQuery) { + var dataType = this.dataSource.dataType; + + // Transform query string in to a request for remote data + // By default, local data doesn't need a transformation, just passes along the query as is. + if(dataType === YAHOO.util.DataSourceBase.TYPE_XHR) { + // By default, XHR GET requests look like "{scriptURI}?{scriptQueryParam}={sQuery}&{scriptQueryAppend}" + if(!this.dataSource.connMethodPost) { + sQuery = (this.queryQuestionMark ? "?" : "") + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + + (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : ""); + } + // By default, XHR POST bodies are sent to the {scriptURI} like "{scriptQueryParam}={sQuery}&{scriptQueryAppend}" + else { + sQuery = (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + + (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : ""); + } + } + // By default, remote script node requests look like "{scriptURI}&{scriptCallbackParam}={callbackString}&{scriptQueryParam}={sQuery}&{scriptQueryAppend}" + else if(dataType === YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE) { + sQuery = "&" + (this.dataSource.scriptQueryParam || "query") + "=" + sQuery + + (this.dataSource.scriptQueryAppend ? ("&" + this.dataSource.scriptQueryAppend) : ""); + } + + return sQuery; +}; + +/** + * Makes query request to the DataSource. + * + * @method sendQuery + * @param sQuery {String} Query string. + */ +YAHOO.widget.AutoComplete.prototype.sendQuery = function(sQuery) { + // Activate focus for a new interaction + this._bFocused = true; + + // Adjust programatically sent queries to look like they were input by user + // when delimiters are enabled + var newQuery = (this.delimChar) ? this._elTextbox.value + sQuery : sQuery; + this._sendQuery(newQuery); +}; + +/** + * Snaps container to bottom-left corner of input element + * + * @method snapContainer + */ +YAHOO.widget.AutoComplete.prototype.snapContainer = function() { + var oTextbox = this._elTextbox, + pos = YAHOO.util.Dom.getXY(oTextbox); + pos[1] += YAHOO.util.Dom.get(oTextbox).offsetHeight + 2; + YAHOO.util.Dom.setXY(this._elContainer,pos); +}; + +/** + * Expands container. + * + * @method expandContainer + */ +YAHOO.widget.AutoComplete.prototype.expandContainer = function() { + this._toggleContainer(true); +}; + +/** + * Collapses container. + * + * @method collapseContainer + */ +YAHOO.widget.AutoComplete.prototype.collapseContainer = function() { + this._toggleContainer(false); +}; + +/** + * Clears entire list of suggestions. + * + * @method clearList + */ +YAHOO.widget.AutoComplete.prototype.clearList = function() { + var allItems = this._elList.childNodes, + i=allItems.length-1; + for(; i>-1; i--) { + allItems[i].style.display = "none"; + } +}; + +/** + * Handles subset matching for when queryMatchSubset is enabled. + * + * @method getSubsetMatches + * @param sQuery {String} Query string. + * @return {Object} oParsedResponse or null. + */ +YAHOO.widget.AutoComplete.prototype.getSubsetMatches = function(sQuery) { + var subQuery, oCachedResponse, subRequest; + // Loop through substrings of each cached element's query property... + for(var i = sQuery.length; i >= this.minQueryLength ; i--) { + subRequest = this.generateRequest(sQuery.substr(0,i)); + this.dataRequestEvent.fire(this, subQuery, subRequest); + + // If a substring of the query is found in the cache + oCachedResponse = this.dataSource.getCachedResponse(subRequest); + if(oCachedResponse) { + return this.filterResults.apply(this.dataSource, [sQuery, oCachedResponse, oCachedResponse, {scope:this}]); + } + } + return null; +}; + +/** + * Executed by DataSource (within DataSource scope via doBeforeParseData()) to + * handle responseStripAfter cleanup. + * + * @method preparseRawResponse + * @param sQuery {String} Query string. + * @return {Object} oParsedResponse or null. + */ +YAHOO.widget.AutoComplete.prototype.preparseRawResponse = function(oRequest, oFullResponse, oCallback) { + var nEnd = ((this.responseStripAfter !== "") && (oFullResponse.indexOf)) ? + oFullResponse.indexOf(this.responseStripAfter) : -1; + if(nEnd != -1) { + oFullResponse = oFullResponse.substring(0,nEnd); + } + return oFullResponse; +}; + +/** + * Executed by DataSource (within DataSource scope via doBeforeCallback()) to + * filter results through a simple client-side matching algorithm. + * + * @method filterResults + * @param sQuery {String} Original request. + * @param oFullResponse {Object} Full response object. + * @param oParsedResponse {Object} Parsed response object. + * @param oCallback {Object} Callback object. + * @return {Object} Filtered response object. + */ + +YAHOO.widget.AutoComplete.prototype.filterResults = function(sQuery, oFullResponse, oParsedResponse, oCallback) { + // If AC has passed a query string value back to itself, grab it + if(oCallback && oCallback.argument && oCallback.argument.query) { + sQuery = oCallback.argument.query; + } + + // Only if a query string is available to match against + if(sQuery && sQuery !== "") { + // First make a copy of the oParseResponse + oParsedResponse = YAHOO.widget.AutoComplete._cloneObject(oParsedResponse); + + var oAC = oCallback.scope, + oDS = this, + allResults = oParsedResponse.results, // the array of results + filteredResults = [], // container for filtered results, + nMax = oAC.maxResultsDisplayed, // max to find + bMatchCase = (oDS.queryMatchCase || oAC.queryMatchCase), // backward compat + bMatchContains = (oDS.queryMatchContains || oAC.queryMatchContains); // backward compat + + // Loop through each result object... + for(var i=0, len=allResults.length; i -1))) { + // Stash the match + filteredResults.push(oResult); + } + } + + // Filter no more if maxResultsDisplayed is reached + if(len>nMax && filteredResults.length===nMax) { + break; + } + } + oParsedResponse.results = filteredResults; + } + else { + } + + return oParsedResponse; +}; + +/** + * Handles response for display. This is the callback function method passed to + * YAHOO.util.DataSourceBase#sendRequest so results from the DataSource are + * returned to the AutoComplete instance. + * + * @method handleResponse + * @param sQuery {String} Original request. + * @param oResponse {Object} Response object. + * @param oPayload {MIXED} (optional) Additional argument(s) + */ +YAHOO.widget.AutoComplete.prototype.handleResponse = function(sQuery, oResponse, oPayload) { + if((this instanceof YAHOO.widget.AutoComplete) && this._sName) { + this._populateList(sQuery, oResponse, oPayload); + } +}; + +/** + * Overridable method called before container is loaded with result data. + * + * @method doBeforeLoadData + * @param sQuery {String} Original request. + * @param oResponse {Object} Response object. + * @param oPayload {MIXED} (optional) Additional argument(s) + * @return {Boolean} Return true to continue loading data, false to cancel. + */ +YAHOO.widget.AutoComplete.prototype.doBeforeLoadData = function(sQuery, oResponse, oPayload) { + return true; +}; + +/** + * Overridable method that returns HTML markup for one result to be populated + * as innerHTML of an <LI> element. + * + * @method formatResult + * @param oResultData {Object} Result data object. + * @param sQuery {String} The corresponding query string. + * @param sResultMatch {HTMLElement} The current query string. + * @return {String} HTML markup of formatted result data. + */ +YAHOO.widget.AutoComplete.prototype.formatResult = function(oResultData, sQuery, sResultMatch) { + var sMarkup = (sResultMatch) ? sResultMatch : ""; + return sMarkup; +}; + +/** + * Overridable method called before container expands allows implementers to access data + * and DOM elements. + * + * @method doBeforeExpandContainer + * @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(elTextbox, elContainer, sQuery, aResults) { + return true; +}; + + +/** + * Nulls out the entire AutoComplete instance and related objects, removes attached + * event listeners, and clears out DOM elements inside the container. After + * calling this method, the instance reference should be expliclitly nulled by + * implementer, as in myAutoComplete = null. Use with caution! + * + * @method destroy + */ +YAHOO.widget.AutoComplete.prototype.destroy = function() { + var instanceName = this.toString(); + var elInput = this._elTextbox; + var elContainer = this._elContainer; + + // Unhook custom events + this.textboxFocusEvent.unsubscribeAll(); + this.textboxKeyEvent.unsubscribeAll(); + this.dataRequestEvent.unsubscribeAll(); + this.dataReturnEvent.unsubscribeAll(); + this.dataErrorEvent.unsubscribeAll(); + this.containerPopulateEvent.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(); + this.textboxChangeEvent.unsubscribeAll(); + + // Unhook DOM events + YAHOO.util.Event.purgeElement(elInput, true); + YAHOO.util.Event.purgeElement(elContainer, true); + + // Remove DOM elements + elContainer.innerHTML = ""; + + // Null out objects + for(var key in this) { + if(YAHOO.lang.hasOwnProperty(this, key)) { + this[key] = null; + } + } + +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Public events +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Fired when the input field receives focus. + * + * @event textboxFocusEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.textboxFocusEvent = null; + +/** + * Fired when the input field receives key input. + * + * @event textboxKeyEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param nKeycode {Number} The keycode number. + */ +YAHOO.widget.AutoComplete.prototype.textboxKeyEvent = null; + +/** + * Fired when the AutoComplete instance makes a request to the DataSource. + * + * @event dataRequestEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param oRequest {Object} The request. + */ +YAHOO.widget.AutoComplete.prototype.dataRequestEvent = null; + +/** + * Fired when the AutoComplete instance receives query results from the data + * source. + * + * @event dataReturnEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param aResults {Object[]} Results array. + */ +YAHOO.widget.AutoComplete.prototype.dataReturnEvent = null; + +/** + * Fired when the AutoComplete instance does not receive query results from the + * DataSource due to an error. + * + * @event dataErrorEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param oResponse {Object} The response object, if available. + */ +YAHOO.widget.AutoComplete.prototype.dataErrorEvent = null; + +/** + * Fired when the results container is populated. + * + * @event containerPopulateEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.containerPopulateEvent = null; + +/** + * Fired when the results container is expanded. + * + * @event containerExpandEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.containerExpandEvent = null; + +/** + * Fired when the input field has been prefilled by the type-ahead + * feature. + * + * @event typeAheadEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sQuery {String} The query string. + * @param sPrefill {String} The prefill string. + */ +YAHOO.widget.AutoComplete.prototype.typeAheadEvent = null; + +/** + * Fired when result item has been moused over. + * + * @event itemMouseOverEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item moused to. + */ +YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent = null; + +/** + * Fired when result item has been moused out. + * + * @event itemMouseOutEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item moused from. + */ +YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent = null; + +/** + * Fired when result item has been arrowed to. + * + * @event itemArrowToEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item arrowed to. + */ +YAHOO.widget.AutoComplete.prototype.itemArrowToEvent = null; + +/** + * Fired when result item has been arrowed away from. + * + * @event itemArrowFromEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The <li> element item arrowed from. + */ +YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent = null; + +/** + * Fired when an item is selected via mouse click, ENTER key, or TAB key. + * + * @event itemSelectEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param elItem {HTMLElement} The selected <li> element item. + * @param oData {Object} The data returned for the item, either as an object, + * or mapped from the schema into an array. + */ +YAHOO.widget.AutoComplete.prototype.itemSelectEvent = null; + +/** + * Fired when a user selection does not match any of the displayed result items. + * + * @event unmatchedItemSelectEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sSelection {String} The selected string. + */ +YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent = null; + +/** + * Fired if forceSelection is enabled and the user's input has been cleared + * because it did not match one of the returned query results. + * + * @event selectionEnforceEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @param sClearedValue {String} The cleared value (including delimiters if applicable). + */ +YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent = null; + +/** + * Fired when the results container is collapsed. + * + * @event containerCollapseEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.containerCollapseEvent = null; + +/** + * Fired when the input field loses focus. + * + * @event textboxBlurEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.textboxBlurEvent = null; + +/** + * Fired when the input field value has changed when it loses focus. + * + * @event textboxChangeEvent + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + */ +YAHOO.widget.AutoComplete.prototype.textboxChangeEvent = null; + +///////////////////////////////////////////////////////////////////////////// +// +// Private member variables +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Internal class variable to index multiple AutoComplete instances. + * + * @property _nIndex + * @type Number + * @default 0 + * @private + */ +YAHOO.widget.AutoComplete._nIndex = 0; + +/** + * Name of AutoComplete instance. + * + * @property _sName + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sName = null; + +/** + * Text input field DOM element. + * + * @property _elTextbox + * @type HTMLElement + * @private + */ +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 widget instance is currently active. If query results come back + * but the user has already moved on, do not proceed with auto complete behavior. + * + * @property _bFocused + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bFocused = false; + +/** + * Animation instance for container expand/collapse. + * + * @property _oAnim + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._oAnim = null; + +/** + * Whether or not the results container is currently open. + * + * @property _bContainerOpen + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bContainerOpen = false; + +/** + * Whether or not the mouse is currently over the results + * container. This is necessary in order to prevent clicks on container items + * from being text input field blur events. + * + * @property _bOverContainer + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bOverContainer = false; + +/** + * Internal reference to <ul> elements that contains query results within the + * results container. + * + * @property _elList + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elList = null; + +/* + * Array of <li> elements references that contain query results within the + * results container. + * + * @property _aListItemEls + * @type HTMLElement[] + * @private + */ +//YAHOO.widget.AutoComplete.prototype._aListItemEls = null; + +/** + * Number of <li> elements currently displayed in results container. + * + * @property _nDisplayedItems + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nDisplayedItems = 0; + +/* + * Internal count of <li> elements displayed and hidden in results container. + * + * @property _maxResultsDisplayed + * @type Number + * @private + */ +//YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed = 0; + +/** + * Current query string + * + * @property _sCurQuery + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sCurQuery = null; + +/** + * Selections from previous queries (for saving delimited queries). + * + * @property _sPastSelections + * @type String + * @default "" + * @private + */ +YAHOO.widget.AutoComplete.prototype._sPastSelections = ""; + +/** + * Stores initial input value used to determine if textboxChangeEvent should be fired. + * + * @property _sInitInputValue + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sInitInputValue = null; + +/** + * Pointer to the currently highlighted <li> element in the container. + * + * @property _elCurListItem + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elCurListItem = null; + +/** + * Pointer to the currently pre-highlighted <li> element in the container. + * + * @property _elCurPrehighlightItem + * @type HTMLElement + * @private + */ +YAHOO.widget.AutoComplete.prototype._elCurPrehighlightItem = null; + +/** + * Whether or not an item has been selected since the container was populated + * with results. Reset to false by _populateList, and set to true when item is + * selected. + * + * @property _bItemSelected + * @type Boolean + * @private + */ +YAHOO.widget.AutoComplete.prototype._bItemSelected = false; + +/** + * Key code of the last key pressed in textbox. + * + * @property _nKeyCode + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nKeyCode = null; + +/** + * Delay timeout ID. + * + * @property _nDelayID + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nDelayID = -1; + +/** + * TypeAhead delay timeout ID. + * + * @property _nTypeAheadDelayID + * @type Number + * @private + */ +YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID = -1; + +/** + * Src to iFrame used when useIFrame = true. Supports implementations over SSL + * as well. + * + * @property _iFrameSrc + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._iFrameSrc = "javascript:false;"; + +/** + * For users typing via certain IMEs, queries must be triggered by intervals, + * since key events yet supported across all browsers for all IMEs. + * + * @property _queryInterval + * @type Object + * @private + */ +YAHOO.widget.AutoComplete.prototype._queryInterval = null; + +/** + * Internal tracker to last known textbox value, used to determine whether or not + * to trigger a query via interval for certain IME users. + * + * @event _sLastTextboxValue + * @type String + * @private + */ +YAHOO.widget.AutoComplete.prototype._sLastTextboxValue = null; + +///////////////////////////////////////////////////////////////////////////// +// +// Private methods +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Updates and validates latest public config properties. + * + * @method __initProps + * @private + */ +YAHOO.widget.AutoComplete.prototype._initProps = function() { + // Correct any invalid values + 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 typeAheadDelay = this.typeAheadDelay; + if(!YAHOO.lang.isNumber(typeAheadDelay) || (typeAheadDelay < 0)) { + this.typeAheadDelay = 0.2; + } + var delimChar = this.delimChar; + if(YAHOO.lang.isString(delimChar) && (delimChar.length > 0)) { + 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._elContent, {}, this.animSpeed); + } + else { + this._oAnim.duration = this.animSpeed; + } + } + if(this.forceSelection && delimChar) { + } +}; + +/** + * Initializes the results container helpers if they are enabled and do + * not exist + * + * @method _initContainerHelperEls + * @private + */ +YAHOO.widget.AutoComplete.prototype._initContainerHelperEls = function() { + if(this.useShadow && !this._elShadow) { + var elShadow = document.createElement("div"); + elShadow.className = "yui-ac-shadow"; + elShadow.style.width = 0; + elShadow.style.height = 0; + 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 = 0; + elIFrame.style.height = 0; + elIFrame.style.padding = 0; + elIFrame.tabIndex = -1; + elIFrame.role = "presentation"; + elIFrame.title = "Presentational iframe shim"; + this._elIFrame = this._elContainer.appendChild(elIFrame); + } +}; + +/** + * Initializes the results container once at object creation + * + * @method _initContainerEl + * @private + */ +YAHOO.widget.AutoComplete.prototype._initContainerEl = function() { + YAHOO.util.Dom.addClass(this._elContainer, "yui-ac-container"); + + if(!this._elContent) { + // The elContent div is assigned DOM listeners and + // 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 { + } +}; + +/** + * Clears out contents of container body and creates up to + * YAHOO.widget.AutoComplete#maxResultsDisplayed <li> elements in an + * <ul> element. + * + * @method _initListEl + * @private + */ +YAHOO.widget.AutoComplete.prototype._initListEl = function() { + var nListLength = this.maxResultsDisplayed, + elList = this._elList || document.createElement("ul"), + elListItem; + + while(elList.childNodes.length < nListLength) { + elListItem = document.createElement("li"); + elListItem.style.display = "none"; + elListItem._nItemIndex = elList.childNodes.length; + elList.appendChild(elListItem); + } + if(!this._elList) { + var elBody = this._elBody; + YAHOO.util.Event.purgeElement(elBody, true); + elBody.innerHTML = ""; + this._elList = elBody.appendChild(elList); + } + + this._elBody.style.display = ""; +}; + +/** + * Focuses input field. + * + * @method _focus + * @private + */ +YAHOO.widget.AutoComplete.prototype._focus = function() { + // http://developer.mozilla.org/en/docs/index.php?title=Key-navigable_custom_DHTML_widgets + var oSelf = this; + setTimeout(function() { + try { + oSelf._elTextbox.focus(); + } + catch(e) { + } + },0); +}; + +/** + * Enables interval detection for IME support. + * + * @method _enableIntervalDetection + * @private + */ +YAHOO.widget.AutoComplete.prototype._enableIntervalDetection = function() { + var oSelf = this; + if(!oSelf._queryInterval && oSelf.queryInterval) { + oSelf._queryInterval = setInterval(function() { oSelf._onInterval(); }, oSelf.queryInterval); + } +}; + +/** + * Enables interval detection for a less performant but brute force mechanism to + * detect input values at an interval set by queryInterval and send queries if + * input value has changed. Needed to support right-click+paste or shift+insert + * edge cases. Please note that intervals are cleared at the end of each interaction, + * so enableIntervalDetection must be called for each new interaction. The + * recommended approach is to call it in response to textboxFocusEvent. + * + * @method enableIntervalDetection + */ +YAHOO.widget.AutoComplete.prototype.enableIntervalDetection = + YAHOO.widget.AutoComplete.prototype._enableIntervalDetection; + +/** + * Enables query triggers based on text input detection by intervals (rather + * than by key events). + * + * @method _onInterval + * @private + */ +YAHOO.widget.AutoComplete.prototype._onInterval = function() { + var currValue = this._elTextbox.value; + var lastValue = this._sLastTextboxValue; + if(currValue != lastValue) { + this._sLastTextboxValue = currValue; + this._sendQuery(currValue); + } +}; + +/** + * Cancels text input detection by intervals. + * + * @method _clearInterval + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._clearInterval = function() { + if(this._queryInterval) { + clearInterval(this._queryInterval); + this._queryInterval = null; + } +}; + +/** + * Whether or not key is functional or should be ignored. Note that the right + * arrow key is NOT an ignored key since it triggers queries for certain intl + * charsets. + * + * @method _isIgnoreKey + * @param nKeycode {Number} Code of key pressed. + * @return {Boolean} True if key should be ignored, false otherwise. + * @private + */ +YAHOO.widget.AutoComplete.prototype._isIgnoreKey = function(nKeyCode) { + if((nKeyCode == 9) || (nKeyCode == 13) || // tab, enter + (nKeyCode == 16) || (nKeyCode == 17) || // shift, ctl + (nKeyCode >= 18 && nKeyCode <= 20) || // alt, pause/break,caps lock + (nKeyCode == 27) || // esc + (nKeyCode >= 33 && nKeyCode <= 35) || // page up,page down,end + /*(nKeyCode >= 36 && nKeyCode <= 38) || // home,left,up + (nKeyCode == 40) || // down*/ + (nKeyCode >= 36 && nKeyCode <= 40) || // home,left,up, right, down + (nKeyCode >= 44 && nKeyCode <= 45) || // print screen,insert + (nKeyCode == 229) // Bug 2041973: Korean XP fires 2 keyup events, the key and 229 + ) { + return true; + } + return false; +}; + +/** + * Makes query request to the DataSource. + * + * @method _sendQuery + * @param sQuery {String} Query string. + * @private + */ +YAHOO.widget.AutoComplete.prototype._sendQuery = function(sQuery) { + // Widget has been effectively turned off + if(this.minQueryLength < 0) { + this._toggleContainer(false); + return; + } + // Delimiter has been enabled + if(this.delimChar) { + var extraction = this._extractQuery(sQuery); + // Here is the query itself + sQuery = extraction.query; + // ...and save the rest of the string for later + this._sPastSelections = extraction.previous; + } + + // Don't search queries that are too short + if((sQuery && (sQuery.length < this.minQueryLength)) || (!sQuery && this.minQueryLength > 0)) { + if(this._nDelayID != -1) { + clearTimeout(this._nDelayID); + } + this._toggleContainer(false); + return; + } + + sQuery = encodeURIComponent(sQuery); + this._nDelayID = -1; // Reset timeout ID because request is being made + + // Subset matching + if(this.dataSource.queryMatchSubset || this.queryMatchSubset) { // backward compat + var oResponse = this.getSubsetMatches(sQuery); + if(oResponse) { + this.handleResponse(sQuery, oResponse, {query: sQuery}); + return; + } + } + + if(this.dataSource.responseStripAfter) { + this.dataSource.doBeforeParseData = this.preparseRawResponse; + } + if(this.applyLocalFilter) { + this.dataSource.doBeforeCallback = this.filterResults; + } + + var sRequest = this.generateRequest(sQuery); + this.dataRequestEvent.fire(this, sQuery, sRequest); + + this.dataSource.sendRequest(sRequest, { + success : this.handleResponse, + failure : this.handleResponse, + scope : this, + argument: { + query: sQuery + } + }); +}; + +/** + * Populates the given <li> element with return value from formatResult(). + * + * @method _populateListItem + * @param elListItem {HTMLElement} The LI element. + * @param oResult {Object} The result object. + * @param sCurQuery {String} The query string. + * @private + */ +YAHOO.widget.AutoComplete.prototype._populateListItem = function(elListItem, oResult, sQuery) { + elListItem.innerHTML = this.formatResult(oResult, sQuery, elListItem._sResultMatch); +}; + +/** + * Populates the array of <li> elements in the container with query + * results. + * + * @method _populateList + * @param sQuery {String} Original request. + * @param oResponse {Object} Response object. + * @param oPayload {MIXED} (optional) Additional argument(s) + * @private + */ +YAHOO.widget.AutoComplete.prototype._populateList = function(sQuery, oResponse, oPayload) { + // Clear previous timeout + if(this._nTypeAheadDelayID != -1) { + clearTimeout(this._nTypeAheadDelayID); + } + + sQuery = (oPayload && oPayload.query) ? oPayload.query : sQuery; + + // Pass data through abstract method for any transformations + var ok = this.doBeforeLoadData(sQuery, oResponse, oPayload); + + // Data is ok + if(ok && !oResponse.error) { + this.dataReturnEvent.fire(this, sQuery, oResponse.results); + + // Continue only if instance is still active (i.e., user hasn't already moved on) + if(this._bFocused) { + // Store state for this interaction + var sCurQuery = decodeURIComponent(sQuery); + this._sCurQuery = sCurQuery; + this._bItemSelected = false; + + var allResults = oResponse.results, + nItemsToShow = Math.min(allResults.length,this.maxResultsDisplayed), + sMatchKey = (this.dataSource.responseSchema.fields) ? + (this.dataSource.responseSchema.fields[0].key || this.dataSource.responseSchema.fields[0]) : 0; + + if(nItemsToShow > 0) { + // Make sure container and helpers are ready to go + if(!this._elList || (this._elList.childNodes.length < nItemsToShow)) { + this._initListEl(); + } + this._initContainerHelperEls(); + + var allListItemEls = this._elList.childNodes; + // Fill items with data from the bottom up + for(var i = nItemsToShow-1; i >= 0; i--) { + var elListItem = allListItemEls[i], + oResult = allResults[i]; + + // Backward compatibility + if(this.resultTypeList) { + // Results need to be converted back to an array + var aResult = []; + // Match key is first + aResult[0] = (YAHOO.lang.isString(oResult)) ? oResult : oResult[sMatchKey] || oResult[this.key]; + // Add additional data to the result array + var fields = this.dataSource.responseSchema.fields; + if(YAHOO.lang.isArray(fields) && (fields.length > 1)) { + for(var k=1, len=fields.length; k= nItemsToShow; j--) { + extraListItem = allListItemEls[j]; + extraListItem.style.display = "none"; + } + } + + this._nDisplayedItems = nItemsToShow; + + this.containerPopulateEvent.fire(this, sQuery, allResults); + + // Highlight the first item + if(this.autoHighlight) { + var elFirstListItem = this._elList.firstChild; + this._toggleHighlight(elFirstListItem,"to"); + this.itemArrowToEvent.fire(this, elFirstListItem); + this._typeAhead(elFirstListItem,sQuery); + } + // Unhighlight any previous time + else { + this._toggleHighlight(this._elCurListItem,"from"); + } + + // Pre-expansion stuff + ok = this._doBeforeExpandContainer(this._elTextbox, this._elContainer, sQuery, allResults); + + // Expand the container + this._toggleContainer(ok); + } + else { + this._toggleContainer(false); + } + + return; + } + } + // Error + else { + this.dataErrorEvent.fire(this, sQuery, oResponse); + } + +}; + +/** + * Called before container expands, by default snaps container to the + * bottom-left corner of the input element, then calls public overrideable method. + * + * @method _doBeforeExpandContainer + * @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. + * @private + */ +YAHOO.widget.AutoComplete.prototype._doBeforeExpandContainer = function(elTextbox, elContainer, sQuery, aResults) { + if(this.autoSnapContainer) { + this.snapContainer(); + } + + return this.doBeforeExpandContainer(elTextbox, elContainer, sQuery, aResults); +}; + +/** + * When forceSelection is true and the user attempts + * leave the text input box without selecting an item from the query results, + * the user selection is cleared. + * + * @method _clearSelection + * @private + */ +YAHOO.widget.AutoComplete.prototype._clearSelection = function() { + var extraction = (this.delimChar) ? this._extractQuery(this._elTextbox.value) : + {previous:"",query:this._elTextbox.value}; + this._elTextbox.value = extraction.previous; + this.selectionEnforceEvent.fire(this, extraction.query); +}; + +/** + * Whether or not user-typed value in the text input box matches any of the + * query results. + * + * @method _textMatchesOption + * @return {HTMLElement} Matching list item element if user-input text matches + * a result, null otherwise. + * @private + */ +YAHOO.widget.AutoComplete.prototype._textMatchesOption = function() { + var elMatch = null; + + for(var i=0; i= 0; i--) { + nNewIndex = sQuery.lastIndexOf(aDelimChar[i]); + if(nNewIndex > nDelimIndex) { + nDelimIndex = nNewIndex; + } + } + // If we think the last delimiter is a space (" "), make sure it is NOT + // a false positive by also checking the char directly before it + if(aDelimChar[i] == " ") { + for (var j = aDelimChar.length-1; j >= 0; j--) { + if(sQuery[nDelimIndex - 1] == aDelimChar[j]) { + nDelimIndex--; + break; + } + } + } + // A delimiter has been found in the query so extract the latest query from past selections + if(nDelimIndex > -1) { + nQueryStart = nDelimIndex + 1; + // Trim any white space from the beginning... + while(sQuery.charAt(nQueryStart) == " ") { + nQueryStart += 1; + } + // ...and save the rest of the string for later + sPrevious = sQuery.substring(0,nQueryStart); + // Here is the query itself + sQuery = sQuery.substr(nQueryStart); + } + // No delimiter found in the query, so there are no selections from past queries + else { + sPrevious = ""; + } + + return { + previous: sPrevious, + query: sQuery + }; +}; + +/** + * Syncs results container with its helpers. + * + * @method _toggleContainerHelpers + * @param bShow {Boolean} True if container is expanded, false if collapsed + * @private + */ +YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers = function(bShow) { + var width = this._elContent.offsetWidth + "px"; + var height = this._elContent.offsetHeight + "px"; + + if(this.useIFrame && this._elIFrame) { + var elIFrame = this._elIFrame; + if(bShow) { + elIFrame.style.width = width; + elIFrame.style.height = height; + elIFrame.style.padding = ""; + } + else { + elIFrame.style.width = 0; + elIFrame.style.height = 0; + elIFrame.style.padding = 0; + } + } + if(this.useShadow && this._elShadow) { + var elShadow = this._elShadow; + if(bShow) { + elShadow.style.width = width; + elShadow.style.height = height; + } + else { + elShadow.style.width = 0; + elShadow.style.height = 0; + } + } +}; + +/** + * Animates expansion or collapse of the container. + * + * @method _toggleContainer + * @param bShow {Boolean} True if container should be expanded, false if container should be collapsed + * @private + */ +YAHOO.widget.AutoComplete.prototype._toggleContainer = function(bShow) { + + var elContainer = this._elContainer; + + // If implementer has container always open and it's already open, don't mess with it + // Container is initialized with display "none" so it may need to be shown first time through + if(this.alwaysShowContainer && this._bContainerOpen) { + return; + } + + // Reset states + if(!bShow) { + this._toggleHighlight(this._elCurListItem,"from"); + this._nDisplayedItems = 0; + this._sCurQuery = null; + + // Container is already closed, so don't bother with changing the UI + if(this._elContent.style.display == "none") { + return; + } + } + + // If animation is enabled... + var oAnim = this._oAnim; + if(oAnim && oAnim.getEl() && (this.animHoriz || this.animVert)) { + if(oAnim.isAnimated()) { + oAnim.stop(true); + } + + // Clone container to grab current size offscreen + var oClone = this._elContent.cloneNode(true); + elContainer.appendChild(oClone); + oClone.style.top = "-9000px"; + oClone.style.width = ""; + oClone.style.height = ""; + oClone.style.display = ""; + + // Current size of the container is the EXPANDED size + var wExp = oClone.offsetWidth; + var hExp = oClone.offsetHeight; + + // Calculate COLLAPSED sizes based on horiz and vert anim + var wColl = (this.animHoriz) ? 0 : wExp; + var hColl = (this.animVert) ? 0 : hExp; + + // Set animation sizes + oAnim.attributes = (bShow) ? + {width: { to: wExp }, height: { to: hExp }} : + {width: { to: wColl}, height: { to: hColl }}; + + // If opening anew, set to a collapsed size... + if(bShow && !this._bContainerOpen) { + this._elContent.style.width = wColl+"px"; + this._elContent.style.height = hColl+"px"; + } + // Else, set it to its last known size. + else { + this._elContent.style.width = wExp+"px"; + this._elContent.style.height = hExp+"px"; + } + + elContainer.removeChild(oClone); + oClone = null; + + var oSelf = this; + var onAnimComplete = function() { + // Finish the collapse + oAnim.onComplete.unsubscribeAll(); + + if(bShow) { + oSelf._toggleContainerHelpers(true); + oSelf._bContainerOpen = bShow; + oSelf.containerExpandEvent.fire(oSelf); + } + else { + oSelf._elContent.style.display = "none"; + oSelf._bContainerOpen = bShow; + oSelf.containerCollapseEvent.fire(oSelf); + } + }; + + // Display container and animate it + this._toggleContainerHelpers(false); // Bug 1424486: Be early to hide, late to show; + this._elContent.style.display = ""; + oAnim.onComplete.subscribe(onAnimComplete); + oAnim.animate(); + } + // Else don't animate, just show or hide + else { + if(bShow) { + this._elContent.style.display = ""; + this._toggleContainerHelpers(true); + this._bContainerOpen = bShow; + this.containerExpandEvent.fire(this); + } + else { + this._toggleContainerHelpers(false); + this._elContent.style.display = "none"; + this._bContainerOpen = bShow; + this.containerCollapseEvent.fire(this); + } + } + +}; + +/** + * Toggles the highlight on or off for an item in the container, and also cleans + * up highlighting of any previous item. + * + * @method _toggleHighlight + * @param elNewListItem {HTMLElement} The <li> element item to receive highlight behavior. + * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off. + * @private + */ +YAHOO.widget.AutoComplete.prototype._toggleHighlight = function(elNewListItem, sType) { + if(elNewListItem) { + var sHighlight = this.highlightClassName; + if(this._elCurListItem) { + // Remove highlight from old item + YAHOO.util.Dom.removeClass(this._elCurListItem, sHighlight); + this._elCurListItem = null; + } + + if((sType == "to") && sHighlight) { + // Apply highlight to new item + YAHOO.util.Dom.addClass(elNewListItem, sHighlight); + this._elCurListItem = elNewListItem; + } + } +}; + +/** + * Toggles the pre-highlight on or off for an item in the container, and also cleans + * up pre-highlighting of any previous item. + * + * @method _togglePrehighlight + * @param elNewListItem {HTMLElement} The <li> element item to receive highlight behavior. + * @param sType {String} Type "mouseover" will toggle highlight on, and "mouseout" will toggle highlight off. + * @private + */ +YAHOO.widget.AutoComplete.prototype._togglePrehighlight = function(elNewListItem, sType) { + var sPrehighlight = this.prehighlightClassName; + + if(this._elCurPrehighlightItem) { + YAHOO.util.Dom.removeClass(this._elCurPrehighlightItem, sPrehighlight); + } + if(elNewListItem == this._elCurListItem) { + return; + } + + if((sType == "mouseover") && sPrehighlight) { + // Apply prehighlight to new item + YAHOO.util.Dom.addClass(elNewListItem, sPrehighlight); + this._elCurPrehighlightItem = elNewListItem; + } + else { + // Remove prehighlight from old item + YAHOO.util.Dom.removeClass(elNewListItem, sPrehighlight); + } +}; + +/** + * Updates the text input box value with selected query result. If a delimiter + * has been defined, then the value gets appended with the delimiter. + * + * @method _updateValue + * @param elListItem {HTMLElement} The <li> element item with which to update the value. + * @private + */ +YAHOO.widget.AutoComplete.prototype._updateValue = function(elListItem) { + if(!this.suppressInputUpdate) { + var elTextbox = this._elTextbox; + var sDelimChar = (this.delimChar) ? (this.delimChar[0] || this.delimChar) : null; + var sResultMatch = elListItem._sResultMatch; + + // Calculate the new value + var sNewValue = ""; + if(sDelimChar) { + // Preserve selections from past queries + sNewValue = this._sPastSelections; + // Add new selection plus delimiter + sNewValue += sResultMatch + sDelimChar; + if(sDelimChar != " ") { + sNewValue += " "; + } + } + else { + sNewValue = sResultMatch; + } + + // Update input field + elTextbox.value = sNewValue; + + // Scroll to bottom of textarea if necessary + if(elTextbox.type == "textarea") { + elTextbox.scrollTop = elTextbox.scrollHeight; + } + + // Move cursor to end + var end = elTextbox.value.length; + this._selectText(elTextbox,end,end); + + this._elCurListItem = elListItem; + } +}; + +/** + * Selects a result item from the container + * + * @method _selectItem + * @param elListItem {HTMLElement} The selected <li> element item. + * @private + */ +YAHOO.widget.AutoComplete.prototype._selectItem = function(elListItem) { + this._bItemSelected = true; + this._updateValue(elListItem); + this._sPastSelections = this._elTextbox.value; + this._clearInterval(); + this.itemSelectEvent.fire(this, elListItem, elListItem._oResultData); + this._toggleContainer(false); +}; + +/** + * If an item is highlighted in the container, the right arrow key jumps to the + * end of the textbox and selects the highlighted item, otherwise the container + * is closed. + * + * @method _jumpSelection + * @private + */ +YAHOO.widget.AutoComplete.prototype._jumpSelection = function() { + if(this._elCurListItem) { + this._selectItem(this._elCurListItem); + } + else { + this._toggleContainer(false); + } +}; + +/** + * Triggered by up and down arrow keys, changes the current highlighted + * <li> element item. Scrolls container if necessary. + * + * @method _moveSelection + * @param nKeyCode {Number} Code of key pressed. + * @private + */ +YAHOO.widget.AutoComplete.prototype._moveSelection = function(nKeyCode) { + if(this._bContainerOpen) { + // Determine current item's id number + var elCurListItem = this._elCurListItem, + nCurItemIndex = -1; + + if(elCurListItem) { + nCurItemIndex = elCurListItem._nItemIndex; + } + + var nNewItemIndex = (nKeyCode == 40) ? + (nCurItemIndex + 1) : (nCurItemIndex - 1); + + // Out of bounds + if(nNewItemIndex < -2 || nNewItemIndex >= this._nDisplayedItems) { + return; + } + + if(elCurListItem) { + // Unhighlight current item + this._toggleHighlight(elCurListItem, "from"); + this.itemArrowFromEvent.fire(this, elCurListItem); + } + if(nNewItemIndex == -1) { + // Go back to query (remove type-ahead string) + if(this.delimChar) { + this._elTextbox.value = this._sPastSelections + this._sCurQuery; + } + else { + this._elTextbox.value = this._sCurQuery; + } + return; + } + if(nNewItemIndex == -2) { + // Close container + this._toggleContainer(false); + return; + } + + var elNewListItem = this._elList.childNodes[nNewItemIndex], + + // Scroll the container if necessary + elContent = this._elContent, + sOF = YAHOO.util.Dom.getStyle(elContent,"overflow"), + sOFY = YAHOO.util.Dom.getStyle(elContent,"overflowY"), + scrollOn = ((sOF == "auto") || (sOF == "scroll") || (sOFY == "auto") || (sOFY == "scroll")); + if(scrollOn && (nNewItemIndex > -1) && + (nNewItemIndex < this._nDisplayedItems)) { + // User is keying down + if(nKeyCode == 40) { + // Bottom of selected item is below scroll area... + if((elNewListItem.offsetTop+elNewListItem.offsetHeight) > (elContent.scrollTop + elContent.offsetHeight)) { + // Set bottom of scroll area to bottom of selected item + elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight; + } + // Bottom of selected item is above scroll area... + else if((elNewListItem.offsetTop+elNewListItem.offsetHeight) < elContent.scrollTop) { + // Set top of selected item to top of scroll area + elContent.scrollTop = elNewListItem.offsetTop; + + } + } + // User is keying up + else { + // Top of selected item is above scroll area + if(elNewListItem.offsetTop < elContent.scrollTop) { + // Set top of scroll area to top of selected item + this._elContent.scrollTop = elNewListItem.offsetTop; + } + // Top of selected item is below scroll area + else if(elNewListItem.offsetTop > (elContent.scrollTop + elContent.offsetHeight)) { + // Set bottom of selected item to bottom of scroll area + this._elContent.scrollTop = (elNewListItem.offsetTop+elNewListItem.offsetHeight) - elContent.offsetHeight; + } + } + } + + this._toggleHighlight(elNewListItem, "to"); + this.itemArrowToEvent.fire(this, elNewListItem); + if(this.typeAhead) { + this._updateValue(elNewListItem); + } + } +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Private event handlers +// +///////////////////////////////////////////////////////////////////////////// + +/** + * Handles container mouseover events. + * + * @method _onContainerMouseover + * @param v {HTMLEvent} The mouseover event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerMouseover = function(v,oSelf) { + var elTarget = YAHOO.util.Event.getTarget(v); + var elTag = elTarget.nodeName.toLowerCase(); + while(elTarget && (elTag != "table")) { + switch(elTag) { + case "body": + return; + case "li": + if(oSelf.prehighlightClassName) { + oSelf._togglePrehighlight(elTarget,"mouseover"); + } + else { + oSelf._toggleHighlight(elTarget,"to"); + } + + oSelf.itemMouseOverEvent.fire(oSelf, elTarget); + break; + case "div": + if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) { + oSelf._bOverContainer = true; + return; + } + break; + default: + break; + } + + elTarget = elTarget.parentNode; + if(elTarget) { + elTag = elTarget.nodeName.toLowerCase(); + } + } +}; + +/** + * Handles container mouseout events. + * + * @method _onContainerMouseout + * @param v {HTMLEvent} The mouseout event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerMouseout = function(v,oSelf) { + var elTarget = YAHOO.util.Event.getTarget(v); + var elTag = elTarget.nodeName.toLowerCase(); + while(elTarget && (elTag != "table")) { + switch(elTag) { + case "body": + return; + case "li": + if(oSelf.prehighlightClassName) { + oSelf._togglePrehighlight(elTarget,"mouseout"); + } + else { + oSelf._toggleHighlight(elTarget,"from"); + } + + oSelf.itemMouseOutEvent.fire(oSelf, elTarget); + break; + case "ul": + oSelf._toggleHighlight(oSelf._elCurListItem,"to"); + break; + case "div": + if(YAHOO.util.Dom.hasClass(elTarget,"yui-ac-container")) { + oSelf._bOverContainer = false; + return; + } + break; + default: + break; + } + + elTarget = elTarget.parentNode; + if(elTarget) { + elTag = elTarget.nodeName.toLowerCase(); + } + } +}; + +/** + * Handles container click events. + * + * @method _onContainerClick + * @param v {HTMLEvent} The click event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerClick = function(v,oSelf) { + var elTarget = YAHOO.util.Event.getTarget(v); + var elTag = elTarget.nodeName.toLowerCase(); + while(elTarget && (elTag != "table")) { + switch(elTag) { + case "body": + return; + case "li": + // In case item has not been moused over + oSelf._toggleHighlight(elTarget,"to"); + oSelf._selectItem(elTarget); + return; + default: + break; + } + + elTarget = elTarget.parentNode; + if(elTarget) { + elTag = elTarget.nodeName.toLowerCase(); + } + } +}; + + +/** + * Handles container scroll events. + * + * @method _onContainerScroll + * @param v {HTMLEvent} The scroll event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerScroll = function(v,oSelf) { + oSelf._focus(); +}; + +/** + * Handles container resize events. + * + * @method _onContainerResize + * @param v {HTMLEvent} The resize event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onContainerResize = function(v,oSelf) { + oSelf._toggleContainerHelpers(oSelf._bContainerOpen); +}; + + +/** + * Handles textbox keydown events of functional keys, mainly for UI behavior. + * + * @method _onTextboxKeyDown + * @param v {HTMLEvent} The keydown event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown = function(v,oSelf) { + var nKeyCode = v.keyCode; + + // Clear timeout + if(oSelf._nTypeAheadDelayID != -1) { + clearTimeout(oSelf._nTypeAheadDelayID); + } + + switch (nKeyCode) { + case 9: // tab + if(!YAHOO.env.ua.opera && (navigator.userAgent.toLowerCase().indexOf("mac") == -1) || (YAHOO.env.ua.webkit>420)) { + // select an item or clear out + if(oSelf._elCurListItem) { + if(oSelf.delimChar && (oSelf._nKeyCode != nKeyCode)) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } + } + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + case 13: // enter + if(!YAHOO.env.ua.opera && (navigator.userAgent.toLowerCase().indexOf("mac") == -1) || (YAHOO.env.ua.webkit>420)) { + if(oSelf._elCurListItem) { + if(oSelf._nKeyCode != nKeyCode) { + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + } + } + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + case 27: // esc + oSelf._toggleContainer(false); + return; + case 39: // right + oSelf._jumpSelection(); + break; + case 38: // up + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + oSelf._moveSelection(nKeyCode); + } + break; + case 40: // down + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + oSelf._moveSelection(nKeyCode); + } + break; + default: + oSelf._bItemSelected = false; + oSelf._toggleHighlight(oSelf._elCurListItem, "from"); + + oSelf.textboxKeyEvent.fire(oSelf, nKeyCode); + break; + } + + if(nKeyCode === 18){ + oSelf._enableIntervalDetection(); + } + oSelf._nKeyCode = nKeyCode; +}; + +/** + * Handles textbox keypress events. + * @method _onTextboxKeyPress + * @param v {HTMLEvent} The keypress event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress = function(v,oSelf) { + var nKeyCode = v.keyCode; + + // Expose only to non SF3 (bug 1978549) Mac browsers (bug 790337) and Opera browsers (bug 583531), + // where stopEvent is ineffective on keydown events + if(YAHOO.env.ua.opera || (navigator.userAgent.toLowerCase().indexOf("mac") != -1) && (YAHOO.env.ua.webkit < 420)) { + switch (nKeyCode) { + case 9: // tab + // select an item or clear out + if(oSelf._bContainerOpen) { + if(oSelf.delimChar) { + YAHOO.util.Event.stopEvent(v); + } + if(oSelf._elCurListItem) { + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + case 13: // enter + if(oSelf._bContainerOpen) { + YAHOO.util.Event.stopEvent(v); + if(oSelf._elCurListItem) { + oSelf._selectItem(oSelf._elCurListItem); + } + else { + oSelf._toggleContainer(false); + } + } + break; + default: + break; + } + } + + //TODO: (?) limit only to non-IE, non-Mac-FF for Korean IME support (bug 811948) + // Korean IME detected + else if(nKeyCode == 229) { + oSelf._enableIntervalDetection(); + } +}; + +/** + * Handles textbox keyup events to trigger queries. + * + * @method _onTextboxKeyUp + * @param v {HTMLEvent} The keyup event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp = function(v,oSelf) { + var sText = this.value; //string in textbox + + // Check to see if any of the public properties have been updated + oSelf._initProps(); + + // Filter out chars that don't trigger queries + var nKeyCode = v.keyCode; + if(oSelf._isIgnoreKey(nKeyCode)) { + return; + } + + // Clear previous timeout + if(oSelf._nDelayID != -1) { + clearTimeout(oSelf._nDelayID); + } + + // Set new timeout + oSelf._nDelayID = setTimeout(function(){ + oSelf._sendQuery(sText); + },(oSelf.queryDelay * 1000)); +}; + +/** + * Handles text input box receiving focus. + * + * @method _onTextboxFocus + * @param v {HTMLEvent} The focus event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxFocus = function (v,oSelf) { + // Start of a new interaction + if(!oSelf._bFocused) { + oSelf._elTextbox.setAttribute("autocomplete","off"); + oSelf._bFocused = true; + oSelf._sInitInputValue = oSelf._elTextbox.value; + oSelf.textboxFocusEvent.fire(oSelf); + } +}; + +/** + * Handles text input box losing focus. + * + * @method _onTextboxBlur + * @param v {HTMLEvent} The focus event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onTextboxBlur = function (v,oSelf) { + // Is a true blur + if(!oSelf._bOverContainer || (oSelf._nKeyCode == 9)) { + // Current query needs to be validated as a selection + if(!oSelf._bItemSelected) { + var elMatchListItem = oSelf._textMatchesOption(); + // Container is closed or current query doesn't match any result + if(!oSelf._bContainerOpen || (oSelf._bContainerOpen && (elMatchListItem === 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); + } + } + // Container is open and current query matches a result + else { + // Force a selection when textbox is blurred with a match + if(oSelf.forceSelection) { + oSelf._selectItem(elMatchListItem); + } + } + } + + oSelf._clearInterval(); + oSelf._bFocused = false; + if(oSelf._sInitInputValue !== oSelf._elTextbox.value) { + oSelf.textboxChangeEvent.fire(oSelf); + } + oSelf.textboxBlurEvent.fire(oSelf); + + oSelf._toggleContainer(false); + } + // Not a true blur if it was a selection via mouse click + else { + oSelf._focus(); + } +}; + +/** + * Handles window unload event. + * + * @method _onWindowUnload + * @param v {HTMLEvent} The unload event. + * @param oSelf {YAHOO.widget.AutoComplete} The AutoComplete instance. + * @private + */ +YAHOO.widget.AutoComplete.prototype._onWindowUnload = function(v,oSelf) { + if(oSelf && oSelf._elTextbox && oSelf.allowBrowserAutocomplete) { + oSelf._elTextbox.setAttribute("autocomplete","on"); + } +}; + +///////////////////////////////////////////////////////////////////////////// +// +// Deprecated for Backwards Compatibility +// +///////////////////////////////////////////////////////////////////////////// +/** + * @method doBeforeSendQuery + * @deprecated Use generateRequest. + */ +YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery = function(sQuery) { + return this.generateRequest(sQuery); +}; + +/** + * @method getListItems + * @deprecated Use getListEl().childNodes. + */ +YAHOO.widget.AutoComplete.prototype.getListItems = function() { + var allListItemEls = [], + els = this._elList.childNodes; + for(var i=els.length-1; i>=0; i--) { + allListItemEls[i] = els[i]; + } + return allListItemEls; +}; + +///////////////////////////////////////////////////////////////////////// +// +// Private static methods +// +///////////////////////////////////////////////////////////////////////// + +/** + * Clones object literal or array of object literals. + * + * @method AutoComplete._cloneObject + * @param o {Object} Object. + * @private + * @static + */ +YAHOO.widget.AutoComplete._cloneObject = function(o) { + if(!YAHOO.lang.isValue(o)) { + return o; + } + + var copy = {}; + + if(YAHOO.lang.isFunction(o)) { + copy = o; + } + else if(YAHOO.lang.isArray(o)) { + var array = []; + for(var i=0,len=o.length;iThe Button Control enables the creation of rich, graphical +* buttons that function like traditional HTML form buttons. Unlike +* traditional 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, + UA = YAHOO.env.ua, + 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 (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(), + sClass = (this.CLASS_NAME_PREFIX + this.CSS_CLASS_NAME), + 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)) { + + YAHOO.log("Setting attribute \"" + p_sAttribute + + "\" using source element's attribute value of \"" + + oAttribute.value + "\"", "info", me.toString()); + + 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, sClass + "-checked")) { + + p_oAttributes.checked = true; + + } + + if (Dom.hasClass(oRootNode, sClass + "-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 + + "\".", "info", this.toString()); + + } + + YAHOO.log("No source HTML element. Building the button " + + "using the set of configuration attributes.", "info", this.toString()); + + 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; + + } + + YAHOO.log("Building the button using an existing " + + "HTML element as a source element.", "info", this.toString()); + + + oConfig.attributes.srcelement = oElement; + + initConfig.call(this, oConfig); + + + if (!oConfig.element) { + + YAHOO.log("Source element could not be used " + + "as is. Creating a new HTML element for " + + "the button.", "info", this.toString()); + + 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 + "\".", "info", this.toString()); + + } + + } + + YAHOO.log("Building the button using an existing HTML " + + "element as a source element.", "info", this.toString()); + + + oConfig.attributes.srcelement = p_oElement; + + initConfig.call(this, oConfig); + + + if (!oConfig.element) { + + YAHOO.log("Source element could not be used as is." + + " Creating a new HTML element for the button.", + "info", this.toString()); + + 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, + + + /** + * @property _nOptionRegionX + * @description Number representing the X coordinate of the leftmost edge of the Button's + * option region. Applies only to Buttons of type "split". + * @default 0 + * @protected + * @type Number + */ + _nOptionRegionX: 0, + + + + // Constants + + /** + * @property CLASS_NAME_PREFIX + * @description Prefix used for all class names applied to a Button. + * @default "yui-" + * @final + * @type String + */ + CLASS_NAME_PREFIX: "yui-", + + + /** + * @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 "button" + * @final + * @type String + */ + CSS_CLASS_NAME: "button", + + + + // 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, + nGeckoVersion = UA.gecko; + + + if (nGeckoVersion && nGeckoVersion < 1.9 && Dom.inDocument(this.get("element"))) { + + sClass = (this.CLASS_NAME_PREFIX + this.CSS_CLASS_NAME); + + this.removeClass(sClass); + + Lang.later(0, this, this.addClass, sClass); + + } + + }, + + + /** + * @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) { + + if (this.get("type") != "link") { + + this._button.title = p_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"); + + if (sType == "checkbox" || sType == "radio") { + + if (p_bChecked) { + this.addStateCSSClasses("checked"); + } + else { + this.removeStateCSSClasses("checked"); + } + + } + + }, + + + /** + * @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; + + + function onAppendTo() { + + oMenu.render(oButtonElement.parentNode); + + this.removeListener("appendTo", onAppendTo); + + } + + + function setMenuContainer() { + + oMenu.cfg.queueProperty("container", oButtonElement.parentNode); + + this.removeListener("appendTo", setMenuContainer); + + } + + + function initMenu() { + + var oContainer; + + if (oMenu) { + + Dom.addClass(oMenu.element, this.get("menuclassname")); + Dom.addClass(oMenu.element, this.CLASS_NAME_PREFIX + 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) { + + if (bLazyLoad) { + + oContainer = this.get("container"); + + if (oContainer) { + + oMenu.cfg.queueProperty("container", oContainer); + + } + else { + + this.on("appendTo", setMenuContainer); + + } + + } + + oMenu.cfg.queueProperty("clicktohide", false); + + oMenu.keyDownEvent.subscribe(this._onMenuKeyDown, this, true); + oMenu.subscribe("click", this._onMenuClick, this, true); + + this.on("selectedMenuItemChange", this._onSelectedMenuItemChange); + + 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 && !bLazyLoad) { + + if (Dom.inDocument(oButtonElement)) { + + oMenu.render(oButtonElement.parentNode); + + } + else { + + this.on("appendTo", onAppendTo); + + } + + } + + } + + } + + + if (Overlay) { + + if (Menu) { + + sMenuCSSClassName = Menu.prototype.CSS_CLASS_NAME; + + } + + if (p_oMenu && Menu && (p_oMenu instanceof Menu)) { + + oMenu = p_oMenu; + bInstance = true; + + initMenu.call(this); + + } + else if (Overlay && p_oMenu && (p_oMenu instanceof Overlay)) { + + oMenu = p_oMenu; + bInstance = true; + + oMenu.cfg.queueProperty("visible", false); + + initMenu.call(this); + + } + else if (Menu && Lang.isArray(p_oMenu)) { + + oMenu = new Menu(Dom.generateId(), { lazyload: bLazyLoad, itemdata: p_oMenu }); + + this._menu = oMenu; + + this.on("appendTo", initMenu); + + } + 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 }); + + 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 }); + + 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; + + } + + }, + + + + // 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, + bReturnVal = false, + i; + + + if (nKeyCodes > 0) { + + i = nKeyCodes - 1; + + do { + + if (p_nKeyCode == aKeyCodes[i]) { + + bReturnVal = true; + break; + + } + + } + while (i--); + + } + + return bReturnVal; + + }, + + + /** + * @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) { + + var bShowMenu = (Event.getCharCode(p_oEvent) == 40); + + + var onKeyPress = function (p_oEvent) { + + Event.preventDefault(p_oEvent); + + this.removeListener("keypress", onKeyPress); + + }; + + + // Prevent the browser from scrolling the window + if (bShowMenu) { + + if (UA.opera) { + + this.on("keypress", onKeyPress); + + } + + Event.preventDefault(p_oEvent); + } + + return bShowMenu; + + }, + + + /** + * @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._onFormSubmit, 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 oMenu = this._menu, + aMenuAlignment = this.get("menualignment"), + bFocusMenu = this.get("focusmenu"), + fnFocusMethod; + + + if (this._renderedMenu) { + + oMenu.cfg.setProperty("context", + [this.get("element"), aMenuAlignment[0], aMenuAlignment[1]]); + + oMenu.cfg.setProperty("preventcontextoverlap", true); + oMenu.cfg.setProperty("constraintoviewport", true); + + } + else { + + oMenu.cfg.queueProperty("context", + [this.get("element"), aMenuAlignment[0], aMenuAlignment[1]]); + + oMenu.cfg.queueProperty("preventcontextoverlap", true); + oMenu.cfg.queueProperty("constraintoviewport", true); + + } + + + /* + Refocus the Button before showing its Menu in case the call to + YAHOO.widget.MenuManager.hideVisible() resulted in another element in the + DOM being focused after another Menu was hidden. + */ + + this.focus(); + + + if (Menu && oMenu && (oMenu instanceof Menu)) { + + // Since Menus automatically focus themselves when made visible, temporarily + // replace the Menu focus method so that the value of the Button's "focusmenu" + // attribute determines if the Menu should be focus when made visible. + + fnFocusMethod = oMenu.focus; + + oMenu.focus = function () {}; + + if (this._renderedMenu) { + + oMenu.cfg.setProperty("minscrollheight", this.get("menuminscrollheight")); + oMenu.cfg.setProperty("maxheight", this.get("menumaxheight")); + + } + else { + + oMenu.cfg.queueProperty("minscrollheight", this.get("menuminscrollheight")); + oMenu.cfg.queueProperty("maxheight", this.get("menumaxheight")); + + } + + + oMenu.show(); + + oMenu.focus = fnFocusMethod; + + oMenu.align(); + + + /* + 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); + } + + + if (bFocusMenu) { + oMenu.focus(); + } + + } + else if (Overlay && oMenu && (oMenu instanceof Overlay)) { + + if (!this._renderedMenu) { + oMenu.render(this.get("element").parentNode); + } + + oMenu.show(); + oMenu.align(); + + } + + }, + + + /** + * @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) { + + var sType = this.get("type"), + oElement, + nOptionRegionX; + + + if (sType === "split") { + + oElement = this.get("element"); + nOptionRegionX = + (Dom.getX(oElement) + (oElement.offsetWidth - this.OPTION_AREA_WIDTH)); + + this._nOptionRegionX = nOptionRegionX; + + } + + + if (!this._hasMouseEventHandlers) { + + if (sType === "split") { + + this.on("mousemove", this._onMouseMove); + + } + + this.on("mouseout", this._onMouseOut); + + this._hasMouseEventHandlers = true; + + } + + + this.addStateCSSClasses("hover"); + + + if (sType === "split" && (Event.getPageX(p_oEvent) > nOptionRegionX)) { + + this.addStateCSSClasses("hoveroption"); + + } + + + if (this._activationButtonPressed) { + + this.addStateCSSClasses("active"); + + } + + + if (this._bOptionPressed) { + + this.addStateCSSClasses("activeoption"); + + } + + + if (this._activationButtonPressed || this._bOptionPressed) { + + Event.removeListener(document, "mouseup", this._onDocumentMouseUp); + + } + + }, + + + /** + * @method _onMouseMove + * @description "mousemove" 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). + */ + _onMouseMove: function (p_oEvent) { + + var nOptionRegionX = this._nOptionRegionX; + + if (nOptionRegionX) { + + if (Event.getPageX(p_oEvent) > nOptionRegionX) { + + this.addStateCSSClasses("hoveroption"); + + } + else { + + this.removeStateCSSClasses("hoveroption"); + + } + + } + + }, + + /** + * @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) { + + var sType = this.get("type"); + + this.removeStateCSSClasses("hover"); + + + if (sType != "menu") { + + this.removeStateCSSClasses("active"); + + } + + + if (this._activationButtonPressed || this._bOptionPressed) { + + Event.on(document, "mouseup", this._onDocumentMouseUp, null, this); + + } + + + if (sType === "split" && (Event.getPageX(p_oEvent) > this._nOptionRegionX)) { + + this.removeStateCSSClasses("hoveroption"); + + } + + }, + + + /** + * @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, + bReturnVal = true; + + + 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") { + + if (Event.getPageX(p_oEvent) > this._nOptionRegionX) { + + this.fireEvent("option", p_oEvent); + bReturnVal = false; + + } + 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") { + + this._hideMenuTimer = Lang.later(250, this, this.on, ["mouseup", onMouseUp]); + + } + + } + + return bReturnVal; + + }, + + + /** + * @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"), + oHideMenuTimer = this._hideMenuTimer, + bReturnVal = true; + + + if (oHideMenuTimer) { + + oHideMenuTimer.cancel(); + + } + + + if (sType == "checkbox" || sType == "radio") { + + this.set("checked", !(this.get("checked"))); + + } + + + this._activationButtonPressed = false; + + + if (sType != "menu") { + + this.removeStateCSSClasses("active"); + + } + + + if (sType == "split" && Event.getPageX(p_oEvent) > this._nOptionRegionX) { + + bReturnVal = false; + + } + + return bReturnVal; + + }, + + + /** + * @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"), + oForm, + oSrcElement, + bReturnVal; + + + switch (sType) { + + case "submit": + + if (p_oEvent.returnValue !== false) { + + this.submitForm(); + + } + + break; + + case "reset": + + oForm = this.getForm(); + + if (oForm) { + + oForm.reset(); + + } + + break; + + + case "split": + + if (this._nOptionRegionX > 0 && + (Event.getPageX(p_oEvent) > this._nOptionRegionX)) { + + bReturnVal = false; + + } + else { + + this._hideMenu(); + + oSrcElement = this.get("srcelement"); + + if (oSrcElement && oSrcElement.type == "submit" && + p_oEvent.returnValue !== false) { + + this.submitForm(); + + } + + } + + break; + + } + + return bReturnVal; + + }, + + + /** + * @method _onDblClick + * @description "dblclick" 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). + */ + _onDblClick: function (p_oEvent) { + + var bReturnVal = true; + + if (this.get("type") == "split" && Event.getPageX(p_oEvent) > this._nOptionRegionX) { + + bReturnVal = false; + + } + + return bReturnVal; + + }, + + + /** + * @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. + */ + + Lang.later(0, this, this._addListenersToForm); + + }, + + + /** + * @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 _onFormSubmit + * @description "submit" 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). + */ + _onFormSubmit: function (p_oEvent) { + + this.createHiddenFields(); + + }, + + + /** + * @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(); + + // In IE when the user mouses down on a focusable element + // that element will be focused and become the "activeElement". + // (http://msdn.microsoft.com/en-us/library/ms533065(VS.85).aspx) + // However, there is a bug in IE where if there is a + // positioned element with a focused descendant that is + // hidden in response to the mousedown event, the target of + // the mousedown event will appear to have focus, but will + // not be set as the activeElement. This will result + // in the element not firing key events, even though it + // appears to have focus. The following call to "setActive" + // fixes this bug. + + if (UA.ie && oTarget.focus) { + oTarget.setActive(); + } + + 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(this.CLASS_NAME_PREFIX + "split-button-activeoption")) { + + this._hideMenu(); + + this._bOptionPressed = false; + + } + else { + + this._showMenu(p_oEvent); + + this._bOptionPressed = true; + + } + + }, + + + /** + * @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 sState = (this.get("type") == "split") ? "activeoption" : "active"; + + this.addStateCSSClasses(sState); + + }, + + + /** + * @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 sState = (this.get("type") == "split") ? "activeoption" : "active"; + + this.removeStateCSSClasses(sState); + + + 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, + oMenu = this._menu, + oMenuElement = oMenu.element, + oSrcElement = oMenu.srcElement, + oItem; + + + if (oButtonParent != oMenuElement.parentNode) { + + oButtonParent.appendChild(oMenuElement); + + } + + this._renderedMenu = true; + + // If the user has designated an