launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06626
[Merge] lp:~rvb/maas/maas-convoy into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/maas-convoy into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~rvb/maas/maas-convoy/+merge/96397
This massive branch is in essence pretty simple: it moves yui from static/js/yui to static/jslibs/yui.
This branch *should* be landed with its follow-up branch: lp:~rvb/maas/maas-user-convoy.
In details:
- the yui_version directory now stores all the yui files (before that, it contained only the content of 'build', so the actual code is in static/jslibs/yui/$version/build/ now as opposed to static/js/yui/$version/ previously):
- this is the way convoy expects it to be.
- it's more simple to add a new yui release to our code: we only need to extract the release and rename yui to $THE_YUI_VERSION in static/jslibs/yui
- I've moved yui out of static/js be cause it's clearer to have our own js code and the js libraries in different places.
--
The attached diff has been truncated due to its size.
https://code.launchpad.net/~rvb/maas/maas-convoy/+merge/96397
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-convoy into lp:maas.
=== added file 'src/maasserver/static/js/testing/yui_test_conf.js'
--- src/maasserver/static/js/testing/yui_test_conf.js 1970-01-01 00:00:00 +0000
+++ src/maasserver/static/js/testing/yui_test_conf.js 2012-03-07 16:50:31 +0000
@@ -0,0 +1,6 @@
+var YUI_config = {
+ debug: true,
+ combine: false,
+ filter: 'raw',
+};
+
=== removed directory 'src/maasserver/static/js/yui/3.4.1'
=== removed directory 'src/maasserver/static/js/yui/3.4.1/align-plugin'
=== removed file 'src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin-debug.js'
--- src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin-debug.js 1970-01-01 00:00:00 +0000
@@ -1,199 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('align-plugin', function(Y) {
-
- /**
- * Provides advanced positioning support for Node via a Plugin
- * for centering and alignment.
- * @module align-plugin
- */
-
- var OFFSET_WIDTH = 'offsetWidth',
- OFFSET_HEIGHT = 'offsetHeight',
- undefined = undefined;
-
- /**
- * Node plugin which can be used to align a node with another node,
- * region, or the viewport.
- *
- * @class Plugin.Align
- * @param {Object} User configuration object
- */
- function Align(config) {
- if (config.host) {
- this._host = config.host;
- }
- }
-
- Align.prototype = {
- /**
- * Aligns node with a point on another node or region.
- * Possible alignment points are:
- * <dl>
- * <dt>tl</dt>
- * <dd>top left</dd>
- * <dt>tr</dt>
- * <dd>top right</dd>
- * <dt>bl</dt>
- * <dd>bottom left</dd>
- * <dt>br</dt>
- * <dd>bottom right</dd>
- * <dt>tc</dt>
- * <dd>top center</dd>
- * <dt>bc</dt>
- * <dd>bottom center</dd>
- * <dt>rc</dt>
- * <dd>right center</dd>
- * <dt>lc</dt>
- * <dd>left center</dd>
- * <dt>cc</dt>
- * <dd>center center</dd>
- * </dl>
- * @method to
- * @param region {String || Node || HTMLElement || Object} The node or
- * region to align with. Defaults to the viewport region.
- * @param regionPoint {String} The point of the region to align with.
- * @param point {String} The point of the node aligned to the region.
- * @param resize {Boolean} Whether or not the node should re-align when
- * the window is resized. Defaults to false.
- */
- to: function(region, regionPoint, point, syncOnResize) {
- // cache original args for syncing
- this._syncArgs = Y.Array(arguments);
-
- if (region.top === undefined) {
- region = Y.one(region).get('region');
- }
-
- if (region) {
- var xy = [region.left, region.top],
- offxy = [region.width, region.height],
- points = Align.points,
- node = this._host,
- NULL = null,
- size = node.getAttrs([OFFSET_HEIGHT, OFFSET_WIDTH]),
- nodeoff = [0 - size[OFFSET_WIDTH], 0 - size[OFFSET_HEIGHT]], // reverse offsets
- regionFn0 = regionPoint ? points[regionPoint.charAt(0)]: NULL,
- regionFn1 = (regionPoint && regionPoint !== 'cc') ? points[regionPoint.charAt(1)] : NULL,
- nodeFn0 = point ? points[point.charAt(0)] : NULL,
- nodeFn1 = (point && point !== 'cc') ? points[point.charAt(1)] : NULL;
-
- if (regionFn0) {
- xy = regionFn0(xy, offxy, regionPoint);
- }
- if (regionFn1) {
- xy = regionFn1(xy, offxy, regionPoint);
- }
-
- if (nodeFn0) {
- xy = nodeFn0(xy, nodeoff, point);
- }
- if (nodeFn1) {
- xy = nodeFn1(xy, nodeoff, point);
- }
-
- if (xy && node) {
- node.setXY(xy);
- }
-
- this._resize(syncOnResize);
-
- }
- return this;
- },
-
- sync: function() {
- this.to.apply(this, this._syncArgs);
- return this;
- },
-
- _resize: function(add) {
- var handle = this._handle;
- if (add && !handle) {
- this._handle = Y.on('resize', this._onresize, window, this);
- } else if (!add && handle) {
- handle.detach();
- }
-
- },
-
- _onresize: function() {
- var self = this;
- setTimeout(function() { // for performance
- self.sync();
- });
- },
-
- /**
- * Aligns the center of a node to the center of another node or region.
- * @method center
- * @param region {Node || HTMLElement || Object} optional The node or
- * region to align with. Defaults to the viewport region.
- * the window is resized. If centering to viewport, this defaults
- * to true, otherwise default is false.
- */
- center: function(region, resize) {
- this.to(region, 'cc', 'cc', resize);
- return this;
- },
-
- /**
- * Removes the resize handler, if any. This is called automatically
- * when unplugged from the host node.
- * @method destroy
- */
- destroy: function() {
- var handle = this._handle;
- if (handle) {
- handle.detach();
- }
- }
- };
-
- Align.points = {
- 't': function(xy, off) {
- return xy;
- },
-
- 'r': function(xy, off) {
- return [xy[0] + off[0], xy[1]];
- },
-
- 'b': function(xy, off) {
- return [xy[0], xy[1] + off[1]];
- },
-
- 'l': function(xy, off) {
- return xy;
- },
-
- 'c': function(xy, off, point) {
- var axis = (point[0] === 't' || point[0] === 'b') ? 0 : 1,
- ret, val;
-
- if (point === 'cc') {
- ret = [xy[0] + off[0] / 2, xy[1] + off[1] / 2];
- } else {
- val = xy[axis] + off[axis] / 2;
- ret = (axis) ? [xy[0], val] : [val, xy[1]];
- }
-
- return ret;
- }
- };
-
- Align.NAME = 'Align';
- Align.NS = 'align';
-
- Align.prototype.constructor = Align;
-
- Y.namespace('Plugin');
- Y.Plugin.Align = Align;
-
-
-
-}, '3.4.1' ,{requires:['node-pluginhost', 'node-screen']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin-min.js'
--- src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("align-plugin",function(c){var e="offsetWidth",d="offsetHeight",b=b;function a(f){if(f.host){this._host=f.host;}}a.prototype={to:function(j,t,l,o){this._syncArgs=c.Array(arguments);if(j.top===b){j=c.one(j).get("region");}if(j){var s=[j.left,j.top],q=[j.width,j.height],n=a.points,f=this._host,h=null,r=f.getAttrs([d,e]),k=[0-r[e],0-r[d]],p=t?n[t.charAt(0)]:h,m=(t&&t!=="cc")?n[t.charAt(1)]:h,i=l?n[l.charAt(0)]:h,g=(l&&l!=="cc")?n[l.charAt(1)]:h;if(p){s=p(s,q,t);}if(m){s=m(s,q,t);}if(i){s=i(s,k,l);}if(g){s=g(s,k,l);}if(s&&f){f.setXY(s);}this._resize(o);}return this;},sync:function(){this.to.apply(this,this._syncArgs);return this;},_resize:function(g){var f=this._handle;if(g&&!f){this._handle=c.on("resize",this._onresize,window,this);}else{if(!g&&f){f.detach();}}},_onresize:function(){var f=this;setTimeout(function(){f.sync();});},center:function(g,f){this.to(g,"cc","cc",f);return this;},destroy:function(){var f=this._handle;if(f){f.detach();}}};a.points={"t":function(f,g){return f;},"r":function(f,g){return[f[0]+g[0],f[1]];},"b":function(f,g){return[f[0],f[1]+g[1]];},"l":function(f,g){return f;},"c":function(i,k,f){var h=(f[0]==="t"||f[0]==="b")?0:1,g,j;if(f==="cc"){g=[i[0]+k[0]/2,i[1]+k[1]/2];}else{j=i[h]+k[h]/2;g=(h)?[i[0],j]:[j,i[1]];}return g;}};a.NAME="Align";a.NS="align";a.prototype.constructor=a;c.namespace("Plugin");c.Plugin.Align=a;},"3.4.1",{requires:["node-pluginhost","node-screen"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin.js'
--- src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/align-plugin/align-plugin.js 1970-01-01 00:00:00 +0000
@@ -1,199 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('align-plugin', function(Y) {
-
- /**
- * Provides advanced positioning support for Node via a Plugin
- * for centering and alignment.
- * @module align-plugin
- */
-
- var OFFSET_WIDTH = 'offsetWidth',
- OFFSET_HEIGHT = 'offsetHeight',
- undefined = undefined;
-
- /**
- * Node plugin which can be used to align a node with another node,
- * region, or the viewport.
- *
- * @class Plugin.Align
- * @param {Object} User configuration object
- */
- function Align(config) {
- if (config.host) {
- this._host = config.host;
- }
- }
-
- Align.prototype = {
- /**
- * Aligns node with a point on another node or region.
- * Possible alignment points are:
- * <dl>
- * <dt>tl</dt>
- * <dd>top left</dd>
- * <dt>tr</dt>
- * <dd>top right</dd>
- * <dt>bl</dt>
- * <dd>bottom left</dd>
- * <dt>br</dt>
- * <dd>bottom right</dd>
- * <dt>tc</dt>
- * <dd>top center</dd>
- * <dt>bc</dt>
- * <dd>bottom center</dd>
- * <dt>rc</dt>
- * <dd>right center</dd>
- * <dt>lc</dt>
- * <dd>left center</dd>
- * <dt>cc</dt>
- * <dd>center center</dd>
- * </dl>
- * @method to
- * @param region {String || Node || HTMLElement || Object} The node or
- * region to align with. Defaults to the viewport region.
- * @param regionPoint {String} The point of the region to align with.
- * @param point {String} The point of the node aligned to the region.
- * @param resize {Boolean} Whether or not the node should re-align when
- * the window is resized. Defaults to false.
- */
- to: function(region, regionPoint, point, syncOnResize) {
- // cache original args for syncing
- this._syncArgs = Y.Array(arguments);
-
- if (region.top === undefined) {
- region = Y.one(region).get('region');
- }
-
- if (region) {
- var xy = [region.left, region.top],
- offxy = [region.width, region.height],
- points = Align.points,
- node = this._host,
- NULL = null,
- size = node.getAttrs([OFFSET_HEIGHT, OFFSET_WIDTH]),
- nodeoff = [0 - size[OFFSET_WIDTH], 0 - size[OFFSET_HEIGHT]], // reverse offsets
- regionFn0 = regionPoint ? points[regionPoint.charAt(0)]: NULL,
- regionFn1 = (regionPoint && regionPoint !== 'cc') ? points[regionPoint.charAt(1)] : NULL,
- nodeFn0 = point ? points[point.charAt(0)] : NULL,
- nodeFn1 = (point && point !== 'cc') ? points[point.charAt(1)] : NULL;
-
- if (regionFn0) {
- xy = regionFn0(xy, offxy, regionPoint);
- }
- if (regionFn1) {
- xy = regionFn1(xy, offxy, regionPoint);
- }
-
- if (nodeFn0) {
- xy = nodeFn0(xy, nodeoff, point);
- }
- if (nodeFn1) {
- xy = nodeFn1(xy, nodeoff, point);
- }
-
- if (xy && node) {
- node.setXY(xy);
- }
-
- this._resize(syncOnResize);
-
- }
- return this;
- },
-
- sync: function() {
- this.to.apply(this, this._syncArgs);
- return this;
- },
-
- _resize: function(add) {
- var handle = this._handle;
- if (add && !handle) {
- this._handle = Y.on('resize', this._onresize, window, this);
- } else if (!add && handle) {
- handle.detach();
- }
-
- },
-
- _onresize: function() {
- var self = this;
- setTimeout(function() { // for performance
- self.sync();
- });
- },
-
- /**
- * Aligns the center of a node to the center of another node or region.
- * @method center
- * @param region {Node || HTMLElement || Object} optional The node or
- * region to align with. Defaults to the viewport region.
- * the window is resized. If centering to viewport, this defaults
- * to true, otherwise default is false.
- */
- center: function(region, resize) {
- this.to(region, 'cc', 'cc', resize);
- return this;
- },
-
- /**
- * Removes the resize handler, if any. This is called automatically
- * when unplugged from the host node.
- * @method destroy
- */
- destroy: function() {
- var handle = this._handle;
- if (handle) {
- handle.detach();
- }
- }
- };
-
- Align.points = {
- 't': function(xy, off) {
- return xy;
- },
-
- 'r': function(xy, off) {
- return [xy[0] + off[0], xy[1]];
- },
-
- 'b': function(xy, off) {
- return [xy[0], xy[1] + off[1]];
- },
-
- 'l': function(xy, off) {
- return xy;
- },
-
- 'c': function(xy, off, point) {
- var axis = (point[0] === 't' || point[0] === 'b') ? 0 : 1,
- ret, val;
-
- if (point === 'cc') {
- ret = [xy[0] + off[0] / 2, xy[1] + off[1] / 2];
- } else {
- val = xy[axis] + off[axis] / 2;
- ret = (axis) ? [xy[0], val] : [val, xy[1]];
- }
-
- return ret;
- }
- };
-
- Align.NAME = 'Align';
- Align.NS = 'align';
-
- Align.prototype.constructor = Align;
-
- Y.namespace('Plugin');
- Y.Plugin.Align = Align;
-
-
-
-}, '3.4.1' ,{requires:['node-pluginhost', 'node-screen']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/anim-base'
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-base/anim-base-debug.js'
--- src/maasserver/static/js/yui/3.4.1/anim-base/anim-base-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-base/anim-base-debug.js 1970-01-01 00:00:00 +0000
@@ -1,676 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-base', function(Y) {
-
-/**
-* The Animation Utility provides an API for creating advanced transitions.
-* @module anim
-*/
-
-/**
-* Provides the base Anim class, for animating numeric properties.
-*
-* @module anim
-* @submodule anim-base
-*/
-
- /**
- * A class for constructing animation instances.
- * @class Anim
- * @for Anim
- * @constructor
- * @extends Base
- */
-
- var RUNNING = 'running',
- START_TIME = 'startTime',
- ELAPSED_TIME = 'elapsedTime',
- /**
- * @for Anim
- * @event start
- * @description fires when an animation begins.
- * @param {Event} ev The start event.
- * @type Event.Custom
- */
- START = 'start',
-
- /**
- * @event tween
- * @description fires every frame of the animation.
- * @param {Event} ev The tween event.
- * @type Event.Custom
- */
- TWEEN = 'tween',
-
- /**
- * @event end
- * @description fires after the animation completes.
- * @param {Event} ev The end event.
- * @type Event.Custom
- */
- END = 'end',
- NODE = 'node',
- PAUSED = 'paused',
- REVERSE = 'reverse', // TODO: cleanup
- ITERATION_COUNT = 'iterationCount',
-
- NUM = Number;
-
- var _running = {},
- _timer;
-
- Y.Anim = function() {
- Y.Anim.superclass.constructor.apply(this, arguments);
- Y.Anim._instances[Y.stamp(this)] = this;
- };
-
- Y.Anim.NAME = 'anim';
-
- Y.Anim._instances = {};
-
- /**
- * Regex of properties that should use the default unit.
- *
- * @property RE_DEFAULT_UNIT
- * @static
- */
- Y.Anim.RE_DEFAULT_UNIT = /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;
-
- /**
- * The default unit to use with properties that pass the RE_DEFAULT_UNIT test.
- *
- * @property DEFAULT_UNIT
- * @static
- */
- Y.Anim.DEFAULT_UNIT = 'px';
-
- Y.Anim.DEFAULT_EASING = function (t, b, c, d) {
- return c * t / d + b; // linear easing
- };
-
- /**
- * Time in milliseconds passed to setInterval for frame processing
- *
- * @property intervalTime
- * @default 20
- * @static
- */
- Y.Anim._intervalTime = 20;
-
- /**
- * Bucket for custom getters and setters
- *
- * @property behaviors
- * @static
- */
- Y.Anim.behaviors = {
- left: {
- get: function(anim, attr) {
- return anim._getOffset(attr);
- }
- }
- };
-
- Y.Anim.behaviors.top = Y.Anim.behaviors.left;
-
- /**
- * The default setter to use when setting object properties.
- *
- * @property DEFAULT_SETTER
- * @static
- */
- Y.Anim.DEFAULT_SETTER = function(anim, att, from, to, elapsed, duration, fn, unit) {
- var node = anim._node,
- val = fn(elapsed, NUM(from), NUM(to) - NUM(from), duration);
-
- if (att in node._node.style || att in Y.DOM.CUSTOM_STYLES) {
- unit = unit || '';
- node.setStyle(att, val + unit);
- } else if (node._node.attributes[att]) {
- node.setAttribute(att, val);
- } else {
- node.set(att, val);
- }
- };
-
- /**
- * The default getter to use when getting object properties.
- *
- * @property DEFAULT_GETTER
- * @static
- */
- Y.Anim.DEFAULT_GETTER = function(anim, att) {
- var node = anim._node,
- val = '';
-
- if (att in node._node.style || att in Y.DOM.CUSTOM_STYLES) {
- val = node.getComputedStyle(att);
- } else if (node._node.attributes[att]) {
- val = node.getAttribute(att);
- } else {
- val = node.get(att);
- }
-
- return val;
- };
-
- Y.Anim.ATTRS = {
- /**
- * The object to be animated.
- * @attribute node
- * @type Node
- */
- node: {
- setter: function(node) {
- if (node) {
- if (typeof node == 'string' || node.nodeType) {
- node = Y.one(node);
- }
- }
-
- this._node = node;
- if (!node) {
- Y.log(node + ' is not a valid node', 'warn', 'Anim');
- }
- return node;
- }
- },
-
- /**
- * The length of the animation. Defaults to "1" (second).
- * @attribute duration
- * @type NUM
- */
- duration: {
- value: 1
- },
-
- /**
- * The method that will provide values to the attribute(s) during the animation.
- * Defaults to "Easing.easeNone".
- * @attribute easing
- * @type Function
- */
- easing: {
- value: Y.Anim.DEFAULT_EASING,
-
- setter: function(val) {
- if (typeof val === 'string' && Y.Easing) {
- return Y.Easing[val];
- }
- }
- },
-
- /**
- * The starting values for the animated properties.
- *
- * Fields may be strings, numbers, or functions.
- * If a function is used, the return value becomes the from value.
- * If no from value is specified, the DEFAULT_GETTER will be used.
- * Supports any unit, provided it matches the "to" (or default)
- * unit (e.g. `{width: '10em', color: 'rgb(0, 0 0)', borderColor: '#ccc'}`).
- *
- * If using the default ('px' for length-based units), the unit may be omitted
- * (e.g. `{width: 100}, borderColor: 'ccc'}`, which defaults to pixels
- * and hex, respectively).
- *
- * @attribute from
- * @type Object
- */
- from: {},
-
- /**
- * The ending values for the animated properties.
- *
- * Fields may be strings, numbers, or functions.
- * Supports any unit, provided it matches the "from" (or default)
- * unit (e.g. `{width: '50%', color: 'red', borderColor: '#ccc'}`).
- *
- * If using the default ('px' for length-based units), the unit may be omitted
- * (e.g. `{width: 100, borderColor: 'ccc'}`, which defaults to pixels
- * and hex, respectively).
- *
- * @attribute to
- * @type Object
- */
- to: {},
-
- /**
- * Date stamp for the first frame of the animation.
- * @attribute startTime
- * @type Int
- * @default 0
- * @readOnly
- */
- startTime: {
- value: 0,
- readOnly: true
- },
-
- /**
- * Current time the animation has been running.
- * @attribute elapsedTime
- * @type Int
- * @default 0
- * @readOnly
- */
- elapsedTime: {
- value: 0,
- readOnly: true
- },
-
- /**
- * Whether or not the animation is currently running.
- * @attribute running
- * @type Boolean
- * @default false
- * @readOnly
- */
- running: {
- getter: function() {
- return !!_running[Y.stamp(this)];
- },
- value: false,
- readOnly: true
- },
-
- /**
- * The number of times the animation should run
- * @attribute iterations
- * @type Int
- * @default 1
- */
- iterations: {
- value: 1
- },
-
- /**
- * The number of iterations that have occurred.
- * Resets when an animation ends (reaches iteration count or stop() called).
- * @attribute iterationCount
- * @type Int
- * @default 0
- * @readOnly
- */
- iterationCount: {
- value: 0,
- readOnly: true
- },
-
- /**
- * How iterations of the animation should behave.
- * Possible values are "normal" and "alternate".
- * Normal will repeat the animation, alternate will reverse on every other pass.
- *
- * @attribute direction
- * @type String
- * @default "normal"
- */
- direction: {
- value: 'normal' // | alternate (fwd on odd, rev on even per spec)
- },
-
- /**
- * Whether or not the animation is currently paused.
- * @attribute paused
- * @type Boolean
- * @default false
- * @readOnly
- */
- paused: {
- readOnly: true,
- value: false
- },
-
- /**
- * If true, animation begins from last frame
- * @attribute reverse
- * @type Boolean
- * @default false
- */
- reverse: {
- value: false
- }
-
-
- };
-
- /**
- * Runs all animation instances.
- * @method run
- * @static
- */
- Y.Anim.run = function() {
- var instances = Y.Anim._instances;
- for (var i in instances) {
- if (instances[i].run) {
- instances[i].run();
- }
- }
- };
-
- /**
- * Pauses all animation instances.
- * @method pause
- * @static
- */
- Y.Anim.pause = function() {
- for (var i in _running) { // stop timer if nothing running
- if (_running[i].pause) {
- _running[i].pause();
- }
- }
-
- Y.Anim._stopTimer();
- };
-
- /**
- * Stops all animation instances.
- * @method stop
- * @static
- */
- Y.Anim.stop = function() {
- for (var i in _running) { // stop timer if nothing running
- if (_running[i].stop) {
- _running[i].stop();
- }
- }
- Y.Anim._stopTimer();
- };
-
- Y.Anim._startTimer = function() {
- if (!_timer) {
- _timer = setInterval(Y.Anim._runFrame, Y.Anim._intervalTime);
- }
- };
-
- Y.Anim._stopTimer = function() {
- clearInterval(_timer);
- _timer = 0;
- };
-
- /**
- * Called per Interval to handle each animation frame.
- * @method _runFrame
- * @private
- * @static
- */
- Y.Anim._runFrame = function() {
- var done = true;
- for (var anim in _running) {
- if (_running[anim]._runFrame) {
- done = false;
- _running[anim]._runFrame();
- }
- }
-
- if (done) {
- Y.Anim._stopTimer();
- }
- };
-
- Y.Anim.RE_UNITS = /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;
-
- var proto = {
- /**
- * Starts or resumes an animation.
- * @method run
- * @chainable
- */
- run: function() {
- if (this.get(PAUSED)) {
- this._resume();
- } else if (!this.get(RUNNING)) {
- this._start();
- }
- return this;
- },
-
- /**
- * Pauses the animation and
- * freezes it in its current state and time.
- * Calling run() will continue where it left off.
- * @method pause
- * @chainable
- */
- pause: function() {
- if (this.get(RUNNING)) {
- this._pause();
- }
- return this;
- },
-
- /**
- * Stops the animation and resets its time.
- * @method stop
- * @param {Boolean} finish If true, the animation will move to the last frame
- * @chainable
- */
- stop: function(finish) {
- if (this.get(RUNNING) || this.get(PAUSED)) {
- this._end(finish);
- }
- return this;
- },
-
- _added: false,
-
- _start: function() {
- this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));
- this._actualFrames = 0;
- if (!this.get(PAUSED)) {
- this._initAnimAttr();
- }
- _running[Y.stamp(this)] = this;
- Y.Anim._startTimer();
-
- this.fire(START);
- },
-
- _pause: function() {
- this._set(START_TIME, null);
- this._set(PAUSED, true);
- delete _running[Y.stamp(this)];
-
- /**
- * @event pause
- * @description fires when an animation is paused.
- * @param {Event} ev The pause event.
- * @type Event.Custom
- */
- this.fire('pause');
- },
-
- _resume: function() {
- this._set(PAUSED, false);
- _running[Y.stamp(this)] = this;
- this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));
- Y.Anim._startTimer();
-
- /**
- * @event resume
- * @description fires when an animation is resumed (run from pause).
- * @param {Event} ev The pause event.
- * @type Event.Custom
- */
- this.fire('resume');
- },
-
- _end: function(finish) {
- var duration = this.get('duration') * 1000;
- if (finish) { // jump to last frame
- this._runAttrs(duration, duration, this.get(REVERSE));
- }
-
- this._set(START_TIME, null);
- this._set(ELAPSED_TIME, 0);
- this._set(PAUSED, false);
-
- delete _running[Y.stamp(this)];
- this.fire(END, {elapsed: this.get(ELAPSED_TIME)});
- },
-
- _runFrame: function() {
- var d = this._runtimeAttr.duration,
- t = new Date() - this.get(START_TIME),
- reverse = this.get(REVERSE),
- done = (t >= d),
- attribute,
- setter;
-
- this._runAttrs(t, d, reverse);
- this._actualFrames += 1;
- this._set(ELAPSED_TIME, t);
-
- this.fire(TWEEN);
- if (done) {
- this._lastFrame();
- }
- },
-
- _runAttrs: function(t, d, reverse) {
- var attr = this._runtimeAttr,
- customAttr = Y.Anim.behaviors,
- easing = attr.easing,
- lastFrame = d,
- done = false,
- attribute,
- setter,
- i;
-
- if (t >= d) {
- done = true;
- }
-
- if (reverse) {
- t = d - t;
- lastFrame = 0;
- }
-
- for (i in attr) {
- if (attr[i].to) {
- attribute = attr[i];
- setter = (i in customAttr && 'set' in customAttr[i]) ?
- customAttr[i].set : Y.Anim.DEFAULT_SETTER;
-
- if (!done) {
- setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
- } else {
- setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
- }
- }
- }
-
-
- },
-
- _lastFrame: function() {
- var iter = this.get('iterations'),
- iterCount = this.get(ITERATION_COUNT);
-
- iterCount += 1;
- if (iter === 'infinite' || iterCount < iter) {
- if (this.get('direction') === 'alternate') {
- this.set(REVERSE, !this.get(REVERSE)); // flip it
- }
- /**
- * @event iteration
- * @description fires when an animation begins an iteration.
- * @param {Event} ev The iteration event.
- * @type Event.Custom
- */
- this.fire('iteration');
- } else {
- iterCount = 0;
- this._end();
- }
-
- this._set(START_TIME, new Date());
- this._set(ITERATION_COUNT, iterCount);
- },
-
- _initAnimAttr: function() {
- var from = this.get('from') || {},
- to = this.get('to') || {},
- attr = {
- duration: this.get('duration') * 1000,
- easing: this.get('easing')
- },
- customAttr = Y.Anim.behaviors,
- node = this.get(NODE), // implicit attr init
- unit, begin, end;
-
- Y.each(to, function(val, name) {
- if (typeof val === 'function') {
- val = val.call(this, node);
- }
-
- begin = from[name];
- if (begin === undefined) {
- begin = (name in customAttr && 'get' in customAttr[name]) ?
- customAttr[name].get(this, name) : Y.Anim.DEFAULT_GETTER(this, name);
- } else if (typeof begin === 'function') {
- begin = begin.call(this, node);
- }
-
- var mFrom = Y.Anim.RE_UNITS.exec(begin);
- var mTo = Y.Anim.RE_UNITS.exec(val);
-
- begin = mFrom ? mFrom[1] : begin;
- end = mTo ? mTo[1] : val;
- unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units
-
- if (!unit && Y.Anim.RE_DEFAULT_UNIT.test(name)) {
- unit = Y.Anim.DEFAULT_UNIT;
- }
-
- if (!begin || !end) {
- Y.error('invalid "from" or "to" for "' + name + '"', 'Anim');
- return;
- }
-
- attr[name] = {
- from: begin,
- to: end,
- unit: unit
- };
-
- }, this);
-
- this._runtimeAttr = attr;
- },
-
-
- // TODO: move to computedStyle? (browsers dont agree on default computed offsets)
- _getOffset: function(attr) {
- var node = this._node,
- val = node.getComputedStyle(attr),
- get = (attr === 'left') ? 'getX': 'getY',
- set = (attr === 'left') ? 'setX': 'setY';
-
- if (val === 'auto') {
- var position = node.getStyle('position');
- if (position === 'absolute' || position === 'fixed') {
- val = node[get]();
- node[set](val);
- } else {
- val = 0;
- }
- }
-
- return val;
- },
-
- destructor: function() {
- delete Y.Anim._instances[Y.stamp(this)];
- }
- };
-
- Y.extend(Y.Anim, Y.Base, proto);
-
-
-}, '3.4.1' ,{requires:['base-base', 'node-style']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-base/anim-base-min.js'
--- src/maasserver/static/js/yui/3.4.1/anim-base/anim-base-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-base/anim-base-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-base",function(b){var c="running",n="startTime",l="elapsedTime",j="start",i="tween",m="end",d="node",k="paused",o="reverse",h="iterationCount",a=Number;var f={},e;b.Anim=function(){b.Anim.superclass.constructor.apply(this,arguments);b.Anim._instances[b.stamp(this)]=this;};b.Anim.NAME="anim";b.Anim._instances={};b.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;b.Anim.DEFAULT_UNIT="px";b.Anim.DEFAULT_EASING=function(q,p,s,r){return s*q/r+p;};b.Anim._intervalTime=20;b.Anim.behaviors={left:{get:function(q,p){return q._getOffset(p);}}};b.Anim.behaviors.top=b.Anim.behaviors.left;b.Anim.DEFAULT_SETTER=function(s,t,v,w,y,r,u,x){var q=s._node,p=u(y,a(v),a(w)-a(v),r);if(t in q._node.style||t in b.DOM.CUSTOM_STYLES){x=x||"";q.setStyle(t,p+x);}else{if(q._node.attributes[t]){q.setAttribute(t,p);}else{q.set(t,p);}}};b.Anim.DEFAULT_GETTER=function(r,p){var q=r._node,s="";if(p in q._node.style||p in b.DOM.CUSTOM_STYLES){s=q.getComputedStyle(p);}else{if(q._node.attributes[p]){s=q.getAttribute(p);}else{s=q.get(p);}}return s;};b.Anim.ATTRS={node:{setter:function(p){if(p){if(typeof p=="string"||p.nodeType){p=b.one(p);}}this._node=p;if(!p){}return p;}},duration:{value:1},easing:{value:b.Anim.DEFAULT_EASING,setter:function(p){if(typeof p==="string"&&b.Easing){return b.Easing[p];}}},from:{},to:{},startTime:{value:0,readOnly:true},elapsedTime:{value:0,readOnly:true},running:{getter:function(){return !!f[b.stamp(this)];},value:false,readOnly:true},iterations:{value:1},iterationCount:{value:0,readOnly:true},direction:{value:"normal"},paused:{readOnly:true,value:false},reverse:{value:false}};b.Anim.run=function(){var q=b.Anim._instances;for(var p in q){if(q[p].run){q[p].run();}}};b.Anim.pause=function(){for(var p in f){if(f[p].pause){f[p].pause();}}b.Anim._stopTimer();};b.Anim.stop=function(){for(var p in f){if(f[p].stop){f[p].stop();}}b.Anim._stopTimer();};b.Anim._startTimer=function(){if(!e){e=setInterval(b.Anim._runFrame,b.Anim._intervalTime);}};b.Anim._stopTimer=function(){clearInterval(e);e=0;};b.Anim._runFrame=function(){var p=true;for(var q in f){if(f[q]._runFrame){p=false;f[q]._runFrame();}}if(p){b.Anim._stopTimer();}};b.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var g={run:function(){if(this.get(k)){this._resume();}else{if(!this.get(c)){this._start();}}return this;},pause:function(){if(this.get(c)){this._pause();}return this;},stop:function(p){if(this.get(c)||this.get(k)){this._end(p);}return this;},_added:false,_start:function(){this._set(n,new Date()-this.get(l));this._actualFrames=0;if(!this.get(k)){this._initAnimAttr();}f[b.stamp(this)]=this;b.Anim._startTimer();this.fire(j);},_pause:function(){this._set(n,null);this._set(k,true);delete f[b.stamp(this)];this.fire("pause");},_resume:function(){this._set(k,false);f[b.stamp(this)]=this;this._set(n,new Date()-this.get(l));b.Anim._startTimer();this.fire("resume");},_end:function(p){var q=this.get("duration")*1000;if(p){this._runAttrs(q,q,this.get(o));}this._set(n,null);this._set(l,0);this._set(k,false);delete f[b.stamp(this)];this.fire(m,{elapsed:this.get(l)});},_runFrame:function(){var u=this._runtimeAttr.duration,r=new Date()-this.get(n),q=this.get(o),p=(r>=u),s,v;this._runAttrs(r,u,q);this._actualFrames+=1;this._set(l,r);this.fire(i);if(p){this._lastFrame();}},_runAttrs:function(A,z,w){var x=this._runtimeAttr,r=b.Anim.behaviors,y=x.easing,p=z,u=false,q,s,v;if(A>=z){u=true;}if(w){A=z-A;p=0;}for(v in x){if(x[v].to){q=x[v];s=(v in r&&"set" in r[v])?r[v].set:b.Anim.DEFAULT_SETTER;if(!u){s(this,v,q.from,q.to,A,z,y,q.unit);}else{s(this,v,q.from,q.to,p,z,y,q.unit);}}}},_lastFrame:function(){var p=this.get("iterations"),q=this.get(h);q+=1;if(p==="infinite"||q<p){if(this.get("direction")==="alternate"){this.set(o,!this.get(o));}this.fire("iteration");}else{q=0;this._end();}this._set(n,new Date());this._set(h,q);},_initAnimAttr:function(){var w=this.get("from")||{},v=this.get("to")||{},p={duration:this.get("duration")*1000,easing:this.get("easing")},r=b.Anim.behaviors,u=this.get(d),t,s,q;b.each(v,function(A,y){if(typeof A==="function"){A=A.call(this,u);}s=w[y];if(s===undefined){s=(y in r&&"get" in r[y])?r[y].get(this,y):b.Anim.DEFAULT_GETTER(this,y);}else{if(typeof s==="function"){s=s.call(this,u);}}var x=b.Anim.RE_UNITS.exec(s);var z=b.Anim.RE_UNITS.exec(A);s=x?x[1]:s;q=z?z[1]:A;t=z?z[2]:x?x[2]:"";if(!t&&b.Anim.RE_DEFAULT_UNIT.test(y)){t=b.Anim.DEFAULT_UNIT;}if(!s||!q){b.error('invalid "from" or "to" for "'+y+'"',"Anim");return;}p[y]={from:s,to:q,unit:t};},this);this._runtimeAttr=p;},_getOffset:function(q){var s=this._node,t=s.getComputedStyle(q),r=(q==="left")?"getX":"getY",u=(q==="left")?"setX":"setY";if(t==="auto"){var p=s.getStyle("position");if(p==="absolute"||p==="fixed"){t=s[r]();s[u](t);}else{t=0;}}return t;},destructor:function(){delete b.Anim._instances[b.stamp(this)];}};b.extend(b.Anim,b.Base,g);},"3.4.1",{requires:["base-base","node-style"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-base/anim-base.js'
--- src/maasserver/static/js/yui/3.4.1/anim-base/anim-base.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-base/anim-base.js 1970-01-01 00:00:00 +0000
@@ -1,675 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-base', function(Y) {
-
-/**
-* The Animation Utility provides an API for creating advanced transitions.
-* @module anim
-*/
-
-/**
-* Provides the base Anim class, for animating numeric properties.
-*
-* @module anim
-* @submodule anim-base
-*/
-
- /**
- * A class for constructing animation instances.
- * @class Anim
- * @for Anim
- * @constructor
- * @extends Base
- */
-
- var RUNNING = 'running',
- START_TIME = 'startTime',
- ELAPSED_TIME = 'elapsedTime',
- /**
- * @for Anim
- * @event start
- * @description fires when an animation begins.
- * @param {Event} ev The start event.
- * @type Event.Custom
- */
- START = 'start',
-
- /**
- * @event tween
- * @description fires every frame of the animation.
- * @param {Event} ev The tween event.
- * @type Event.Custom
- */
- TWEEN = 'tween',
-
- /**
- * @event end
- * @description fires after the animation completes.
- * @param {Event} ev The end event.
- * @type Event.Custom
- */
- END = 'end',
- NODE = 'node',
- PAUSED = 'paused',
- REVERSE = 'reverse', // TODO: cleanup
- ITERATION_COUNT = 'iterationCount',
-
- NUM = Number;
-
- var _running = {},
- _timer;
-
- Y.Anim = function() {
- Y.Anim.superclass.constructor.apply(this, arguments);
- Y.Anim._instances[Y.stamp(this)] = this;
- };
-
- Y.Anim.NAME = 'anim';
-
- Y.Anim._instances = {};
-
- /**
- * Regex of properties that should use the default unit.
- *
- * @property RE_DEFAULT_UNIT
- * @static
- */
- Y.Anim.RE_DEFAULT_UNIT = /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;
-
- /**
- * The default unit to use with properties that pass the RE_DEFAULT_UNIT test.
- *
- * @property DEFAULT_UNIT
- * @static
- */
- Y.Anim.DEFAULT_UNIT = 'px';
-
- Y.Anim.DEFAULT_EASING = function (t, b, c, d) {
- return c * t / d + b; // linear easing
- };
-
- /**
- * Time in milliseconds passed to setInterval for frame processing
- *
- * @property intervalTime
- * @default 20
- * @static
- */
- Y.Anim._intervalTime = 20;
-
- /**
- * Bucket for custom getters and setters
- *
- * @property behaviors
- * @static
- */
- Y.Anim.behaviors = {
- left: {
- get: function(anim, attr) {
- return anim._getOffset(attr);
- }
- }
- };
-
- Y.Anim.behaviors.top = Y.Anim.behaviors.left;
-
- /**
- * The default setter to use when setting object properties.
- *
- * @property DEFAULT_SETTER
- * @static
- */
- Y.Anim.DEFAULT_SETTER = function(anim, att, from, to, elapsed, duration, fn, unit) {
- var node = anim._node,
- val = fn(elapsed, NUM(from), NUM(to) - NUM(from), duration);
-
- if (att in node._node.style || att in Y.DOM.CUSTOM_STYLES) {
- unit = unit || '';
- node.setStyle(att, val + unit);
- } else if (node._node.attributes[att]) {
- node.setAttribute(att, val);
- } else {
- node.set(att, val);
- }
- };
-
- /**
- * The default getter to use when getting object properties.
- *
- * @property DEFAULT_GETTER
- * @static
- */
- Y.Anim.DEFAULT_GETTER = function(anim, att) {
- var node = anim._node,
- val = '';
-
- if (att in node._node.style || att in Y.DOM.CUSTOM_STYLES) {
- val = node.getComputedStyle(att);
- } else if (node._node.attributes[att]) {
- val = node.getAttribute(att);
- } else {
- val = node.get(att);
- }
-
- return val;
- };
-
- Y.Anim.ATTRS = {
- /**
- * The object to be animated.
- * @attribute node
- * @type Node
- */
- node: {
- setter: function(node) {
- if (node) {
- if (typeof node == 'string' || node.nodeType) {
- node = Y.one(node);
- }
- }
-
- this._node = node;
- if (!node) {
- }
- return node;
- }
- },
-
- /**
- * The length of the animation. Defaults to "1" (second).
- * @attribute duration
- * @type NUM
- */
- duration: {
- value: 1
- },
-
- /**
- * The method that will provide values to the attribute(s) during the animation.
- * Defaults to "Easing.easeNone".
- * @attribute easing
- * @type Function
- */
- easing: {
- value: Y.Anim.DEFAULT_EASING,
-
- setter: function(val) {
- if (typeof val === 'string' && Y.Easing) {
- return Y.Easing[val];
- }
- }
- },
-
- /**
- * The starting values for the animated properties.
- *
- * Fields may be strings, numbers, or functions.
- * If a function is used, the return value becomes the from value.
- * If no from value is specified, the DEFAULT_GETTER will be used.
- * Supports any unit, provided it matches the "to" (or default)
- * unit (e.g. `{width: '10em', color: 'rgb(0, 0 0)', borderColor: '#ccc'}`).
- *
- * If using the default ('px' for length-based units), the unit may be omitted
- * (e.g. `{width: 100}, borderColor: 'ccc'}`, which defaults to pixels
- * and hex, respectively).
- *
- * @attribute from
- * @type Object
- */
- from: {},
-
- /**
- * The ending values for the animated properties.
- *
- * Fields may be strings, numbers, or functions.
- * Supports any unit, provided it matches the "from" (or default)
- * unit (e.g. `{width: '50%', color: 'red', borderColor: '#ccc'}`).
- *
- * If using the default ('px' for length-based units), the unit may be omitted
- * (e.g. `{width: 100, borderColor: 'ccc'}`, which defaults to pixels
- * and hex, respectively).
- *
- * @attribute to
- * @type Object
- */
- to: {},
-
- /**
- * Date stamp for the first frame of the animation.
- * @attribute startTime
- * @type Int
- * @default 0
- * @readOnly
- */
- startTime: {
- value: 0,
- readOnly: true
- },
-
- /**
- * Current time the animation has been running.
- * @attribute elapsedTime
- * @type Int
- * @default 0
- * @readOnly
- */
- elapsedTime: {
- value: 0,
- readOnly: true
- },
-
- /**
- * Whether or not the animation is currently running.
- * @attribute running
- * @type Boolean
- * @default false
- * @readOnly
- */
- running: {
- getter: function() {
- return !!_running[Y.stamp(this)];
- },
- value: false,
- readOnly: true
- },
-
- /**
- * The number of times the animation should run
- * @attribute iterations
- * @type Int
- * @default 1
- */
- iterations: {
- value: 1
- },
-
- /**
- * The number of iterations that have occurred.
- * Resets when an animation ends (reaches iteration count or stop() called).
- * @attribute iterationCount
- * @type Int
- * @default 0
- * @readOnly
- */
- iterationCount: {
- value: 0,
- readOnly: true
- },
-
- /**
- * How iterations of the animation should behave.
- * Possible values are "normal" and "alternate".
- * Normal will repeat the animation, alternate will reverse on every other pass.
- *
- * @attribute direction
- * @type String
- * @default "normal"
- */
- direction: {
- value: 'normal' // | alternate (fwd on odd, rev on even per spec)
- },
-
- /**
- * Whether or not the animation is currently paused.
- * @attribute paused
- * @type Boolean
- * @default false
- * @readOnly
- */
- paused: {
- readOnly: true,
- value: false
- },
-
- /**
- * If true, animation begins from last frame
- * @attribute reverse
- * @type Boolean
- * @default false
- */
- reverse: {
- value: false
- }
-
-
- };
-
- /**
- * Runs all animation instances.
- * @method run
- * @static
- */
- Y.Anim.run = function() {
- var instances = Y.Anim._instances;
- for (var i in instances) {
- if (instances[i].run) {
- instances[i].run();
- }
- }
- };
-
- /**
- * Pauses all animation instances.
- * @method pause
- * @static
- */
- Y.Anim.pause = function() {
- for (var i in _running) { // stop timer if nothing running
- if (_running[i].pause) {
- _running[i].pause();
- }
- }
-
- Y.Anim._stopTimer();
- };
-
- /**
- * Stops all animation instances.
- * @method stop
- * @static
- */
- Y.Anim.stop = function() {
- for (var i in _running) { // stop timer if nothing running
- if (_running[i].stop) {
- _running[i].stop();
- }
- }
- Y.Anim._stopTimer();
- };
-
- Y.Anim._startTimer = function() {
- if (!_timer) {
- _timer = setInterval(Y.Anim._runFrame, Y.Anim._intervalTime);
- }
- };
-
- Y.Anim._stopTimer = function() {
- clearInterval(_timer);
- _timer = 0;
- };
-
- /**
- * Called per Interval to handle each animation frame.
- * @method _runFrame
- * @private
- * @static
- */
- Y.Anim._runFrame = function() {
- var done = true;
- for (var anim in _running) {
- if (_running[anim]._runFrame) {
- done = false;
- _running[anim]._runFrame();
- }
- }
-
- if (done) {
- Y.Anim._stopTimer();
- }
- };
-
- Y.Anim.RE_UNITS = /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;
-
- var proto = {
- /**
- * Starts or resumes an animation.
- * @method run
- * @chainable
- */
- run: function() {
- if (this.get(PAUSED)) {
- this._resume();
- } else if (!this.get(RUNNING)) {
- this._start();
- }
- return this;
- },
-
- /**
- * Pauses the animation and
- * freezes it in its current state and time.
- * Calling run() will continue where it left off.
- * @method pause
- * @chainable
- */
- pause: function() {
- if (this.get(RUNNING)) {
- this._pause();
- }
- return this;
- },
-
- /**
- * Stops the animation and resets its time.
- * @method stop
- * @param {Boolean} finish If true, the animation will move to the last frame
- * @chainable
- */
- stop: function(finish) {
- if (this.get(RUNNING) || this.get(PAUSED)) {
- this._end(finish);
- }
- return this;
- },
-
- _added: false,
-
- _start: function() {
- this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));
- this._actualFrames = 0;
- if (!this.get(PAUSED)) {
- this._initAnimAttr();
- }
- _running[Y.stamp(this)] = this;
- Y.Anim._startTimer();
-
- this.fire(START);
- },
-
- _pause: function() {
- this._set(START_TIME, null);
- this._set(PAUSED, true);
- delete _running[Y.stamp(this)];
-
- /**
- * @event pause
- * @description fires when an animation is paused.
- * @param {Event} ev The pause event.
- * @type Event.Custom
- */
- this.fire('pause');
- },
-
- _resume: function() {
- this._set(PAUSED, false);
- _running[Y.stamp(this)] = this;
- this._set(START_TIME, new Date() - this.get(ELAPSED_TIME));
- Y.Anim._startTimer();
-
- /**
- * @event resume
- * @description fires when an animation is resumed (run from pause).
- * @param {Event} ev The pause event.
- * @type Event.Custom
- */
- this.fire('resume');
- },
-
- _end: function(finish) {
- var duration = this.get('duration') * 1000;
- if (finish) { // jump to last frame
- this._runAttrs(duration, duration, this.get(REVERSE));
- }
-
- this._set(START_TIME, null);
- this._set(ELAPSED_TIME, 0);
- this._set(PAUSED, false);
-
- delete _running[Y.stamp(this)];
- this.fire(END, {elapsed: this.get(ELAPSED_TIME)});
- },
-
- _runFrame: function() {
- var d = this._runtimeAttr.duration,
- t = new Date() - this.get(START_TIME),
- reverse = this.get(REVERSE),
- done = (t >= d),
- attribute,
- setter;
-
- this._runAttrs(t, d, reverse);
- this._actualFrames += 1;
- this._set(ELAPSED_TIME, t);
-
- this.fire(TWEEN);
- if (done) {
- this._lastFrame();
- }
- },
-
- _runAttrs: function(t, d, reverse) {
- var attr = this._runtimeAttr,
- customAttr = Y.Anim.behaviors,
- easing = attr.easing,
- lastFrame = d,
- done = false,
- attribute,
- setter,
- i;
-
- if (t >= d) {
- done = true;
- }
-
- if (reverse) {
- t = d - t;
- lastFrame = 0;
- }
-
- for (i in attr) {
- if (attr[i].to) {
- attribute = attr[i];
- setter = (i in customAttr && 'set' in customAttr[i]) ?
- customAttr[i].set : Y.Anim.DEFAULT_SETTER;
-
- if (!done) {
- setter(this, i, attribute.from, attribute.to, t, d, easing, attribute.unit);
- } else {
- setter(this, i, attribute.from, attribute.to, lastFrame, d, easing, attribute.unit);
- }
- }
- }
-
-
- },
-
- _lastFrame: function() {
- var iter = this.get('iterations'),
- iterCount = this.get(ITERATION_COUNT);
-
- iterCount += 1;
- if (iter === 'infinite' || iterCount < iter) {
- if (this.get('direction') === 'alternate') {
- this.set(REVERSE, !this.get(REVERSE)); // flip it
- }
- /**
- * @event iteration
- * @description fires when an animation begins an iteration.
- * @param {Event} ev The iteration event.
- * @type Event.Custom
- */
- this.fire('iteration');
- } else {
- iterCount = 0;
- this._end();
- }
-
- this._set(START_TIME, new Date());
- this._set(ITERATION_COUNT, iterCount);
- },
-
- _initAnimAttr: function() {
- var from = this.get('from') || {},
- to = this.get('to') || {},
- attr = {
- duration: this.get('duration') * 1000,
- easing: this.get('easing')
- },
- customAttr = Y.Anim.behaviors,
- node = this.get(NODE), // implicit attr init
- unit, begin, end;
-
- Y.each(to, function(val, name) {
- if (typeof val === 'function') {
- val = val.call(this, node);
- }
-
- begin = from[name];
- if (begin === undefined) {
- begin = (name in customAttr && 'get' in customAttr[name]) ?
- customAttr[name].get(this, name) : Y.Anim.DEFAULT_GETTER(this, name);
- } else if (typeof begin === 'function') {
- begin = begin.call(this, node);
- }
-
- var mFrom = Y.Anim.RE_UNITS.exec(begin);
- var mTo = Y.Anim.RE_UNITS.exec(val);
-
- begin = mFrom ? mFrom[1] : begin;
- end = mTo ? mTo[1] : val;
- unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units
-
- if (!unit && Y.Anim.RE_DEFAULT_UNIT.test(name)) {
- unit = Y.Anim.DEFAULT_UNIT;
- }
-
- if (!begin || !end) {
- Y.error('invalid "from" or "to" for "' + name + '"', 'Anim');
- return;
- }
-
- attr[name] = {
- from: begin,
- to: end,
- unit: unit
- };
-
- }, this);
-
- this._runtimeAttr = attr;
- },
-
-
- // TODO: move to computedStyle? (browsers dont agree on default computed offsets)
- _getOffset: function(attr) {
- var node = this._node,
- val = node.getComputedStyle(attr),
- get = (attr === 'left') ? 'getX': 'getY',
- set = (attr === 'left') ? 'setX': 'setY';
-
- if (val === 'auto') {
- var position = node.getStyle('position');
- if (position === 'absolute' || position === 'fixed') {
- val = node[get]();
- node[set](val);
- } else {
- val = 0;
- }
- }
-
- return val;
- },
-
- destructor: function() {
- delete Y.Anim._instances[Y.stamp(this)];
- }
- };
-
- Y.extend(Y.Anim, Y.Base, proto);
-
-
-}, '3.4.1' ,{requires:['base-base', 'node-style']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/anim-color'
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-color/anim-color-debug.js'
--- src/maasserver/static/js/yui/3.4.1/anim-color/anim-color-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-color/anim-color-debug.js 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-color', function(Y) {
-
-/**
- * Adds support for color properties in <code>to</code>
- * and <code>from</code> attributes.
- * @module anim
- * @submodule anim-color
- */
-
-var NUM = Number;
-
-Y.Anim.behaviors.color = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- from = Y.Color.re_RGB.exec(Y.Color.toRGB(from));
- to = Y.Color.re_RGB.exec(Y.Color.toRGB(to));
-
- if (!from || from.length < 3 || !to || to.length < 3) {
- Y.error('invalid from or to passed to color behavior');
- }
-
- anim._node.setStyle(att, 'rgb(' + [
- Math.floor(fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)),
- Math.floor(fn(elapsed, NUM(from[2]), NUM(to[2]) - NUM(from[2]), duration)),
- Math.floor(fn(elapsed, NUM(from[3]), NUM(to[3]) - NUM(from[3]), duration))
- ].join(', ') + ')');
- },
-
- // TODO: default bgcolor const
- get: function(anim, att) {
- var val = anim._node.getComputedStyle(att);
- val = (val === 'transparent') ? 'rgb(255, 255, 255)' : val;
- return val;
- }
-};
-
-Y.each(['backgroundColor',
- 'borderColor',
- 'borderTopColor',
- 'borderRightColor',
- 'borderBottomColor',
- 'borderLeftColor'],
- function(v, i) {
- Y.Anim.behaviors[v] = Y.Anim.behaviors.color;
- }
-);
-
-
-}, '3.4.1' ,{requires:['anim-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-color/anim-color-min.js'
--- src/maasserver/static/js/yui/3.4.1/anim-color/anim-color-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-color/anim-color-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-color",function(b){var a=Number;b.Anim.behaviors.color={set:function(f,d,i,h,c,g,e){i=b.Color.re_RGB.exec(b.Color.toRGB(i));h=b.Color.re_RGB.exec(b.Color.toRGB(h));if(!i||i.length<3||!h||h.length<3){b.error("invalid from or to passed to color behavior");}f._node.setStyle(d,"rgb("+[Math.floor(e(c,a(i[1]),a(h[1])-a(i[1]),g)),Math.floor(e(c,a(i[2]),a(h[2])-a(i[2]),g)),Math.floor(e(c,a(i[3]),a(h[3])-a(i[3]),g))].join(", ")+")");},get:function(d,c){var e=d._node.getComputedStyle(c);e=(e==="transparent")?"rgb(255, 255, 255)":e;return e;}};b.each(["backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],function(c,d){b.Anim.behaviors[c]=b.Anim.behaviors.color;});},"3.4.1",{requires:["anim-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-color/anim-color.js'
--- src/maasserver/static/js/yui/3.4.1/anim-color/anim-color.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-color/anim-color.js 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-color', function(Y) {
-
-/**
- * Adds support for color properties in <code>to</code>
- * and <code>from</code> attributes.
- * @module anim
- * @submodule anim-color
- */
-
-var NUM = Number;
-
-Y.Anim.behaviors.color = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- from = Y.Color.re_RGB.exec(Y.Color.toRGB(from));
- to = Y.Color.re_RGB.exec(Y.Color.toRGB(to));
-
- if (!from || from.length < 3 || !to || to.length < 3) {
- Y.error('invalid from or to passed to color behavior');
- }
-
- anim._node.setStyle(att, 'rgb(' + [
- Math.floor(fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)),
- Math.floor(fn(elapsed, NUM(from[2]), NUM(to[2]) - NUM(from[2]), duration)),
- Math.floor(fn(elapsed, NUM(from[3]), NUM(to[3]) - NUM(from[3]), duration))
- ].join(', ') + ')');
- },
-
- // TODO: default bgcolor const
- get: function(anim, att) {
- var val = anim._node.getComputedStyle(att);
- val = (val === 'transparent') ? 'rgb(255, 255, 255)' : val;
- return val;
- }
-};
-
-Y.each(['backgroundColor',
- 'borderColor',
- 'borderTopColor',
- 'borderRightColor',
- 'borderBottomColor',
- 'borderLeftColor'],
- function(v, i) {
- Y.Anim.behaviors[v] = Y.Anim.behaviors.color;
- }
-);
-
-
-}, '3.4.1' ,{requires:['anim-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/anim-curve'
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve-debug.js'
--- src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve-debug.js 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-curve', function(Y) {
-
-/**
- * Adds support for the <code>curve</code> property for the <code>to</code>
- * attribute. A curve is zero or more control points and an end point.
- * @module anim
- * @submodule anim-curve
- */
-
-Y.Anim.behaviors.curve = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- from = from.slice.call(from);
- to = to.slice.call(to);
- var t = fn(elapsed, 0, 100, duration) / 100;
- to.unshift(from);
- anim._node.setXY(Y.Anim.getBezier(to, t));
- },
-
- get: function(anim, att) {
- return anim._node.getXY();
- }
-};
-
-/**
- * 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.
- * @for Anim
- * @method getBezier
- * @static
- * @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
- */
-Y.Anim.getBezier = 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] ];
-
-};
-
-
-}, '3.4.1' ,{requires:['anim-xy']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve-min.js'
--- src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-curve",function(a){a.Anim.behaviors.curve={set:function(f,c,i,h,b,g,e){i=i.slice.call(i);h=h.slice.call(h);var d=e(b,0,100,g)/100;h.unshift(i);f._node.setXY(a.Anim.getBezier(h,d));},get:function(c,b){return c._node.getXY();}};a.Anim.getBezier=function(f,e){var g=f.length;var d=[];for(var c=0;c<g;++c){d[c]=[f[c][0],f[c][1]];}for(var b=1;b<g;++b){for(c=0;c<g-b;++c){d[c][0]=(1-e)*d[c][0]+e*d[parseInt(c+1,10)][0];d[c][1]=(1-e)*d[c][1]+e*d[parseInt(c+1,10)][1];}}return[d[0][0],d[0][1]];};},"3.4.1",{requires:["anim-xy"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve.js'
--- src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-curve/anim-curve.js 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-curve', function(Y) {
-
-/**
- * Adds support for the <code>curve</code> property for the <code>to</code>
- * attribute. A curve is zero or more control points and an end point.
- * @module anim
- * @submodule anim-curve
- */
-
-Y.Anim.behaviors.curve = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- from = from.slice.call(from);
- to = to.slice.call(to);
- var t = fn(elapsed, 0, 100, duration) / 100;
- to.unshift(from);
- anim._node.setXY(Y.Anim.getBezier(to, t));
- },
-
- get: function(anim, att) {
- return anim._node.getXY();
- }
-};
-
-/**
- * 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.
- * @for Anim
- * @method getBezier
- * @static
- * @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
- */
-Y.Anim.getBezier = 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] ];
-
-};
-
-
-}, '3.4.1' ,{requires:['anim-xy']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/anim-easing'
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing-debug.js'
--- src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing-debug.js 1970-01-01 00:00:00 +0000
@@ -1,356 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-easing', function(Y) {
-
-/*
-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.
-*/
-
-/**
- * The easing module provides methods for customizing
- * how an animation behaves during each run.
- * @class Easing
- * @module anim
- * @submodule anim-easing
- */
-
-var Easing = {
-
- /**
- * Uniform speed between points.
- * @for Easing
- * @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. (quadratic)
- * @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. (quadratic)
- * @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. (quadratic)
- * @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. (quartic)
- * @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. (quartic)
- * @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. (quartic)
- * @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) {
- var s;
- if (t === 0) {
- return b;
- }
- if ( (t /= d) === 1 ) {
- return b+c;
- }
- if (!p) {
- p = d* 0.3;
- }
-
- if (!a || a < Math.abs(c)) {
- a = c;
- s = p/4;
- }
- else {
- 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) {
- var s;
- if (t === 0) {
- return b;
- }
- if ( (t /= d) === 1 ) {
- return b+c;
- }
- if (!p) {
- p=d * 0.3;
- }
-
- if (!a || a < Math.abs(c)) {
- a = c;
- s = p / 4;
- }
- else {
- 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) {
- var s;
- if (t === 0) {
- return b;
- }
-
- if ( (t /= d/2) === 2 ) {
- return b+c;
- }
-
- if (!p) {
- p = d*(0.3*1.5);
- }
-
- if ( !a || a < Math.abs(c) ) {
- a = c;
- s = p/4;
- }
- else {
- s = p/(2*Math.PI) * Math.asin (c/a);
- }
-
- if (t < 1) {
- return -0.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 )*0.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 (s === undefined) {
- s = 1.70158;
- }
- if (t === d) {
- t -= 0.001;
- }
- 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 - Y.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 + 0.75) + b;
- } else if (t < (2.5/2.75)) {
- return c*(7.5625*(t-=(2.25/2.75))*t + 0.9375) + b;
- }
- return c*(7.5625*(t-=(2.625/2.75))*t + 0.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 Y.Easing.bounceIn(t * 2, 0, c, d) * 0.5 + b;
- }
- return Y.Easing.bounceOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
- }
-};
-
-Y.Easing = Easing;
-
-
-}, '3.4.1' ,{requires:['anim-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing-min.js'
--- src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-easing",function(b){var a={easeNone:function(f,e,h,g){return h*f/g+e;},easeIn:function(f,e,h,g){return h*(f/=g)*f+e;},easeOut:function(f,e,h,g){return -h*(f/=g)*(f-2)+e;},easeBoth:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f+e;}return -h/2*((--f)*(f-2)-1)+e;},easeInStrong:function(f,e,h,g){return h*(f/=g)*f*f*f+e;},easeOutStrong:function(f,e,h,g){return -h*((f=f/g-1)*f*f*f-1)+e;},easeBothStrong:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+e;}return -h/2*((f-=2)*f*f*f-2)+e;},elasticIn:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return -(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;},elasticOut:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return f*Math.pow(2,-10*g)*Math.sin((g*j-h)*(2*Math.PI)/i)+k+e;},elasticBoth:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j/2)===2){return e+k;}if(!i){i=j*(0.3*1.5);}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}if(g<1){return -0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i)*0.5+k+e;},backIn:function(f,e,i,h,g){if(g===undefined){g=1.70158;}if(f===h){f-=0.001;}return i*(f/=h)*f*((g+1)*f-g)+e;},backOut:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+e;},backBoth:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+e;}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+e;},bounceIn:function(f,e,h,g){return h-b.Easing.bounceOut(g-f,0,h,g)+e;},bounceOut:function(f,e,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+e;}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+e;}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+e;}}}return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+e;},bounceBoth:function(f,e,h,g){if(f<g/2){return b.Easing.bounceIn(f*2,0,h,g)*0.5+e;}return b.Easing.bounceOut(f*2-g,0,h,g)*0.5+h*0.5+e;}};b.Easing=a;},"3.4.1",{requires:["anim-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing.js'
--- src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-easing/anim-easing.js 1970-01-01 00:00:00 +0000
@@ -1,356 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-easing', function(Y) {
-
-/*
-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.
-*/
-
-/**
- * The easing module provides methods for customizing
- * how an animation behaves during each run.
- * @class Easing
- * @module anim
- * @submodule anim-easing
- */
-
-var Easing = {
-
- /**
- * Uniform speed between points.
- * @for Easing
- * @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. (quadratic)
- * @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. (quadratic)
- * @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. (quadratic)
- * @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. (quartic)
- * @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. (quartic)
- * @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. (quartic)
- * @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) {
- var s;
- if (t === 0) {
- return b;
- }
- if ( (t /= d) === 1 ) {
- return b+c;
- }
- if (!p) {
- p = d* 0.3;
- }
-
- if (!a || a < Math.abs(c)) {
- a = c;
- s = p/4;
- }
- else {
- 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) {
- var s;
- if (t === 0) {
- return b;
- }
- if ( (t /= d) === 1 ) {
- return b+c;
- }
- if (!p) {
- p=d * 0.3;
- }
-
- if (!a || a < Math.abs(c)) {
- a = c;
- s = p / 4;
- }
- else {
- 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) {
- var s;
- if (t === 0) {
- return b;
- }
-
- if ( (t /= d/2) === 2 ) {
- return b+c;
- }
-
- if (!p) {
- p = d*(0.3*1.5);
- }
-
- if ( !a || a < Math.abs(c) ) {
- a = c;
- s = p/4;
- }
- else {
- s = p/(2*Math.PI) * Math.asin (c/a);
- }
-
- if (t < 1) {
- return -0.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 )*0.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 (s === undefined) {
- s = 1.70158;
- }
- if (t === d) {
- t -= 0.001;
- }
- 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 - Y.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 + 0.75) + b;
- } else if (t < (2.5/2.75)) {
- return c*(7.5625*(t-=(2.25/2.75))*t + 0.9375) + b;
- }
- return c*(7.5625*(t-=(2.625/2.75))*t + 0.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 Y.Easing.bounceIn(t * 2, 0, c, d) * 0.5 + b;
- }
- return Y.Easing.bounceOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
- }
-};
-
-Y.Easing = Easing;
-
-
-}, '3.4.1' ,{requires:['anim-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/anim-node-plugin'
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin-debug.js'
--- src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin-debug.js 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-node-plugin', function(Y) {
-
-/**
- * Binds an Anim instance to a Node instance
- * @module anim
- * @class Plugin.NodeFX
- * @extends Base
- * @submodule anim-node-plugin
- */
-
-var NodeFX = function(config) {
- config = (config) ? Y.merge(config) : {};
- config.node = config.host;
- NodeFX.superclass.constructor.apply(this, arguments);
-};
-
-NodeFX.NAME = "nodefx";
-NodeFX.NS = "fx";
-
-Y.extend(NodeFX, Y.Anim);
-
-Y.namespace('Plugin');
-Y.Plugin.NodeFX = NodeFX;
-
-
-}, '3.4.1' ,{requires:['node-pluginhost', 'anim-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin-min.js'
--- src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-node-plugin",function(b){var a=function(c){c=(c)?b.merge(c):{};c.node=c.host;a.superclass.constructor.apply(this,arguments);};a.NAME="nodefx";a.NS="fx";b.extend(a,b.Anim);b.namespace("Plugin");b.Plugin.NodeFX=a;},"3.4.1",{requires:["node-pluginhost","anim-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin.js'
--- src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-node-plugin/anim-node-plugin.js 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-node-plugin', function(Y) {
-
-/**
- * Binds an Anim instance to a Node instance
- * @module anim
- * @class Plugin.NodeFX
- * @extends Base
- * @submodule anim-node-plugin
- */
-
-var NodeFX = function(config) {
- config = (config) ? Y.merge(config) : {};
- config.node = config.host;
- NodeFX.superclass.constructor.apply(this, arguments);
-};
-
-NodeFX.NAME = "nodefx";
-NodeFX.NS = "fx";
-
-Y.extend(NodeFX, Y.Anim);
-
-Y.namespace('Plugin');
-Y.Plugin.NodeFX = NodeFX;
-
-
-}, '3.4.1' ,{requires:['node-pluginhost', 'anim-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/anim-scroll'
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll-debug.js'
--- src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll-debug.js 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-scroll', function(Y) {
-
-/**
- * Adds support for the <code>scroll</code> property in <code>to</code>
- * and <code>from</code> attributes.
- * @module anim
- * @submodule anim-scroll
- */
-
-var NUM = Number;
-
-//TODO: deprecate for scrollTop/Left properties?
-Y.Anim.behaviors.scroll = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- var
- node = anim._node,
- val = ([
- fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
- fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
- ]);
-
- if (val[0]) {
- node.set('scrollLeft', val[0]);
- }
-
- if (val[1]) {
- node.set('scrollTop', val[1]);
- }
- },
- get: function(anim) {
- var node = anim._node;
- return [node.get('scrollLeft'), node.get('scrollTop')];
- }
-};
-
-
-
-}, '3.4.1' ,{requires:['anim-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll-min.js'
--- src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-scroll",function(b){var a=Number;b.Anim.behaviors.scroll={set:function(f,g,i,j,k,e,h){var d=f._node,c=([h(k,a(i[0]),a(j[0])-a(i[0]),e),h(k,a(i[1]),a(j[1])-a(i[1]),e)]);if(c[0]){d.set("scrollLeft",c[0]);}if(c[1]){d.set("scrollTop",c[1]);}},get:function(d){var c=d._node;return[c.get("scrollLeft"),c.get("scrollTop")];}};},"3.4.1",{requires:["anim-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll.js'
--- src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-scroll/anim-scroll.js 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-scroll', function(Y) {
-
-/**
- * Adds support for the <code>scroll</code> property in <code>to</code>
- * and <code>from</code> attributes.
- * @module anim
- * @submodule anim-scroll
- */
-
-var NUM = Number;
-
-//TODO: deprecate for scrollTop/Left properties?
-Y.Anim.behaviors.scroll = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- var
- node = anim._node,
- val = ([
- fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
- fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
- ]);
-
- if (val[0]) {
- node.set('scrollLeft', val[0]);
- }
-
- if (val[1]) {
- node.set('scrollTop', val[1]);
- }
- },
- get: function(anim) {
- var node = anim._node;
- return [node.get('scrollLeft'), node.get('scrollTop')];
- }
-};
-
-
-
-}, '3.4.1' ,{requires:['anim-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/anim-xy'
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy-debug.js'
--- src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy-debug.js 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-xy', function(Y) {
-
-/**
- * Adds support for the <code>xy</code> property in <code>from</code> and
- * <code>to</code> attributes.
- * @module anim
- * @submodule anim-xy
- */
-
-var NUM = Number;
-
-Y.Anim.behaviors.xy = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- anim._node.setXY([
- fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
- fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
- ]);
- },
- get: function(anim) {
- return anim._node.getXY();
- }
-};
-
-
-
-}, '3.4.1' ,{requires:['anim-base', 'node-screen']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy-min.js'
--- src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("anim-xy",function(b){var a=Number;b.Anim.behaviors.xy={set:function(f,d,i,h,c,g,e){f._node.setXY([e(c,a(i[0]),a(h[0])-a(i[0]),g),e(c,a(i[1]),a(h[1])-a(i[1]),g)]);},get:function(c){return c._node.getXY();}};},"3.4.1",{requires:["anim-base","node-screen"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy.js'
--- src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/anim-xy/anim-xy.js 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('anim-xy', function(Y) {
-
-/**
- * Adds support for the <code>xy</code> property in <code>from</code> and
- * <code>to</code> attributes.
- * @module anim
- * @submodule anim-xy
- */
-
-var NUM = Number;
-
-Y.Anim.behaviors.xy = {
- set: function(anim, att, from, to, elapsed, duration, fn) {
- anim._node.setXY([
- fn(elapsed, NUM(from[0]), NUM(to[0]) - NUM(from[0]), duration),
- fn(elapsed, NUM(from[1]), NUM(to[1]) - NUM(from[1]), duration)
- ]);
- },
- get: function(anim) {
- return anim._node.getXY();
- }
-};
-
-
-
-}, '3.4.1' ,{requires:['anim-base', 'node-screen']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/array-extras'
=== removed file 'src/maasserver/static/js/yui/3.4.1/array-extras/array-extras-debug.js'
--- src/maasserver/static/js/yui/3.4.1/array-extras/array-extras-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/array-extras/array-extras-debug.js 1970-01-01 00:00:00 +0000
@@ -1,365 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('array-extras', function(Y) {
-
-/**
-Adds additional utility methods to the `Y.Array` class.
-
-@module collection
-@submodule array-extras
-**/
-
-var L = Y.Lang, Native = Array.prototype, A = Y.Array;
-
-/**
-Returns the index of the last item in the array that contains the specified
-value, or `-1` if the value isn't found.
-
-@method lastIndexOf
-@param {Array} a Array to search in.
-@param {Any} val Value to search for.
-@param {Number} [fromIndex] Index at which to start searching backwards.
- Defaults to the array's length - 1. If negative, it will be taken as an offset
- from the end of the array. If the calculated index is less than 0, the array
- will not be searched and `-1` will be returned.
-@return {Number} Index of the item that contains the value, or `-1` if not
- found.
-@static
-@for Array
-**/
-A.lastIndexOf = Native.lastIndexOf ?
- function(a, val, fromIndex) {
- // An undefined fromIndex is still considered a value by some (all?)
- // native implementations, so we can't pass it unless it's actually
- // specified.
- return fromIndex || fromIndex === 0 ? a.lastIndexOf(val, fromIndex) :
- a.lastIndexOf(val);
- } :
- function(a, val, fromIndex) {
- var len = a.length,
- i = len - 1;
-
- if (fromIndex || fromIndex === 0) {
- i = Math.min(fromIndex < 0 ? len + fromIndex : fromIndex, len);
- }
-
- if (i > -1 && len > 0) {
- for (; i > -1; --i) {
- if (i in a && a[i] === val) {
- return i;
- }
- }
- }
-
- return -1;
- };
-
-/**
-Returns a copy of the specified array with duplicate items removed.
-
-@method unique
-@param {Array} a Array to dedupe.
-@return {Array} Copy of the array with duplicate items removed.
-@static
-**/
-A.unique = function(a, sort) {
- // Note: the sort param is deprecated and intentionally undocumented since
- // YUI 3.3.0. It never did what the API docs said it did (see the older
- // comment below as well).
- var i = 0,
- len = a.length,
- results = [],
- item, j;
-
- for (; i < len; ++i) {
- item = a[i];
-
- // This loop iterates over the results array in reverse order and stops
- // if it finds an item that matches the current input array item (a
- // dupe). If it makes it all the way through without finding a dupe, the
- // current item is pushed onto the results array.
- for (j = results.length; j > -1; --j) {
- if (item === results[j]) {
- break;
- }
- }
-
- if (j === -1) {
- results.push(item);
- }
- }
-
- // Note: the sort option doesn't really belong here... I think it was added
- // because there was a way to fast path the two operations together. That
- // implementation was not working, so I replaced it with the following.
- // Leaving it in so that the API doesn't get broken.
- if (sort) {
- Y.log('The sort parameter is deprecated and will be removed in a future version of YUI.', 'warn', 'deprecated');
-
- if (L.isNumber(results[0])) {
- results.sort(A.numericSort);
- } else {
- results.sort();
- }
- }
-
- return results;
-};
-
-/**
-Executes the supplied function on each item in the array. Returns a new array
-containing the items for which the supplied function returned a truthy value.
-
-@method filter
-@param {Array} a Array to filter.
-@param {Function} f Function to execute on each item.
-@param {Object} [o] Optional context object.
-@return {Array} Array of items for which the supplied function returned a
- truthy value (empty if it never returned a truthy value).
-@static
-*/
-A.filter = Native.filter ?
- function(a, f, o) {
- return a.filter(f, o);
- } :
- function(a, f, o) {
- var i = 0,
- len = a.length,
- results = [],
- item;
-
- for (; i < len; ++i) {
- if (i in a) {
- item = a[i];
-
- if (f.call(o, item, i, a)) {
- results.push(item);
- }
- }
- }
-
- return results;
- };
-
-/**
-The inverse of `Array.filter()`. Executes the supplied function on each item.
-Returns a new array containing the items for which the supplied function
-returned `false`.
-
-@method reject
-@param {Array} a the array to iterate.
-@param {Function} f the function to execute on each item.
-@param {object} [o] Optional context object.
-@return {Array} The items for which the supplied function returned `false`.
-@static
-*/
-A.reject = function(a, f, o) {
- return A.filter(a, function(item, i, a) {
- return !f.call(o, item, i, a);
- });
-};
-
-/**
-Executes the supplied function on each item in the array. Iteration stops if the
-supplied function does not return a truthy value.
-
-@method every
-@param {Array} a the array to iterate.
-@param {Function} f the function to execute on each item.
-@param {Object} [o] Optional context object.
-@return {Boolean} `true` if every item in the array returns `true` from the
- supplied function, `false` otherwise.
-@static
-*/
-A.every = Native.every ?
- function(a, f, o) {
- return a.every(f, o);
- } :
- function(a, f, o) {
- for (var i = 0, l = a.length; i < l; ++i) {
- if (i in a && !f.call(o, a[i], i, a)) {
- return false;
- }
- }
-
- return true;
- };
-
-/**
-Executes the supplied function on each item in the array and returns a new array
-containing all the values returned by the supplied function.
-
-@example
-
- // Convert an array of numbers into an array of strings.
- Y.Array.map([1, 2, 3, 4], function (item) {
- return '' + item;
- });
- // => ['1', '2', '3', '4']
-
-@method map
-@param {Array} a the array to iterate.
-@param {Function} f the function to execute on each item.
-@param {object} [o] Optional context object.
-@return {Array} A new array containing the return value of the supplied function
- for each item in the original array.
-@static
-*/
-A.map = Native.map ?
- function(a, f, o) {
- return a.map(f, o);
- } :
- function(a, f, o) {
- var i = 0,
- len = a.length,
- results = a.concat();
-
- for (; i < len; ++i) {
- if (i in a) {
- results[i] = f.call(o, a[i], i, a);
- }
- }
-
- return results;
- };
-
-
-/**
-Executes the supplied function on each item in the array, "folding" the array
-into a single value.
-
-@method reduce
-@param {Array} a Array to iterate.
-@param {Any} init Initial value to start with.
-@param {Function} f Function to execute on each item. This function should
- update and return the value of the computation. It will receive the following
- arguments:
- @param {Any} f.previousValue Value returned from the previous iteration,
- or the initial value if this is the first iteration.
- @param {Any} f.currentValue Value of the current item being iterated.
- @param {Number} f.index Index of the current item.
- @param {Array} f.array Array being iterated.
-@param {Object} [o] Optional context object.
-@return {Any} Final result from iteratively applying the given function to each
- element in the array.
-@static
-*/
-A.reduce = Native.reduce ?
- function(a, init, f, o) {
- // ES5 Array.reduce doesn't support a thisObject, so we need to
- // implement it manually
- return a.reduce(function(init, item, i, a) {
- return f.call(o, init, item, i, a);
- }, init);
- } :
- function(a, init, f, o) {
- var i = 0,
- len = a.length,
- result = init;
-
- for (; i < len; ++i) {
- if (i in a) {
- result = f.call(o, result, a[i], i, a);
- }
- }
-
- return result;
- };
-
-/**
-Executes the supplied function on each item in the array, searching for the
-first item that matches the supplied function.
-
-@method find
-@param {Array} a the array to search.
-@param {Function} f the function to execute on each item. Iteration is stopped
- as soon as this function returns `true`.
-@param {Object} [o] Optional context object.
-@return {Object} the first item that the supplied function returns `true` for,
- or `null` if it never returns `true`.
-@static
-*/
-A.find = function(a, f, o) {
- for (var i = 0, l = a.length; i < l; i++) {
- if (i in a && f.call(o, a[i], i, a)) {
- return a[i];
- }
- }
- return null;
-};
-
-/**
-Iterates over an array, returning a new array of all the elements that match the
-supplied regular expression.
-
-@method grep
-@param {Array} a Array to iterate over.
-@param {RegExp} pattern Regular expression to test against each item.
-@return {Array} All the items in the array that produce a match against the
- supplied regular expression. If no items match, an empty array is returned.
-@static
-*/
-A.grep = function(a, pattern) {
- return A.filter(a, function(item, index) {
- return pattern.test(item);
- });
-};
-
-/**
-Partitions an array into two new arrays, one with the items for which the
-supplied function returns `true`, and one with the items for which the function
-returns `false`.
-
-@method partition
-@param {Array} a Array to iterate over.
-@param {Function} f Function to execute for each item in the array. It will
- receive the following arguments:
- @param {Any} f.item Current item.
- @param {Number} f.index Index of the current item.
- @param {Array} f.array The array being iterated.
-@param {Object} [o] Optional execution context.
-@return {Object} An object with two properties: `matches` and `rejects`. Each is
- an array containing the items that were selected or rejected by the test
- function (or an empty array if none).
-@static
-*/
-A.partition = function(a, f, o) {
- var results = {
- matches: [],
- rejects: []
- };
-
- A.each(a, function(item, index) {
- var set = f.call(o, item, index, a) ? results.matches : results.rejects;
- set.push(item);
- });
-
- return results;
-};
-
-/**
-Creates an array of arrays by pairing the corresponding elements of two arrays
-together into a new array.
-
-@method zip
-@param {Array} a Array to iterate over.
-@param {Array} a2 Another array whose values will be paired with values of the
- first array.
-@return {Array} An array of arrays formed by pairing each element of the first
- array with an item in the second array having the corresponding index.
-@static
-*/
-A.zip = function(a, a2) {
- var results = [];
- A.each(a, function(item, index) {
- results.push([item, a2[index]]);
- });
- return results;
-};
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/array-extras/array-extras-min.js'
--- src/maasserver/static/js/yui/3.4.1/array-extras/array-extras-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/array-extras/array-extras-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("array-extras",function(d){var b=d.Lang,c=Array.prototype,a=d.Array;a.lastIndexOf=c.lastIndexOf?function(e,g,f){return f||f===0?e.lastIndexOf(g,f):e.lastIndexOf(g);}:function(f,j,h){var e=f.length,g=e-1;if(h||h===0){g=Math.min(h<0?e+h:h,e);}if(g>-1&&e>0){for(;g>-1;--g){if(g in f&&f[g]===j){return g;}}}return -1;};a.unique=function(f,l){var k=0,e=f.length,h=[],m,g;for(;k<e;++k){m=f[k];for(g=h.length;g>-1;--g){if(m===h[g]){break;}}if(g===-1){h.push(m);}}if(l){if(b.isNumber(h[0])){h.sort(a.numericSort);}else{h.sort();}}return h;};a.filter=c.filter?function(e,g,h){return e.filter(g,h);}:function(g,l,m){var j=0,e=g.length,h=[],k;for(;j<e;++j){if(j in g){k=g[j];if(l.call(m,k,j,g)){h.push(k);}}}return h;};a.reject=function(e,g,h){return a.filter(e,function(k,j,f){return !g.call(h,k,j,f);});};a.every=c.every?function(e,g,h){return e.every(g,h);}:function(g,j,k){for(var h=0,e=g.length;h<e;++h){if(h in g&&!j.call(k,g[h],h,g)){return false;}}return true;};a.map=c.map?function(e,g,h){return e.map(g,h);}:function(g,k,l){var j=0,e=g.length,h=g.concat();for(;j<e;++j){if(j in g){h[j]=k.call(l,g[j],j,g);}}return h;};a.reduce=c.reduce?function(e,i,g,h){return e.reduce(function(l,k,j,f){return g.call(h,l,k,j,f);},i);}:function(h,m,k,l){var j=0,g=h.length,e=m;for(;j<g;++j){if(j in h){e=k.call(l,e,h[j],j,h);}}return e;};a.find=function(g,j,k){for(var h=0,e=g.length;h<e;h++){if(h in g&&j.call(k,g[h],h,g)){return g[h];}}return null;};a.grep=function(e,f){return a.filter(e,function(h,g){return f.test(h);});};a.partition=function(e,h,i){var g={matches:[],rejects:[]};a.each(e,function(j,f){var k=h.call(i,j,f,e)?g.matches:g.rejects;k.push(j);});return g;};a.zip=function(f,e){var g=[];a.each(f,function(i,h){g.push([i,e[h]]);});return g;};},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/array-extras/array-extras.js'
--- src/maasserver/static/js/yui/3.4.1/array-extras/array-extras.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/array-extras/array-extras.js 1970-01-01 00:00:00 +0000
@@ -1,364 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('array-extras', function(Y) {
-
-/**
-Adds additional utility methods to the `Y.Array` class.
-
-@module collection
-@submodule array-extras
-**/
-
-var L = Y.Lang, Native = Array.prototype, A = Y.Array;
-
-/**
-Returns the index of the last item in the array that contains the specified
-value, or `-1` if the value isn't found.
-
-@method lastIndexOf
-@param {Array} a Array to search in.
-@param {Any} val Value to search for.
-@param {Number} [fromIndex] Index at which to start searching backwards.
- Defaults to the array's length - 1. If negative, it will be taken as an offset
- from the end of the array. If the calculated index is less than 0, the array
- will not be searched and `-1` will be returned.
-@return {Number} Index of the item that contains the value, or `-1` if not
- found.
-@static
-@for Array
-**/
-A.lastIndexOf = Native.lastIndexOf ?
- function(a, val, fromIndex) {
- // An undefined fromIndex is still considered a value by some (all?)
- // native implementations, so we can't pass it unless it's actually
- // specified.
- return fromIndex || fromIndex === 0 ? a.lastIndexOf(val, fromIndex) :
- a.lastIndexOf(val);
- } :
- function(a, val, fromIndex) {
- var len = a.length,
- i = len - 1;
-
- if (fromIndex || fromIndex === 0) {
- i = Math.min(fromIndex < 0 ? len + fromIndex : fromIndex, len);
- }
-
- if (i > -1 && len > 0) {
- for (; i > -1; --i) {
- if (i in a && a[i] === val) {
- return i;
- }
- }
- }
-
- return -1;
- };
-
-/**
-Returns a copy of the specified array with duplicate items removed.
-
-@method unique
-@param {Array} a Array to dedupe.
-@return {Array} Copy of the array with duplicate items removed.
-@static
-**/
-A.unique = function(a, sort) {
- // Note: the sort param is deprecated and intentionally undocumented since
- // YUI 3.3.0. It never did what the API docs said it did (see the older
- // comment below as well).
- var i = 0,
- len = a.length,
- results = [],
- item, j;
-
- for (; i < len; ++i) {
- item = a[i];
-
- // This loop iterates over the results array in reverse order and stops
- // if it finds an item that matches the current input array item (a
- // dupe). If it makes it all the way through without finding a dupe, the
- // current item is pushed onto the results array.
- for (j = results.length; j > -1; --j) {
- if (item === results[j]) {
- break;
- }
- }
-
- if (j === -1) {
- results.push(item);
- }
- }
-
- // Note: the sort option doesn't really belong here... I think it was added
- // because there was a way to fast path the two operations together. That
- // implementation was not working, so I replaced it with the following.
- // Leaving it in so that the API doesn't get broken.
- if (sort) {
-
- if (L.isNumber(results[0])) {
- results.sort(A.numericSort);
- } else {
- results.sort();
- }
- }
-
- return results;
-};
-
-/**
-Executes the supplied function on each item in the array. Returns a new array
-containing the items for which the supplied function returned a truthy value.
-
-@method filter
-@param {Array} a Array to filter.
-@param {Function} f Function to execute on each item.
-@param {Object} [o] Optional context object.
-@return {Array} Array of items for which the supplied function returned a
- truthy value (empty if it never returned a truthy value).
-@static
-*/
-A.filter = Native.filter ?
- function(a, f, o) {
- return a.filter(f, o);
- } :
- function(a, f, o) {
- var i = 0,
- len = a.length,
- results = [],
- item;
-
- for (; i < len; ++i) {
- if (i in a) {
- item = a[i];
-
- if (f.call(o, item, i, a)) {
- results.push(item);
- }
- }
- }
-
- return results;
- };
-
-/**
-The inverse of `Array.filter()`. Executes the supplied function on each item.
-Returns a new array containing the items for which the supplied function
-returned `false`.
-
-@method reject
-@param {Array} a the array to iterate.
-@param {Function} f the function to execute on each item.
-@param {object} [o] Optional context object.
-@return {Array} The items for which the supplied function returned `false`.
-@static
-*/
-A.reject = function(a, f, o) {
- return A.filter(a, function(item, i, a) {
- return !f.call(o, item, i, a);
- });
-};
-
-/**
-Executes the supplied function on each item in the array. Iteration stops if the
-supplied function does not return a truthy value.
-
-@method every
-@param {Array} a the array to iterate.
-@param {Function} f the function to execute on each item.
-@param {Object} [o] Optional context object.
-@return {Boolean} `true` if every item in the array returns `true` from the
- supplied function, `false` otherwise.
-@static
-*/
-A.every = Native.every ?
- function(a, f, o) {
- return a.every(f, o);
- } :
- function(a, f, o) {
- for (var i = 0, l = a.length; i < l; ++i) {
- if (i in a && !f.call(o, a[i], i, a)) {
- return false;
- }
- }
-
- return true;
- };
-
-/**
-Executes the supplied function on each item in the array and returns a new array
-containing all the values returned by the supplied function.
-
-@example
-
- // Convert an array of numbers into an array of strings.
- Y.Array.map([1, 2, 3, 4], function (item) {
- return '' + item;
- });
- // => ['1', '2', '3', '4']
-
-@method map
-@param {Array} a the array to iterate.
-@param {Function} f the function to execute on each item.
-@param {object} [o] Optional context object.
-@return {Array} A new array containing the return value of the supplied function
- for each item in the original array.
-@static
-*/
-A.map = Native.map ?
- function(a, f, o) {
- return a.map(f, o);
- } :
- function(a, f, o) {
- var i = 0,
- len = a.length,
- results = a.concat();
-
- for (; i < len; ++i) {
- if (i in a) {
- results[i] = f.call(o, a[i], i, a);
- }
- }
-
- return results;
- };
-
-
-/**
-Executes the supplied function on each item in the array, "folding" the array
-into a single value.
-
-@method reduce
-@param {Array} a Array to iterate.
-@param {Any} init Initial value to start with.
-@param {Function} f Function to execute on each item. This function should
- update and return the value of the computation. It will receive the following
- arguments:
- @param {Any} f.previousValue Value returned from the previous iteration,
- or the initial value if this is the first iteration.
- @param {Any} f.currentValue Value of the current item being iterated.
- @param {Number} f.index Index of the current item.
- @param {Array} f.array Array being iterated.
-@param {Object} [o] Optional context object.
-@return {Any} Final result from iteratively applying the given function to each
- element in the array.
-@static
-*/
-A.reduce = Native.reduce ?
- function(a, init, f, o) {
- // ES5 Array.reduce doesn't support a thisObject, so we need to
- // implement it manually
- return a.reduce(function(init, item, i, a) {
- return f.call(o, init, item, i, a);
- }, init);
- } :
- function(a, init, f, o) {
- var i = 0,
- len = a.length,
- result = init;
-
- for (; i < len; ++i) {
- if (i in a) {
- result = f.call(o, result, a[i], i, a);
- }
- }
-
- return result;
- };
-
-/**
-Executes the supplied function on each item in the array, searching for the
-first item that matches the supplied function.
-
-@method find
-@param {Array} a the array to search.
-@param {Function} f the function to execute on each item. Iteration is stopped
- as soon as this function returns `true`.
-@param {Object} [o] Optional context object.
-@return {Object} the first item that the supplied function returns `true` for,
- or `null` if it never returns `true`.
-@static
-*/
-A.find = function(a, f, o) {
- for (var i = 0, l = a.length; i < l; i++) {
- if (i in a && f.call(o, a[i], i, a)) {
- return a[i];
- }
- }
- return null;
-};
-
-/**
-Iterates over an array, returning a new array of all the elements that match the
-supplied regular expression.
-
-@method grep
-@param {Array} a Array to iterate over.
-@param {RegExp} pattern Regular expression to test against each item.
-@return {Array} All the items in the array that produce a match against the
- supplied regular expression. If no items match, an empty array is returned.
-@static
-*/
-A.grep = function(a, pattern) {
- return A.filter(a, function(item, index) {
- return pattern.test(item);
- });
-};
-
-/**
-Partitions an array into two new arrays, one with the items for which the
-supplied function returns `true`, and one with the items for which the function
-returns `false`.
-
-@method partition
-@param {Array} a Array to iterate over.
-@param {Function} f Function to execute for each item in the array. It will
- receive the following arguments:
- @param {Any} f.item Current item.
- @param {Number} f.index Index of the current item.
- @param {Array} f.array The array being iterated.
-@param {Object} [o] Optional execution context.
-@return {Object} An object with two properties: `matches` and `rejects`. Each is
- an array containing the items that were selected or rejected by the test
- function (or an empty array if none).
-@static
-*/
-A.partition = function(a, f, o) {
- var results = {
- matches: [],
- rejects: []
- };
-
- A.each(a, function(item, index) {
- var set = f.call(o, item, index, a) ? results.matches : results.rejects;
- set.push(item);
- });
-
- return results;
-};
-
-/**
-Creates an array of arrays by pairing the corresponding elements of two arrays
-together into a new array.
-
-@method zip
-@param {Array} a Array to iterate over.
-@param {Array} a2 Another array whose values will be paired with values of the
- first array.
-@return {Array} An array of arrays formed by pairing each element of the first
- array with an item in the second array having the corresponding index.
-@static
-*/
-A.zip = function(a, a2) {
- var results = [];
- A.each(a, function(item, index) {
- results.push([item, a2[index]]);
- });
- return results;
-};
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/array-invoke'
=== removed file 'src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke-debug.js'
--- src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke-debug.js 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('array-invoke', function(Y) {
-
-/**
-@module collection
-@submodule array-invoke
-*/
-
-/**
-Executes a named method on each item in an array of objects. Items in the array
-that do not have a function by that name will be skipped.
-
-@example
-
- Y.Array.invoke(arrayOfDrags, 'plug', Y.Plugin.DDProxy);
-
-@method invoke
-@param {Array} items Array of objects supporting the named method.
-@param {String} name the name of the method to execute on each item.
-@param {Any} [args*] Any number of additional args are passed as parameters to
- the execution of the named method.
-@return {Array} All return values, indexed according to the item index.
-@static
-@for Array
-**/
-Y.Array.invoke = function(items, name) {
- var args = Y.Array(arguments, 2, true),
- isFunction = Y.Lang.isFunction,
- ret = [];
-
- Y.Array.each(Y.Array(items), function(item, i) {
- if (isFunction(item[name])) {
- ret[i] = item[name].apply(item, args);
- }
- });
-
- return ret;
-};
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke-min.js'
--- src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("array-invoke",function(a){a.Array.invoke=function(b,e){var d=a.Array(arguments,2,true),f=a.Lang.isFunction,c=[];a.Array.each(a.Array(b),function(h,g){if(f(h[e])){c[g]=h[e].apply(h,d);}});return c;};},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke.js'
--- src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/array-invoke/array-invoke.js 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('array-invoke', function(Y) {
-
-/**
-@module collection
-@submodule array-invoke
-*/
-
-/**
-Executes a named method on each item in an array of objects. Items in the array
-that do not have a function by that name will be skipped.
-
-@example
-
- Y.Array.invoke(arrayOfDrags, 'plug', Y.Plugin.DDProxy);
-
-@method invoke
-@param {Array} items Array of objects supporting the named method.
-@param {String} name the name of the method to execute on each item.
-@param {Any} [args*] Any number of additional args are passed as parameters to
- the execution of the named method.
-@return {Array} All return values, indexed according to the item index.
-@static
-@for Array
-**/
-Y.Array.invoke = function(items, name) {
- var args = Y.Array(arguments, 2, true),
- isFunction = Y.Lang.isFunction,
- ret = [];
-
- Y.Array.each(Y.Array(items), function(item, i) {
- if (isFunction(item[name])) {
- ret[i] = item[name].apply(item, args);
- }
- });
-
- return ret;
-};
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/arraylist'
=== removed directory 'src/maasserver/static/js/yui/3.4.1/arraylist-add'
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add-debug.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add-debug.js 1970-01-01 00:00:00 +0000
@@ -1,90 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraylist-add', function(Y) {
-
-/**
- * Collection utilities beyond what is provided in the YUI core
- * @module collection
- * @main collection
- * @submodule arraylist-add
- */
-
-/*
- * Adds methods add and remove to Y.ArrayList
- */
-Y.mix(Y.ArrayList.prototype, {
-
- /**
- * Add a single item to the ArrayList. Does not prevent duplicates.
- *
- * @method add
- * @param { mixed } item Item presumably of the same type as others in the
- * ArrayList.
- * @param {Number} index (Optional.) Number representing the position at
- * which the item should be inserted.
- * @return {ArrayList} the instance.
- * @for ArrayList
- * @chainable
- */
- add: function(item, index) {
- var items = this._items;
-
- if (Y.Lang.isNumber(index)) {
- items.splice(index, 0, item);
- }
- else {
- items.push(item);
- }
-
- return this;
- },
-
- /**
- * Removes first or all occurrences of an item to the ArrayList. If a
- * comparator is not provided, uses itemsAreEqual method to determine
- * matches.
- *
- * @method remove
- * @param { mixed } needle Item to find and remove from the list.
- * @param { Boolean } all If true, remove all occurrences.
- * @param { Function } comparator optional a/b function to test equivalence.
- * @return {ArrayList} the instance.
- * @for ArrayList
- * @chainable
- */
- remove: function(needle, all, comparator) {
- comparator = comparator || this.itemsAreEqual;
-
- for (var i = this._items.length - 1; i >= 0; --i) {
- if (comparator.call(this, needle, this.item(i))) {
- this._items.splice(i, 1);
- if (!all) {
- break;
- }
- }
- }
-
- return this;
- },
-
- /**
- * Default comparator for items stored in this list. Used by remove().
- *
- * @method itemsAreEqual
- * @param { mixed } a item to test equivalence with.
- * @param { mixed } b other item to test equivalance.
- * @return { Boolean } true if items are deemed equivalent.
- * @for ArrayList
- */
- itemsAreEqual: function(a, b) {
- return a === b;
- }
-
-});
-
-
-}, '3.4.1' ,{requires:['arraylist']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add-min.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("arraylist-add",function(a){a.mix(a.ArrayList.prototype,{add:function(d,c){var b=this._items;if(a.Lang.isNumber(c)){b.splice(c,0,d);}else{b.push(d);}return this;},remove:function(e,d,b){b=b||this.itemsAreEqual;for(var c=this._items.length-1;c>=0;--c){if(b.call(this,e,this.item(c))){this._items.splice(c,1);if(!d){break;}}}return this;},itemsAreEqual:function(d,c){return d===c;}});},"3.4.1",{requires:["arraylist"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist-add/arraylist-add.js 1970-01-01 00:00:00 +0000
@@ -1,90 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraylist-add', function(Y) {
-
-/**
- * Collection utilities beyond what is provided in the YUI core
- * @module collection
- * @main collection
- * @submodule arraylist-add
- */
-
-/*
- * Adds methods add and remove to Y.ArrayList
- */
-Y.mix(Y.ArrayList.prototype, {
-
- /**
- * Add a single item to the ArrayList. Does not prevent duplicates.
- *
- * @method add
- * @param { mixed } item Item presumably of the same type as others in the
- * ArrayList.
- * @param {Number} index (Optional.) Number representing the position at
- * which the item should be inserted.
- * @return {ArrayList} the instance.
- * @for ArrayList
- * @chainable
- */
- add: function(item, index) {
- var items = this._items;
-
- if (Y.Lang.isNumber(index)) {
- items.splice(index, 0, item);
- }
- else {
- items.push(item);
- }
-
- return this;
- },
-
- /**
- * Removes first or all occurrences of an item to the ArrayList. If a
- * comparator is not provided, uses itemsAreEqual method to determine
- * matches.
- *
- * @method remove
- * @param { mixed } needle Item to find and remove from the list.
- * @param { Boolean } all If true, remove all occurrences.
- * @param { Function } comparator optional a/b function to test equivalence.
- * @return {ArrayList} the instance.
- * @for ArrayList
- * @chainable
- */
- remove: function(needle, all, comparator) {
- comparator = comparator || this.itemsAreEqual;
-
- for (var i = this._items.length - 1; i >= 0; --i) {
- if (comparator.call(this, needle, this.item(i))) {
- this._items.splice(i, 1);
- if (!all) {
- break;
- }
- }
- }
-
- return this;
- },
-
- /**
- * Default comparator for items stored in this list. Used by remove().
- *
- * @method itemsAreEqual
- * @param { mixed } a item to test equivalence with.
- * @param { mixed } b other item to test equivalance.
- * @return { Boolean } true if items are deemed equivalent.
- * @for ArrayList
- */
- itemsAreEqual: function(a, b) {
- return a === b;
- }
-
-});
-
-
-}, '3.4.1' ,{requires:['arraylist']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/arraylist-filter'
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter-debug.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter-debug.js 1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraylist-filter', function(Y) {
-
-/**
- * Collection utilities beyond what is provided in the YUI core
- * @module collection
- * @submodule arraylist-filter
- */
-
-/*
- * Adds filter method to ArrayList prototype
- */
-Y.mix(Y.ArrayList.prototype, {
-
- /**
- * <p>Create a new ArrayList (or augmenting class instance) from a subset
- * of items as determined by the boolean function passed as the
- * argument. The original ArrayList is unchanged.</p>
- *
- * <p>The validator signature is <code>validator( item )</code>.</p>
- *
- * @method filter
- * @param { Function } validator Boolean function to determine in or out.
- * @return { ArrayList } New instance based on who passed the validator.
- * @for ArrayList
- */
- filter: function(validator) {
- var items = [];
-
- Y.Array.each(this._items, function(item, i) {
- item = this.item(i);
-
- if (validator(item)) {
- items.push(item);
- }
- }, this);
-
- return new this.constructor(items);
- }
-
-});
-
-
-}, '3.4.1' ,{requires:['arraylist']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter-min.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("arraylist-filter",function(a){a.mix(a.ArrayList.prototype,{filter:function(c){var b=[];a.Array.each(this._items,function(e,d){e=this.item(d);if(c(e)){b.push(e);}},this);return new this.constructor(b);}});},"3.4.1",{requires:["arraylist"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist-filter/arraylist-filter.js 1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraylist-filter', function(Y) {
-
-/**
- * Collection utilities beyond what is provided in the YUI core
- * @module collection
- * @submodule arraylist-filter
- */
-
-/*
- * Adds filter method to ArrayList prototype
- */
-Y.mix(Y.ArrayList.prototype, {
-
- /**
- * <p>Create a new ArrayList (or augmenting class instance) from a subset
- * of items as determined by the boolean function passed as the
- * argument. The original ArrayList is unchanged.</p>
- *
- * <p>The validator signature is <code>validator( item )</code>.</p>
- *
- * @method filter
- * @param { Function } validator Boolean function to determine in or out.
- * @return { ArrayList } New instance based on who passed the validator.
- * @for ArrayList
- */
- filter: function(validator) {
- var items = [];
-
- Y.Array.each(this._items, function(item, i) {
- item = this.item(i);
-
- if (validator(item)) {
- items.push(item);
- }
- }, this);
-
- return new this.constructor(items);
- }
-
-});
-
-
-}, '3.4.1' ,{requires:['arraylist']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist/arraylist-debug.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist/arraylist-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist/arraylist-debug.js 1970-01-01 00:00:00 +0000
@@ -1,218 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraylist', function(Y) {
-
-/**
- * Collection utilities beyond what is provided in the YUI core
- * @module collection
- * @submodule arraylist
- */
-
-var YArray = Y.Array,
- YArray_each = YArray.each,
- ArrayListProto;
-
-/**
- * Generic ArrayList class for managing lists of items and iterating operations
- * over them. The targeted use for this class is for augmentation onto a
- * class that is responsible for managing multiple instances of another class
- * (e.g. NodeList for Nodes). The recommended use is to augment your class with
- * ArrayList, then use ArrayList.addMethod to mirror the API of the constituent
- * items on the list's API.
- *
- * The default implementation creates immutable lists, but mutability can be
- * provided via the arraylist-add submodule or by implementing mutation methods
- * directly on the augmented class's prototype.
- *
- * @class ArrayList
- * @constructor
- * @param items { Array } array of items this list will be responsible for
- */
-function ArrayList( items ) {
- if ( items !== undefined ) {
- this._items = Y.Lang.isArray( items ) ? items : YArray( items );
- } else {
- // ||= to support lazy initialization from augment
- this._items = this._items || [];
- }
-}
-
-ArrayListProto = {
- /**
- * Get an item by index from the list. Override this method if managing a
- * list of objects that have a different public representation (e.g. Node
- * instances vs DOM nodes). The iteration methods that accept a user
- * function will use this method for access list items for operation.
- *
- * @method item
- * @param i { Integer } index to fetch
- * @return { mixed } the item at the requested index
- */
- item: function ( i ) {
- return this._items[i];
- },
-
- /**
- * <p>Execute a function on each item of the list, optionally providing a
- * custom execution context. Default context is the item.</p>
- *
- * <p>The callback signature is <code>callback( item, index )</code>.</p>
- *
- * @method each
- * @param fn { Function } the function to execute
- * @param context { mixed } optional override 'this' in the function
- * @return { ArrayList } this instance
- * @chainable
- */
- each: function ( fn, context ) {
- YArray_each( this._items, function ( item, i ) {
- item = this.item( i );
-
- fn.call( context || item, item, i, this );
- }, this);
-
- return this;
- },
-
- /**
- * <p>Execute a function on each item of the list, optionally providing a
- * custom execution context. Default context is the item.</p>
- *
- * <p>The callback signature is <code>callback( item, index )</code>.</p>
- *
- * <p>Unlike <code>each</code>, if the callback returns true, the
- * iteratation will stop.</p>
- *
- * @method some
- * @param fn { Function } the function to execute
- * @param context { mixed } optional override 'this' in the function
- * @return { Boolean } True if the function returned true on an item
- */
- some: function ( fn, context ) {
- return YArray.some( this._items, function ( item, i ) {
- item = this.item( i );
-
- return fn.call( context || item, item, i, this );
- }, this);
- },
-
- /**
- * Finds the first index of the needle in the managed array of items.
- *
- * @method indexOf
- * @param needle { mixed } The item to search for
- * @return { Integer } Array index if found. Otherwise -1
- */
- indexOf: function ( needle ) {
- return YArray.indexOf( this._items, needle );
- },
-
- /**
- * How many items are in this list?
- *
- * @method size
- * @return { Integer } Number of items in the list
- */
- size: function () {
- return this._items.length;
- },
-
- /**
- * Is this instance managing any items?
- *
- * @method isEmpty
- * @return { Boolean } true if 1 or more items are being managed
- */
- isEmpty: function () {
- return !this.size();
- },
-
- /**
- * Provides an array-like representation for JSON.stringify.
- *
- * @method toJSON
- * @return { Array } an array representation of the ArrayList
- */
- toJSON: function () {
- return this._items;
- }
-};
-// Default implementation does not distinguish between public and private
-// item getter
-/**
- * Protected method for optimizations that may be appropriate for API
- * mirroring. Similar in functionality to <code>item</code>, but is used by
- * methods added with <code>ArrayList.addMethod()</code>.
- *
- * @method _item
- * @protected
- * @param i { Integer } Index of item to fetch
- * @return { mixed } The item appropriate for pass through API methods
- */
-ArrayListProto._item = ArrayListProto.item;
-
-ArrayList.prototype = ArrayListProto;
-
-Y.mix( ArrayList, {
-
- /**
- * <p>Adds a pass through method to dest (typically the prototype of a list
- * class) that calls the named method on each item in the list with
- * whatever parameters are passed in. Allows for API indirection via list
- * instances.</p>
- *
- * <p>Accepts a single string name or an array of string names.</p>
- *
- * <pre><code>list.each( function ( item ) {
- * item.methodName( 1, 2, 3 );
- * } );
- * // becomes
- * list.methodName( 1, 2, 3 );</code></pre>
- *
- * <p>Additionally, the pass through methods use the item retrieved by the
- * <code>_item</code> method in case there is any special behavior that is
- * appropriate for API mirroring.</p>
- *
- * <p>If the iterated method returns a value, the return value from the
- * added method will be an array of values with each value being at the
- * corresponding index for that item. If the iterated method does not
- * return a value, the added method will be chainable.
- *
- * @method addMethod
- * @static
- * @param dest {Object} Object or prototype to receive the iterator method
- * @param name {String|String[]} Name of method of methods to create
- */
- addMethod: function ( dest, names ) {
-
- names = YArray( names );
-
- YArray_each( names, function ( name ) {
- dest[ name ] = function () {
- var args = YArray( arguments, 0, true ),
- ret = [];
-
- YArray_each( this._items, function ( item, i ) {
- item = this._item( i );
-
- var result = item[ name ].apply( item, args );
-
- if ( result !== undefined && result !== item ) {
- ret[i] = result;
- }
- }, this);
-
- return ret.length ? ret : this;
- };
- } );
- }
-} );
-
-Y.ArrayList = ArrayList;
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist/arraylist-min.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist/arraylist-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist/arraylist-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("arraylist",function(e){var d=e.Array,c=d.each,a;function b(f){if(f!==undefined){this._items=e.Lang.isArray(f)?f:d(f);}else{this._items=this._items||[];}}a={item:function(f){return this._items[f];},each:function(g,f){c(this._items,function(j,h){j=this.item(h);g.call(f||j,j,h,this);},this);return this;},some:function(g,f){return d.some(this._items,function(j,h){j=this.item(h);return g.call(f||j,j,h,this);},this);},indexOf:function(f){return d.indexOf(this._items,f);},size:function(){return this._items.length;},isEmpty:function(){return !this.size();},toJSON:function(){return this._items;}};a._item=a.item;b.prototype=a;e.mix(b,{addMethod:function(f,g){g=d(g);c(g,function(h){f[h]=function(){var j=d(arguments,0,true),i=[];c(this._items,function(m,l){m=this._item(l);var k=m[h].apply(m,j);if(k!==undefined&&k!==m){i[l]=k;}},this);return i.length?i:this;};});}});e.ArrayList=b;},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraylist/arraylist.js'
--- src/maasserver/static/js/yui/3.4.1/arraylist/arraylist.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraylist/arraylist.js 1970-01-01 00:00:00 +0000
@@ -1,218 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraylist', function(Y) {
-
-/**
- * Collection utilities beyond what is provided in the YUI core
- * @module collection
- * @submodule arraylist
- */
-
-var YArray = Y.Array,
- YArray_each = YArray.each,
- ArrayListProto;
-
-/**
- * Generic ArrayList class for managing lists of items and iterating operations
- * over them. The targeted use for this class is for augmentation onto a
- * class that is responsible for managing multiple instances of another class
- * (e.g. NodeList for Nodes). The recommended use is to augment your class with
- * ArrayList, then use ArrayList.addMethod to mirror the API of the constituent
- * items on the list's API.
- *
- * The default implementation creates immutable lists, but mutability can be
- * provided via the arraylist-add submodule or by implementing mutation methods
- * directly on the augmented class's prototype.
- *
- * @class ArrayList
- * @constructor
- * @param items { Array } array of items this list will be responsible for
- */
-function ArrayList( items ) {
- if ( items !== undefined ) {
- this._items = Y.Lang.isArray( items ) ? items : YArray( items );
- } else {
- // ||= to support lazy initialization from augment
- this._items = this._items || [];
- }
-}
-
-ArrayListProto = {
- /**
- * Get an item by index from the list. Override this method if managing a
- * list of objects that have a different public representation (e.g. Node
- * instances vs DOM nodes). The iteration methods that accept a user
- * function will use this method for access list items for operation.
- *
- * @method item
- * @param i { Integer } index to fetch
- * @return { mixed } the item at the requested index
- */
- item: function ( i ) {
- return this._items[i];
- },
-
- /**
- * <p>Execute a function on each item of the list, optionally providing a
- * custom execution context. Default context is the item.</p>
- *
- * <p>The callback signature is <code>callback( item, index )</code>.</p>
- *
- * @method each
- * @param fn { Function } the function to execute
- * @param context { mixed } optional override 'this' in the function
- * @return { ArrayList } this instance
- * @chainable
- */
- each: function ( fn, context ) {
- YArray_each( this._items, function ( item, i ) {
- item = this.item( i );
-
- fn.call( context || item, item, i, this );
- }, this);
-
- return this;
- },
-
- /**
- * <p>Execute a function on each item of the list, optionally providing a
- * custom execution context. Default context is the item.</p>
- *
- * <p>The callback signature is <code>callback( item, index )</code>.</p>
- *
- * <p>Unlike <code>each</code>, if the callback returns true, the
- * iteratation will stop.</p>
- *
- * @method some
- * @param fn { Function } the function to execute
- * @param context { mixed } optional override 'this' in the function
- * @return { Boolean } True if the function returned true on an item
- */
- some: function ( fn, context ) {
- return YArray.some( this._items, function ( item, i ) {
- item = this.item( i );
-
- return fn.call( context || item, item, i, this );
- }, this);
- },
-
- /**
- * Finds the first index of the needle in the managed array of items.
- *
- * @method indexOf
- * @param needle { mixed } The item to search for
- * @return { Integer } Array index if found. Otherwise -1
- */
- indexOf: function ( needle ) {
- return YArray.indexOf( this._items, needle );
- },
-
- /**
- * How many items are in this list?
- *
- * @method size
- * @return { Integer } Number of items in the list
- */
- size: function () {
- return this._items.length;
- },
-
- /**
- * Is this instance managing any items?
- *
- * @method isEmpty
- * @return { Boolean } true if 1 or more items are being managed
- */
- isEmpty: function () {
- return !this.size();
- },
-
- /**
- * Provides an array-like representation for JSON.stringify.
- *
- * @method toJSON
- * @return { Array } an array representation of the ArrayList
- */
- toJSON: function () {
- return this._items;
- }
-};
-// Default implementation does not distinguish between public and private
-// item getter
-/**
- * Protected method for optimizations that may be appropriate for API
- * mirroring. Similar in functionality to <code>item</code>, but is used by
- * methods added with <code>ArrayList.addMethod()</code>.
- *
- * @method _item
- * @protected
- * @param i { Integer } Index of item to fetch
- * @return { mixed } The item appropriate for pass through API methods
- */
-ArrayListProto._item = ArrayListProto.item;
-
-ArrayList.prototype = ArrayListProto;
-
-Y.mix( ArrayList, {
-
- /**
- * <p>Adds a pass through method to dest (typically the prototype of a list
- * class) that calls the named method on each item in the list with
- * whatever parameters are passed in. Allows for API indirection via list
- * instances.</p>
- *
- * <p>Accepts a single string name or an array of string names.</p>
- *
- * <pre><code>list.each( function ( item ) {
- * item.methodName( 1, 2, 3 );
- * } );
- * // becomes
- * list.methodName( 1, 2, 3 );</code></pre>
- *
- * <p>Additionally, the pass through methods use the item retrieved by the
- * <code>_item</code> method in case there is any special behavior that is
- * appropriate for API mirroring.</p>
- *
- * <p>If the iterated method returns a value, the return value from the
- * added method will be an array of values with each value being at the
- * corresponding index for that item. If the iterated method does not
- * return a value, the added method will be chainable.
- *
- * @method addMethod
- * @static
- * @param dest {Object} Object or prototype to receive the iterator method
- * @param name {String|String[]} Name of method of methods to create
- */
- addMethod: function ( dest, names ) {
-
- names = YArray( names );
-
- YArray_each( names, function ( name ) {
- dest[ name ] = function () {
- var args = YArray( arguments, 0, true ),
- ret = [];
-
- YArray_each( this._items, function ( item, i ) {
- item = this._item( i );
-
- var result = item[ name ].apply( item, args );
-
- if ( result !== undefined && result !== item ) {
- ret[i] = result;
- }
- }, this);
-
- return ret.length ? ret : this;
- };
- } );
- }
-} );
-
-Y.ArrayList = ArrayList;
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/arraysort'
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraysort/arraysort-debug.js'
--- src/maasserver/static/js/yui/3.4.1/arraysort/arraysort-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraysort/arraysort-debug.js 1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraysort', function(Y) {
-
-/**
- * Provides a case-insenstive comparator which can be used for array sorting.
- *
- * @module arraysort
- */
-
-var LANG = Y.Lang,
- ISVALUE = LANG.isValue,
- ISSTRING = LANG.isString;
-
-/**
- * Provides a case-insenstive comparator which can be used for array sorrting.
- *
- * @class ArraySort
- */
-
-Y.ArraySort = {
- /**
- * Comparator function for simple case-insensitive string sorting.
- *
- * @method compare
- * @param a {Object} First sort argument.
- * @param b {Object} Second sort argument.
- * @param desc {Boolean} True if sort direction is descending, false if
- * sort direction is ascending.
- * @return {Boolean} Return -1 when a < b. Return 0 when a = b.
- * Return 1 when a > b.
- */
- compare: function(a, b, desc) {
- if(!ISVALUE(a)) {
- if(!ISVALUE(b)) {
- return 0;
- }
- else {
- return 1;
- }
- }
- else if(!ISVALUE(b)) {
- return -1;
- }
-
- if(ISSTRING(a)) {
- a = a.toLowerCase();
- }
- if(ISSTRING(b)) {
- b = b.toLowerCase();
- }
- if(a < b) {
- return (desc) ? 1 : -1;
- }
- else if (a > b) {
- return (desc) ? -1 : 1;
- }
- else {
- return 0;
- }
- }
-};
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraysort/arraysort-min.js'
--- src/maasserver/static/js/yui/3.4.1/arraysort/arraysort-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraysort/arraysort-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("arraysort",function(c){var b=c.Lang,a=b.isValue,d=b.isString;c.ArraySort={compare:function(f,e,g){if(!a(f)){if(!a(e)){return 0;}else{return 1;}}else{if(!a(e)){return -1;}}if(d(f)){f=f.toLowerCase();}if(d(e)){e=e.toLowerCase();}if(f<e){return(g)?1:-1;}else{if(f>e){return(g)?-1:1;}else{return 0;}}}};},"3.4.1",{requires:["yui-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/arraysort/arraysort.js'
--- src/maasserver/static/js/yui/3.4.1/arraysort/arraysort.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/arraysort/arraysort.js 1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('arraysort', function(Y) {
-
-/**
- * Provides a case-insenstive comparator which can be used for array sorting.
- *
- * @module arraysort
- */
-
-var LANG = Y.Lang,
- ISVALUE = LANG.isValue,
- ISSTRING = LANG.isString;
-
-/**
- * Provides a case-insenstive comparator which can be used for array sorrting.
- *
- * @class ArraySort
- */
-
-Y.ArraySort = {
- /**
- * Comparator function for simple case-insensitive string sorting.
- *
- * @method compare
- * @param a {Object} First sort argument.
- * @param b {Object} Second sort argument.
- * @param desc {Boolean} True if sort direction is descending, false if
- * sort direction is ascending.
- * @return {Boolean} Return -1 when a < b. Return 0 when a = b.
- * Return 1 when a > b.
- */
- compare: function(a, b, desc) {
- if(!ISVALUE(a)) {
- if(!ISVALUE(b)) {
- return 0;
- }
- else {
- return 1;
- }
- }
- else if(!ISVALUE(b)) {
- return -1;
- }
-
- if(ISSTRING(a)) {
- a = a.toLowerCase();
- }
- if(ISSTRING(b)) {
- b = b.toLowerCase();
- }
- if(a < b) {
- return (desc) ? 1 : -1;
- }
- else if (a > b) {
- return (desc) ? -1 : 1;
- }
- else {
- return 0;
- }
- }
-};
-
-
-}, '3.4.1' ,{requires:['yui-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/assets'
=== removed directory 'src/maasserver/static/js/yui/3.4.1/assets/skins'
=== removed directory 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam'
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/arrows.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/arrows.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/arrows.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/autocomplete-list.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/autocomplete-list.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/autocomplete-list.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-aclist{position:absolute;z-index:1}.yui3-aclist-hidden{visibility:hidden}.yui3-aclist-aria{left:-9999px;position:absolute}.yui3-aclist-list{list-style:none;margin:0;overflow:hidden;padding:0}.yui3-aclist-item{cursor:pointer;list-style:none;padding:2px 5px}.yui3-aclist-item-active{outline:#afafaf dotted thin}.yui3-skin-sam .yui3-aclist-content{background:#fff;border:1px solid #afafaf;-moz-box-shadow:1px 1px 4px #888;-webkit-box-shadow:1px 1px 4px #888;box-shadow:1px 1px 4px #888}.yui3-skin-sam .yui3-aclist-item-hover{background:#bfdaff}.yui3-skin-sam .yui3-aclist-item-active{background:#2647a0;color:#fff;outline:0}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/bg.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/bg.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/bg.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendar-base.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendar-base.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendar-base.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-calendar-pane{width:100%}.yui3-calendar-grid{width:100%}.yui3-calendar-left-grid{margin-right:1em}.yui3-calendar-right-grid{margin-left:1em}.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-calendar-selection-disabled{color:#999}.yui3-calendar-prevmonth-day{color:#ccc}.yui3-calendar-nextmonth-day{color:#ccc}.yui3-calendar-day-selected{background-color:#ddd}.yui3-calendar-header-label{text-align:center}.yui3-skin-sam .yui3-calendar-content{padding:10px;font-size:.8em;font-family:"Lucida Grande","Lucida Sans",Calibri,Helvetica,Arial,sans-serif;color:#000;border:1px solid gray;background:#f2f2f2;background:-moz-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#f9f9f9),color-stop(100%,#f2f2f2));background:-webkit-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-o-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-ms-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9',endColorstr='#f2f2f2',GradientType=0);background:linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);-moz-border-radius:5px;border-radius:5px}.yui3-skin-sam .yui3-calendar-grid{padding:5px;border-collapse:collapse}.yui3-skin-sam .yui3-calendar-header{padding-bottom:10px}.yui3-skin-sam .yui3-calendar-header-label h4{margin:0;font-size:1em;font-weight:bold}.yui3-skin-sam .yui3-calendar-selection-disabled{color:#555}.yui3-skin-sam .yui3-calendar-day,.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-skin-sam .yui3-calendar-nextmonth-day{border:1px solid #ccc;background:#fff;text-align:center}.yui3-skin-sam .yui3-calendar-day:hover{background:#06c;color:#fff}.yui3-skin-sam .yui3-calendar-selection-disabled,.yui3-skin-sam .yui3-calendar-selection-disabled:hover{color:#a6a6a6;background:#ccc}.yui3-skin-sam .yui3-calendar-weekday{font-weight:bold}.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-calendar-nextmonth-day{color:#a6a6a6}.yui3-skin-sam .yui3-calendar-day{font-weight:bold}.yui3-skin-sam .yui3-calendar-day-selected{background-color:#b3d4ff;color:#000}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendar.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendar.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendar.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-calendar-day{cursor:pointer}.yui3-calendar-selection-disabled{cursor:default}.yui3-calendar-prevmonth-day{cursor:default}.yui3-calendar-nextmonth-day{cursor:default}.yui3-calendar-content:hover .yui3-calendar-day,.yui3-calendar-content:hover .yui3-calendar-prevmonth-day,.yui3-calendar-content:hover .yui3-calendar-nextmonth-day{-moz-user-select:none}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendarnavigator.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendarnavigator.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/calendarnavigator.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-calendar-header{padding-left:15px;padding-right:15px}.yui3-calendar-header-label{width:100%}.yui3-calendarnav-prevmonth{width:15px;margin-left:-15px;cursor:pointer}.yui3-calendarnav-nextmonth{width:15px;margin-right:-15px;cursor:pointer;text-align:right}.yui3-calendarnav-prevmonth,.yui3-calendarnav-nextmonth{color:#000}.yui3-calendarnav-prevmonth:hover,.yui3-calendarnav-nextmonth:hover{color:#06c}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/console-filters.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/console-filters.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/console-filters.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-skin-sam .yui3-console-ft .yui3-console-filters-categories,.yui3-skin-sam .yui3-console-ft .yui3-console-filters-sources{text-align:left;padding:5px 0;border:1px inset;margin:0 2px}.yui3-skin-sam .yui3-console-ft .yui3-console-filters-categories{background:#fff;border-bottom:2px ridge}.yui3-skin-sam .yui3-console-ft .yui3-console-filters-sources{background:#fff;margin-bottom:2px;border-top:0 none;border-bottom-right-radius:10px;border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-moz-border-radius-bottomleft:10px;-webkit-border-bottom-right-radius:10px;-webkit-border-bottom-left-radius:10px}.yui3-skin-sam .yui3-console-filter-label{white-space:nowrap;margin-left:1ex}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/console.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/console.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/console.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-skin-sam .yui3-console-separate{position:absolute;right:1em;top:1em;z-index:999}.yui3-skin-sam .yui3-console-inline{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:top}.yui3-skin-sam .yui3-console-inline .yui3-console-content{position:relative}.yui3-skin-sam .yui3-console-content{background:#777;_background:#d8d8da url(bg.png) repeat-x 0 0;font:normal 13px/1.3 Arial,sans-serif;text-align:left;border:1px solid #777;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.yui3-skin-sam .yui3-console-hd,.yui3-skin-sam .yui3-console-bd,.yui3-skin-sam .yui3-console-ft{position:relative}.yui3-skin-sam .yui3-console-hd,.yui3-skin-sam .yui3-console-ft .yui3-console-controls{text-align:right}.yui3-skin-sam .yui3-console-hd{background:#d8d8da url(bg.png) repeat-x 0 0;padding:1ex;border:1px solid transparent;_border:0 none;border-top-right-radius:10px;border-top-left-radius:10px;-moz-border-radius-topright:10px;-moz-border-radius-topleft:10px;-webkit-border-top-right-radius:10px;-webkit-border-top-left-radius:10px}.yui3-skin-sam .yui3-console-bd{background:#fff;border-top:1px solid #777;border-bottom:1px solid #777;color:#000;font-size:11px;overflow:auto;overflow-x:auto;overflow-y:scroll;_width:100%}.yui3-skin-sam .yui3-console-ft{background:#d8d8da url(bg.png) repeat-x 0 0;border:1px solid transparent;_border:0 none;border-bottom-right-radius:10px;border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-moz-border-radius-bottomleft:10px;-webkit-border-bottom-right-radius:10px;-webkit-border-bottom-left-radius:10px}.yui3-skin-sam .yui3-console-controls{padding:4px 1ex;zoom:1}.yui3-skin-sam .yui3-console-title{color:#000;display:inline;float:left;font-weight:bold;font-size:13px;height:24px;line-height:24px;margin:0;padding-left:1ex}.yui3-skin-sam .yui3-console-pause-label{float:left}.yui3-skin-sam .yui3-console-button{line-height:1.3}.yui3-skin-sam .yui3-console-collapsed .yui3-console-bd,.yui3-skin-sam .yui3-console-collapsed .yui3-console-ft{display:none}.yui3-skin-sam .yui3-console-content.yui3-console-collapsed{-webkit-border-radius:0}.yui3-skin-sam .yui3-console-collapsed .yui3-console-hd{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:0}.yui3-skin-sam .yui3-console-entry{border-bottom:1px solid #aaa;min-height:32px;_height:32px}.yui3-skin-sam .yui3-console-entry-meta{margin:0;overflow:hidden}.yui3-skin-sam .yui3-console-entry-content{margin:0;padding:0 1ex;white-space:pre-wrap;word-wrap:break-word}.yui3-skin-sam .yui3-console-entry-meta .yui3-console-entry-src{color:#000;font-style:italic;font-weight:bold;float:right;margin:2px 5px 0 0}.yui3-skin-sam .yui3-console-entry-meta .yui3-console-entry-time{color:#777;padding-left:1ex}.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-meta .yui3-console-entry-time{color:#555}.yui3-skin-sam .yui3-console-entry-info .yui3-console-entry-meta .yui3-console-entry-cat,.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-meta .yui3-console-entry-cat,.yui3-skin-sam .yui3-console-entry-error .yui3-console-entry-meta .yui3-console-entry-cat{display:none}.yui3-skin-sam .yui3-console-entry-warn{background:#aee url(warn_error.png) no-repeat -15px 15px}.yui3-skin-sam .yui3-console-entry-error{background:#ffa url(warn_error.png) no-repeat 5px -24px;color:#900}.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-content,.yui3-skin-sam .yui3-console-entry-error .yui3-console-entry-content{padding-left:24px}.yui3-skin-sam .yui3-console-entry-cat{text-transform:uppercase;padding:1px 4px;background-color:#ccc}.yui3-skin-sam .yui3-console-entry-info .yui3-console-entry-cat{background-color:#ac2}.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-cat{background-color:#e81}.yui3-skin-sam .yui3-console-entry-error .yui3-console-entry-cat{background-color:#b00;color:#fff}.yui3-skin-sam .yui3-console-hidden{display:none}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/datatable-base.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/datatable-base.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/datatable-base.css 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-skin-sam .yui3-datatable-mask{position:absolute;z-index:9500}.yui3-datatable-tmp{position:absolute;left:-9000px}.yui3-datatable-scrollable .yui3-datatable-bd{overflow:auto}.yui3-datatable-scrollable .yui3-datatable-hd{overflow:hidden;position:relative}.yui3-datatable-scrollable .yui3-datatable-bd thead tr,.yui3-datatable-scrollable .yui3-datatable-bd thead th{position:absolute;left:-1500px}.yui3-datatable-scrollable tbody{-moz-outline:0}.yui3-skin-sam thead .yui3-datatable-sortable{cursor:pointer}.yui3-skin-sam thead .yui3-datatable-draggable{cursor:move}.yui3-datatable-coltarget{position:absolute;z-index:999}.yui3-datatable-hd{zoom:1}th.yui3-datatable-resizeable .yui3-datatable-resizerliner{position:relative}.yui3-datatable-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}.yui3-datatable-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}th.yui3-datatable-hidden .yui3-datatable-liner,td.yui3-datatable-hidden .yui3-datatable-liner,th.yui3-datatable-hidden .yui3-datatable-resizer{display:none}.yui3-datatable-editor,.yui3-datatable-editor-shim{position:absolute;z-index:9000}.yui3-skin-sam .yui3-datatable table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7f7f7f}.yui3-skin-sam .yui3-datatable thead{border-spacing:0}.yui3-skin-sam .yui3-datatable caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center}.yui3-skin-sam .yui3-datatable th{background:#d8d8da url(sprite.png) repeat-x 0 0}.yui3-skin-sam .yui3-datatable th,.yui3-skin-sam .yui3-datatable th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom}.yui3-skin-sam .yui3-datatable th{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb}.yui3-skin-sam .yui3-datatable tr.yui3-datatable-first td{border-top:1px solid #7f7f7f}.yui3-skin-sam .yui3-datatable th .yui3-datatable-liner{white-space:nowrap}.yui3-skin-sam .yui3-datatable-liner{margin:0;padding:0;padding:4px 10px 4px 10px;overflow:visible;border:0 solid black}.yui3-skin-sam .yui3-datatable-coltarget{width:5px;background-color:red}.yui3-skin-sam .yui3-datatable td{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb;text-align:left}.yui3-skin-sam .yui3-datatable-list td{border-right:0}.yui3-skin-sam .yui3-datatable-resizer{width:6px}.yui3-skin-sam .yui3-datatable-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui3-skin-sam .yui3-datatable-message{background-color:#FFF}.yui3-skin-sam .yui3-datatable-scrollable table{border:0}.yui3-skin-sam .yui3-datatable-scrollable .yui3-datatable-hd{border-left:1px solid #7f7f7f;border-top:1px solid #7f7f7f;border-right:1px solid #7f7f7f}.yui3-skin-sam .yui3-datatable-scrollable .yui3-datatable-bd{border-left:1px solid #7f7f7f;border-bottom:1px solid #7f7f7f;border-right:1px solid #7f7f7f;background-color:#FFF}.yui3-skin-sam .yui3-datatable-scrollable .yui3-datatable-data tr.yui3-datatable-last td{border-bottom:1px solid #7f7f7f}.yui3-skin-sam th.yui3-datatable-asc,.yui3-skin-sam th.yui3-datatable-desc{background:url(sprite.png) repeat-x 0 -100px}.yui3-skin-sam th.yui3-datatable-sortable .yui3-datatable-liner{padding-right:20px}.yui3-skin-sam th.yui3-datatable-asc .yui3-datatable-liner{background:url(dt-arrow-up.png) no-repeat right}.yui3-skin-sam th.yui3-datatable-desc .yui3-datatable-liner{background:url(dt-arrow-dn.png) no-repeat right}tbody .yui3-datatable-editable{cursor:pointer}.yui3-datatable-editor{text-align:left;background-color:#f2f2f2;border:1px solid #808080;padding:6px}.yui3-datatable-editor label{padding-left:4px;padding-right:6px}.yui3-datatable-editor .yui3-datatable-button{padding-top:6px;text-align:right}.yui3-datatable-editor .yui3-datatable-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px}.yui3-datatable-editor .yui3-datatable-button button.yui3-datatable-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584e0;border:1px solid #304369;color:#FFF}.yui3-datatable-editor .yui3-datatable-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000}.yui3-datatable-editor .yui3-datatable-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000}.yui3-skin-sam .yui3-datatable td{background-color:transparent}.yui3-skin-sam tr.yui3-datatable-even td{background-color:#FFF}.yui3-skin-sam tr.yui3-datatable-odd td{background-color:#edf5ff}.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-desc{background-color:#edf5ff}.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-desc{background-color:#dbeaff}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even{background-color:#FFF}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd{background-color:#FFF}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-desc{background-color:#edf5ff}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-desc{background-color:#edf5ff}.yui3-skin-sam th.yui3-datatable-highlighted,.yui3-skin-sam th.yui3-datatable-highlighted a{background-color:#b2d2ff}.yui3-skin-sam tr.yui3-datatable-highlighted,.yui3-skin-sam tr.yui3-datatable-highlighted td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-highlighted td.yui3-datatable-desc,.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-highlighted,.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-highlighted{cursor:pointer;background-color:#b2d2ff}
-.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-highlighted,.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-highlighted a{background-color:#b2d2ff}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-highlighted,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-highlighted td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-highlighted td.yui3-datatable-desc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-highlighted,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-highlighted{cursor:pointer;background-color:#b2d2ff}.yui3-skin-sam th.yui3-datatable-selected,.yui3-skin-sam th.yui3-datatable-selected a{background-color:#446cd7}.yui3-skin-sam tr.yui3-datatable-selected td,.yui3-skin-sam tr.yui3-datatable-selected td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-selected td.yui3-datatable-desc{background-color:#426fd9;color:#FFF}.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-selected,.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-selected{background-color:#446cd7;color:#FFF}.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-selected,.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-selected a{background-color:#446cd7}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-selected td,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-selected td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-selected td.yui3-datatable-desc{background-color:#426fd9;color:#FFF}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-selected,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-selected{background-color:#446cd7;color:#FFF}.yui3-skin-sam .yui3-datatable-paginator{display:block;margin:6px 0;white-space:nowrap}.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-first,.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-last,.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-selected{padding:2px 6px}.yui3-skin-sam .yui3-datatable-paginator a.yui3-datatable-first,.yui3-skin-sam .yui3-datatable-paginator a.yui3-datatable-last{text-decoration:none}.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-previous,.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-next{display:none}.yui3-skin-sam a.yui3-datatable-page{border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none;background-color:#fff}.yui3-skin-sam .yui3-datatable-selected{border:1px solid #fff;background-color:#fff}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dial.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dial.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dial.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-v\:oval,v\:shadow,v\:fill{behavior:url(#default#VML);display:inline-block;zoom:1;*display:inline}.yui3-dial{position:relative;display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline}.yui3-dial-content,.yui3-dial-ring{position:relative}.yui3-dial-handle,.yui3-dial-marker,.yui3-dial-center-button,.yui3-dial-reset-string,.yui3-dial-handle-vml,.yui3-dial-marker-vml,.yui3-dial-center-button-vml,.yui3-dial-ring-vml v\:oval,.yui3-dial-center-button-vml v\:oval{position:absolute}.yui3-dial-center-button-vml v\:oval{font-size:1px;top:0;left:0}.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden v\:oval,.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden{opacity:0;filter:alpha(opacity=0)}.yui3-skin-sam .yui3-dial-handle{background:#6c3a3a;opacity:.3;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.9) inset;cursor:pointer;font-size:1px}.yui3-skin-sam .yui3-dial-ring{background:#bebdb7;background:-moz-linear-gradient(100% 100% 135deg,#7b7a6d,#fff);background:-webkit-gradient(linear,left top,right bottom,from(#fff),to(#7b7a6d));box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset;-webkit-box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset;-moz-box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset}.yui3-skin-sam .yui3-dial-center-button{box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);-moz-box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);background:#dddbd4;background:-moz-radial-gradient(30% 30% 0deg,circle farthest-side,#fbfbf9 24%,#f2f0ea 41%,#d3d0c3 83%) repeat scroll 0 0 transparent;background:-webkit-gradient(radial,15 15,15,30 30,40,from(#fbfbf9),to(#d3d0c3),color-stop(.2,#f2f0ea));cursor:pointer;opacity:.7}.yui3-skin-sam .yui3-dial-reset-string{color:#676767;font-size:85%;text-decoration:underline}.yui3-skin-sam .yui3-dial-label{color:#808080;margin-bottom:.8em}.yui3-skin-sam .yui3-dial-value-string{margin-left:.5em;color:#000;font-size:130%}.yui3-skin-sam .yui3-dial-value{visibility:hidden;position:absolute;top:0;left:102%;width:4em}.yui3-skin-sam .yui3-dial-north-mark{position:absolute;border-left:2px solid #ccc;height:5px;width:10px;left:50%;top:-7px;font-size:1px}.yui3-skin-sam .yui3-dial-marker{background-color:#000;opacity:.2;font-size:1px}.yui3-skin-sam .yui3-dial-marker-max-min{background-color:#ab3232;opacity:.6}.yui3-skin-sam .yui3-dial-ring-vml,.yui3-skin-sam .yui3-dial-center-button-vml,.yui3-skin-sam .yui3-dial-marker v\:oval.yui3-dial-marker-max-min,.yui3-skin-sam v\:oval.yui3-dial-marker-max-min,.yui3-skin-sam .yui3-dial-marker-vml,.yui3-skin-sam .yui3-dial-handle-vml{background:0;opacity:1}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dt-arrow-dn.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dt-arrow-dn.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dt-arrow-dn.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dt-arrow-up.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dt-arrow-up.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/dt-arrow-up.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/horizontal-menu-submenu-indicator.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/horizontal-menu-submenu-indicator.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/horizontal-menu-submenu-indicator.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/horizontal-menu-submenu-toggle.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/horizontal-menu-submenu-toggle.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/horizontal-menu-submenu-toggle.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/node-flick.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/node-flick.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/node-flick.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-flick{position:relative;overflow:hidden}.yui3-flick-content{position:relative}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/node-menunav.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/node-menunav.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/node-menunav.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-menu .yui3-menu{position:absolute;z-index:1}.yui3-menu .yui3-shim{position:absolute;top:0;left:0;z-index:-1;opacity:0;filter:alpha(opacity=0);border:0;margin:0;padding:0;height:100%;width:100%}.yui3-menu-hidden{top:-10000px;left:-10000px;visibility:hidden}.yui3-menu li{list-style-type:none}.yui3-menu ul,.yui3-menu li{margin:0;padding:0}.yui3-menu-label,.yui3-menuitem-content{text-align:left;white-space:nowrap;display:block}.yui3-menu-horizontal li{float:left;width:auto}.yui3-menu-horizontal li li{float:none}.yui3-menu-horizontal ul{*zoom:1}.yui3-menu-horizontal ul ul{*zoom:normal}.yui3-menu-horizontal>.yui3-menu-content>ul:after{content:"";display:block;clear:both;line-height:0;font-size:0;visibility:hidden}.yui3-menu-content{*zoom:1}.yui3-menu-hidden .yui3-menu-content{*zoom:normal}.yui3-menuitem-content,.yui3-menu-label{_zoom:1}.yui3-menu-hidden .yui3-menuitem-content,.yui3-menu-hidden .yui3-menu-label{_zoom:normal}.yui3-skin-sam .yui3-menu-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-content{font-size:93%;line-height:1.5;*line-height:1.45;border:solid 1px #808080;background:#fff;padding:3px 0}.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-content{font-size:100%}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-content{line-height:2;*line-height:1.9;background:url(sprite.png) repeat-x 0 0;padding:0}.yui3-skin-sam .yui3-menu ul,.yui3-skin-sam .yui3-menu ul ul{margin-top:3px;padding-top:3px;border-top:solid 1px #ccc}.yui3-skin-sam .yui3-menu ul.first-of-type{border:0;margin:0;padding:0}.yui3-skin-sam .yui3-menu-horizontal ul{padding:0;margin:0;border:0}.yui3-skin-sam .yui3-menu li,.yui3-skin-sam .yui3-menu .yui3-menu li{_border-bottom:solid 1px #fff}.yui3-skin-sam .yui3-menu-horizontal li{_border-bottom:0}.yui3-skin-sam .yui3-menubuttonnav li{border-right:solid 1px #ccc}.yui3-skin-sam .yui3-splitbuttonnav li{border-right:solid 1px #808080}.yui3-skin-sam .yui3-menubuttonnav li li,.yui3-skin-sam .yui3-splitbuttonnav li li{border-right:0}.yui3-skin-sam .yui3-menu-label,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label,.yui3-skin-sam .yui3-menuitem-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-content{padding:0 20px;color:#000;text-decoration:none;cursor:default;float:none;border:0;margin:0}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content{padding:0 10px;border-style:solid;border-color:#808080;border-width:1px 0;margin:-1px 0;float:left;width:auto}.yui3-skin-sam .yui3-menu-label,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label{background:url(vertical-menu-submenu-indicator.png) right center no-repeat}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label{background:url(sprite.png) repeat-x 0 0}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label{background-image:none}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label{padding-right:0}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label em{font-style:normal;padding-right:20px;display:block;background:url(horizontal-menu-submenu-indicator.png) right center no-repeat}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label{padding:0}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label a{float:left;width:auto;color:#000;text-decoration:none;cursor:default;padding:0 5px 0 10px}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle{padding:0;border-left:solid 1px #ccc;width:15px;overflow:hidden;text-indent:-1000px;background:url(horizontal-menu-submenu-indicator.png) 3px center no-repeat}.yui3-skin-sam .yui3-menu-label-active,.yui3-skin-sam .yui3-menu-label-menuvisible,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-active,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-menuvisible{background-color:#b3d4ff}.yui3-skin-sam .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content{background-image:none;background-color:#b3d4ff;border-left-width:0;margin-left:0}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-active,.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-menuvisible{border-color:#7d98b8;background:url(sprite.png) repeat-x 0 -1700px}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label-active,.yui3-skin-sam .yui3-menubuttonnav .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label-menuvisible,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-active,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible{border-left-width:1px;margin-left:-1px}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible{border-color:#808080;background:transparent}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle{border-color:#7d98b8;background:url(horizontal-menu-submenu-toggle.png) left center no-repeat}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/overlay.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/overlay.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/overlay.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-overlay{position:absolute}.yui3-overlay-hidden{visibility:hidden}.yui3-widget-tmp-forcesize .yui3-overlay-content{overflow:hidden!important}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/panel.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/panel.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/panel.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-panel{position:absolute}.yui3-panel-hidden{visibility:hidden}.yui3-widget-tmp-forcesize .yui3-panel-content{overflow:hidden!important}.yui3-panel .yui3-widget-hd{position:relative}.yui3-panel .yui3-widget-hd .yui3-widget-button-wrapper{position:absolute;top:0;right:0}.yui3-panel .yui3-widget-ft .yui3-widget-button-wrapper{display:inline-block;*display:inline;zoom:1}.yui3-skin-sam .yui3-widget-mask{background-color:black;zoom:1;-ms-filter:"alpha(opacity=70)";filter:alpha(opacity=70);opacity:.7}.yui3-skin-sam .yui3-panel-content{-webkit-box-shadow:0 0 5px #333;-moz-box-shadow:0 0 5px #333;box-shadow:0 0 5px #333;border:1px solid black;background:white}.yui3-skin-sam .yui3-panel-content .yui3-widget-hd{padding:8px 28px 8px 8px;min-height:13px;_height:13px;color:white;background-color:#3961c5;background:-moz-linear-gradient(0% 100% 90deg,#2647a0 7%,#3d67ce 50%,#426fd9 100%);background:-webkit-gradient(linear,left bottom,left top,from(#2647a0),color-stop(0.07,#2647a0),color-stop(0.5,#3d67ce),to(#426fd9))}.yui3-skin-sam .yui3-panel-content .yui3-widget-hd .yui3-widget-button-wrapper{padding:8px}.yui3-skin-sam .yui3-panel-content .yui3-widget-bd{padding:10px}.yui3-skin-sam .yui3-panel-content .yui3-widget-ft{background:#edf5ff;padding:8px;text-align:right}.yui3-skin-sam .yui3-panel-content .yui3-widget-ft .yui3-button{padding:2px 8px;margin:0 3px;border:1px solid gray;-moz-border-radius:.435em;-webkit-border-radius:.435em;border-radius:.435em;color:black;background:#d8d8da;background:-moz-linear-gradient(0% 100% 90deg,#d8d8da 18%,#f1f2f2 50%,white 100%);background:-webkit-gradient(linear,left bottom,left top,from(#d8d8da),color-stop(0.18,#d8d8da),color-stop(0.5,#f1f2f2),to(white))}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-x-lines.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-x-lines.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-x-lines.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-x.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-x.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-x.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-y-lines.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-y-lines.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-y-lines.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-y.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-y.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/rail-y.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/resize-base.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/resize-base.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/resize-base.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-resize,.yui3-resize-wrapper{z-index:0;zoom:1}.yui3-resize-handle{position:absolute;display:block;z-index:100;zoom:1}.yui3-resize-proxy{position:absolute;border:1px dashed #000;position:absolute;z-index:10000}.yui3-resize-hidden-handles .yui3-resize-handle{opacity:0;filter:alpha(opacity=0)}.yui3-resize-handle-t,.yui3-resize-handle-b{width:100%;left:0;height:6px}.yui3-resize-handle-l,.yui3-resize-handle-r{height:100%;top:0;width:6px}.yui3-resize-handle-t{cursor:n-resize;top:0}.yui3-resize-handle-b{cursor:s-resize;bottom:0}.yui3-resize-handle-l{cursor:w-resize;left:0}.yui3-resize-handle-r{cursor:e-resize;right:0}.yui3-resize-handle-inner{position:absolute;zoom:1}.yui3-resize-handle-inner-t,.yui3-resize-handle-inner-b{margin-left:-8px;left:50%}.yui3-resize-handle-inner-l,.yui3-resize-handle-inner-r{margin-top:-8px;top:50%}.yui3-resize-handle-inner-t{top:-4px}.yui3-resize-handle-inner-b{bottom:-4px}.yui3-resize-handle-inner-l{left:-4px}.yui3-resize-handle-inner-r{right:-4px}.yui3-resize-handle-tr,.yui3-resize-handle-br,.yui3-resize-handle-tl,.yui3-resize-handle-bl{height:15px;width:15px;z-index:200}.yui3-resize-handle-tr{cursor:ne-resize;top:0;right:0}.yui3-resize-handle-tl{cursor:nw-resize;top:0;left:0}.yui3-resize-handle-br{cursor:se-resize;bottom:0;right:0}.yui3-resize-handle-bl{cursor:sw-resize;bottom:0;left:0}.yui3-resize-handle-inner-r,.yui3-resize-handle-inner-l,.yui3-resize-handle-inner-t,.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-tr,.yui3-resize-handle-inner-br,.yui3-resize-handle-inner-tl,.yui3-resize-handle-inner-bl{background-repeat:no-repeat;background:url(arrows.png) no-repeat 0 0;display:block;height:15px;overflow:hidden;text-indent:-99999em;width:15px}.yui3-resize-handle-inner-br{background-position:-30px 0;bottom:-2px;right:-2px}.yui3-resize-handle-inner-tr{background-position:-58px 0;bottom:0;right:-2px}.yui3-resize-handle-inner-bl{background-position:-75px 0;bottom:-2px;right:-2px}.yui3-resize-handle-inner-tl{background-position:-47px 0;bottom:0;right:-2px}.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-t{background-position:-15px 0}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-base.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-base.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-base.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-scrollview{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none}.yui3-scrollview-hidden{display:none}.yui3-scrollview-content{position:relative}.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-list.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-list.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-list.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}.yui3-skin-sam .yui3-scrollview{background-color:white}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{*zoom:1}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list{*zoom:1;list-style:none;padding:0;margin:0}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content{border-top:0;background-color:white;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;color:black}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{border-bottom:1px solid #303030;padding:15px 20px 16px;font-size:100%;font-weight:bold;background-color:white;cursor:pointer}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-scrollbars.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-scrollbars.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/scrollview-scrollbars.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-scrollview-scrollbar{opacity:1;position:absolute;width:6px;height:10px}.yui3-scrollview-scrollbar{top:0;right:1px}.yui3-scrollview-scrollbar-horiz{top:auto;height:8px;width:20px;bottom:1px;left:0}.yui3-scrollview-scrollbar .yui3-scrollview-child{position:absolute;right:0;display:block;width:100%;height:4px}.yui3-scrollview-scrollbar .yui3-scrollview-first{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-last{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-middle{position:absolute;top:4px;height:1px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-child{display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline;top:0;left:0;bottom:auto;right:auto}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{width:4px;height:6px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{top:0;left:4px;width:1px;height:6px}.yui3-scrollview-scrollbar-vert-basic{height:auto}.yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child{position:static;_overflow:hidden;_line-height:4px}.yui3-scrollview-scrollbar-horiz-basic{width:auto;white-space:nowrap;line-height:6px;_overflow:hidden}.yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{position:static;padding:0;margin:0;top:auto;left:auto;right:auto;bottom:auto}.yui3-skin-sam .yui3-scrollview-scrollbar{-webkit-transform:translate3d(0,0,0);-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAABCAYAAAD9yd/wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABJJREFUeNpiZGBgSGPAAgACDAAIkABoFyloZQAAAABJRU5ErkJggg==)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-bottom-right-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-webkit-transform:translate3d(0,0,0);-moz-border-radius:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-transform:translate3d(0,0,0) scaleY(1);-webkit-transform-origin-y:0;-moz-transform:translate(0,0) scaleY(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-top-right-radius:0;border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomleft:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-bottom-left-radius:0;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:3px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{-webkit-transform:translate3d(0,0,0) scaleX(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleX(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{background-color:#aaa;background-image:none}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/skin.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/skin.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/skin.css 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-aclist{position:absolute;z-index:1}.yui3-aclist-hidden{visibility:hidden}.yui3-aclist-aria{left:-9999px;position:absolute}.yui3-aclist-list{list-style:none;margin:0;overflow:hidden;padding:0}.yui3-aclist-item{cursor:pointer;list-style:none;padding:2px 5px}.yui3-aclist-item-active{outline:#afafaf dotted thin}.yui3-skin-sam .yui3-aclist-content{background:#fff;border:1px solid #afafaf;-moz-box-shadow:1px 1px 4px #888;-webkit-box-shadow:1px 1px 4px #888;box-shadow:1px 1px 4px #888}.yui3-skin-sam .yui3-aclist-item-hover{background:#bfdaff}.yui3-skin-sam .yui3-aclist-item-active{background:#2647a0;color:#fff;outline:0}
-.yui3-calendar-pane{width:100%}.yui3-calendar-grid{width:100%}.yui3-calendar-left-grid{margin-right:1em}.yui3-calendar-right-grid{margin-left:1em}.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-calendar-selection-disabled{color:#999}.yui3-calendar-prevmonth-day{color:#ccc}.yui3-calendar-nextmonth-day{color:#ccc}.yui3-calendar-day-selected{background-color:#ddd}.yui3-calendar-header-label{text-align:center}.yui3-skin-sam .yui3-calendar-content{padding:10px;font-size:.8em;font-family:"Lucida Grande","Lucida Sans",Calibri,Helvetica,Arial,sans-serif;color:#000;border:1px solid gray;background:#f2f2f2;background:-moz-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#f9f9f9),color-stop(100%,#f2f2f2));background:-webkit-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-o-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);background:-ms-linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9',endColorstr='#f2f2f2',GradientType=0);background:linear-gradient(top,#f9f9f9 0,#f2f2f2 100%);-moz-border-radius:5px;border-radius:5px}.yui3-skin-sam .yui3-calendar-grid{padding:5px;border-collapse:collapse}.yui3-skin-sam .yui3-calendar-header{padding-bottom:10px}.yui3-skin-sam .yui3-calendar-header-label h4{margin:0;font-size:1em;font-weight:bold}.yui3-skin-sam .yui3-calendar-selection-disabled{color:#555}.yui3-skin-sam .yui3-calendar-day,.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-skin-sam .yui3-calendar-nextmonth-day{border:1px solid #ccc;background:#fff;text-align:center}.yui3-skin-sam .yui3-calendar-day:hover{background:#06c;color:#fff}.yui3-skin-sam .yui3-calendar-selection-disabled,.yui3-skin-sam .yui3-calendar-selection-disabled:hover{color:#a6a6a6;background:#ccc}.yui3-skin-sam .yui3-calendar-weekday{font-weight:bold}.yui3-skin-sam .yui3-calendar-prevmonth-day,.yui3-calendar-nextmonth-day{color:#a6a6a6}.yui3-skin-sam .yui3-calendar-day{font-weight:bold}.yui3-skin-sam .yui3-calendar-day-selected{background-color:#b3d4ff;color:#000}
-.yui3-calendar-column-hidden,.yui3-calendar-hidden{display:none}.yui3-calendar-day{cursor:pointer}.yui3-calendar-selection-disabled{cursor:default}.yui3-calendar-prevmonth-day{cursor:default}.yui3-calendar-nextmonth-day{cursor:default}.yui3-calendar-content:hover .yui3-calendar-day,.yui3-calendar-content:hover .yui3-calendar-prevmonth-day,.yui3-calendar-content:hover .yui3-calendar-nextmonth-day{-moz-user-select:none}
-.yui3-calendar-header{padding-left:15px;padding-right:15px}.yui3-calendar-header-label{width:100%}.yui3-calendarnav-prevmonth{width:15px;margin-left:-15px;cursor:pointer}.yui3-calendarnav-nextmonth{width:15px;margin-right:-15px;cursor:pointer;text-align:right}.yui3-calendarnav-prevmonth,.yui3-calendarnav-nextmonth{color:#000}.yui3-calendarnav-prevmonth:hover,.yui3-calendarnav-nextmonth:hover{color:#06c}
-.yui3-skin-sam .yui3-console-ft .yui3-console-filters-categories,.yui3-skin-sam .yui3-console-ft .yui3-console-filters-sources{text-align:left;padding:5px 0;border:1px inset;margin:0 2px}.yui3-skin-sam .yui3-console-ft .yui3-console-filters-categories{background:#fff;border-bottom:2px ridge}.yui3-skin-sam .yui3-console-ft .yui3-console-filters-sources{background:#fff;margin-bottom:2px;border-top:0 none;border-bottom-right-radius:10px;border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-moz-border-radius-bottomleft:10px;-webkit-border-bottom-right-radius:10px;-webkit-border-bottom-left-radius:10px}.yui3-skin-sam .yui3-console-filter-label{white-space:nowrap;margin-left:1ex}
-.yui3-skin-sam .yui3-console-separate{position:absolute;right:1em;top:1em;z-index:999}.yui3-skin-sam .yui3-console-inline{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:top}.yui3-skin-sam .yui3-console-inline .yui3-console-content{position:relative}.yui3-skin-sam .yui3-console-content{background:#777;_background:#d8d8da url(bg.png) repeat-x 0 0;font:normal 13px/1.3 Arial,sans-serif;text-align:left;border:1px solid #777;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.yui3-skin-sam .yui3-console-hd,.yui3-skin-sam .yui3-console-bd,.yui3-skin-sam .yui3-console-ft{position:relative}.yui3-skin-sam .yui3-console-hd,.yui3-skin-sam .yui3-console-ft .yui3-console-controls{text-align:right}.yui3-skin-sam .yui3-console-hd{background:#d8d8da url(bg.png) repeat-x 0 0;padding:1ex;border:1px solid transparent;_border:0 none;border-top-right-radius:10px;border-top-left-radius:10px;-moz-border-radius-topright:10px;-moz-border-radius-topleft:10px;-webkit-border-top-right-radius:10px;-webkit-border-top-left-radius:10px}.yui3-skin-sam .yui3-console-bd{background:#fff;border-top:1px solid #777;border-bottom:1px solid #777;color:#000;font-size:11px;overflow:auto;overflow-x:auto;overflow-y:scroll;_width:100%}.yui3-skin-sam .yui3-console-ft{background:#d8d8da url(bg.png) repeat-x 0 0;border:1px solid transparent;_border:0 none;border-bottom-right-radius:10px;border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-moz-border-radius-bottomleft:10px;-webkit-border-bottom-right-radius:10px;-webkit-border-bottom-left-radius:10px}.yui3-skin-sam .yui3-console-controls{padding:4px 1ex;zoom:1}.yui3-skin-sam .yui3-console-title{color:#000;display:inline;float:left;font-weight:bold;font-size:13px;height:24px;line-height:24px;margin:0;padding-left:1ex}.yui3-skin-sam .yui3-console-pause-label{float:left}.yui3-skin-sam .yui3-console-button{line-height:1.3}.yui3-skin-sam .yui3-console-collapsed .yui3-console-bd,.yui3-skin-sam .yui3-console-collapsed .yui3-console-ft{display:none}.yui3-skin-sam .yui3-console-content.yui3-console-collapsed{-webkit-border-radius:0}.yui3-skin-sam .yui3-console-collapsed .yui3-console-hd{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:0}.yui3-skin-sam .yui3-console-entry{border-bottom:1px solid #aaa;min-height:32px;_height:32px}.yui3-skin-sam .yui3-console-entry-meta{margin:0;overflow:hidden}.yui3-skin-sam .yui3-console-entry-content{margin:0;padding:0 1ex;white-space:pre-wrap;word-wrap:break-word}.yui3-skin-sam .yui3-console-entry-meta .yui3-console-entry-src{color:#000;font-style:italic;font-weight:bold;float:right;margin:2px 5px 0 0}.yui3-skin-sam .yui3-console-entry-meta .yui3-console-entry-time{color:#777;padding-left:1ex}.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-meta .yui3-console-entry-time{color:#555}.yui3-skin-sam .yui3-console-entry-info .yui3-console-entry-meta .yui3-console-entry-cat,.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-meta .yui3-console-entry-cat,.yui3-skin-sam .yui3-console-entry-error .yui3-console-entry-meta .yui3-console-entry-cat{display:none}.yui3-skin-sam .yui3-console-entry-warn{background:#aee url(warn_error.png) no-repeat -15px 15px}.yui3-skin-sam .yui3-console-entry-error{background:#ffa url(warn_error.png) no-repeat 5px -24px;color:#900}.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-content,.yui3-skin-sam .yui3-console-entry-error .yui3-console-entry-content{padding-left:24px}.yui3-skin-sam .yui3-console-entry-cat{text-transform:uppercase;padding:1px 4px;background-color:#ccc}.yui3-skin-sam .yui3-console-entry-info .yui3-console-entry-cat{background-color:#ac2}.yui3-skin-sam .yui3-console-entry-warn .yui3-console-entry-cat{background-color:#e81}.yui3-skin-sam .yui3-console-entry-error .yui3-console-entry-cat{background-color:#b00;color:#fff}.yui3-skin-sam .yui3-console-hidden{display:none}
-.yui3-skin-sam .yui3-datatable-mask{position:absolute;z-index:9500}.yui3-datatable-tmp{position:absolute;left:-9000px}.yui3-datatable-scrollable .yui3-datatable-bd{overflow:auto}.yui3-datatable-scrollable .yui3-datatable-hd{overflow:hidden;position:relative}.yui3-datatable-scrollable .yui3-datatable-bd thead tr,.yui3-datatable-scrollable .yui3-datatable-bd thead th{position:absolute;left:-1500px}.yui3-datatable-scrollable tbody{-moz-outline:0}.yui3-skin-sam thead .yui3-datatable-sortable{cursor:pointer}.yui3-skin-sam thead .yui3-datatable-draggable{cursor:move}.yui3-datatable-coltarget{position:absolute;z-index:999}.yui3-datatable-hd{zoom:1}th.yui3-datatable-resizeable .yui3-datatable-resizerliner{position:relative}.yui3-datatable-resizer{position:absolute;right:0;bottom:0;height:100%;cursor:e-resize;cursor:col-resize;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}.yui3-datatable-resizerproxy{visibility:hidden;position:absolute;z-index:9000;background-color:#CCC;opacity:0;filter:alpha(opacity=0)}th.yui3-datatable-hidden .yui3-datatable-liner,td.yui3-datatable-hidden .yui3-datatable-liner,th.yui3-datatable-hidden .yui3-datatable-resizer{display:none}.yui3-datatable-editor,.yui3-datatable-editor-shim{position:absolute;z-index:9000}.yui3-skin-sam .yui3-datatable table{margin:0;padding:0;font-family:arial;font-size:inherit;border-collapse:separate;*border-collapse:collapse;border-spacing:0;border:1px solid #7f7f7f}.yui3-skin-sam .yui3-datatable thead{border-spacing:0}.yui3-skin-sam .yui3-datatable caption{color:#000;font-size:85%;font-weight:normal;font-style:italic;line-height:1;padding:1em 0;text-align:center}.yui3-skin-sam .yui3-datatable th{background:#d8d8da url(sprite.png) repeat-x 0 0}.yui3-skin-sam .yui3-datatable th,.yui3-skin-sam .yui3-datatable th a{font-weight:normal;text-decoration:none;color:#000;vertical-align:bottom}.yui3-skin-sam .yui3-datatable th{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb}.yui3-skin-sam .yui3-datatable tr.yui3-datatable-first td{border-top:1px solid #7f7f7f}.yui3-skin-sam .yui3-datatable th .yui3-datatable-liner{white-space:nowrap}.yui3-skin-sam .yui3-datatable-liner{margin:0;padding:0;padding:4px 10px 4px 10px;overflow:visible;border:0 solid black}.yui3-skin-sam .yui3-datatable-coltarget{width:5px;background-color:red}.yui3-skin-sam .yui3-datatable td{margin:0;padding:0;border:0;border-right:1px solid #cbcbcb;text-align:left}.yui3-skin-sam .yui3-datatable-list td{border-right:0}.yui3-skin-sam .yui3-datatable-resizer{width:6px}.yui3-skin-sam .yui3-datatable-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui3-skin-sam .yui3-datatable-message{background-color:#FFF}.yui3-skin-sam .yui3-datatable-scrollable table{border:0}.yui3-skin-sam .yui3-datatable-scrollable .yui3-datatable-hd{border-left:1px solid #7f7f7f;border-top:1px solid #7f7f7f;border-right:1px solid #7f7f7f}.yui3-skin-sam .yui3-datatable-scrollable .yui3-datatable-bd{border-left:1px solid #7f7f7f;border-bottom:1px solid #7f7f7f;border-right:1px solid #7f7f7f;background-color:#FFF}.yui3-skin-sam .yui3-datatable-scrollable .yui3-datatable-data tr.yui3-datatable-last td{border-bottom:1px solid #7f7f7f}.yui3-skin-sam th.yui3-datatable-asc,.yui3-skin-sam th.yui3-datatable-desc{background:url(sprite.png) repeat-x 0 -100px}.yui3-skin-sam th.yui3-datatable-sortable .yui3-datatable-liner{padding-right:20px}.yui3-skin-sam th.yui3-datatable-asc .yui3-datatable-liner{background:url(dt-arrow-up.png) no-repeat right}.yui3-skin-sam th.yui3-datatable-desc .yui3-datatable-liner{background:url(dt-arrow-dn.png) no-repeat right}tbody .yui3-datatable-editable{cursor:pointer}.yui3-datatable-editor{text-align:left;background-color:#f2f2f2;border:1px solid #808080;padding:6px}.yui3-datatable-editor label{padding-left:4px;padding-right:6px}.yui3-datatable-editor .yui3-datatable-button{padding-top:6px;text-align:right}.yui3-datatable-editor .yui3-datatable-button button{background:url(sprite.png) repeat-x 0 0;border:1px solid #999;width:4em;height:1.8em;margin-left:6px}.yui3-datatable-editor .yui3-datatable-button button.yui3-datatable-default{background:url(sprite.png) repeat-x 0 -1400px;background-color:#5584e0;border:1px solid #304369;color:#FFF}.yui3-datatable-editor .yui3-datatable-button button:hover{background:url(sprite.png) repeat-x 0 -1300px;color:#000}.yui3-datatable-editor .yui3-datatable-button button:active{background:url(sprite.png) repeat-x 0 -1700px;color:#000}.yui3-skin-sam .yui3-datatable td{background-color:transparent}.yui3-skin-sam tr.yui3-datatable-even td{background-color:#FFF}.yui3-skin-sam tr.yui3-datatable-odd td{background-color:#edf5ff}.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-desc{background-color:#edf5ff}.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-desc{background-color:#dbeaff}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even{background-color:#FFF}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd{background-color:#FFF}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-desc{background-color:#edf5ff}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-desc{background-color:#edf5ff}.yui3-skin-sam th.yui3-datatable-highlighted,.yui3-skin-sam th.yui3-datatable-highlighted a{background-color:#b2d2ff}.yui3-skin-sam tr.yui3-datatable-highlighted,.yui3-skin-sam tr.yui3-datatable-highlighted td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-highlighted td.yui3-datatable-desc,.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-highlighted,.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-highlighted{cursor:pointer;background-color:#b2d2ff}
-.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-highlighted,.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-highlighted a{background-color:#b2d2ff}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-highlighted,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-highlighted td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-highlighted td.yui3-datatable-desc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-highlighted,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-highlighted{cursor:pointer;background-color:#b2d2ff}.yui3-skin-sam th.yui3-datatable-selected,.yui3-skin-sam th.yui3-datatable-selected a{background-color:#446cd7}.yui3-skin-sam tr.yui3-datatable-selected td,.yui3-skin-sam tr.yui3-datatable-selected td.yui3-datatable-asc,.yui3-skin-sam tr.yui3-datatable-selected td.yui3-datatable-desc{background-color:#426fd9;color:#FFF}.yui3-skin-sam tr.yui3-datatable-even td.yui3-datatable-selected,.yui3-skin-sam tr.yui3-datatable-odd td.yui3-datatable-selected{background-color:#446cd7;color:#FFF}.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-selected,.yui3-skin-sam .yui3-datatable-list th.yui3-datatable-selected a{background-color:#446cd7}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-selected td,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-selected td.yui3-datatable-asc,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-selected td.yui3-datatable-desc{background-color:#426fd9;color:#FFF}.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-even td.yui3-datatable-selected,.yui3-skin-sam .yui3-datatable-list tr.yui3-datatable-odd td.yui3-datatable-selected{background-color:#446cd7;color:#FFF}.yui3-skin-sam .yui3-datatable-paginator{display:block;margin:6px 0;white-space:nowrap}.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-first,.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-last,.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-selected{padding:2px 6px}.yui3-skin-sam .yui3-datatable-paginator a.yui3-datatable-first,.yui3-skin-sam .yui3-datatable-paginator a.yui3-datatable-last{text-decoration:none}.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-previous,.yui3-skin-sam .yui3-datatable-paginator .yui3-datatable-next{display:none}.yui3-skin-sam a.yui3-datatable-page{border:1px solid #cbcbcb;padding:2px 6px;text-decoration:none;background-color:#fff}.yui3-skin-sam .yui3-datatable-selected{border:1px solid #fff;background-color:#fff}
-v\:oval,v\:shadow,v\:fill{behavior:url(#default#VML);display:inline-block;zoom:1;*display:inline}.yui3-dial{position:relative;display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline}.yui3-dial-content,.yui3-dial-ring{position:relative}.yui3-dial-handle,.yui3-dial-marker,.yui3-dial-center-button,.yui3-dial-reset-string,.yui3-dial-handle-vml,.yui3-dial-marker-vml,.yui3-dial-center-button-vml,.yui3-dial-ring-vml v\:oval,.yui3-dial-center-button-vml v\:oval{position:absolute}.yui3-dial-center-button-vml v\:oval{font-size:1px;top:0;left:0}.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden v\:oval,.yui3-dial-content .yui3-dial-ring .yui3-dial-hidden{opacity:0;filter:alpha(opacity=0)}.yui3-skin-sam .yui3-dial-handle{background:#6c3a3a;opacity:.3;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.9) inset;cursor:pointer;font-size:1px}.yui3-skin-sam .yui3-dial-ring{background:#bebdb7;background:-moz-linear-gradient(100% 100% 135deg,#7b7a6d,#fff);background:-webkit-gradient(linear,left top,right bottom,from(#fff),to(#7b7a6d));box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset;-webkit-box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset;-moz-box-shadow:1px 1px 5px rgba(0,0,0,0.4) inset}.yui3-skin-sam .yui3-dial-center-button{box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);-moz-box-shadow:-1px -1px 2px rgba(0,0,0,0.3) inset,1px 1px 2px rgba(0,0,0,0.5);background:#dddbd4;background:-moz-radial-gradient(30% 30% 0deg,circle farthest-side,#fbfbf9 24%,#f2f0ea 41%,#d3d0c3 83%) repeat scroll 0 0 transparent;background:-webkit-gradient(radial,15 15,15,30 30,40,from(#fbfbf9),to(#d3d0c3),color-stop(.2,#f2f0ea));cursor:pointer;opacity:.7}.yui3-skin-sam .yui3-dial-reset-string{color:#676767;font-size:85%;text-decoration:underline}.yui3-skin-sam .yui3-dial-label{color:#808080;margin-bottom:.8em}.yui3-skin-sam .yui3-dial-value-string{margin-left:.5em;color:#000;font-size:130%}.yui3-skin-sam .yui3-dial-value{visibility:hidden;position:absolute;top:0;left:102%;width:4em}.yui3-skin-sam .yui3-dial-north-mark{position:absolute;border-left:2px solid #ccc;height:5px;width:10px;left:50%;top:-7px;font-size:1px}.yui3-skin-sam .yui3-dial-marker{background-color:#000;opacity:.2;font-size:1px}.yui3-skin-sam .yui3-dial-marker-max-min{background-color:#ab3232;opacity:.6}.yui3-skin-sam .yui3-dial-ring-vml,.yui3-skin-sam .yui3-dial-center-button-vml,.yui3-skin-sam .yui3-dial-marker v\:oval.yui3-dial-marker-max-min,.yui3-skin-sam v\:oval.yui3-dial-marker-max-min,.yui3-skin-sam .yui3-dial-marker-vml,.yui3-skin-sam .yui3-dial-handle-vml{background:0;opacity:1}
-.yui3-flick{position:relative;overflow:hidden}.yui3-flick-content{position:relative}
-.yui3-menu .yui3-menu{position:absolute;z-index:1}.yui3-menu .yui3-shim{position:absolute;top:0;left:0;z-index:-1;opacity:0;filter:alpha(opacity=0);border:0;margin:0;padding:0;height:100%;width:100%}.yui3-menu-hidden{top:-10000px;left:-10000px;visibility:hidden}.yui3-menu li{list-style-type:none}.yui3-menu ul,.yui3-menu li{margin:0;padding:0}.yui3-menu-label,.yui3-menuitem-content{text-align:left;white-space:nowrap;display:block}.yui3-menu-horizontal li{float:left;width:auto}.yui3-menu-horizontal li li{float:none}.yui3-menu-horizontal ul{*zoom:1}.yui3-menu-horizontal ul ul{*zoom:normal}.yui3-menu-horizontal>.yui3-menu-content>ul:after{content:"";display:block;clear:both;line-height:0;font-size:0;visibility:hidden}.yui3-menu-content{*zoom:1}.yui3-menu-hidden .yui3-menu-content{*zoom:normal}.yui3-menuitem-content,.yui3-menu-label{_zoom:1}.yui3-menu-hidden .yui3-menuitem-content,.yui3-menu-hidden .yui3-menu-label{_zoom:normal}.yui3-skin-sam .yui3-menu-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-content{font-size:93%;line-height:1.5;*line-height:1.45;border:solid 1px #808080;background:#fff;padding:3px 0}.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-content{font-size:100%}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-content{line-height:2;*line-height:1.9;background:url(sprite.png) repeat-x 0 0;padding:0}.yui3-skin-sam .yui3-menu ul,.yui3-skin-sam .yui3-menu ul ul{margin-top:3px;padding-top:3px;border-top:solid 1px #ccc}.yui3-skin-sam .yui3-menu ul.first-of-type{border:0;margin:0;padding:0}.yui3-skin-sam .yui3-menu-horizontal ul{padding:0;margin:0;border:0}.yui3-skin-sam .yui3-menu li,.yui3-skin-sam .yui3-menu .yui3-menu li{_border-bottom:solid 1px #fff}.yui3-skin-sam .yui3-menu-horizontal li{_border-bottom:0}.yui3-skin-sam .yui3-menubuttonnav li{border-right:solid 1px #ccc}.yui3-skin-sam .yui3-splitbuttonnav li{border-right:solid 1px #808080}.yui3-skin-sam .yui3-menubuttonnav li li,.yui3-skin-sam .yui3-splitbuttonnav li li{border-right:0}.yui3-skin-sam .yui3-menu-label,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label,.yui3-skin-sam .yui3-menuitem-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-content{padding:0 20px;color:#000;text-decoration:none;cursor:default;float:none;border:0;margin:0}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content{padding:0 10px;border-style:solid;border-color:#808080;border-width:1px 0;margin:-1px 0;float:left;width:auto}.yui3-skin-sam .yui3-menu-label,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label{background:url(vertical-menu-submenu-indicator.png) right center no-repeat}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label{background:url(sprite.png) repeat-x 0 0}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label{background-image:none}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label{padding-right:0}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label em{font-style:normal;padding-right:20px;display:block;background:url(horizontal-menu-submenu-indicator.png) right center no-repeat}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label{padding:0}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label a{float:left;width:auto;color:#000;text-decoration:none;cursor:default;padding:0 5px 0 10px}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle{padding:0;border-left:solid 1px #ccc;width:15px;overflow:hidden;text-indent:-1000px;background:url(horizontal-menu-submenu-indicator.png) 3px center no-repeat}.yui3-skin-sam .yui3-menu-label-active,.yui3-skin-sam .yui3-menu-label-menuvisible,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-active,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-menuvisible{background-color:#b3d4ff}.yui3-skin-sam .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content{background-image:none;background-color:#b3d4ff;border-left-width:0;margin-left:0}.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-active,.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-menuvisible{border-color:#7d98b8;background:url(sprite.png) repeat-x 0 -1700px}.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label-active,.yui3-skin-sam .yui3-menubuttonnav .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-menubuttonnav .yui3-menu-label-menuvisible,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-active,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible{border-left-width:1px;margin-left:-1px}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible{border-color:#808080;background:transparent}.yui3-skin-sam .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle{border-color:#7d98b8;background:url(horizontal-menu-submenu-toggle.png) left center no-repeat}
-.yui3-overlay{position:absolute}.yui3-overlay-hidden{visibility:hidden}.yui3-widget-tmp-forcesize .yui3-overlay-content{overflow:hidden!important}
-.yui3-panel{position:absolute}.yui3-panel-hidden{visibility:hidden}.yui3-widget-tmp-forcesize .yui3-panel-content{overflow:hidden!important}.yui3-panel .yui3-widget-hd{position:relative}.yui3-panel .yui3-widget-hd .yui3-widget-button-wrapper{position:absolute;top:0;right:0}.yui3-panel .yui3-widget-ft .yui3-widget-button-wrapper{display:inline-block;*display:inline;zoom:1}.yui3-skin-sam .yui3-widget-mask{background-color:black;zoom:1;-ms-filter:"alpha(opacity=70)";filter:alpha(opacity=70);opacity:.7}.yui3-skin-sam .yui3-panel-content{-webkit-box-shadow:0 0 5px #333;-moz-box-shadow:0 0 5px #333;box-shadow:0 0 5px #333;border:1px solid black;background:white}.yui3-skin-sam .yui3-panel-content .yui3-widget-hd{padding:8px 28px 8px 8px;min-height:13px;_height:13px;color:white;background-color:#3961c5;background:-moz-linear-gradient(0% 100% 90deg,#2647a0 7%,#3d67ce 50%,#426fd9 100%);background:-webkit-gradient(linear,left bottom,left top,from(#2647a0),color-stop(0.07,#2647a0),color-stop(0.5,#3d67ce),to(#426fd9))}.yui3-skin-sam .yui3-panel-content .yui3-widget-hd .yui3-widget-button-wrapper{padding:8px}.yui3-skin-sam .yui3-panel-content .yui3-widget-bd{padding:10px}.yui3-skin-sam .yui3-panel-content .yui3-widget-ft{background:#edf5ff;padding:8px;text-align:right}.yui3-skin-sam .yui3-panel-content .yui3-widget-ft .yui3-button{padding:2px 8px;margin:0 3px;border:1px solid gray;-moz-border-radius:.435em;-webkit-border-radius:.435em;border-radius:.435em;color:black;background:#d8d8da;background:-moz-linear-gradient(0% 100% 90deg,#d8d8da 18%,#f1f2f2 50%,white 100%);background:-webkit-gradient(linear,left bottom,left top,from(#d8d8da),color-stop(0.18,#d8d8da),color-stop(0.5,#f1f2f2),to(white))}
-.yui3-resize,.yui3-resize-wrapper{z-index:0;zoom:1}.yui3-resize-handle{position:absolute;display:block;z-index:100;zoom:1}.yui3-resize-proxy{position:absolute;border:1px dashed #000;position:absolute;z-index:10000}.yui3-resize-hidden-handles .yui3-resize-handle{opacity:0;filter:alpha(opacity=0)}.yui3-resize-handle-t,.yui3-resize-handle-b{width:100%;left:0;height:6px}.yui3-resize-handle-l,.yui3-resize-handle-r{height:100%;top:0;width:6px}.yui3-resize-handle-t{cursor:n-resize;top:0}.yui3-resize-handle-b{cursor:s-resize;bottom:0}.yui3-resize-handle-l{cursor:w-resize;left:0}.yui3-resize-handle-r{cursor:e-resize;right:0}.yui3-resize-handle-inner{position:absolute;zoom:1}.yui3-resize-handle-inner-t,.yui3-resize-handle-inner-b{margin-left:-8px;left:50%}.yui3-resize-handle-inner-l,.yui3-resize-handle-inner-r{margin-top:-8px;top:50%}.yui3-resize-handle-inner-t{top:-4px}.yui3-resize-handle-inner-b{bottom:-4px}.yui3-resize-handle-inner-l{left:-4px}.yui3-resize-handle-inner-r{right:-4px}.yui3-resize-handle-tr,.yui3-resize-handle-br,.yui3-resize-handle-tl,.yui3-resize-handle-bl{height:15px;width:15px;z-index:200}.yui3-resize-handle-tr{cursor:ne-resize;top:0;right:0}.yui3-resize-handle-tl{cursor:nw-resize;top:0;left:0}.yui3-resize-handle-br{cursor:se-resize;bottom:0;right:0}.yui3-resize-handle-bl{cursor:sw-resize;bottom:0;left:0}.yui3-resize-handle-inner-r,.yui3-resize-handle-inner-l,.yui3-resize-handle-inner-t,.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-tr,.yui3-resize-handle-inner-br,.yui3-resize-handle-inner-tl,.yui3-resize-handle-inner-bl{background-repeat:no-repeat;background:url(arrows.png) no-repeat 0 0;display:block;height:15px;overflow:hidden;text-indent:-99999em;width:15px}.yui3-resize-handle-inner-br{background-position:-30px 0;bottom:-2px;right:-2px}.yui3-resize-handle-inner-tr{background-position:-58px 0;bottom:0;right:-2px}.yui3-resize-handle-inner-bl{background-position:-75px 0;bottom:-2px;right:-2px}.yui3-resize-handle-inner-tl{background-position:-47px 0;bottom:0;right:-2px}.yui3-resize-handle-inner-b,.yui3-resize-handle-inner-t{background-position:-15px 0}
-.yui3-scrollview{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none}.yui3-scrollview-hidden{display:none}.yui3-scrollview-content{position:relative}.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}
-.yui3-skin-sam .yui3-scrollview{-webkit-tap-highlight-color:rgba(255,255,255,0)}.yui3-skin-sam .yui3-scrollview{background-color:white}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{*zoom:1}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-list{*zoom:1;list-style:none;padding:0;margin:0}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content{border-top:0;background-color:white;font-family:HelveticaNeue,arial,helvetica,clean,sans-serif;color:black}.yui3-skin-sam .yui3-scrollview-vert .yui3-scrollview-content .yui3-scrollview-item{border-bottom:1px solid #303030;padding:15px 20px 16px;font-size:100%;font-weight:bold;background-color:white;cursor:pointer}
-.yui3-scrollview-scrollbar{opacity:1;position:absolute;width:6px;height:10px}.yui3-scrollview-scrollbar{top:0;right:1px}.yui3-scrollview-scrollbar-horiz{top:auto;height:8px;width:20px;bottom:1px;left:0}.yui3-scrollview-scrollbar .yui3-scrollview-child{position:absolute;right:0;display:block;width:100%;height:4px}.yui3-scrollview-scrollbar .yui3-scrollview-first{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-last{top:0}.yui3-scrollview-scrollbar .yui3-scrollview-middle{position:absolute;top:4px;height:1px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-child{display:-moz-inline-stack;display:inline-block;zoom:1;*display:inline;top:0;left:0;bottom:auto;right:auto}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{width:4px;height:6px}.yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{top:0;left:4px;width:1px;height:6px}.yui3-scrollview-scrollbar-vert-basic{height:auto}.yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child{position:static;_overflow:hidden;_line-height:4px}.yui3-scrollview-scrollbar-horiz-basic{width:auto;white-space:nowrap;line-height:6px;_overflow:hidden}.yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{position:static;padding:0;margin:0;top:auto;left:auto;right:auto;bottom:auto}.yui3-skin-sam .yui3-scrollview-scrollbar{-webkit-transform:translate3d(0,0,0);-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAABCAYAAAD9yd/wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABJJREFUeNpiZGBgSGPAAgACDAAIkABoFyloZQAAAABJRU5ErkJggg==)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-bottom-right-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-last{border-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-webkit-transform:translate3d(0,0,0);-moz-border-radius:0;-moz-border-radius-bottomright:3px;-moz-border-radius-bottomleft:3px;-moz-transform:translate(0,0)}.yui3-skin-sam .yui3-scrollview-scrollbar .yui3-scrollview-middle{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-transform:translate3d(0,0,0) scaleY(1);-webkit-transform-origin-y:0;-moz-transform:translate(0,0) scaleY(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-first,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-top-right-radius:0;border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomleft:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-last{border-bottom-left-radius:0;border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:3px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:3px}.yui3-skin-sam .yui3-scrollview-scrollbar-horiz .yui3-scrollview-middle{-webkit-transform:translate3d(0,0,0) scaleX(1);-webkit-transform-origin:0 0;-moz-transform:translate(0,0) scaleX(1);-moz-transform-origin:0 0}.yui3-skin-sam .yui3-scrollview-scrollbar-vert-basic .yui3-scrollview-child,.yui3-skin-sam .yui3-scrollview-scrollbar-horiz-basic .yui3-scrollview-child{background-color:#aaa;background-image:none}
-.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail{height:26px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb{height:26px;width:15px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail{width:26px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb{width:26px;height:15px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0}
-.yui3-tab-panel{display:none}.yui3-tab-panel-selected{display:block}.yui3-tabview-list,.yui3-tab{margin:0;padding:0;list-style:none}.yui3-tabview{position:relative}.yui3-tabview,.yui3-tabview-list,.yui3-tabview-panel,.yui3-tab,.yui3-tab-panel{zoom:1}.yui3-tab{display:inline-block;*display:inline;vertical-align:bottom;cursor:pointer}.yui3-tab-label{display:block;display:inline-block;padding:6px 10px;position:relative;text-decoration:none;vertical-align:bottom}.yui3-skin-sam .yui3-tabview-list{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui3-skin-sam .yui3-tab{margin:0 .2em 0 0;padding:1px 0 0;zoom:1}.yui3-skin-sam .yui3-tab-selected{margin-bottom:-1px}.yui3-skin-sam .yui3-tab-label{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:1px 1px 0 1px;color:#000;cursor:hand;font-size:85%;padding:.3em .75em;text-decoration:none}.yui3-skin-sam .yui3-tab-label:hover,.yui3-skin-sam .yui3-tab-label:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:focus,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{padding:.4em .75em}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{border-color:#243356}.yui3-skin-sam .yui3-tabview-panel{background:#edf5ff}.yui3-skin-sam .yui3-tabview-panel{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}
-.yui3-skin-sam .yui3-console-entry-pass .yui3-console-entry-cat{background-color:green;color:#fff;}.yui3-skin-sam .yui3-console-entry-fail .yui3-console-entry-cat{background-color:red;color:#fff;}.yui3-skin-sam .yui3-console-entry-ignore .yui3-console-entry-cat{background-color:#666;}
-.yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden!important}
-.yui3-widget-buttons .yui3-button{display:inline-block;*display:inline;zoom:1;cursor:pointer;text-decoration:none}.yui3-widget-buttons .yui3-button-close,.yui3-widget-buttons .yui3-button-close .yui3-button-content,.yui3-widget-buttons .yui3-button-close .yui3-button-icon{display:inline-block;*display:inline;zoom:1;width:13px;height:13px;line-height:13px;vertical-align:top}.yui3-widget-buttons .yui3-button-close .yui3-button-icon{background-repeat:no-repeat;background-position:1px 1px}.yui3-skin-sam .yui3-widget-buttons .yui3-button-icon{background-image:url(sprite_icons.gif)}
-.yui3-widget-stacked .yui3-widget-shim{opacity:0;filter:alpha(opacity=0);position:absolute;border:0;top:0;left:0;padding:0;margin:0;z-index:-1;width:100%;height:100%;_width:0;_height:0}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/slider-base.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/slider-base.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/slider-base.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-slider,.yui3-slider-rail{display:-moz-inline-stack;display:inline-block;*display:inline;zoom:1;vertical-align:middle}.yui3-slider-content{position:relative;display:block}.yui3-slider-rail{position:relative}.yui3-slider-rail-cap-top,.yui3-slider-rail-cap-left,.yui3-slider-rail-cap-bottom,.yui3-slider-rail-cap-right,.yui3-slider-thumb,.yui3-slider-thumb-image,.yui3-slider-thumb-shadow{position:absolute}.yui3-slider-thumb{overflow:hidden}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left,.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-image:url(rail-x.png);background-repeat:repeat-x}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail{height:26px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb{height:26px;width:15px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-left{background-position:0 -20px;height:20px;left:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-rail-cap-right{background-position:0 -40px;height:20px;right:-2px;width:5px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-image{left:0;top:-10px}.yui3-skin-sam .yui3-slider-x .yui3-slider-thumb-shadow{left:0;opacity:.15;filter:alpha(opacity=15);top:-50px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top,.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-image:url(rail-y.png);background-repeat:repeat-y}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail{width:26px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb{width:26px;height:15px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-top{background-position:-20px 0;width:20px;top:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-rail-cap-bottom{background-position:-40px 0;width:20px;bottom:-2px;height:5px}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-image{left:-10px;top:0}.yui3-skin-sam .yui3-slider-y .yui3-slider-thumb-shadow{left:-50px;opacity:.15;filter:alpha(opacity=15);top:0}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/sprite.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/sprite.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/sprite.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/sprite_icons.gif'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/sprite_icons.gif 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/sprite_icons.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/tabview.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/tabview.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/tabview.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-tab-panel{display:none}.yui3-tab-panel-selected{display:block}.yui3-tabview-list,.yui3-tab{margin:0;padding:0;list-style:none}.yui3-tabview{position:relative}.yui3-tabview,.yui3-tabview-list,.yui3-tabview-panel,.yui3-tab,.yui3-tab-panel{zoom:1}.yui3-tab{display:inline-block;*display:inline;vertical-align:bottom;cursor:pointer}.yui3-tab-label{display:block;display:inline-block;padding:6px 10px;position:relative;text-decoration:none;vertical-align:bottom}.yui3-skin-sam .yui3-tabview-list{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui3-skin-sam .yui3-tab{margin:0 .2em 0 0;padding:1px 0 0;zoom:1}.yui3-skin-sam .yui3-tab-selected{margin-bottom:-1px}.yui3-skin-sam .yui3-tab-label{background:#d8d8d8 url(sprite.png) repeat-x;border:solid #a3a3a3;border-width:1px 1px 0 1px;color:#000;cursor:hand;font-size:85%;padding:.3em .75em;text-decoration:none}.yui3-skin-sam .yui3-tab-label:hover,.yui3-skin-sam .yui3-tab-label:focus{background:#bfdaff url(sprite.png) repeat-x left -1300px;outline:0}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:focus,.yui3-skin-sam .yui3-tab-selected .yui3-tab-label:hover{background:#2647a0 url(sprite.png) repeat-x left -1400px;color:#fff}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{padding:.4em .75em}.yui3-skin-sam .yui3-tab-selected .yui3-tab-label{border-color:#243356}.yui3-skin-sam .yui3-tabview-panel{background:#edf5ff}.yui3-skin-sam .yui3-tabview-panel{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/test.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/test.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/test.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-skin-sam .yui3-console-entry-pass .yui3-console-entry-cat{background-color:green;color:#fff;}.yui3-skin-sam .yui3-console-entry-fail .yui3-console-entry-cat{background-color:red;color:#fff;}.yui3-skin-sam .yui3-console-entry-ignore .yui3-console-entry-cat{background-color:#666;}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/thumb-x.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/thumb-x.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/thumb-x.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/thumb-y.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/thumb-y.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/thumb-y.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/vertical-menu-submenu-indicator.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/vertical-menu-submenu-indicator.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/vertical-menu-submenu-indicator.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/warn_error.png'
Binary files src/maasserver/static/js/yui/3.4.1/assets/skins/sam/warn_error.png 2012-01-16 16:15:44 +0000 and src/maasserver/static/js/yui/3.4.1/assets/skins/sam/warn_error.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-base.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-base.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-base.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-widget-hidden{display:none}.yui3-widget-content{overflow:hidden}.yui3-widget-content-expanded{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;height:100%}.yui3-widget-tmp-forcesize{overflow:hidden!important}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-buttons.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-buttons.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-buttons.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-widget-buttons .yui3-button{display:inline-block;*display:inline;zoom:1;cursor:pointer;text-decoration:none}.yui3-widget-buttons .yui3-button-close,.yui3-widget-buttons .yui3-button-close .yui3-button-content,.yui3-widget-buttons .yui3-button-close .yui3-button-icon{display:inline-block;*display:inline;zoom:1;width:13px;height:13px;line-height:13px;vertical-align:top}.yui3-widget-buttons .yui3-button-close .yui3-button-icon{background-repeat:no-repeat;background-position:1px 1px}.yui3-skin-sam .yui3-widget-buttons .yui3-button-icon{background-image:url(sprite_icons.gif)}
=== removed file 'src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-stack.css'
--- src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-stack.css 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/assets/skins/sam/widget-stack.css 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-.yui3-widget-stacked .yui3-widget-shim{opacity:0;filter:alpha(opacity=0);position:absolute;border:0;top:0;left:0;padding:0;margin:0;z-index:-1;width:100%;height:100%;_width:0;_height:0}
=== removed directory 'src/maasserver/static/js/yui/3.4.1/async-queue'
=== removed file 'src/maasserver/static/js/yui/3.4.1/async-queue/async-queue-debug.js'
--- src/maasserver/static/js/yui/3.4.1/async-queue/async-queue-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/async-queue/async-queue-debug.js 1970-01-01 00:00:00 +0000
@@ -1,528 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('async-queue', function(Y) {
-
-/**
- * <p>AsyncQueue allows you create a chain of function callbacks executed
- * via setTimeout (or synchronously) that are guaranteed to run in order.
- * Items in the queue can be promoted or removed. Start or resume the
- * execution chain with run(). pause() to temporarily delay execution, or
- * stop() to halt and clear the queue.</p>
- *
- * @module async-queue
- */
-
-/**
- * <p>A specialized queue class that supports scheduling callbacks to execute
- * sequentially, iteratively, even asynchronously.</p>
- *
- * <p>Callbacks can be function refs or objects with the following keys. Only
- * the <code>fn</code> key is required.</p>
- *
- * <ul>
- * <li><code>fn</code> -- The callback function</li>
- * <li><code>context</code> -- The execution context for the callbackFn.</li>
- * <li><code>args</code> -- Arguments to pass to callbackFn.</li>
- * <li><code>timeout</code> -- Millisecond delay before executing callbackFn.
- * (Applies to each iterative execution of callback)</li>
- * <li><code>iterations</code> -- Number of times to repeat the callback.
- * <li><code>until</code> -- Repeat the callback until this function returns
- * true. This setting trumps iterations.</li>
- * <li><code>autoContinue</code> -- Set to false to prevent the AsyncQueue from
- * executing the next callback in the Queue after
- * the callback completes.</li>
- * <li><code>id</code> -- Name that can be used to get, promote, get the
- * indexOf, or delete this callback.</li>
- * </ul>
- *
- * @class AsyncQueue
- * @extends EventTarget
- * @constructor
- * @param callback* {Function|Object} 0..n callbacks to seed the queue
- */
-Y.AsyncQueue = function() {
- this._init();
- this.add.apply(this, arguments);
-};
-
-var Queue = Y.AsyncQueue,
- EXECUTE = 'execute',
- SHIFT = 'shift',
- PROMOTE = 'promote',
- REMOVE = 'remove',
-
- isObject = Y.Lang.isObject,
- isFunction = Y.Lang.isFunction;
-
-/**
- * <p>Static default values used to populate callback configuration properties.
- * Preconfigured defaults include:</p>
- *
- * <ul>
- * <li><code>autoContinue</code>: <code>true</code></li>
- * <li><code>iterations</code>: 1</li>
- * <li><code>timeout</code>: 10 (10ms between callbacks)</li>
- * <li><code>until</code>: (function to run until iterations <= 0)</li>
- * </ul>
- *
- * @property defaults
- * @type {Object}
- * @static
- */
-Queue.defaults = Y.mix({
- autoContinue : true,
- iterations : 1,
- timeout : 10,
- until : function () {
- this.iterations |= 0;
- return this.iterations <= 0;
- }
-}, Y.config.queueDefaults || {});
-
-Y.extend(Queue, Y.EventTarget, {
- /**
- * Used to indicate the queue is currently executing a callback.
- *
- * @property _running
- * @type {Boolean|Object} true for synchronous callback execution, the
- * return handle from Y.later for async callbacks.
- * Otherwise false.
- * @protected
- */
- _running : false,
-
- /**
- * Initializes the AsyncQueue instance properties and events.
- *
- * @method _init
- * @protected
- */
- _init : function () {
- Y.EventTarget.call(this, { prefix: 'queue', emitFacade: true });
-
- this._q = [];
-
- /**
- * Callback defaults for this instance. Static defaults that are not
- * overridden are also included.
- *
- * @property defaults
- * @type {Object}
- */
- this.defaults = {};
-
- this._initEvents();
- },
-
- /**
- * Initializes the instance events.
- *
- * @method _initEvents
- * @protected
- */
- _initEvents : function () {
- this.publish({
- 'execute' : { defaultFn : this._defExecFn, emitFacade: true },
- 'shift' : { defaultFn : this._defShiftFn, emitFacade: true },
- 'add' : { defaultFn : this._defAddFn, emitFacade: true },
- 'promote' : { defaultFn : this._defPromoteFn, emitFacade: true },
- 'remove' : { defaultFn : this._defRemoveFn, emitFacade: true }
- });
- },
-
- /**
- * Returns the next callback needing execution. If a callback is
- * configured to repeat via iterations or until, it will be returned until
- * the completion criteria is met.
- *
- * When the queue is empty, null is returned.
- *
- * @method next
- * @return {Function} the callback to execute
- */
- next : function () {
- var callback;
-
- while (this._q.length) {
- callback = this._q[0] = this._prepare(this._q[0]);
- if (callback && callback.until()) {
- this.fire(SHIFT, { callback: callback });
- callback = null;
- } else {
- break;
- }
- }
-
- return callback || null;
- },
-
- /**
- * Default functionality for the "shift" event. Shifts the
- * callback stored in the event object's <em>callback</em> property from
- * the queue if it is the first item.
- *
- * @method _defShiftFn
- * @param e {Event} The event object
- * @protected
- */
- _defShiftFn : function (e) {
- if (this.indexOf(e.callback) === 0) {
- this._q.shift();
- }
- },
-
- /**
- * Creates a wrapper function to execute the callback using the aggregated
- * configuration generated by combining the static AsyncQueue.defaults, the
- * instance defaults, and the specified callback settings.
- *
- * The wrapper function is decorated with the callback configuration as
- * properties for runtime modification.
- *
- * @method _prepare
- * @param callback {Object|Function} the raw callback
- * @return {Function} a decorated function wrapper to execute the callback
- * @protected
- */
- _prepare: function (callback) {
- if (isFunction(callback) && callback._prepared) {
- return callback;
- }
-
- var config = Y.merge(
- Queue.defaults,
- { context : this, args: [], _prepared: true },
- this.defaults,
- (isFunction(callback) ? { fn: callback } : callback)),
-
- wrapper = Y.bind(function () {
- if (!wrapper._running) {
- wrapper.iterations--;
- }
- if (isFunction(wrapper.fn)) {
- wrapper.fn.apply(wrapper.context || Y,
- Y.Array(wrapper.args));
- }
- }, this);
-
- return Y.mix(wrapper, config);
- },
-
- /**
- * Sets the queue in motion. All queued callbacks will be executed in
- * order unless pause() or stop() is called or if one of the callbacks is
- * configured with autoContinue: false.
- *
- * @method run
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- run : function () {
- var callback,
- cont = true;
-
- for (callback = this.next();
- cont && callback && !this.isRunning();
- callback = this.next())
- {
- cont = (callback.timeout < 0) ?
- this._execute(callback) :
- this._schedule(callback);
- }
-
- if (!callback) {
- /**
- * Event fired after the last queued callback is executed.
- * @event complete
- */
- this.fire('complete');
- }
-
- return this;
- },
-
- /**
- * Handles the execution of callbacks. Returns a boolean indicating
- * whether it is appropriate to continue running.
- *
- * @method _execute
- * @param callback {Object} the callback object to execute
- * @return {Boolean} whether the run loop should continue
- * @protected
- */
- _execute : function (callback) {
- this._running = callback._running = true;
-
- callback.iterations--;
- this.fire(EXECUTE, { callback: callback });
-
- var cont = this._running && callback.autoContinue;
-
- this._running = callback._running = false;
-
- return cont;
- },
-
- /**
- * Schedules the execution of asynchronous callbacks.
- *
- * @method _schedule
- * @param callback {Object} the callback object to execute
- * @return {Boolean} whether the run loop should continue
- * @protected
- */
- _schedule : function (callback) {
- this._running = Y.later(callback.timeout, this, function () {
- if (this._execute(callback)) {
- this.run();
- }
- });
-
- return false;
- },
-
- /**
- * Determines if the queue is waiting for a callback to complete execution.
- *
- * @method isRunning
- * @return {Boolean} true if queue is waiting for a
- * from any initiated transactions
- */
- isRunning : function () {
- return !!this._running;
- },
-
- /**
- * Default functionality for the "execute" event. Executes the
- * callback function
- *
- * @method _defExecFn
- * @param e {Event} the event object
- * @protected
- */
- _defExecFn : function (e) {
- e.callback();
- },
-
- /**
- * Add any number of callbacks to the end of the queue. Callbacks may be
- * provided as functions or objects.
- *
- * @method add
- * @param callback* {Function|Object} 0..n callbacks
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- add : function () {
- this.fire('add', { callbacks: Y.Array(arguments,0,true) });
-
- return this;
- },
-
- /**
- * Default functionality for the "add" event. Adds the callbacks
- * in the event facade to the queue. Callbacks successfully added to the
- * queue are present in the event's <code>added</code> property in the
- * after phase.
- *
- * @method _defAddFn
- * @param e {Event} the event object
- * @protected
- */
- _defAddFn : function(e) {
- var _q = this._q,
- added = [];
-
- Y.Array.each(e.callbacks, function (c) {
- if (isObject(c)) {
- _q.push(c);
- added.push(c);
- }
- });
-
- e.added = added;
- },
-
- /**
- * Pause the execution of the queue after the execution of the current
- * callback completes. If called from code outside of a queued callback,
- * clears the timeout for the pending callback. Paused queue can be
- * restarted with q.run()
- *
- * @method pause
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- pause: function () {
- if (isObject(this._running)) {
- this._running.cancel();
- }
-
- this._running = false;
-
- return this;
- },
-
- /**
- * Stop and clear the queue after the current execution of the
- * current callback completes.
- *
- * @method stop
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- stop : function () {
- this._q = [];
-
- return this.pause();
- },
-
- /**
- * Returns the current index of a callback. Pass in either the id or
- * callback function from getCallback.
- *
- * @method indexOf
- * @param callback {String|Function} the callback or its specified id
- * @return {Number} index of the callback or -1 if not found
- */
- indexOf : function (callback) {
- var i = 0, len = this._q.length, c;
-
- for (; i < len; ++i) {
- c = this._q[i];
- if (c === callback || c.id === callback) {
- return i;
- }
- }
-
- return -1;
- },
-
- /**
- * Retrieve a callback by its id. Useful to modify the configuration
- * while the queue is running.
- *
- * @method getCallback
- * @param id {String} the id assigned to the callback
- * @return {Object} the callback object
- */
- getCallback : function (id) {
- var i = this.indexOf(id);
-
- return (i > -1) ? this._q[i] : null;
- },
-
- /**
- * Promotes the named callback to the top of the queue. If a callback is
- * currently executing or looping (via until or iterations), the promotion
- * is scheduled to occur after the current callback has completed.
- *
- * @method promote
- * @param callback {String|Object} the callback object or a callback's id
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- promote : function (callback) {
- var payload = { callback : callback },e;
-
- if (this.isRunning()) {
- e = this.after(SHIFT, function () {
- this.fire(PROMOTE, payload);
- e.detach();
- }, this);
- } else {
- this.fire(PROMOTE, payload);
- }
-
- return this;
- },
-
- /**
- * <p>Default functionality for the "promote" event. Promotes the
- * named callback to the head of the queue.</p>
- *
- * <p>The event object will contain a property "callback", which
- * holds the id of a callback or the callback object itself.</p>
- *
- * @method _defPromoteFn
- * @param e {Event} the custom event
- * @protected
- */
- _defPromoteFn : function (e) {
- var i = this.indexOf(e.callback),
- promoted = (i > -1) ? this._q.splice(i,1)[0] : null;
-
- e.promoted = promoted;
-
- if (promoted) {
- this._q.unshift(promoted);
- }
- },
-
- /**
- * Removes the callback from the queue. If the queue is active, the
- * removal is scheduled to occur after the current callback has completed.
- *
- * @method remove
- * @param callback {String|Object} the callback object or a callback's id
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- remove : function (callback) {
- var payload = { callback : callback },e;
-
- // Can't return the removed callback because of the deferral until
- // current callback is complete
- if (this.isRunning()) {
- e = this.after(SHIFT, function () {
- this.fire(REMOVE, payload);
- e.detach();
- },this);
- } else {
- this.fire(REMOVE, payload);
- }
-
- return this;
- },
-
- /**
- * <p>Default functionality for the "remove" event. Removes the
- * callback from the queue.</p>
- *
- * <p>The event object will contain a property "callback", which
- * holds the id of a callback or the callback object itself.</p>
- *
- * @method _defRemoveFn
- * @param e {Event} the custom event
- * @protected
- */
- _defRemoveFn : function (e) {
- var i = this.indexOf(e.callback);
-
- e.removed = (i > -1) ? this._q.splice(i,1)[0] : null;
- },
-
- /**
- * Returns the number of callbacks in the queue.
- *
- * @method size
- * @return {Number}
- */
- size : function () {
- // next() flushes callbacks that have met their until() criteria and
- // therefore shouldn't count since they wouldn't execute anyway.
- if (!this.isRunning()) {
- this.next();
- }
-
- return this._q.length;
- }
-});
-
-
-
-}, '3.4.1' ,{requires:['event-custom']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/async-queue/async-queue-min.js'
--- src/maasserver/static/js/yui/3.4.1/async-queue/async-queue-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/async-queue/async-queue-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("async-queue",function(g){g.AsyncQueue=function(){this._init();this.add.apply(this,arguments);};var e=g.AsyncQueue,c="execute",b="shift",d="promote",h="remove",a=g.Lang.isObject,f=g.Lang.isFunction;e.defaults=g.mix({autoContinue:true,iterations:1,timeout:10,until:function(){this.iterations|=0;return this.iterations<=0;}},g.config.queueDefaults||{});g.extend(e,g.EventTarget,{_running:false,_init:function(){g.EventTarget.call(this,{prefix:"queue",emitFacade:true});this._q=[];this.defaults={};this._initEvents();},_initEvents:function(){this.publish({"execute":{defaultFn:this._defExecFn,emitFacade:true},"shift":{defaultFn:this._defShiftFn,emitFacade:true},"add":{defaultFn:this._defAddFn,emitFacade:true},"promote":{defaultFn:this._defPromoteFn,emitFacade:true},"remove":{defaultFn:this._defRemoveFn,emitFacade:true}});},next:function(){var i;while(this._q.length){i=this._q[0]=this._prepare(this._q[0]);if(i&&i.until()){this.fire(b,{callback:i});i=null;}else{break;}}return i||null;},_defShiftFn:function(i){if(this.indexOf(i.callback)===0){this._q.shift();}},_prepare:function(k){if(f(k)&&k._prepared){return k;}var i=g.merge(e.defaults,{context:this,args:[],_prepared:true},this.defaults,(f(k)?{fn:k}:k)),j=g.bind(function(){if(!j._running){j.iterations--;}if(f(j.fn)){j.fn.apply(j.context||g,g.Array(j.args));}},this);return g.mix(j,i);},run:function(){var j,i=true;for(j=this.next();i&&j&&!this.isRunning();j=this.next()){i=(j.timeout<0)?this._execute(j):this._schedule(j);}if(!j){this.fire("complete");}return this;},_execute:function(j){this._running=j._running=true;j.iterations--;this.fire(c,{callback:j});var i=this._running&&j.autoContinue;this._running=j._running=false;return i;},_schedule:function(i){this._running=g.later(i.timeout,this,function(){if(this._execute(i)){this.run();}});return false;},isRunning:function(){return !!this._running;},_defExecFn:function(i){i.callback();},add:function(){this.fire("add",{callbacks:g.Array(arguments,0,true)});return this;},_defAddFn:function(j){var k=this._q,i=[];g.Array.each(j.callbacks,function(l){if(a(l)){k.push(l);i.push(l);}});j.added=i;},pause:function(){if(a(this._running)){this._running.cancel();}this._running=false;return this;},stop:function(){this._q=[];return this.pause();},indexOf:function(m){var k=0,j=this._q.length,l;for(;k<j;++k){l=this._q[k];if(l===m||l.id===m){return k;}}return -1;},getCallback:function(k){var j=this.indexOf(k);return(j>-1)?this._q[j]:null;},promote:function(k){var j={callback:k},i;if(this.isRunning()){i=this.after(b,function(){this.fire(d,j);i.detach();},this);}else{this.fire(d,j);}return this;},_defPromoteFn:function(l){var j=this.indexOf(l.callback),k=(j>-1)?this._q.splice(j,1)[0]:null;l.promoted=k;if(k){this._q.unshift(k);}},remove:function(k){var j={callback:k},i;if(this.isRunning()){i=this.after(b,function(){this.fire(h,j);i.detach();},this);}else{this.fire(h,j);}return this;},_defRemoveFn:function(k){var j=this.indexOf(k.callback);k.removed=(j>-1)?this._q.splice(j,1)[0]:null;},size:function(){if(!this.isRunning()){this.next();}return this._q.length;}});},"3.4.1",{requires:["event-custom"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/async-queue/async-queue.js'
--- src/maasserver/static/js/yui/3.4.1/async-queue/async-queue.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/async-queue/async-queue.js 1970-01-01 00:00:00 +0000
@@ -1,528 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('async-queue', function(Y) {
-
-/**
- * <p>AsyncQueue allows you create a chain of function callbacks executed
- * via setTimeout (or synchronously) that are guaranteed to run in order.
- * Items in the queue can be promoted or removed. Start or resume the
- * execution chain with run(). pause() to temporarily delay execution, or
- * stop() to halt and clear the queue.</p>
- *
- * @module async-queue
- */
-
-/**
- * <p>A specialized queue class that supports scheduling callbacks to execute
- * sequentially, iteratively, even asynchronously.</p>
- *
- * <p>Callbacks can be function refs or objects with the following keys. Only
- * the <code>fn</code> key is required.</p>
- *
- * <ul>
- * <li><code>fn</code> -- The callback function</li>
- * <li><code>context</code> -- The execution context for the callbackFn.</li>
- * <li><code>args</code> -- Arguments to pass to callbackFn.</li>
- * <li><code>timeout</code> -- Millisecond delay before executing callbackFn.
- * (Applies to each iterative execution of callback)</li>
- * <li><code>iterations</code> -- Number of times to repeat the callback.
- * <li><code>until</code> -- Repeat the callback until this function returns
- * true. This setting trumps iterations.</li>
- * <li><code>autoContinue</code> -- Set to false to prevent the AsyncQueue from
- * executing the next callback in the Queue after
- * the callback completes.</li>
- * <li><code>id</code> -- Name that can be used to get, promote, get the
- * indexOf, or delete this callback.</li>
- * </ul>
- *
- * @class AsyncQueue
- * @extends EventTarget
- * @constructor
- * @param callback* {Function|Object} 0..n callbacks to seed the queue
- */
-Y.AsyncQueue = function() {
- this._init();
- this.add.apply(this, arguments);
-};
-
-var Queue = Y.AsyncQueue,
- EXECUTE = 'execute',
- SHIFT = 'shift',
- PROMOTE = 'promote',
- REMOVE = 'remove',
-
- isObject = Y.Lang.isObject,
- isFunction = Y.Lang.isFunction;
-
-/**
- * <p>Static default values used to populate callback configuration properties.
- * Preconfigured defaults include:</p>
- *
- * <ul>
- * <li><code>autoContinue</code>: <code>true</code></li>
- * <li><code>iterations</code>: 1</li>
- * <li><code>timeout</code>: 10 (10ms between callbacks)</li>
- * <li><code>until</code>: (function to run until iterations <= 0)</li>
- * </ul>
- *
- * @property defaults
- * @type {Object}
- * @static
- */
-Queue.defaults = Y.mix({
- autoContinue : true,
- iterations : 1,
- timeout : 10,
- until : function () {
- this.iterations |= 0;
- return this.iterations <= 0;
- }
-}, Y.config.queueDefaults || {});
-
-Y.extend(Queue, Y.EventTarget, {
- /**
- * Used to indicate the queue is currently executing a callback.
- *
- * @property _running
- * @type {Boolean|Object} true for synchronous callback execution, the
- * return handle from Y.later for async callbacks.
- * Otherwise false.
- * @protected
- */
- _running : false,
-
- /**
- * Initializes the AsyncQueue instance properties and events.
- *
- * @method _init
- * @protected
- */
- _init : function () {
- Y.EventTarget.call(this, { prefix: 'queue', emitFacade: true });
-
- this._q = [];
-
- /**
- * Callback defaults for this instance. Static defaults that are not
- * overridden are also included.
- *
- * @property defaults
- * @type {Object}
- */
- this.defaults = {};
-
- this._initEvents();
- },
-
- /**
- * Initializes the instance events.
- *
- * @method _initEvents
- * @protected
- */
- _initEvents : function () {
- this.publish({
- 'execute' : { defaultFn : this._defExecFn, emitFacade: true },
- 'shift' : { defaultFn : this._defShiftFn, emitFacade: true },
- 'add' : { defaultFn : this._defAddFn, emitFacade: true },
- 'promote' : { defaultFn : this._defPromoteFn, emitFacade: true },
- 'remove' : { defaultFn : this._defRemoveFn, emitFacade: true }
- });
- },
-
- /**
- * Returns the next callback needing execution. If a callback is
- * configured to repeat via iterations or until, it will be returned until
- * the completion criteria is met.
- *
- * When the queue is empty, null is returned.
- *
- * @method next
- * @return {Function} the callback to execute
- */
- next : function () {
- var callback;
-
- while (this._q.length) {
- callback = this._q[0] = this._prepare(this._q[0]);
- if (callback && callback.until()) {
- this.fire(SHIFT, { callback: callback });
- callback = null;
- } else {
- break;
- }
- }
-
- return callback || null;
- },
-
- /**
- * Default functionality for the "shift" event. Shifts the
- * callback stored in the event object's <em>callback</em> property from
- * the queue if it is the first item.
- *
- * @method _defShiftFn
- * @param e {Event} The event object
- * @protected
- */
- _defShiftFn : function (e) {
- if (this.indexOf(e.callback) === 0) {
- this._q.shift();
- }
- },
-
- /**
- * Creates a wrapper function to execute the callback using the aggregated
- * configuration generated by combining the static AsyncQueue.defaults, the
- * instance defaults, and the specified callback settings.
- *
- * The wrapper function is decorated with the callback configuration as
- * properties for runtime modification.
- *
- * @method _prepare
- * @param callback {Object|Function} the raw callback
- * @return {Function} a decorated function wrapper to execute the callback
- * @protected
- */
- _prepare: function (callback) {
- if (isFunction(callback) && callback._prepared) {
- return callback;
- }
-
- var config = Y.merge(
- Queue.defaults,
- { context : this, args: [], _prepared: true },
- this.defaults,
- (isFunction(callback) ? { fn: callback } : callback)),
-
- wrapper = Y.bind(function () {
- if (!wrapper._running) {
- wrapper.iterations--;
- }
- if (isFunction(wrapper.fn)) {
- wrapper.fn.apply(wrapper.context || Y,
- Y.Array(wrapper.args));
- }
- }, this);
-
- return Y.mix(wrapper, config);
- },
-
- /**
- * Sets the queue in motion. All queued callbacks will be executed in
- * order unless pause() or stop() is called or if one of the callbacks is
- * configured with autoContinue: false.
- *
- * @method run
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- run : function () {
- var callback,
- cont = true;
-
- for (callback = this.next();
- cont && callback && !this.isRunning();
- callback = this.next())
- {
- cont = (callback.timeout < 0) ?
- this._execute(callback) :
- this._schedule(callback);
- }
-
- if (!callback) {
- /**
- * Event fired after the last queued callback is executed.
- * @event complete
- */
- this.fire('complete');
- }
-
- return this;
- },
-
- /**
- * Handles the execution of callbacks. Returns a boolean indicating
- * whether it is appropriate to continue running.
- *
- * @method _execute
- * @param callback {Object} the callback object to execute
- * @return {Boolean} whether the run loop should continue
- * @protected
- */
- _execute : function (callback) {
- this._running = callback._running = true;
-
- callback.iterations--;
- this.fire(EXECUTE, { callback: callback });
-
- var cont = this._running && callback.autoContinue;
-
- this._running = callback._running = false;
-
- return cont;
- },
-
- /**
- * Schedules the execution of asynchronous callbacks.
- *
- * @method _schedule
- * @param callback {Object} the callback object to execute
- * @return {Boolean} whether the run loop should continue
- * @protected
- */
- _schedule : function (callback) {
- this._running = Y.later(callback.timeout, this, function () {
- if (this._execute(callback)) {
- this.run();
- }
- });
-
- return false;
- },
-
- /**
- * Determines if the queue is waiting for a callback to complete execution.
- *
- * @method isRunning
- * @return {Boolean} true if queue is waiting for a
- * from any initiated transactions
- */
- isRunning : function () {
- return !!this._running;
- },
-
- /**
- * Default functionality for the "execute" event. Executes the
- * callback function
- *
- * @method _defExecFn
- * @param e {Event} the event object
- * @protected
- */
- _defExecFn : function (e) {
- e.callback();
- },
-
- /**
- * Add any number of callbacks to the end of the queue. Callbacks may be
- * provided as functions or objects.
- *
- * @method add
- * @param callback* {Function|Object} 0..n callbacks
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- add : function () {
- this.fire('add', { callbacks: Y.Array(arguments,0,true) });
-
- return this;
- },
-
- /**
- * Default functionality for the "add" event. Adds the callbacks
- * in the event facade to the queue. Callbacks successfully added to the
- * queue are present in the event's <code>added</code> property in the
- * after phase.
- *
- * @method _defAddFn
- * @param e {Event} the event object
- * @protected
- */
- _defAddFn : function(e) {
- var _q = this._q,
- added = [];
-
- Y.Array.each(e.callbacks, function (c) {
- if (isObject(c)) {
- _q.push(c);
- added.push(c);
- }
- });
-
- e.added = added;
- },
-
- /**
- * Pause the execution of the queue after the execution of the current
- * callback completes. If called from code outside of a queued callback,
- * clears the timeout for the pending callback. Paused queue can be
- * restarted with q.run()
- *
- * @method pause
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- pause: function () {
- if (isObject(this._running)) {
- this._running.cancel();
- }
-
- this._running = false;
-
- return this;
- },
-
- /**
- * Stop and clear the queue after the current execution of the
- * current callback completes.
- *
- * @method stop
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- stop : function () {
- this._q = [];
-
- return this.pause();
- },
-
- /**
- * Returns the current index of a callback. Pass in either the id or
- * callback function from getCallback.
- *
- * @method indexOf
- * @param callback {String|Function} the callback or its specified id
- * @return {Number} index of the callback or -1 if not found
- */
- indexOf : function (callback) {
- var i = 0, len = this._q.length, c;
-
- for (; i < len; ++i) {
- c = this._q[i];
- if (c === callback || c.id === callback) {
- return i;
- }
- }
-
- return -1;
- },
-
- /**
- * Retrieve a callback by its id. Useful to modify the configuration
- * while the queue is running.
- *
- * @method getCallback
- * @param id {String} the id assigned to the callback
- * @return {Object} the callback object
- */
- getCallback : function (id) {
- var i = this.indexOf(id);
-
- return (i > -1) ? this._q[i] : null;
- },
-
- /**
- * Promotes the named callback to the top of the queue. If a callback is
- * currently executing or looping (via until or iterations), the promotion
- * is scheduled to occur after the current callback has completed.
- *
- * @method promote
- * @param callback {String|Object} the callback object or a callback's id
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- promote : function (callback) {
- var payload = { callback : callback },e;
-
- if (this.isRunning()) {
- e = this.after(SHIFT, function () {
- this.fire(PROMOTE, payload);
- e.detach();
- }, this);
- } else {
- this.fire(PROMOTE, payload);
- }
-
- return this;
- },
-
- /**
- * <p>Default functionality for the "promote" event. Promotes the
- * named callback to the head of the queue.</p>
- *
- * <p>The event object will contain a property "callback", which
- * holds the id of a callback or the callback object itself.</p>
- *
- * @method _defPromoteFn
- * @param e {Event} the custom event
- * @protected
- */
- _defPromoteFn : function (e) {
- var i = this.indexOf(e.callback),
- promoted = (i > -1) ? this._q.splice(i,1)[0] : null;
-
- e.promoted = promoted;
-
- if (promoted) {
- this._q.unshift(promoted);
- }
- },
-
- /**
- * Removes the callback from the queue. If the queue is active, the
- * removal is scheduled to occur after the current callback has completed.
- *
- * @method remove
- * @param callback {String|Object} the callback object or a callback's id
- * @return {AsyncQueue} the AsyncQueue instance
- * @chainable
- */
- remove : function (callback) {
- var payload = { callback : callback },e;
-
- // Can't return the removed callback because of the deferral until
- // current callback is complete
- if (this.isRunning()) {
- e = this.after(SHIFT, function () {
- this.fire(REMOVE, payload);
- e.detach();
- },this);
- } else {
- this.fire(REMOVE, payload);
- }
-
- return this;
- },
-
- /**
- * <p>Default functionality for the "remove" event. Removes the
- * callback from the queue.</p>
- *
- * <p>The event object will contain a property "callback", which
- * holds the id of a callback or the callback object itself.</p>
- *
- * @method _defRemoveFn
- * @param e {Event} the custom event
- * @protected
- */
- _defRemoveFn : function (e) {
- var i = this.indexOf(e.callback);
-
- e.removed = (i > -1) ? this._q.splice(i,1)[0] : null;
- },
-
- /**
- * Returns the number of callbacks in the queue.
- *
- * @method size
- * @return {Number}
- */
- size : function () {
- // next() flushes callbacks that have met their until() criteria and
- // therefore shouldn't count since they wouldn't execute anyway.
- if (!this.isRunning()) {
- this.next();
- }
-
- return this._q.length;
- }
-});
-
-
-
-}, '3.4.1' ,{requires:['event-custom']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/attribute-base'
=== removed file 'src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base-debug.js'
--- src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base-debug.js 1970-01-01 00:00:00 +0000
@@ -1,1197 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('attribute-base', function(Y) {
-
- /**
- * The State class maintains state for a collection of named items, with
- * a varying number of properties defined.
- *
- * It avoids the need to create a separate class for the item, and separate instances
- * of these classes for each item, by storing the state in a 2 level hash table,
- * improving performance when the number of items is likely to be large.
- *
- * @constructor
- * @class State
- */
- Y.State = function() {
- /**
- * Hash of attributes
- * @property data
- */
- this.data = {};
- };
-
- Y.State.prototype = {
-
- /**
- * Adds a property to an item.
- *
- * @method add
- * @param name {String} The name of the item.
- * @param key {String} The name of the property.
- * @param val {Any} The value of the property.
- */
- add : function(name, key, val) {
- var d = this.data;
- d[key] = d[key] || {};
- d[key][name] = val;
- },
-
- /**
- * Adds multiple properties to an item.
- *
- * @method addAll
- * @param name {String} The name of the item.
- * @param o {Object} A hash of property/value pairs.
- */
- addAll: function(name, o) {
- var key;
- for (key in o) {
- if (o.hasOwnProperty(key)) {
- this.add(name, key, o[key]);
- }
- }
- },
-
- /**
- * Removes a property from an item.
- *
- * @method remove
- * @param name {String} The name of the item.
- * @param key {String} The property to remove.
- */
- remove: function(name, key) {
- var d = this.data;
- if (d[key] && (name in d[key])) {
- delete d[key][name];
- }
- },
-
- /**
- * Removes multiple properties from an item, or remove the item completely.
- *
- * @method removeAll
- * @param name {String} The name of the item.
- * @param o {Object|Array} Collection of properties to delete. If not provided, the entire item is removed.
- */
- removeAll: function(name, o) {
- var d = this.data;
-
- Y.each(o || d, function(v, k) {
- if(Y.Lang.isString(k)) {
- this.remove(name, k);
- } else {
- this.remove(name, v);
- }
- }, this);
- },
-
- /**
- * For a given item, returns the value of the property requested, or undefined if not found.
- *
- * @method get
- * @param name {String} The name of the item
- * @param key {String} Optional. The property value to retrieve.
- * @return {Any} The value of the supplied property.
- */
- get: function(name, key) {
- var d = this.data;
- return (d[key] && name in d[key]) ? d[key][name] : undefined;
- },
-
- /**
- * For the given item, returns a disposable object with all of the
- * item's property/value pairs.
- *
- * @method getAll
- * @param name {String} The name of the item
- * @return {Object} An object with property/value pairs for the item.
- */
- getAll : function(name) {
- var d = this.data, o;
-
- Y.each(d, function(v, k) {
- if (name in d[k]) {
- o = o || {};
- o[k] = v[name];
- }
- }, this);
-
- return o;
- }
- };
- /**
- * The attribute module provides an augmentable Attribute implementation, which
- * adds configurable attributes and attribute change events to the class being
- * augmented. It also provides a State class, which is used internally by Attribute,
- * but can also be used independently to provide a name/property/value data structure to
- * store state.
- *
- * @module attribute
- */
-
- /**
- * The attribute-base submodule provides core attribute handling support, with everything
- * aside from complex attribute handling in the provider's constructor.
- *
- * @module attribute
- * @submodule attribute-base
- */
- var O = Y.Object,
- Lang = Y.Lang,
- EventTarget = Y.EventTarget,
-
- DOT = ".",
- CHANGE = "Change",
-
- // Externally configurable props
- GETTER = "getter",
- SETTER = "setter",
- READ_ONLY = "readOnly",
- WRITE_ONCE = "writeOnce",
- INIT_ONLY = "initOnly",
- VALIDATOR = "validator",
- VALUE = "value",
- VALUE_FN = "valueFn",
- BROADCAST = "broadcast",
- LAZY_ADD = "lazyAdd",
- BYPASS_PROXY = "_bypassProxy",
-
- // Used for internal state management
- ADDED = "added",
- INITIALIZING = "initializing",
- INIT_VALUE = "initValue",
- PUBLISHED = "published",
- DEF_VALUE = "defaultValue",
- LAZY = "lazy",
- IS_LAZY_ADD = "isLazyAdd",
-
- INVALID_VALUE,
-
- MODIFIABLE = {};
-
- // Properties which can be changed after the attribute has been added.
- MODIFIABLE[READ_ONLY] = 1;
- MODIFIABLE[WRITE_ONCE] = 1;
- MODIFIABLE[GETTER] = 1;
- MODIFIABLE[BROADCAST] = 1;
-
- /**
- * <p>
- * Attribute provides configurable attribute support along with attribute change events. It is designed to be
- * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
- * along with attribute change events.
- * </p>
- * <p>For example, attributes added to the host can be configured:</p>
- * <ul>
- * <li>As read only.</li>
- * <li>As write once.</li>
- * <li>With a setter function, which can be used to manipulate
- * values passed to Attribute's <a href="#method_set">set</a> method, before they are stored.</li>
- * <li>With a getter function, which can be used to manipulate stored values,
- * before they are returned by Attribute's <a href="#method_get">get</a> method.</li>
- * <li>With a validator function, to validate values before they are stored.</li>
- * </ul>
- *
- * <p>See the <a href="#method_addAttr">addAttr</a> method, for the complete set of configuration
- * options available for attributes</p>.
- *
- * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
- * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
- * of attributes for derived classes, accounting for values passed into the constructor.</p>
- *
- * @class Attribute
- * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
- * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
- * @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).
- * @uses EventTarget
- */
- function Attribute(attrs, values, lazy) {
-
- var host = this; // help compression
-
- // Perf tweak - avoid creating event literals if not required.
- host._ATTR_E_FACADE = {};
-
- EventTarget.call(host, {emitFacade:true});
-
- // _conf maintained for backwards compat
- host._conf = host._state = new Y.State();
-
- host._stateProxy = host._stateProxy || null;
- host._requireAddAttr = host._requireAddAttr || false;
-
- this._initAttrs(attrs, values, lazy);
- }
-
- /**
- * <p>The value to return from an attribute setter in order to prevent the set from going through.</p>
- *
- * <p>You can return this value from your setter if you wish to combine validator and setter
- * functionality into a single setter function, which either returns the massaged value to be stored or
- * Attribute.INVALID_VALUE to prevent invalid values from being stored.</p>
- *
- * @property INVALID_VALUE
- * @type Object
- * @static
- * @final
- */
- Attribute.INVALID_VALUE = {};
- INVALID_VALUE = Attribute.INVALID_VALUE;
-
- /**
- * The list of properties which can be configured for
- * each attribute (e.g. setter, getter, writeOnce etc.).
- *
- * This property is used internally as a whitelist for faster
- * Y.mix operations.
- *
- * @property _ATTR_CFG
- * @type Array
- * @static
- * @protected
- */
- Attribute._ATTR_CFG = [SETTER, GETTER, VALIDATOR, VALUE, VALUE_FN, WRITE_ONCE, READ_ONLY, LAZY_ADD, BROADCAST, BYPASS_PROXY];
-
- Attribute.prototype = {
- /**
- * <p>
- * Adds an attribute with the provided configuration to the host object.
- * </p>
- * <p>
- * The config argument object supports the following properties:
- * </p>
- *
- * <dl>
- * <dt>value <Any></dt>
- * <dd>The initial value to set on the attribute</dd>
- *
- * <dt>valueFn <Function | String></dt>
- * <dd>
- * <p>A function, which will return the initial value to set on the attribute. This is useful
- * for cases where the attribute configuration is defined statically, but needs to
- * reference the host instance ("this") to obtain an initial value. If both the value and valueFn properties are defined,
- * the value returned by the valueFn has precedence over the value property, unless it returns undefined, in which
- * case the value property is used.</p>
- *
- * <p>valueFn can also be set to a string, representing the name of the instance method to be used to retrieve the value.</p>
- * </dd>
- *
- * <dt>readOnly <boolean></dt>
- * <dd>Whether or not the attribute is read only. Attributes having readOnly set to true
- * cannot be modified by invoking the set method.</dd>
- *
- * <dt>writeOnce <boolean> or <string></dt>
- * <dd>
- * Whether or not the attribute is "write once". Attributes having writeOnce set to true,
- * can only have their values set once, be it through the default configuration,
- * constructor configuration arguments, or by invoking set.
- * <p>The writeOnce attribute can also be set to the string "initOnly", in which case the attribute can only be set during initialization
- * (when used with Base, this means it can only be set during construction)</p>
- * </dd>
- *
- * <dt>setter <Function | String></dt>
- * <dd>
- * <p>The setter function used to massage or normalize the value passed to the set method for the attribute.
- * The value returned by the setter will be the final stored value. Returning
- * <a href="#property_Attribute.INVALID_VALUE">Attribute.INVALID_VALUE</a>, from the setter will prevent
- * the value from being stored.
- * </p>
- *
- * <p>setter can also be set to a string, representing the name of the instance method to be used as the setter function.</p>
- * </dd>
- *
- * <dt>getter <Function | String></dt>
- * <dd>
- * <p>
- * The getter function used to massage or normalize the value returned by the get method for the attribute.
- * The value returned by the getter function is the value which will be returned to the user when they
- * invoke get.
- * </p>
- *
- * <p>getter can also be set to a string, representing the name of the instance method to be used as the getter function.</p>
- * </dd>
- *
- * <dt>validator <Function | String></dt>
- * <dd>
- * <p>
- * The validator function invoked prior to setting the stored value. Returning
- * false from the validator function will prevent the value from being stored.
- * </p>
- *
- * <p>validator can also be set to a string, representing the name of the instance method to be used as the validator function.</p>
- * </dd>
- *
- * <dt>broadcast <int></dt>
- * <dd>If and how attribute change events for this attribute should be broadcast. See CustomEvent's <a href="CustomEvent.html#property_broadcast">broadcast</a> property for
- * valid values. By default attribute change events are not broadcast.</dd>
- *
- * <dt>lazyAdd <boolean></dt>
- * <dd>Whether or not to delay initialization of the attribute until the first call to get/set it.
- * This flag can be used to over-ride lazy initialization on a per attribute basis, when adding multiple attributes through
- * the <a href="#method_addAttrs">addAttrs</a> method.</dd>
- *
- * </dl>
- *
- * <p>The setter, getter and validator are invoked with the value and name passed in as the first and second arguments, and with
- * the context ("this") set to the host object.</p>
- *
- * <p>Configuration properties outside of the list mentioned above are considered private properties used internally by attribute, and are not intended for public use.</p>
- *
- * @method addAttr
- *
- * @param {String} name The name of the attribute.
- * @param {Object} config An object with attribute configuration property/value pairs, specifying the configuration for the attribute.
- *
- * <p>
- * <strong>NOTE:</strong> The configuration object is modified when adding an attribute, so if you need
- * to protect the original values, you will need to merge the object.
- * </p>
- *
- * @param {boolean} lazy (optional) Whether or not to add this attribute lazily (on the first call to get/set).
- *
- * @return {Object} A reference to the host object.
- *
- * @chainable
- */
- addAttr: function(name, config, lazy) {
-
- Y.log('Adding attribute: ' + name, 'info', 'attribute');
-
- var host = this, // help compression
- state = host._state,
- value,
- hasValue;
-
- lazy = (LAZY_ADD in config) ? config[LAZY_ADD] : lazy;
-
- if (lazy && !host.attrAdded(name)) {
- state.add(name, LAZY, config || {});
- state.add(name, ADDED, true);
- } else {
-
- if (host.attrAdded(name) && !state.get(name, IS_LAZY_ADD)) { Y.log('Attribute: ' + name + ' already exists. Cannot add it again without removing it first', 'warn', 'attribute'); }
-
- if (!host.attrAdded(name) || state.get(name, IS_LAZY_ADD)) {
-
- config = config || {};
-
- hasValue = (VALUE in config);
-
- if (config.readOnly && !hasValue) { Y.log('readOnly attribute: ' + name + ', added without an initial value. Value will be set on initial call to set', 'warn', 'attribute');}
-
- if(hasValue) {
- // We'll go through set, don't want to set value in config directly
- value = config.value;
- delete config.value;
- }
-
- config.added = true;
- config.initializing = true;
-
- state.addAll(name, config);
-
- if (hasValue) {
- // Go through set, so that raw values get normalized/validated
- host.set(name, value);
- }
-
- state.remove(name, INITIALIZING);
- }
- }
-
- return host;
- },
-
- /**
- * Checks if the given attribute has been added to the host
- *
- * @method attrAdded
- * @param {String} name The name of the attribute to check.
- * @return {boolean} true if an attribute with the given name has been added, false if it hasn't. This method will return true for lazily added attributes.
- */
- attrAdded: function(name) {
- return !!this._state.get(name, ADDED);
- },
-
- /**
- * Updates the configuration of an attribute which has already been added.
- * <p>
- * The properties which can be modified through this interface are limited
- * to the following subset of attributes, which can be safely modified
- * after a value has already been set on the attribute: readOnly, writeOnce,
- * broadcast and getter.
- * </p>
- * @method modifyAttr
- * @param {String} name The name of the attribute whose configuration is to be updated.
- * @param {Object} config An object with configuration property/value pairs, specifying the configuration properties to modify.
- */
- modifyAttr: function(name, config) {
- var host = this, // help compression
- prop, state;
-
- if (host.attrAdded(name)) {
-
- if (host._isLazyAttr(name)) {
- host._addLazyAttr(name);
- }
-
- state = host._state;
- for (prop in config) {
- if (MODIFIABLE[prop] && config.hasOwnProperty(prop)) {
- state.add(name, prop, config[prop]);
-
- // If we reconfigured broadcast, need to republish
- if (prop === BROADCAST) {
- state.remove(name, PUBLISHED);
- }
- }
- }
- }
-
- if (!host.attrAdded(name)) {Y.log('Attribute modifyAttr:' + name + ' has not been added. Use addAttr to add the attribute', 'warn', 'attribute');}
- },
-
- /**
- * Removes an attribute from the host object
- *
- * @method removeAttr
- * @param {String} name The name of the attribute to be removed.
- */
- removeAttr: function(name) {
- this._state.removeAll(name);
- },
-
- /**
- * Returns the current value of the attribute. If the attribute
- * has been configured with a 'getter' function, this method will delegate
- * to the 'getter' to obtain the value of the attribute.
- *
- * @method get
- *
- * @param {String} name The name of the attribute. If the value of the attribute is an Object,
- * dot notation can be used to obtain the value of a property of the object (e.g. <code>get("x.y.z")</code>)
- *
- * @return {Any} The value of the attribute
- */
- get : function(name) {
- return this._getAttr(name);
- },
-
- /**
- * Checks whether or not the attribute is one which has been
- * added lazily and still requires initialization.
- *
- * @method _isLazyAttr
- * @private
- * @param {String} name The name of the attribute
- * @return {boolean} true if it's a lazily added attribute, false otherwise.
- */
- _isLazyAttr: function(name) {
- return this._state.get(name, LAZY);
- },
-
- /**
- * Finishes initializing an attribute which has been lazily added.
- *
- * @method _addLazyAttr
- * @private
- * @param {Object} name The name of the attribute
- */
- _addLazyAttr: function(name) {
- var state = this._state,
- lazyCfg = state.get(name, LAZY);
-
- state.add(name, IS_LAZY_ADD, true);
- state.remove(name, LAZY);
- this.addAttr(name, lazyCfg);
- },
-
- /**
- * Sets the value of an attribute.
- *
- * @method set
- * @chainable
- *
- * @param {String} name The name of the attribute. If the
- * current value of the attribute is an Object, dot notation can be used
- * to set the value of a property within the object (e.g. <code>set("x.y.z", 5)</code>).
- *
- * @param {Any} value The value to set the attribute to.
- *
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event. This
- * can be used as a flexible way to identify the source of a call to set, allowing
- * the developer to distinguish between set called internally by the host, vs.
- * set called externally by the application developer.
- *
- * @return {Object} A reference to the host object.
- */
- set : function(name, val, opts) {
- return this._setAttr(name, val, opts);
- },
-
- /**
- * Resets the attribute (or all attributes) to its initial value, as long as
- * the attribute is not readOnly, or writeOnce.
- *
- * @method reset
- * @param {String} name Optional. The name of the attribute to reset. If omitted, all attributes are reset.
- * @return {Object} A reference to the host object.
- * @chainable
- */
- reset : function(name) {
- var host = this, // help compression
- added;
-
- if (name) {
- if (host._isLazyAttr(name)) {
- host._addLazyAttr(name);
- }
- host.set(name, host._state.get(name, INIT_VALUE));
- } else {
- added = host._state.data.added;
- Y.each(added, function(v, n) {
- host.reset(n);
- }, host);
- }
- return host;
- },
-
- /**
- * Allows setting of readOnly/writeOnce attributes. See <a href="#method_set">set</a> for argument details.
- *
- * @method _set
- * @protected
- * @chainable
- *
- * @param {String} name The name of the attribute.
- * @param {Any} val The value to set the attribute to.
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event.
- * @return {Object} A reference to the host object.
- */
- _set : function(name, val, opts) {
- return this._setAttr(name, val, opts, true);
- },
-
- /**
- * Provides the common implementation for the public get method,
- * allowing Attribute hosts to over-ride either method.
- *
- * See <a href="#method_get">get</a> for argument details.
- *
- * @method _getAttr
- * @protected
- * @chainable
- *
- * @param {String} name The name of the attribute.
- * @return {Any} The value of the attribute.
- */
- _getAttr : function(name) {
- var host = this, // help compression
- fullName = name,
- state = host._state,
- path,
- getter,
- val,
- cfg;
-
- if (name.indexOf(DOT) !== -1) {
- path = name.split(DOT);
- name = path.shift();
- }
-
- // On Demand - Should be rare - handles out of order valueFn references
- if (host._tCfgs && host._tCfgs[name]) {
- cfg = {};
- cfg[name] = host._tCfgs[name];
- delete host._tCfgs[name];
- host._addAttrs(cfg, host._tVals);
- }
-
- // Lazy Init
- if (host._isLazyAttr(name)) {
- host._addLazyAttr(name);
- }
-
- val = host._getStateVal(name);
- getter = state.get(name, GETTER);
-
- if (getter && !getter.call) {
- getter = this[getter];
- }
-
- val = (getter) ? getter.call(host, val, fullName) : val;
- val = (path) ? O.getValue(val, path) : val;
-
- return val;
- },
-
- /**
- * Provides the common implementation for the public set and protected _set methods.
- *
- * See <a href="#method_set">set</a> for argument details.
- *
- * @method _setAttr
- * @protected
- * @chainable
- *
- * @param {String} name The name of the attribute.
- * @param {Any} value The value to set the attribute to.
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event.
- * @param {boolean} force If true, allows the caller to set values for
- * readOnly or writeOnce attributes which have already been set.
- *
- * @return {Object} A reference to the host object.
- */
- _setAttr : function(name, val, opts, force) {
- var allowSet = true,
- state = this._state,
- stateProxy = this._stateProxy,
- data = state.data,
- initialSet,
- strPath,
- path,
- currVal,
- writeOnce,
- initializing;
-
- if (name.indexOf(DOT) !== -1) {
- strPath = name;
- path = name.split(DOT);
- name = path.shift();
- }
-
- if (this._isLazyAttr(name)) {
- this._addLazyAttr(name);
- }
-
- initialSet = (!data.value || !(name in data.value));
-
- if (stateProxy && name in stateProxy && !this._state.get(name, BYPASS_PROXY)) {
- // TODO: Value is always set for proxy. Can we do any better? Maybe take a snapshot as the initial value for the first call to set?
- initialSet = false;
- }
-
- if (this._requireAddAttr && !this.attrAdded(name)) {
- Y.log('Set attribute:' + name + ', aborted; Attribute is not configured', 'warn', 'attribute');
- } else {
-
- writeOnce = state.get(name, WRITE_ONCE);
- initializing = state.get(name, INITIALIZING);
-
- if (!initialSet && !force) {
-
- if (writeOnce) {
- Y.log('Set attribute:' + name + ', aborted; Attribute is writeOnce', 'warn', 'attribute');
- allowSet = false;
- }
-
- if (state.get(name, READ_ONLY)) {
- Y.log('Set attribute:' + name + ', aborted; Attribute is readOnly', 'warn', 'attribute');
- allowSet = false;
- }
- }
-
- if (!initializing && !force && writeOnce === INIT_ONLY) {
- Y.log('Set attribute:' + name + ', aborted; Attribute is writeOnce: "initOnly"', 'warn', 'attribute');
- allowSet = false;
- }
-
- if (allowSet) {
- // Don't need currVal if initialSet (might fail in custom getter if it always expects a non-undefined/non-null value)
- if (!initialSet) {
- currVal = this.get(name);
- }
-
- if (path) {
- val = O.setValue(Y.clone(currVal), path, val);
-
- if (val === undefined) {
- Y.log('Set attribute path:' + strPath + ', aborted; Path is invalid', 'warn', 'attribute');
- allowSet = false;
- }
- }
-
- if (allowSet) {
- if (initializing) {
- this._setAttrVal(name, strPath, currVal, val);
- } else {
- this._fireAttrChange(name, strPath, currVal, val, opts);
- }
- }
- }
- }
-
- return this;
- },
-
- /**
- * Utility method to help setup the event payload and fire the attribute change event.
- *
- * @method _fireAttrChange
- * @private
- * @param {String} attrName The name of the attribute
- * @param {String} subAttrName The full path of the property being changed,
- * if this is a sub-attribute value being change. Otherwise null.
- * @param {Any} currVal The current value of the attribute
- * @param {Any} newVal The new value of the attribute
- * @param {Object} opts Any additional event data to mix into the attribute change event's event facade.
- */
- _fireAttrChange : function(attrName, subAttrName, currVal, newVal, opts) {
- var host = this,
- eventName = attrName + CHANGE,
- state = host._state,
- facade;
-
- if (!state.get(attrName, PUBLISHED)) {
- host.publish(eventName, {
- queuable:false,
- defaultTargetOnly: true,
- defaultFn:host._defAttrChangeFn,
- silent:true,
- broadcast : state.get(attrName, BROADCAST)
- });
- state.add(attrName, PUBLISHED, true);
- }
-
- facade = (opts) ? Y.merge(opts) : host._ATTR_E_FACADE;
-
- // Not using the single object signature for fire({type:..., newVal:...}), since
- // we don't want to override type. Changed to the fire(type, {newVal:...}) signature.
-
- // facade.type = eventName;
- facade.attrName = attrName;
- facade.subAttrName = subAttrName;
- facade.prevVal = currVal;
- facade.newVal = newVal;
-
- // host.fire(facade);
- host.fire(eventName, facade);
- },
-
- /**
- * Default function for attribute change events.
- *
- * @private
- * @method _defAttrChangeFn
- * @param {EventFacade} e The event object for attribute change events.
- */
- _defAttrChangeFn : function(e) {
- if (!this._setAttrVal(e.attrName, e.subAttrName, e.prevVal, e.newVal)) {
- Y.log('State not updated and stopImmediatePropagation called for attribute: ' + e.attrName + ' , value:' + e.newVal, 'warn', 'attribute');
- // Prevent "after" listeners from being invoked since nothing changed.
- e.stopImmediatePropagation();
- } else {
- e.newVal = this.get(e.attrName);
- }
- },
-
- /**
- * Gets the stored value for the attribute, from either the
- * internal state object, or the state proxy if it exits
- *
- * @method _getStateVal
- * @private
- * @param {String} name The name of the attribute
- * @return {Any} The stored value of the attribute
- */
- _getStateVal : function(name) {
- var stateProxy = this._stateProxy;
- return stateProxy && (name in stateProxy) && !this._state.get(name, BYPASS_PROXY) ? stateProxy[name] : this._state.get(name, VALUE);
- },
-
- /**
- * Sets the stored value for the attribute, in either the
- * internal state object, or the state proxy if it exits
- *
- * @method _setStateVal
- * @private
- * @param {String} name The name of the attribute
- * @param {Any} value The value of the attribute
- */
- _setStateVal : function(name, value) {
- var stateProxy = this._stateProxy;
- if (stateProxy && (name in stateProxy) && !this._state.get(name, BYPASS_PROXY)) {
- stateProxy[name] = value;
- } else {
- this._state.add(name, VALUE, value);
- }
- },
-
- /**
- * Updates the stored value of the attribute in the privately held State object,
- * if validation and setter passes.
- *
- * @method _setAttrVal
- * @private
- * @param {String} attrName The attribute name.
- * @param {String} subAttrName The sub-attribute name, if setting a sub-attribute property ("x.y.z").
- * @param {Any} prevVal The currently stored value of the attribute.
- * @param {Any} newVal The value which is going to be stored.
- *
- * @return {booolean} true if the new attribute value was stored, false if not.
- */
- _setAttrVal : function(attrName, subAttrName, prevVal, newVal) {
-
- var host = this,
- allowSet = true,
- state = host._state,
-
- validator = state.get(attrName, VALIDATOR),
- setter = state.get(attrName, SETTER),
- initializing = state.get(attrName, INITIALIZING),
- prevValRaw = this._getStateVal(attrName),
-
- name = subAttrName || attrName,
- retVal,
- valid;
-
- if (validator) {
- if (!validator.call) {
- // Assume string - trying to keep critical path tight, so avoiding Lang check
- validator = this[validator];
- }
- if (validator) {
- valid = validator.call(host, newVal, name);
-
- if (!valid && initializing) {
- newVal = state.get(attrName, DEF_VALUE);
- valid = true; // Assume it's valid, for perf.
- }
- }
- }
-
- if (!validator || valid) {
- if (setter) {
- if (!setter.call) {
- // Assume string - trying to keep critical path tight, so avoiding Lang check
- setter = this[setter];
- }
- if (setter) {
- retVal = setter.call(host, newVal, name);
-
- if (retVal === INVALID_VALUE) {
- Y.log('Attribute: ' + attrName + ', setter returned Attribute.INVALID_VALUE for value:' + newVal, 'warn', 'attribute');
- allowSet = false;
- } else if (retVal !== undefined){
- Y.log('Attribute: ' + attrName + ', raw value: ' + newVal + ' modified by setter to:' + retVal, 'info', 'attribute');
- newVal = retVal;
- }
- }
- }
-
- if (allowSet) {
- if(!subAttrName && (newVal === prevValRaw) && !Lang.isObject(newVal)) {
- Y.log('Attribute: ' + attrName + ', value unchanged:' + newVal, 'warn', 'attribute');
- allowSet = false;
- } else {
- // Store value
- if (state.get(attrName, INIT_VALUE) === undefined) {
- state.add(attrName, INIT_VALUE, newVal);
- }
- host._setStateVal(attrName, newVal);
- }
- }
-
- } else {
- Y.log('Attribute:' + attrName + ', Validation failed for value:' + newVal, 'warn', 'attribute');
- allowSet = false;
- }
-
- return allowSet;
- },
-
- /**
- * Sets multiple attribute values.
- *
- * @method setAttrs
- * @param {Object} attrs An object with attributes name/value pairs.
- * @return {Object} A reference to the host object.
- * @chainable
- */
- setAttrs : function(attrs, opts) {
- return this._setAttrs(attrs, opts);
- },
-
- /**
- * Implementation behind the public setAttrs method, to set multiple attribute values.
- *
- * @method _setAttrs
- * @protected
- * @param {Object} attrs An object with attributes name/value pairs.
- * @return {Object} A reference to the host object.
- * @chainable
- */
- _setAttrs : function(attrs, opts) {
- for (var attr in attrs) {
- if ( attrs.hasOwnProperty(attr) ) {
- this.set(attr, attrs[attr]);
- }
- }
- return this;
- },
-
- /**
- * Gets multiple attribute values.
- *
- * @method getAttrs
- * @param {Array | boolean} attrs Optional. An array of attribute names. If omitted, all attribute values are
- * returned. If set to true, all attributes modified from their initial values are returned.
- * @return {Object} An object with attribute name/value pairs.
- */
- getAttrs : function(attrs) {
- return this._getAttrs(attrs);
- },
-
- /**
- * Implementation behind the public getAttrs method, to get multiple attribute values.
- *
- * @method _getAttrs
- * @protected
- * @param {Array | boolean} attrs Optional. An array of attribute names. If omitted, all attribute values are
- * returned. If set to true, all attributes modified from their initial values are returned.
- * @return {Object} An object with attribute name/value pairs.
- */
- _getAttrs : function(attrs) {
- var host = this,
- o = {},
- i, l, attr, val,
- modifiedOnly = (attrs === true);
-
- attrs = (attrs && !modifiedOnly) ? attrs : O.keys(host._state.data.added);
-
- for (i = 0, l = attrs.length; i < l; i++) {
- // Go through get, to honor cloning/normalization
- attr = attrs[i];
- val = host.get(attr);
-
- if (!modifiedOnly || host._getStateVal(attr) != host._state.get(attr, INIT_VALUE)) {
- o[attr] = host.get(attr);
- }
- }
-
- return o;
- },
-
- /**
- * Configures a group of attributes, and sets initial values.
- *
- * <p>
- * <strong>NOTE:</strong> This method does not isolate the configuration object by merging/cloning.
- * The caller is responsible for merging/cloning the configuration object if required.
- * </p>
- *
- * @method addAttrs
- * @chainable
- *
- * @param {Object} cfgs An object with attribute name/configuration pairs.
- * @param {Object} values An object with attribute name/value pairs, defining the initial values to apply.
- * Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.
- * @param {boolean} lazy Whether or not to delay the intialization of these attributes until the first call to get/set.
- * Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration.
- * See <a href="#method_addAttr">addAttr</a>.
- *
- * @return {Object} A reference to the host object.
- */
- addAttrs : function(cfgs, values, lazy) {
- var host = this; // help compression
- if (cfgs) {
- host._tCfgs = cfgs;
- host._tVals = host._normAttrVals(values);
- host._addAttrs(cfgs, host._tVals, lazy);
- host._tCfgs = host._tVals = null;
- }
-
- return host;
- },
-
- /**
- * Implementation behind the public addAttrs method.
- *
- * This method is invoked directly by get if it encounters a scenario
- * in which an attribute's valueFn attempts to obtain the
- * value an attribute in the same group of attributes, which has not yet
- * been added (on demand initialization).
- *
- * @method _addAttrs
- * @private
- * @param {Object} cfgs An object with attribute name/configuration pairs.
- * @param {Object} values An object with attribute name/value pairs, defining the initial values to apply.
- * Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.
- * @param {boolean} lazy Whether or not to delay the intialization of these attributes until the first call to get/set.
- * Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration.
- * See <a href="#method_addAttr">addAttr</a>.
- */
- _addAttrs : function(cfgs, values, lazy) {
- var host = this, // help compression
- attr,
- attrCfg,
- value;
-
- for (attr in cfgs) {
- if (cfgs.hasOwnProperty(attr)) {
-
- // Not Merging. Caller is responsible for isolating configs
- attrCfg = cfgs[attr];
- attrCfg.defaultValue = attrCfg.value;
-
- // Handle simple, complex and user values, accounting for read-only
- value = host._getAttrInitVal(attr, attrCfg, host._tVals);
-
- if (value !== undefined) {
- attrCfg.value = value;
- }
-
- if (host._tCfgs[attr]) {
- delete host._tCfgs[attr];
- }
-
- host.addAttr(attr, attrCfg, lazy);
- }
- }
- },
-
- /**
- * Utility method to protect an attribute configuration
- * hash, by merging the entire object and the individual
- * attr config objects.
- *
- * @method _protectAttrs
- * @protected
- * @param {Object} attrs A hash of attribute to configuration object pairs.
- * @return {Object} A protected version of the attrs argument.
- */
- _protectAttrs : function(attrs) {
- if (attrs) {
- attrs = Y.merge(attrs);
- for (var attr in attrs) {
- if (attrs.hasOwnProperty(attr)) {
- attrs[attr] = Y.merge(attrs[attr]);
- }
- }
- }
- return attrs;
- },
-
- /**
- * Utility method to normalize attribute values. The base implementation
- * simply merges the hash to protect the original.
- *
- * @method _normAttrVals
- * @param {Object} valueHash An object with attribute name/value pairs
- *
- * @return {Object}
- *
- * @private
- */
- _normAttrVals : function(valueHash) {
- return (valueHash) ? Y.merge(valueHash) : null;
- },
-
- /**
- * Returns the initial value of the given attribute from
- * either the default configuration provided, or the
- * over-ridden value if it exists in the set of initValues
- * provided and the attribute is not read-only.
- *
- * @param {String} attr The name of the attribute
- * @param {Object} cfg The attribute configuration object
- * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals
- *
- * @return {Any} The initial value of the attribute.
- *
- * @method _getAttrInitVal
- * @private
- */
- _getAttrInitVal : function(attr, cfg, initValues) {
- var val, valFn;
- // init value is provided by the user if it exists, else, provided by the config
- if (!cfg[READ_ONLY] && initValues && initValues.hasOwnProperty(attr)) {
- val = initValues[attr];
- } else {
- val = cfg[VALUE];
- valFn = cfg[VALUE_FN];
-
- if (valFn) {
- if (!valFn.call) {
- valFn = this[valFn];
- }
- if (valFn) {
- val = valFn.call(this);
- }
- }
- }
-
- Y.log('initValue for ' + attr + ':' + val, 'info', 'attribute');
-
- return val;
- },
-
- /**
- * Returns an object with the configuration properties (and value)
- * for the given attrubute. If attrName is not provided, returns the
- * configuration properties for all attributes.
- *
- * @method _getAttrCfg
- * @protected
- * @param {String} name Optional. The attribute name. If not provided, the method will return the configuration for all attributes.
- * @return {Object} The configuration properties for the given attribute, or all attributes.
- */
- _getAttrCfg : function(name) {
- var o,
- data = this._state.data;
-
- if (data) {
- o = {};
-
- Y.each(data, function(cfg, cfgProp) {
- if (name) {
- if(name in cfg) {
- o[cfgProp] = cfg[name];
- }
- } else {
- Y.each(cfg, function(attrCfg, attr) {
- o[attr] = o[attr] || {};
- o[attr][cfgProp] = attrCfg;
- });
- }
- });
- }
-
- return o;
- },
-
- /**
- * Utility method to set up initial attributes defined during construction, either through the constructor.ATTRS property, or explicitly passed in.
- *
- * @method _initAttrs
- * @protected
- * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
- * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
- * @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).
- */
- _initAttrs : function(attrs, values, lazy) {
- // ATTRS support for Node, which is not Base based
- attrs = attrs || this.constructor.ATTRS;
-
- var Base = Y.Base;
- if ( attrs && !(Base && Y.instanceOf(this, Base))) {
- this.addAttrs(this._protectAttrs(attrs), values, lazy);
- }
- }
- };
-
- // Basic prototype augment - no lazy constructor invocation.
- Y.mix(Attribute, EventTarget, false, null, 1);
-
- Y.Attribute = Attribute;
-
-
-}, '3.4.1' ,{requires:['event-custom']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base-min.js'
--- src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base-min.js 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("attribute-base",function(c){c.State=function(){this.data={};};c.State.prototype={add:function(B,C,E){var D=this.data;D[C]=D[C]||{};D[C][B]=E;},addAll:function(B,D){var C;for(C in D){if(D.hasOwnProperty(C)){this.add(B,C,D[C]);}}},remove:function(B,C){var D=this.data;if(D[C]&&(B in D[C])){delete D[C][B];}},removeAll:function(B,D){var C=this.data;c.each(D||C,function(F,E){if(c.Lang.isString(E)){this.remove(B,E);}else{this.remove(B,F);}},this);},get:function(B,C){var D=this.data;return(D[C]&&B in D[C])?D[C][B]:undefined;},getAll:function(B){var D=this.data,C;c.each(D,function(F,E){if(B in D[E]){C=C||{};C[E]=F[B];}},this);return C;}};var k=c.Object,f=c.Lang,l=c.EventTarget,w=".",t="Change",n="getter",m="setter",o="readOnly",x="writeOnce",u="initOnly",A="validator",h="value",p="valueFn",e="broadcast",r="lazyAdd",j="_bypassProxy",z="added",b="initializing",i="initValue",v="published",s="defaultValue",a="lazy",q="isLazyAdd",g,y={};y[o]=1;y[x]=1;y[n]=1;y[e]=1;function d(C,B,D){var E=this;E._ATTR_E_FACADE={};l.call(E,{emitFacade:true});E._conf=E._state=new c.State();E._stateProxy=E._stateProxy||null;E._requireAddAttr=E._requireAddAttr||false;this._initAttrs(C,B,D);}d.INVALID_VALUE={};g=d.INVALID_VALUE;d._ATTR_CFG=[m,n,A,h,p,x,o,r,e,j];d.prototype={addAttr:function(C,B,E){var F=this,H=F._state,G,D;E=(r in B)?B[r]:E;if(E&&!F.attrAdded(C)){H.add(C,a,B||{});H.add(C,z,true);}else{if(!F.attrAdded(C)||H.get(C,q)){B=B||{};D=(h in B);if(D){G=B.value;delete B.value;}B.added=true;B.initializing=true;H.addAll(C,B);if(D){F.set(C,G);}H.remove(C,b);}}return F;},attrAdded:function(B){return !!this._state.get(B,z);},modifyAttr:function(C,B){var D=this,F,E;if(D.attrAdded(C)){if(D._isLazyAttr(C)){D._addLazyAttr(C);}E=D._state;for(F in B){if(y[F]&&B.hasOwnProperty(F)){E.add(C,F,B[F]);if(F===e){E.remove(C,v);}}}}},removeAttr:function(B){this._state.removeAll(B);},get:function(B){return this._getAttr(B);},_isLazyAttr:function(B){return this._state.get(B,a);},_addLazyAttr:function(C){var D=this._state,B=D.get(C,a);D.add(C,q,true);D.remove(C,a);this.addAttr(C,B);},set:function(B,D,C){return this._setAttr(B,D,C);},reset:function(B){var D=this,C;if(B){if(D._isLazyAttr(B)){D._addLazyAttr(B);}D.set(B,D._state.get(B,i));}else{C=D._state.data.added;c.each(C,function(E,F){D.reset(F);},D);}return D;},_set:function(B,D,C){return this._setAttr(B,D,C,true);},_getAttr:function(D){var E=this,I=D,F=E._state,G,B,H,C;if(D.indexOf(w)!==-1){G=D.split(w);D=G.shift();}if(E._tCfgs&&E._tCfgs[D]){C={};C[D]=E._tCfgs[D];delete E._tCfgs[D];E._addAttrs(C,E._tVals);}if(E._isLazyAttr(D)){E._addLazyAttr(D);}H=E._getStateVal(D);B=F.get(D,n);if(B&&!B.call){B=this[B];}H=(B)?B.call(E,H,I):H;H=(G)?k.getValue(H,G):H;return H;},_setAttr:function(D,G,B,E){var K=true,C=this._state,H=this._stateProxy,M=C.data,J,N,O,F,I,L;if(D.indexOf(w)!==-1){N=D;O=D.split(w);D=O.shift();}if(this._isLazyAttr(D)){this._addLazyAttr(D);}J=(!M.value||!(D in M.value));if(H&&D in H&&!this._state.get(D,j)){J=false;}if(this._requireAddAttr&&!this.attrAdded(D)){}else{I=C.get(D,x);L=C.get(D,b);if(!J&&!E){if(I){K=false;}if(C.get(D,o)){K=false;}}if(!L&&!E&&I===u){K=false;}if(K){if(!J){F=this.get(D);}if(O){G=k.setValue(c.clone(F),O,G);if(G===undefined){K=false;}}if(K){if(L){this._setAttrVal(D,N,F,G);}else{this._fireAttrChange(D,N,F,G,B);}}}}return this;},_fireAttrChange:function(H,G,E,D,B){var J=this,F=H+t,C=J._state,I;if(!C.get(H,v)){J.publish(F,{queuable:false,defaultTargetOnly:true,defaultFn:J._defAttrChangeFn,silent:true,broadcast:C.get(H,e)});C.add(H,v,true);}I=(B)?c.merge(B):J._ATTR_E_FACADE;I.attrName=H;I.subAttrName=G;I.prevVal=E;I.newVal=D;J.fire(F,I);},_defAttrChangeFn:function(B){if(!this._setAttrVal(B.attrName,B.subAttrName,B.prevVal,B.newVal)){B.stopImmediatePropagation();}else{B.newVal=this.get(B.attrName);}},_getStateVal:function(B){var C=this._stateProxy;return C&&(B in C)&&!this._state.get(B,j)?C[B]:this._state.get(B,h);},_setStateVal:function(B,D){var C=this._stateProxy;if(C&&(B in C)&&!this._state.get(B,j)){C[B]=D;}else{this._state.add(B,h,D);}},_setAttrVal:function(M,L,I,G){var O=this,J=true,D=O._state,E=D.get(M,A),H=D.get(M,m),K=D.get(M,b),N=this._getStateVal(M),C=L||M,F,B;if(E){if(!E.call){E=this[E];}if(E){B=E.call(O,G,C);if(!B&&K){G=D.get(M,s);B=true;}}}if(!E||B){if(H){if(!H.call){H=this[H];}if(H){F=H.call(O,G,C);if(F===g){J=false;}else{if(F!==undefined){G=F;}}}}if(J){if(!L&&(G===N)&&!f.isObject(G)){J=false;}else{if(D.get(M,i)===undefined){D.add(M,i,G);}O._setStateVal(M,G);}}}else{J=false;}return J;},setAttrs:function(B,C){return this._setAttrs(B,C);},_setAttrs:function(C,D){for(var B in C){if(C.hasOwnProperty(B)){this.set(B,C[B]);}}return this;},getAttrs:function(B){return this._getAttrs(B);},_getAttrs:function(E){var G=this,I={},F,C,B,H,D=(E===true);E=(E&&!D)?E:k.keys(G._state.data.added);for(F=0,C=E.length;F<C;F++){B=E[F];H=G.get(B);if(!D||G._getStateVal(B)!=G._state.get(B,i)){I[B]=G.get(B);}}return I;},addAttrs:function(B,C,D){var E=this;if(B){E._tCfgs=B;E._tVals=E._normAttrVals(C);E._addAttrs(B,E._tVals,D);E._tCfgs=E._tVals=null;}return E;},_addAttrs:function(C,D,E){var G=this,B,F,H;for(B in C){if(C.hasOwnProperty(B)){F=C[B];F.defaultValue=F.value;H=G._getAttrInitVal(B,F,G._tVals);if(H!==undefined){F.value=H;}if(G._tCfgs[B]){delete G._tCfgs[B];}G.addAttr(B,F,E);}}},_protectAttrs:function(C){if(C){C=c.merge(C);for(var B in C){if(C.hasOwnProperty(B)){C[B]=c.merge(C[B]);}}}return C;},_normAttrVals:function(B){return(B)?c.merge(B):null;},_getAttrInitVal:function(B,C,E){var F,D;if(!C[o]&&E&&E.hasOwnProperty(B)){F=E[B];}else{F=C[h];D=C[p];if(D){if(!D.call){D=this[D];}if(D){F=D.call(this);}}}return F;},_getAttrCfg:function(B){var D,C=this._state.data;if(C){D={};c.each(C,function(E,F){if(B){if(B in E){D[F]=E[B];}}else{c.each(E,function(H,G){D[G]=D[G]||{};D[G][F]=H;});}});}return D;},_initAttrs:function(C,B,E){C=C||this.constructor.ATTRS;var D=c.Base;if(C&&!(D&&c.instanceOf(this,D))){this.addAttrs(this._protectAttrs(C),B,E);}}};c.mix(d,l,false,null,1);c.Attribute=d;
-},"3.4.1",{requires:["event-custom"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base.js'
--- src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/attribute-base/attribute-base.js 1970-01-01 00:00:00 +0000
@@ -1,1182 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('attribute-base', function(Y) {
-
- /**
- * The State class maintains state for a collection of named items, with
- * a varying number of properties defined.
- *
- * It avoids the need to create a separate class for the item, and separate instances
- * of these classes for each item, by storing the state in a 2 level hash table,
- * improving performance when the number of items is likely to be large.
- *
- * @constructor
- * @class State
- */
- Y.State = function() {
- /**
- * Hash of attributes
- * @property data
- */
- this.data = {};
- };
-
- Y.State.prototype = {
-
- /**
- * Adds a property to an item.
- *
- * @method add
- * @param name {String} The name of the item.
- * @param key {String} The name of the property.
- * @param val {Any} The value of the property.
- */
- add : function(name, key, val) {
- var d = this.data;
- d[key] = d[key] || {};
- d[key][name] = val;
- },
-
- /**
- * Adds multiple properties to an item.
- *
- * @method addAll
- * @param name {String} The name of the item.
- * @param o {Object} A hash of property/value pairs.
- */
- addAll: function(name, o) {
- var key;
- for (key in o) {
- if (o.hasOwnProperty(key)) {
- this.add(name, key, o[key]);
- }
- }
- },
-
- /**
- * Removes a property from an item.
- *
- * @method remove
- * @param name {String} The name of the item.
- * @param key {String} The property to remove.
- */
- remove: function(name, key) {
- var d = this.data;
- if (d[key] && (name in d[key])) {
- delete d[key][name];
- }
- },
-
- /**
- * Removes multiple properties from an item, or remove the item completely.
- *
- * @method removeAll
- * @param name {String} The name of the item.
- * @param o {Object|Array} Collection of properties to delete. If not provided, the entire item is removed.
- */
- removeAll: function(name, o) {
- var d = this.data;
-
- Y.each(o || d, function(v, k) {
- if(Y.Lang.isString(k)) {
- this.remove(name, k);
- } else {
- this.remove(name, v);
- }
- }, this);
- },
-
- /**
- * For a given item, returns the value of the property requested, or undefined if not found.
- *
- * @method get
- * @param name {String} The name of the item
- * @param key {String} Optional. The property value to retrieve.
- * @return {Any} The value of the supplied property.
- */
- get: function(name, key) {
- var d = this.data;
- return (d[key] && name in d[key]) ? d[key][name] : undefined;
- },
-
- /**
- * For the given item, returns a disposable object with all of the
- * item's property/value pairs.
- *
- * @method getAll
- * @param name {String} The name of the item
- * @return {Object} An object with property/value pairs for the item.
- */
- getAll : function(name) {
- var d = this.data, o;
-
- Y.each(d, function(v, k) {
- if (name in d[k]) {
- o = o || {};
- o[k] = v[name];
- }
- }, this);
-
- return o;
- }
- };
- /**
- * The attribute module provides an augmentable Attribute implementation, which
- * adds configurable attributes and attribute change events to the class being
- * augmented. It also provides a State class, which is used internally by Attribute,
- * but can also be used independently to provide a name/property/value data structure to
- * store state.
- *
- * @module attribute
- */
-
- /**
- * The attribute-base submodule provides core attribute handling support, with everything
- * aside from complex attribute handling in the provider's constructor.
- *
- * @module attribute
- * @submodule attribute-base
- */
- var O = Y.Object,
- Lang = Y.Lang,
- EventTarget = Y.EventTarget,
-
- DOT = ".",
- CHANGE = "Change",
-
- // Externally configurable props
- GETTER = "getter",
- SETTER = "setter",
- READ_ONLY = "readOnly",
- WRITE_ONCE = "writeOnce",
- INIT_ONLY = "initOnly",
- VALIDATOR = "validator",
- VALUE = "value",
- VALUE_FN = "valueFn",
- BROADCAST = "broadcast",
- LAZY_ADD = "lazyAdd",
- BYPASS_PROXY = "_bypassProxy",
-
- // Used for internal state management
- ADDED = "added",
- INITIALIZING = "initializing",
- INIT_VALUE = "initValue",
- PUBLISHED = "published",
- DEF_VALUE = "defaultValue",
- LAZY = "lazy",
- IS_LAZY_ADD = "isLazyAdd",
-
- INVALID_VALUE,
-
- MODIFIABLE = {};
-
- // Properties which can be changed after the attribute has been added.
- MODIFIABLE[READ_ONLY] = 1;
- MODIFIABLE[WRITE_ONCE] = 1;
- MODIFIABLE[GETTER] = 1;
- MODIFIABLE[BROADCAST] = 1;
-
- /**
- * <p>
- * Attribute provides configurable attribute support along with attribute change events. It is designed to be
- * augmented on to a host class, and provides the host with the ability to configure attributes to store and retrieve state,
- * along with attribute change events.
- * </p>
- * <p>For example, attributes added to the host can be configured:</p>
- * <ul>
- * <li>As read only.</li>
- * <li>As write once.</li>
- * <li>With a setter function, which can be used to manipulate
- * values passed to Attribute's <a href="#method_set">set</a> method, before they are stored.</li>
- * <li>With a getter function, which can be used to manipulate stored values,
- * before they are returned by Attribute's <a href="#method_get">get</a> method.</li>
- * <li>With a validator function, to validate values before they are stored.</li>
- * </ul>
- *
- * <p>See the <a href="#method_addAttr">addAttr</a> method, for the complete set of configuration
- * options available for attributes</p>.
- *
- * <p><strong>NOTE:</strong> Most implementations will be better off extending the <a href="Base.html">Base</a> class,
- * instead of augmenting Attribute directly. Base augments Attribute and will handle the initial configuration
- * of attributes for derived classes, accounting for values passed into the constructor.</p>
- *
- * @class Attribute
- * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
- * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
- * @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).
- * @uses EventTarget
- */
- function Attribute(attrs, values, lazy) {
-
- var host = this; // help compression
-
- // Perf tweak - avoid creating event literals if not required.
- host._ATTR_E_FACADE = {};
-
- EventTarget.call(host, {emitFacade:true});
-
- // _conf maintained for backwards compat
- host._conf = host._state = new Y.State();
-
- host._stateProxy = host._stateProxy || null;
- host._requireAddAttr = host._requireAddAttr || false;
-
- this._initAttrs(attrs, values, lazy);
- }
-
- /**
- * <p>The value to return from an attribute setter in order to prevent the set from going through.</p>
- *
- * <p>You can return this value from your setter if you wish to combine validator and setter
- * functionality into a single setter function, which either returns the massaged value to be stored or
- * Attribute.INVALID_VALUE to prevent invalid values from being stored.</p>
- *
- * @property INVALID_VALUE
- * @type Object
- * @static
- * @final
- */
- Attribute.INVALID_VALUE = {};
- INVALID_VALUE = Attribute.INVALID_VALUE;
-
- /**
- * The list of properties which can be configured for
- * each attribute (e.g. setter, getter, writeOnce etc.).
- *
- * This property is used internally as a whitelist for faster
- * Y.mix operations.
- *
- * @property _ATTR_CFG
- * @type Array
- * @static
- * @protected
- */
- Attribute._ATTR_CFG = [SETTER, GETTER, VALIDATOR, VALUE, VALUE_FN, WRITE_ONCE, READ_ONLY, LAZY_ADD, BROADCAST, BYPASS_PROXY];
-
- Attribute.prototype = {
- /**
- * <p>
- * Adds an attribute with the provided configuration to the host object.
- * </p>
- * <p>
- * The config argument object supports the following properties:
- * </p>
- *
- * <dl>
- * <dt>value <Any></dt>
- * <dd>The initial value to set on the attribute</dd>
- *
- * <dt>valueFn <Function | String></dt>
- * <dd>
- * <p>A function, which will return the initial value to set on the attribute. This is useful
- * for cases where the attribute configuration is defined statically, but needs to
- * reference the host instance ("this") to obtain an initial value. If both the value and valueFn properties are defined,
- * the value returned by the valueFn has precedence over the value property, unless it returns undefined, in which
- * case the value property is used.</p>
- *
- * <p>valueFn can also be set to a string, representing the name of the instance method to be used to retrieve the value.</p>
- * </dd>
- *
- * <dt>readOnly <boolean></dt>
- * <dd>Whether or not the attribute is read only. Attributes having readOnly set to true
- * cannot be modified by invoking the set method.</dd>
- *
- * <dt>writeOnce <boolean> or <string></dt>
- * <dd>
- * Whether or not the attribute is "write once". Attributes having writeOnce set to true,
- * can only have their values set once, be it through the default configuration,
- * constructor configuration arguments, or by invoking set.
- * <p>The writeOnce attribute can also be set to the string "initOnly", in which case the attribute can only be set during initialization
- * (when used with Base, this means it can only be set during construction)</p>
- * </dd>
- *
- * <dt>setter <Function | String></dt>
- * <dd>
- * <p>The setter function used to massage or normalize the value passed to the set method for the attribute.
- * The value returned by the setter will be the final stored value. Returning
- * <a href="#property_Attribute.INVALID_VALUE">Attribute.INVALID_VALUE</a>, from the setter will prevent
- * the value from being stored.
- * </p>
- *
- * <p>setter can also be set to a string, representing the name of the instance method to be used as the setter function.</p>
- * </dd>
- *
- * <dt>getter <Function | String></dt>
- * <dd>
- * <p>
- * The getter function used to massage or normalize the value returned by the get method for the attribute.
- * The value returned by the getter function is the value which will be returned to the user when they
- * invoke get.
- * </p>
- *
- * <p>getter can also be set to a string, representing the name of the instance method to be used as the getter function.</p>
- * </dd>
- *
- * <dt>validator <Function | String></dt>
- * <dd>
- * <p>
- * The validator function invoked prior to setting the stored value. Returning
- * false from the validator function will prevent the value from being stored.
- * </p>
- *
- * <p>validator can also be set to a string, representing the name of the instance method to be used as the validator function.</p>
- * </dd>
- *
- * <dt>broadcast <int></dt>
- * <dd>If and how attribute change events for this attribute should be broadcast. See CustomEvent's <a href="CustomEvent.html#property_broadcast">broadcast</a> property for
- * valid values. By default attribute change events are not broadcast.</dd>
- *
- * <dt>lazyAdd <boolean></dt>
- * <dd>Whether or not to delay initialization of the attribute until the first call to get/set it.
- * This flag can be used to over-ride lazy initialization on a per attribute basis, when adding multiple attributes through
- * the <a href="#method_addAttrs">addAttrs</a> method.</dd>
- *
- * </dl>
- *
- * <p>The setter, getter and validator are invoked with the value and name passed in as the first and second arguments, and with
- * the context ("this") set to the host object.</p>
- *
- * <p>Configuration properties outside of the list mentioned above are considered private properties used internally by attribute, and are not intended for public use.</p>
- *
- * @method addAttr
- *
- * @param {String} name The name of the attribute.
- * @param {Object} config An object with attribute configuration property/value pairs, specifying the configuration for the attribute.
- *
- * <p>
- * <strong>NOTE:</strong> The configuration object is modified when adding an attribute, so if you need
- * to protect the original values, you will need to merge the object.
- * </p>
- *
- * @param {boolean} lazy (optional) Whether or not to add this attribute lazily (on the first call to get/set).
- *
- * @return {Object} A reference to the host object.
- *
- * @chainable
- */
- addAttr: function(name, config, lazy) {
-
-
- var host = this, // help compression
- state = host._state,
- value,
- hasValue;
-
- lazy = (LAZY_ADD in config) ? config[LAZY_ADD] : lazy;
-
- if (lazy && !host.attrAdded(name)) {
- state.add(name, LAZY, config || {});
- state.add(name, ADDED, true);
- } else {
-
-
- if (!host.attrAdded(name) || state.get(name, IS_LAZY_ADD)) {
-
- config = config || {};
-
- hasValue = (VALUE in config);
-
-
- if(hasValue) {
- // We'll go through set, don't want to set value in config directly
- value = config.value;
- delete config.value;
- }
-
- config.added = true;
- config.initializing = true;
-
- state.addAll(name, config);
-
- if (hasValue) {
- // Go through set, so that raw values get normalized/validated
- host.set(name, value);
- }
-
- state.remove(name, INITIALIZING);
- }
- }
-
- return host;
- },
-
- /**
- * Checks if the given attribute has been added to the host
- *
- * @method attrAdded
- * @param {String} name The name of the attribute to check.
- * @return {boolean} true if an attribute with the given name has been added, false if it hasn't. This method will return true for lazily added attributes.
- */
- attrAdded: function(name) {
- return !!this._state.get(name, ADDED);
- },
-
- /**
- * Updates the configuration of an attribute which has already been added.
- * <p>
- * The properties which can be modified through this interface are limited
- * to the following subset of attributes, which can be safely modified
- * after a value has already been set on the attribute: readOnly, writeOnce,
- * broadcast and getter.
- * </p>
- * @method modifyAttr
- * @param {String} name The name of the attribute whose configuration is to be updated.
- * @param {Object} config An object with configuration property/value pairs, specifying the configuration properties to modify.
- */
- modifyAttr: function(name, config) {
- var host = this, // help compression
- prop, state;
-
- if (host.attrAdded(name)) {
-
- if (host._isLazyAttr(name)) {
- host._addLazyAttr(name);
- }
-
- state = host._state;
- for (prop in config) {
- if (MODIFIABLE[prop] && config.hasOwnProperty(prop)) {
- state.add(name, prop, config[prop]);
-
- // If we reconfigured broadcast, need to republish
- if (prop === BROADCAST) {
- state.remove(name, PUBLISHED);
- }
- }
- }
- }
-
- },
-
- /**
- * Removes an attribute from the host object
- *
- * @method removeAttr
- * @param {String} name The name of the attribute to be removed.
- */
- removeAttr: function(name) {
- this._state.removeAll(name);
- },
-
- /**
- * Returns the current value of the attribute. If the attribute
- * has been configured with a 'getter' function, this method will delegate
- * to the 'getter' to obtain the value of the attribute.
- *
- * @method get
- *
- * @param {String} name The name of the attribute. If the value of the attribute is an Object,
- * dot notation can be used to obtain the value of a property of the object (e.g. <code>get("x.y.z")</code>)
- *
- * @return {Any} The value of the attribute
- */
- get : function(name) {
- return this._getAttr(name);
- },
-
- /**
- * Checks whether or not the attribute is one which has been
- * added lazily and still requires initialization.
- *
- * @method _isLazyAttr
- * @private
- * @param {String} name The name of the attribute
- * @return {boolean} true if it's a lazily added attribute, false otherwise.
- */
- _isLazyAttr: function(name) {
- return this._state.get(name, LAZY);
- },
-
- /**
- * Finishes initializing an attribute which has been lazily added.
- *
- * @method _addLazyAttr
- * @private
- * @param {Object} name The name of the attribute
- */
- _addLazyAttr: function(name) {
- var state = this._state,
- lazyCfg = state.get(name, LAZY);
-
- state.add(name, IS_LAZY_ADD, true);
- state.remove(name, LAZY);
- this.addAttr(name, lazyCfg);
- },
-
- /**
- * Sets the value of an attribute.
- *
- * @method set
- * @chainable
- *
- * @param {String} name The name of the attribute. If the
- * current value of the attribute is an Object, dot notation can be used
- * to set the value of a property within the object (e.g. <code>set("x.y.z", 5)</code>).
- *
- * @param {Any} value The value to set the attribute to.
- *
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event. This
- * can be used as a flexible way to identify the source of a call to set, allowing
- * the developer to distinguish between set called internally by the host, vs.
- * set called externally by the application developer.
- *
- * @return {Object} A reference to the host object.
- */
- set : function(name, val, opts) {
- return this._setAttr(name, val, opts);
- },
-
- /**
- * Resets the attribute (or all attributes) to its initial value, as long as
- * the attribute is not readOnly, or writeOnce.
- *
- * @method reset
- * @param {String} name Optional. The name of the attribute to reset. If omitted, all attributes are reset.
- * @return {Object} A reference to the host object.
- * @chainable
- */
- reset : function(name) {
- var host = this, // help compression
- added;
-
- if (name) {
- if (host._isLazyAttr(name)) {
- host._addLazyAttr(name);
- }
- host.set(name, host._state.get(name, INIT_VALUE));
- } else {
- added = host._state.data.added;
- Y.each(added, function(v, n) {
- host.reset(n);
- }, host);
- }
- return host;
- },
-
- /**
- * Allows setting of readOnly/writeOnce attributes. See <a href="#method_set">set</a> for argument details.
- *
- * @method _set
- * @protected
- * @chainable
- *
- * @param {String} name The name of the attribute.
- * @param {Any} val The value to set the attribute to.
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event.
- * @return {Object} A reference to the host object.
- */
- _set : function(name, val, opts) {
- return this._setAttr(name, val, opts, true);
- },
-
- /**
- * Provides the common implementation for the public get method,
- * allowing Attribute hosts to over-ride either method.
- *
- * See <a href="#method_get">get</a> for argument details.
- *
- * @method _getAttr
- * @protected
- * @chainable
- *
- * @param {String} name The name of the attribute.
- * @return {Any} The value of the attribute.
- */
- _getAttr : function(name) {
- var host = this, // help compression
- fullName = name,
- state = host._state,
- path,
- getter,
- val,
- cfg;
-
- if (name.indexOf(DOT) !== -1) {
- path = name.split(DOT);
- name = path.shift();
- }
-
- // On Demand - Should be rare - handles out of order valueFn references
- if (host._tCfgs && host._tCfgs[name]) {
- cfg = {};
- cfg[name] = host._tCfgs[name];
- delete host._tCfgs[name];
- host._addAttrs(cfg, host._tVals);
- }
-
- // Lazy Init
- if (host._isLazyAttr(name)) {
- host._addLazyAttr(name);
- }
-
- val = host._getStateVal(name);
- getter = state.get(name, GETTER);
-
- if (getter && !getter.call) {
- getter = this[getter];
- }
-
- val = (getter) ? getter.call(host, val, fullName) : val;
- val = (path) ? O.getValue(val, path) : val;
-
- return val;
- },
-
- /**
- * Provides the common implementation for the public set and protected _set methods.
- *
- * See <a href="#method_set">set</a> for argument details.
- *
- * @method _setAttr
- * @protected
- * @chainable
- *
- * @param {String} name The name of the attribute.
- * @param {Any} value The value to set the attribute to.
- * @param {Object} opts (Optional) Optional event data to be mixed into
- * the event facade passed to subscribers of the attribute's change event.
- * @param {boolean} force If true, allows the caller to set values for
- * readOnly or writeOnce attributes which have already been set.
- *
- * @return {Object} A reference to the host object.
- */
- _setAttr : function(name, val, opts, force) {
- var allowSet = true,
- state = this._state,
- stateProxy = this._stateProxy,
- data = state.data,
- initialSet,
- strPath,
- path,
- currVal,
- writeOnce,
- initializing;
-
- if (name.indexOf(DOT) !== -1) {
- strPath = name;
- path = name.split(DOT);
- name = path.shift();
- }
-
- if (this._isLazyAttr(name)) {
- this._addLazyAttr(name);
- }
-
- initialSet = (!data.value || !(name in data.value));
-
- if (stateProxy && name in stateProxy && !this._state.get(name, BYPASS_PROXY)) {
- // TODO: Value is always set for proxy. Can we do any better? Maybe take a snapshot as the initial value for the first call to set?
- initialSet = false;
- }
-
- if (this._requireAddAttr && !this.attrAdded(name)) {
- } else {
-
- writeOnce = state.get(name, WRITE_ONCE);
- initializing = state.get(name, INITIALIZING);
-
- if (!initialSet && !force) {
-
- if (writeOnce) {
- allowSet = false;
- }
-
- if (state.get(name, READ_ONLY)) {
- allowSet = false;
- }
- }
-
- if (!initializing && !force && writeOnce === INIT_ONLY) {
- allowSet = false;
- }
-
- if (allowSet) {
- // Don't need currVal if initialSet (might fail in custom getter if it always expects a non-undefined/non-null value)
- if (!initialSet) {
- currVal = this.get(name);
- }
-
- if (path) {
- val = O.setValue(Y.clone(currVal), path, val);
-
- if (val === undefined) {
- allowSet = false;
- }
- }
-
- if (allowSet) {
- if (initializing) {
- this._setAttrVal(name, strPath, currVal, val);
- } else {
- this._fireAttrChange(name, strPath, currVal, val, opts);
- }
- }
- }
- }
-
- return this;
- },
-
- /**
- * Utility method to help setup the event payload and fire the attribute change event.
- *
- * @method _fireAttrChange
- * @private
- * @param {String} attrName The name of the attribute
- * @param {String} subAttrName The full path of the property being changed,
- * if this is a sub-attribute value being change. Otherwise null.
- * @param {Any} currVal The current value of the attribute
- * @param {Any} newVal The new value of the attribute
- * @param {Object} opts Any additional event data to mix into the attribute change event's event facade.
- */
- _fireAttrChange : function(attrName, subAttrName, currVal, newVal, opts) {
- var host = this,
- eventName = attrName + CHANGE,
- state = host._state,
- facade;
-
- if (!state.get(attrName, PUBLISHED)) {
- host.publish(eventName, {
- queuable:false,
- defaultTargetOnly: true,
- defaultFn:host._defAttrChangeFn,
- silent:true,
- broadcast : state.get(attrName, BROADCAST)
- });
- state.add(attrName, PUBLISHED, true);
- }
-
- facade = (opts) ? Y.merge(opts) : host._ATTR_E_FACADE;
-
- // Not using the single object signature for fire({type:..., newVal:...}), since
- // we don't want to override type. Changed to the fire(type, {newVal:...}) signature.
-
- // facade.type = eventName;
- facade.attrName = attrName;
- facade.subAttrName = subAttrName;
- facade.prevVal = currVal;
- facade.newVal = newVal;
-
- // host.fire(facade);
- host.fire(eventName, facade);
- },
-
- /**
- * Default function for attribute change events.
- *
- * @private
- * @method _defAttrChangeFn
- * @param {EventFacade} e The event object for attribute change events.
- */
- _defAttrChangeFn : function(e) {
- if (!this._setAttrVal(e.attrName, e.subAttrName, e.prevVal, e.newVal)) {
- // Prevent "after" listeners from being invoked since nothing changed.
- e.stopImmediatePropagation();
- } else {
- e.newVal = this.get(e.attrName);
- }
- },
-
- /**
- * Gets the stored value for the attribute, from either the
- * internal state object, or the state proxy if it exits
- *
- * @method _getStateVal
- * @private
- * @param {String} name The name of the attribute
- * @return {Any} The stored value of the attribute
- */
- _getStateVal : function(name) {
- var stateProxy = this._stateProxy;
- return stateProxy && (name in stateProxy) && !this._state.get(name, BYPASS_PROXY) ? stateProxy[name] : this._state.get(name, VALUE);
- },
-
- /**
- * Sets the stored value for the attribute, in either the
- * internal state object, or the state proxy if it exits
- *
- * @method _setStateVal
- * @private
- * @param {String} name The name of the attribute
- * @param {Any} value The value of the attribute
- */
- _setStateVal : function(name, value) {
- var stateProxy = this._stateProxy;
- if (stateProxy && (name in stateProxy) && !this._state.get(name, BYPASS_PROXY)) {
- stateProxy[name] = value;
- } else {
- this._state.add(name, VALUE, value);
- }
- },
-
- /**
- * Updates the stored value of the attribute in the privately held State object,
- * if validation and setter passes.
- *
- * @method _setAttrVal
- * @private
- * @param {String} attrName The attribute name.
- * @param {String} subAttrName The sub-attribute name, if setting a sub-attribute property ("x.y.z").
- * @param {Any} prevVal The currently stored value of the attribute.
- * @param {Any} newVal The value which is going to be stored.
- *
- * @return {booolean} true if the new attribute value was stored, false if not.
- */
- _setAttrVal : function(attrName, subAttrName, prevVal, newVal) {
-
- var host = this,
- allowSet = true,
- state = host._state,
-
- validator = state.get(attrName, VALIDATOR),
- setter = state.get(attrName, SETTER),
- initializing = state.get(attrName, INITIALIZING),
- prevValRaw = this._getStateVal(attrName),
-
- name = subAttrName || attrName,
- retVal,
- valid;
-
- if (validator) {
- if (!validator.call) {
- // Assume string - trying to keep critical path tight, so avoiding Lang check
- validator = this[validator];
- }
- if (validator) {
- valid = validator.call(host, newVal, name);
-
- if (!valid && initializing) {
- newVal = state.get(attrName, DEF_VALUE);
- valid = true; // Assume it's valid, for perf.
- }
- }
- }
-
- if (!validator || valid) {
- if (setter) {
- if (!setter.call) {
- // Assume string - trying to keep critical path tight, so avoiding Lang check
- setter = this[setter];
- }
- if (setter) {
- retVal = setter.call(host, newVal, name);
-
- if (retVal === INVALID_VALUE) {
- allowSet = false;
- } else if (retVal !== undefined){
- newVal = retVal;
- }
- }
- }
-
- if (allowSet) {
- if(!subAttrName && (newVal === prevValRaw) && !Lang.isObject(newVal)) {
- allowSet = false;
- } else {
- // Store value
- if (state.get(attrName, INIT_VALUE) === undefined) {
- state.add(attrName, INIT_VALUE, newVal);
- }
- host._setStateVal(attrName, newVal);
- }
- }
-
- } else {
- allowSet = false;
- }
-
- return allowSet;
- },
-
- /**
- * Sets multiple attribute values.
- *
- * @method setAttrs
- * @param {Object} attrs An object with attributes name/value pairs.
- * @return {Object} A reference to the host object.
- * @chainable
- */
- setAttrs : function(attrs, opts) {
- return this._setAttrs(attrs, opts);
- },
-
- /**
- * Implementation behind the public setAttrs method, to set multiple attribute values.
- *
- * @method _setAttrs
- * @protected
- * @param {Object} attrs An object with attributes name/value pairs.
- * @return {Object} A reference to the host object.
- * @chainable
- */
- _setAttrs : function(attrs, opts) {
- for (var attr in attrs) {
- if ( attrs.hasOwnProperty(attr) ) {
- this.set(attr, attrs[attr]);
- }
- }
- return this;
- },
-
- /**
- * Gets multiple attribute values.
- *
- * @method getAttrs
- * @param {Array | boolean} attrs Optional. An array of attribute names. If omitted, all attribute values are
- * returned. If set to true, all attributes modified from their initial values are returned.
- * @return {Object} An object with attribute name/value pairs.
- */
- getAttrs : function(attrs) {
- return this._getAttrs(attrs);
- },
-
- /**
- * Implementation behind the public getAttrs method, to get multiple attribute values.
- *
- * @method _getAttrs
- * @protected
- * @param {Array | boolean} attrs Optional. An array of attribute names. If omitted, all attribute values are
- * returned. If set to true, all attributes modified from their initial values are returned.
- * @return {Object} An object with attribute name/value pairs.
- */
- _getAttrs : function(attrs) {
- var host = this,
- o = {},
- i, l, attr, val,
- modifiedOnly = (attrs === true);
-
- attrs = (attrs && !modifiedOnly) ? attrs : O.keys(host._state.data.added);
-
- for (i = 0, l = attrs.length; i < l; i++) {
- // Go through get, to honor cloning/normalization
- attr = attrs[i];
- val = host.get(attr);
-
- if (!modifiedOnly || host._getStateVal(attr) != host._state.get(attr, INIT_VALUE)) {
- o[attr] = host.get(attr);
- }
- }
-
- return o;
- },
-
- /**
- * Configures a group of attributes, and sets initial values.
- *
- * <p>
- * <strong>NOTE:</strong> This method does not isolate the configuration object by merging/cloning.
- * The caller is responsible for merging/cloning the configuration object if required.
- * </p>
- *
- * @method addAttrs
- * @chainable
- *
- * @param {Object} cfgs An object with attribute name/configuration pairs.
- * @param {Object} values An object with attribute name/value pairs, defining the initial values to apply.
- * Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.
- * @param {boolean} lazy Whether or not to delay the intialization of these attributes until the first call to get/set.
- * Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration.
- * See <a href="#method_addAttr">addAttr</a>.
- *
- * @return {Object} A reference to the host object.
- */
- addAttrs : function(cfgs, values, lazy) {
- var host = this; // help compression
- if (cfgs) {
- host._tCfgs = cfgs;
- host._tVals = host._normAttrVals(values);
- host._addAttrs(cfgs, host._tVals, lazy);
- host._tCfgs = host._tVals = null;
- }
-
- return host;
- },
-
- /**
- * Implementation behind the public addAttrs method.
- *
- * This method is invoked directly by get if it encounters a scenario
- * in which an attribute's valueFn attempts to obtain the
- * value an attribute in the same group of attributes, which has not yet
- * been added (on demand initialization).
- *
- * @method _addAttrs
- * @private
- * @param {Object} cfgs An object with attribute name/configuration pairs.
- * @param {Object} values An object with attribute name/value pairs, defining the initial values to apply.
- * Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.
- * @param {boolean} lazy Whether or not to delay the intialization of these attributes until the first call to get/set.
- * Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration.
- * See <a href="#method_addAttr">addAttr</a>.
- */
- _addAttrs : function(cfgs, values, lazy) {
- var host = this, // help compression
- attr,
- attrCfg,
- value;
-
- for (attr in cfgs) {
- if (cfgs.hasOwnProperty(attr)) {
-
- // Not Merging. Caller is responsible for isolating configs
- attrCfg = cfgs[attr];
- attrCfg.defaultValue = attrCfg.value;
-
- // Handle simple, complex and user values, accounting for read-only
- value = host._getAttrInitVal(attr, attrCfg, host._tVals);
-
- if (value !== undefined) {
- attrCfg.value = value;
- }
-
- if (host._tCfgs[attr]) {
- delete host._tCfgs[attr];
- }
-
- host.addAttr(attr, attrCfg, lazy);
- }
- }
- },
-
- /**
- * Utility method to protect an attribute configuration
- * hash, by merging the entire object and the individual
- * attr config objects.
- *
- * @method _protectAttrs
- * @protected
- * @param {Object} attrs A hash of attribute to configuration object pairs.
- * @return {Object} A protected version of the attrs argument.
- */
- _protectAttrs : function(attrs) {
- if (attrs) {
- attrs = Y.merge(attrs);
- for (var attr in attrs) {
- if (attrs.hasOwnProperty(attr)) {
- attrs[attr] = Y.merge(attrs[attr]);
- }
- }
- }
- return attrs;
- },
-
- /**
- * Utility method to normalize attribute values. The base implementation
- * simply merges the hash to protect the original.
- *
- * @method _normAttrVals
- * @param {Object} valueHash An object with attribute name/value pairs
- *
- * @return {Object}
- *
- * @private
- */
- _normAttrVals : function(valueHash) {
- return (valueHash) ? Y.merge(valueHash) : null;
- },
-
- /**
- * Returns the initial value of the given attribute from
- * either the default configuration provided, or the
- * over-ridden value if it exists in the set of initValues
- * provided and the attribute is not read-only.
- *
- * @param {String} attr The name of the attribute
- * @param {Object} cfg The attribute configuration object
- * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals
- *
- * @return {Any} The initial value of the attribute.
- *
- * @method _getAttrInitVal
- * @private
- */
- _getAttrInitVal : function(attr, cfg, initValues) {
- var val, valFn;
- // init value is provided by the user if it exists, else, provided by the config
- if (!cfg[READ_ONLY] && initValues && initValues.hasOwnProperty(attr)) {
- val = initValues[attr];
- } else {
- val = cfg[VALUE];
- valFn = cfg[VALUE_FN];
-
- if (valFn) {
- if (!valFn.call) {
- valFn = this[valFn];
- }
- if (valFn) {
- val = valFn.call(this);
- }
- }
- }
-
-
- return val;
- },
-
- /**
- * Returns an object with the configuration properties (and value)
- * for the given attrubute. If attrName is not provided, returns the
- * configuration properties for all attributes.
- *
- * @method _getAttrCfg
- * @protected
- * @param {String} name Optional. The attribute name. If not provided, the method will return the configuration for all attributes.
- * @return {Object} The configuration properties for the given attribute, or all attributes.
- */
- _getAttrCfg : function(name) {
- var o,
- data = this._state.data;
-
- if (data) {
- o = {};
-
- Y.each(data, function(cfg, cfgProp) {
- if (name) {
- if(name in cfg) {
- o[cfgProp] = cfg[name];
- }
- } else {
- Y.each(cfg, function(attrCfg, attr) {
- o[attr] = o[attr] || {};
- o[attr][cfgProp] = attrCfg;
- });
- }
- });
- }
-
- return o;
- },
-
- /**
- * Utility method to set up initial attributes defined during construction, either through the constructor.ATTRS property, or explicitly passed in.
- *
- * @method _initAttrs
- * @protected
- * @param attrs {Object} The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
- * @param values {Object} The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
- * @param lazy {boolean} Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).
- */
- _initAttrs : function(attrs, values, lazy) {
- // ATTRS support for Node, which is not Base based
- attrs = attrs || this.constructor.ATTRS;
-
- var Base = Y.Base;
- if ( attrs && !(Base && Y.instanceOf(this, Base))) {
- this.addAttrs(this._protectAttrs(attrs), values, lazy);
- }
- }
- };
-
- // Basic prototype augment - no lazy constructor invocation.
- Y.mix(Attribute, EventTarget, false, null, 1);
-
- Y.Attribute = Attribute;
-
-
-}, '3.4.1' ,{requires:['event-custom']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/attribute-complex'
=== removed file 'src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex-debug.js'
--- src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex-debug.js 1970-01-01 00:00:00 +0000
@@ -1,129 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('attribute-complex', function(Y) {
-
- /**
- * Adds support for attribute providers to handle complex attributes in the constructor
- *
- * @module attribute
- * @submodule attribute-complex
- * @for Attribute
- */
-
- var O = Y.Object,
- DOT = ".";
-
- Y.Attribute.Complex = function() {};
- Y.Attribute.Complex.prototype = {
-
- /**
- * Utility method to split out simple attribute name/value pairs ("x")
- * from complex attribute name/value pairs ("x.y.z"), so that complex
- * attributes can be keyed by the top level attribute name.
- *
- * @method _normAttrVals
- * @param {Object} valueHash An object with attribute name/value pairs
- *
- * @return {Object} An object literal with 2 properties - "simple" and "complex",
- * containing simple and complex attribute values respectively keyed
- * by the top level attribute name, or null, if valueHash is falsey.
- *
- * @private
- */
- _normAttrVals : function(valueHash) {
- var vals = {},
- subvals = {},
- path,
- attr,
- v, k;
-
- if (valueHash) {
- for (k in valueHash) {
- if (valueHash.hasOwnProperty(k)) {
- if (k.indexOf(DOT) !== -1) {
- path = k.split(DOT);
- attr = path.shift();
- v = subvals[attr] = subvals[attr] || [];
- v[v.length] = {
- path : path,
- value: valueHash[k]
- };
- } else {
- vals[k] = valueHash[k];
- }
- }
- }
- return { simple:vals, complex:subvals };
- } else {
- return null;
- }
- },
-
- /**
- * Returns the initial value of the given attribute from
- * either the default configuration provided, or the
- * over-ridden value if it exists in the set of initValues
- * provided and the attribute is not read-only.
- *
- * @param {String} attr The name of the attribute
- * @param {Object} cfg The attribute configuration object
- * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals
- *
- * @return {Any} The initial value of the attribute.
- *
- * @method _getAttrInitVal
- * @private
- */
- _getAttrInitVal : function(attr, cfg, initValues) {
-
- var val = cfg.value,
- valFn = cfg.valueFn,
- simple,
- complex,
- i,
- l,
- path,
- subval,
- subvals;
-
- if (valFn) {
- if (!valFn.call) {
- valFn = this[valFn];
- }
- if (valFn) {
- val = valFn.call(this);
- }
- }
-
- if (!cfg.readOnly && initValues) {
-
- // Simple Attributes
- simple = initValues.simple;
- if (simple && simple.hasOwnProperty(attr)) {
- val = simple[attr];
- }
-
- // Complex Attributes (complex values applied, after simple, incase both are set)
- complex = initValues.complex;
- if (complex && complex.hasOwnProperty(attr)) {
- subvals = complex[attr];
- for (i = 0, l = subvals.length; i < l; ++i) {
- path = subvals[i].path;
- subval = subvals[i].value;
- O.setValue(val, path, subval);
- }
- }
- }
-
- return val;
- }
- };
-
- Y.mix(Y.Attribute, Y.Attribute.Complex, true, null, 1);
-
-
-}, '3.4.1' ,{requires:['attribute-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex-min.js'
--- src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex-min.js 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("attribute-complex",function(b){var a=b.Object,c=".";b.Attribute.Complex=function(){};b.Attribute.Complex.prototype={_normAttrVals:function(g){var i={},h={},j,d,f,e;if(g){for(e in g){if(g.hasOwnProperty(e)){if(e.indexOf(c)!==-1){j=e.split(c);d=j.shift();f=h[d]=h[d]||[];f[f.length]={path:j,value:g[e]};}else{i[e]=g[e];}}}return{simple:i,complex:h};}else{return null;}},_getAttrInitVal:function(m,j,p){var e=j.value,o=j.valueFn,d,f,h,g,q,n,k;if(o){if(!o.call){o=this[o];}if(o){e=o.call(this);}}if(!j.readOnly&&p){d=p.simple;if(d&&d.hasOwnProperty(m)){e=d[m];}f=p.complex;if(f&&f.hasOwnProperty(m)){k=f[m];for(h=0,g=k.length;h<g;++h){q=k[h].path;n=k[h].value;a.setValue(e,q,n);}}}return e;}};b.mix(b.Attribute,b.Attribute.Complex,true,null,1);},"3.4.1",{requires:["attribute-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex.js'
--- src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/attribute-complex/attribute-complex.js 1970-01-01 00:00:00 +0000
@@ -1,129 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('attribute-complex', function(Y) {
-
- /**
- * Adds support for attribute providers to handle complex attributes in the constructor
- *
- * @module attribute
- * @submodule attribute-complex
- * @for Attribute
- */
-
- var O = Y.Object,
- DOT = ".";
-
- Y.Attribute.Complex = function() {};
- Y.Attribute.Complex.prototype = {
-
- /**
- * Utility method to split out simple attribute name/value pairs ("x")
- * from complex attribute name/value pairs ("x.y.z"), so that complex
- * attributes can be keyed by the top level attribute name.
- *
- * @method _normAttrVals
- * @param {Object} valueHash An object with attribute name/value pairs
- *
- * @return {Object} An object literal with 2 properties - "simple" and "complex",
- * containing simple and complex attribute values respectively keyed
- * by the top level attribute name, or null, if valueHash is falsey.
- *
- * @private
- */
- _normAttrVals : function(valueHash) {
- var vals = {},
- subvals = {},
- path,
- attr,
- v, k;
-
- if (valueHash) {
- for (k in valueHash) {
- if (valueHash.hasOwnProperty(k)) {
- if (k.indexOf(DOT) !== -1) {
- path = k.split(DOT);
- attr = path.shift();
- v = subvals[attr] = subvals[attr] || [];
- v[v.length] = {
- path : path,
- value: valueHash[k]
- };
- } else {
- vals[k] = valueHash[k];
- }
- }
- }
- return { simple:vals, complex:subvals };
- } else {
- return null;
- }
- },
-
- /**
- * Returns the initial value of the given attribute from
- * either the default configuration provided, or the
- * over-ridden value if it exists in the set of initValues
- * provided and the attribute is not read-only.
- *
- * @param {String} attr The name of the attribute
- * @param {Object} cfg The attribute configuration object
- * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals
- *
- * @return {Any} The initial value of the attribute.
- *
- * @method _getAttrInitVal
- * @private
- */
- _getAttrInitVal : function(attr, cfg, initValues) {
-
- var val = cfg.value,
- valFn = cfg.valueFn,
- simple,
- complex,
- i,
- l,
- path,
- subval,
- subvals;
-
- if (valFn) {
- if (!valFn.call) {
- valFn = this[valFn];
- }
- if (valFn) {
- val = valFn.call(this);
- }
- }
-
- if (!cfg.readOnly && initValues) {
-
- // Simple Attributes
- simple = initValues.simple;
- if (simple && simple.hasOwnProperty(attr)) {
- val = simple[attr];
- }
-
- // Complex Attributes (complex values applied, after simple, incase both are set)
- complex = initValues.complex;
- if (complex && complex.hasOwnProperty(attr)) {
- subvals = complex[attr];
- for (i = 0, l = subvals.length; i < l; ++i) {
- path = subvals[i].path;
- subval = subvals[i].value;
- O.setValue(val, path, subval);
- }
- }
- }
-
- return val;
- }
- };
-
- Y.mix(Y.Attribute, Y.Attribute.Complex, true, null, 1);
-
-
-}, '3.4.1' ,{requires:['attribute-base']});
=== removed directory 'src/maasserver/static/js/yui/3.4.1/autocomplete-base'
=== removed file 'src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base-debug.js'
--- src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base-debug.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base-debug.js 1970-01-01 00:00:00 +0000
@@ -1,1642 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-base', function(Y) {
-
-/**
- * Provides automatic input completion or suggestions for text input fields and
- * textareas.
- *
- * @module autocomplete
- * @main autocomplete
- * @since 3.3.0
- */
-
-/**
- * <code>Y.Base</code> extension that provides core autocomplete logic (but no
- * UI implementation) for a text input field or textarea. Must be mixed into a
- * <code>Y.Base</code>-derived class to be useful.
- *
- * @submodule autocomplete-base
- */
-
-/**
- * <p>
- * Extension that provides core autocomplete logic (but no UI implementation)
- * for a text input field or textarea.
- * </p>
- *
- * <p>
- * The <code>AutoCompleteBase</code> class provides events and attributes that
- * abstract away core autocomplete logic and configuration, but does not provide
- * a widget implementation or suggestion UI. For a prepackaged autocomplete
- * widget, see <code>AutoCompleteList</code>.
- * </p>
- *
- * <p>
- * This extension cannot be instantiated directly, since it doesn't provide an
- * actual implementation. It's intended to be mixed into a
- * <code>Y.Base</code>-based class or widget.
- * </p>
- *
- * <p>
- * <code>Y.Widget</code>-based example:
- * </p>
- *
- * <pre>
- * YUI().use('autocomplete-base', 'widget', function (Y) {
- * var MyAC = Y.Base.create('myAC', Y.Widget, [Y.AutoCompleteBase], {
- * // Custom prototype methods and properties.
- * }, {
- * // Custom static methods and properties.
- * });
- *
- * // Custom implementation code.
- * });
- * </pre>
- *
- * <p>
- * <code>Y.Base</code>-based example:
- * </p>
- *
- * <pre>
- * YUI().use('autocomplete-base', function (Y) {
- * var MyAC = Y.Base.create('myAC', Y.Base, [Y.AutoCompleteBase], {
- * initializer: function () {
- * this._bindUIACBase();
- * this._syncUIACBase();
- * },
- *
- * // Custom prototype methods and properties.
- * }, {
- * // Custom static methods and properties.
- * });
- *
- * // Custom implementation code.
- * });
- * </pre>
- *
- * @class AutoCompleteBase
- */
-
-var Escape = Y.Escape,
- Lang = Y.Lang,
- YArray = Y.Array,
- YObject = Y.Object,
-
- isFunction = Lang.isFunction,
- isString = Lang.isString,
- trim = Lang.trim,
-
- INVALID_VALUE = Y.Attribute.INVALID_VALUE,
-
- _FUNCTION_VALIDATOR = '_functionValidator',
- _SOURCE_SUCCESS = '_sourceSuccess',
-
- ALLOW_BROWSER_AC = 'allowBrowserAutocomplete',
- INPUT_NODE = 'inputNode',
- QUERY = 'query',
- QUERY_DELIMITER = 'queryDelimiter',
- REQUEST_TEMPLATE = 'requestTemplate',
- RESULTS = 'results',
- RESULT_LIST_LOCATOR = 'resultListLocator',
- VALUE = 'value',
- VALUE_CHANGE = 'valueChange',
-
- EVT_CLEAR = 'clear',
- EVT_QUERY = QUERY,
- EVT_RESULTS = RESULTS;
-
-function AutoCompleteBase() {
- // AOP bindings.
- Y.before(this._bindUIACBase, this, 'bindUI');
- Y.before(this._destructorACBase, this, 'destructor');
- Y.before(this._syncUIACBase, this, 'syncUI');
-
- // -- Public Events --------------------------------------------------------
-
- /**
- * Fires after the query has been completely cleared or no longer meets the
- * minimum query length requirement.
- *
- * @event clear
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- * <dl>
- * <dt>prevVal (String)</dt>
- * <dd>
- * Value of the query before it was cleared.
- * </dd>
- * </dl>
- *
- * @preventable _defClearFn
- */
- this.publish(EVT_CLEAR, {
- defaultFn: this._defClearFn
- });
-
- /**
- * Fires when the contents of the input field have changed and the input
- * value meets the criteria necessary to generate an autocomplete query.
- *
- * @event query
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- * <dl>
- * <dt>inputValue (String)</dt>
- * <dd>
- * Full contents of the text input field or textarea that generated
- * the query.
- * </dd>
- *
- * <dt>query (String)</dt>
- * <dd>
- * Autocomplete query. This is the string that will be used to
- * request completion results. It may or may not be the same as
- * <code>inputValue</code>.
- * </dd>
- * </dl>
- *
- * @preventable _defQueryFn
- */
- this.publish(EVT_QUERY, {
- defaultFn: this._defQueryFn
- });
-
- /**
- * Fires after query results are received from the <code>source</code>. If
- * no source has been set, this event will not fire.
- *
- * @event results
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- * <dl>
- * <dt>data (Array|Object)</dt>
- * <dd>
- * Raw, unfiltered result data (if available).
- * </dd>
- *
- * <dt>query (String)</dt>
- * <dd>
- * Query that generated these results.
- * </dd>
- *
- * <dt>results (Array)</dt>
- * <dd>
- * Array of filtered, formatted, and highlighted results. Each item in
- * the array is an object with the following properties:
- *
- * <dl>
- * <dt>display (Node|HTMLElement|String)</dt>
- * <dd>
- * Formatted result HTML suitable for display to the user. If no
- * custom formatter is set, this will be an HTML-escaped version of
- * the string in the <code>text</code> property.
- * </dd>
- *
- * <dt>highlighted (String)</dt>
- * <dd>
- * Highlighted (but not formatted) result text. This property will
- * only be set if a highlighter is in use.
- * </dd>
- *
- * <dt>raw (mixed)</dt>
- * <dd>
- * Raw, unformatted result in whatever form it was provided by the
- * <code>source</code>.
- * </dd>
- *
- * <dt>text (String)</dt>
- * <dd>
- * Plain text version of the result, suitable for being inserted
- * into the value of a text input field or textarea when the result
- * is selected by a user. This value is not HTML-escaped and should
- * not be inserted into the page using innerHTML.
- * </dd>
- * </dl>
- * </dd>
- * </dl>
- *
- * @preventable _defResultsFn
- */
- this.publish(EVT_RESULTS, {
- defaultFn: this._defResultsFn
- });
-}
-
-// -- Public Static Properties -------------------------------------------------
-AutoCompleteBase.ATTRS = {
- /**
- * Whether or not to enable the browser's built-in autocomplete
- * functionality for input fields.
- *
- * @attribute allowBrowserAutocomplete
- * @type Boolean
- * @default false
- */
- allowBrowserAutocomplete: {
- value: false
- },
-
- /**
- * When a <code>queryDelimiter</code> is set, trailing delimiters will
- * automatically be stripped from the input value by default when the
- * input node loses focus. Set this to <code>true</code> to allow trailing
- * delimiters.
- *
- * @attribute allowTrailingDelimiter
- * @type Boolean
- * @default false
- */
- allowTrailingDelimiter: {
- value: false
- },
-
- /**
- * Node to monitor for changes, which will generate <code>query</code>
- * events when appropriate. May be either an input field or a textarea.
- *
- * @attribute inputNode
- * @type Node|HTMLElement|String
- * @writeonce
- */
- inputNode: {
- setter: Y.one,
- writeOnce: 'initOnly'
- },
-
- /**
- * Maximum number of results to return. A value of <code>0</code> or less
- * will allow an unlimited number of results.
- *
- * @attribute maxResults
- * @type Number
- * @default 0
- */
- maxResults: {
- value: 0
- },
-
- /**
- * Minimum number of characters that must be entered before a
- * <code>query</code> event will be fired. A value of <code>0</code>
- * allows empty queries; a negative value will effectively disable all
- * <code>query</code> events.
- *
- * @attribute minQueryLength
- * @type Number
- * @default 1
- */
- minQueryLength: {
- value: 1
- },
-
- /**
- * <p>
- * Current query, or <code>null</code> if there is no current query.
- * </p>
- *
- * <p>
- * The query might not be the same as the current value of the input
- * node, both for timing reasons (due to <code>queryDelay</code>) and
- * because when one or more <code>queryDelimiter</code> separators are
- * in use, only the last portion of the delimited input string will be
- * used as the query value.
- * </p>
- *
- * @attribute query
- * @type String|null
- * @default null
- * @readonly
- */
- query: {
- readOnly: true,
- value: null
- },
-
- /**
- * <p>
- * Number of milliseconds to delay after input before triggering a
- * <code>query</code> event. If new input occurs before this delay is
- * over, the previous input event will be ignored and a new delay will
- * begin.
- * </p>
- *
- * <p>
- * This can be useful both to throttle queries to a remote data source
- * and to avoid distracting the user by showing them less relevant
- * results before they've paused their typing.
- * </p>
- *
- * @attribute queryDelay
- * @type Number
- * @default 100
- */
- queryDelay: {
- value: 100
- },
-
- /**
- * Query delimiter string. When a delimiter is configured, the input value
- * will be split on the delimiter, and only the last portion will be used in
- * autocomplete queries and updated when the <code>query</code> attribute is
- * modified.
- *
- * @attribute queryDelimiter
- * @type String|null
- * @default null
- */
- queryDelimiter: {
- value: null
- },
-
- /**
- * <p>
- * Source request template. This can be a function that accepts a query as a
- * parameter and returns a request string, or it can be a string containing
- * the placeholder "{query}", which will be replaced with the actual
- * URI-encoded query. In either case, the resulting string will be appended
- * to the request URL when the <code>source</code> attribute is set to a
- * remote DataSource, JSONP URL, or XHR URL (it will not be appended to YQL
- * URLs).
- * </p>
- *
- * <p>
- * While <code>requestTemplate</code> may be set to either a function or
- * a string, it will always be returned as a function that accepts a
- * query argument and returns a string.
- * </p>
- *
- * @attribute requestTemplate
- * @type Function|String|null
- * @default null
- */
- requestTemplate: {
- setter: '_setRequestTemplate',
- value: null
- },
-
- /**
- * <p>
- * Array of local result filter functions. If provided, each filter
- * will be called with two arguments when results are received: the query
- * and an array of result objects. See the documentation for the
- * <code>results</code> event for a list of the properties available on each
- * result object.
- * </p>
- *
- * <p>
- * Each filter is expected to return a filtered or modified version of the
- * results array, which will then be passed on to subsequent filters, then
- * the <code>resultHighlighter</code> function (if set), then the
- * <code>resultFormatter</code> function (if set), and finally to
- * subscribers to the <code>results</code> event.
- * </p>
- *
- * <p>
- * If no <code>source</code> is set, result filters will not be called.
- * </p>
- *
- * <p>
- * Prepackaged result filters provided by the autocomplete-filters and
- * autocomplete-filters-accentfold modules can be used by specifying the
- * filter name as a string, such as <code>'phraseMatch'</code> (assuming
- * the necessary filters module is loaded).
- * </p>
- *
- * @attribute resultFilters
- * @type Array
- * @default []
- */
- resultFilters: {
- setter: '_setResultFilters',
- value: []
- },
-
- /**
- * <p>
- * Function which will be used to format results. If provided, this function
- * will be called with two arguments after results have been received and
- * filtered: the query and an array of result objects. The formatter is
- * expected to return an array of HTML strings or Node instances containing
- * the desired HTML for each result.
- * </p>
- *
- * <p>
- * See the documentation for the <code>results</code> event for a list of
- * the properties available on each result object.
- * </p>
- *
- * <p>
- * If no <code>source</code> is set, the formatter will not be called.
- * </p>
- *
- * @attribute resultFormatter
- * @type Function|null
- */
- resultFormatter: {
- validator: _FUNCTION_VALIDATOR
- },
-
- /**
- * <p>
- * Function which will be used to highlight results. If provided, this
- * function will be called with two arguments after results have been
- * received and filtered: the query and an array of filtered result objects.
- * The highlighter is expected to return an array of highlighted result
- * text in the form of HTML strings.
- * </p>
- *
- * <p>
- * See the documentation for the <code>results</code> event for a list of
- * the properties available on each result object.
- * </p>
- *
- * <p>
- * If no <code>source</code> is set, the highlighter will not be called.
- * </p>
- *
- * @attribute resultHighlighter
- * @type Function|null
- */
- resultHighlighter: {
- setter: '_setResultHighlighter'
- },
-
- /**
- * <p>
- * Locator that should be used to extract an array of results from a
- * non-array response.
- * </p>
- *
- * <p>
- * By default, no locator is applied, and all responses are assumed to be
- * arrays by default. If all responses are already arrays, you don't need to
- * define a locator.
- * </p>
- *
- * <p>
- * The locator may be either a function (which will receive the raw response
- * as an argument and must return an array) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * <code>result.foo.bar.baz</code> if the response is an object).
- * </p>
- *
- * <p>
- * While <code>resultListLocator</code> may be set to either a function or a
- * string, it will always be returned as a function that accepts a response
- * argument and returns an array.
- * </p>
- *
- * @attribute resultListLocator
- * @type Function|String|null
- */
- resultListLocator: {
- setter: '_setLocator'
- },
-
- /**
- * Current results, or an empty array if there are no results.
- *
- * @attribute results
- * @type Array
- * @default []
- * @readonly
- */
- results: {
- readOnly: true,
- value: []
- },
-
- /**
- * <p>
- * Locator that should be used to extract a plain text string from a
- * non-string result item. The resulting text value will typically be the
- * value that ends up being inserted into an input field or textarea when
- * the user of an autocomplete implementation selects a result.
- * </p>
- *
- * <p>
- * By default, no locator is applied, and all results are assumed to be
- * plain text strings. If all results are already plain text strings, you
- * don't need to define a locator.
- * </p>
- *
- * <p>
- * The locator may be either a function (which will receive the raw result
- * as an argument and must return a string) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * <code>result.foo.bar.baz</code> if the result is an object).
- * </p>
- *
- * <p>
- * While <code>resultTextLocator</code> may be set to either a function or a
- * string, it will always be returned as a function that accepts a result
- * argument and returns a string.
- * </p>
- *
- * @attribute resultTextLocator
- * @type Function|String|null
- */
- resultTextLocator: {
- setter: '_setLocator'
- },
-
- /**
- * <p>
- * Source for autocomplete results. The following source types are
- * supported:
- * </p>
- *
- * <dl>
- * <dt>Array</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>['first result', 'second result', 'etc']</code>
- * </p>
- *
- * <p>
- * The full array will be provided to any configured filters for each
- * query. This is an easy way to create a fully client-side autocomplete
- * implementation.
- * </p>
- * </dd>
- *
- * <dt>DataSource</dt>
- * <dd>
- * <p>
- * A <code>DataSource</code> instance or other object that provides a
- * DataSource-like <code>sendRequest</code> method. See the
- * <code>DataSource</code> documentation for details.
- * </p>
- * </dd>
- *
- * <dt>Function</dt>
- * <dd>
- * <p>
- * <i>Example (synchronous):</i> <code>function (query) { return ['foo', 'bar']; }</code><br>
- <i>Example (async):</i> <code>function (query, callback) { callback(['foo', 'bar']); }</code>
- * </p>
- *
- * <p>
- * A function source will be called with the current query and a
- * callback function as parameters, and should either return an array of
- * results (for synchronous operation) or return nothing and pass an
- * array of results to the provided callback (for asynchronous
- * operation).
- * </p>
- * </dd>
- *
- * <dt>Object</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>{foo: ['foo result 1', 'foo result 2'], bar: ['bar result']}</code>
- * </p>
- *
- * <p>
- * An object will be treated as a query hashmap. If a property on the
- * object matches the current query, the value of that property will be
- * used as the response.
- * </p>
- *
- * <p>
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a <code>resultListLocator</code> to
- * process the response and return an array.
- * </p>
- * </dd>
- * </dl>
- *
- * <p>
- * If the optional <code>autocomplete-sources</code> module is loaded, then
- * the following additional source types will be supported as well:
- * </p>
- *
- * <dl>
- * <dt><select> Node</dt>
- * <dd>
- * <p>
- * You may provide a YUI Node instance wrapping a <select>
- * element, and the options in the list will be used as results. You
- * will also need to specify a <code>resultTextLocator</code> of 'text'
- * or 'value', depending on what you want to use as the text of the
- * result.
- * </p>
- *
- * <p>
- * Each result will be an object with the following properties:
- * </p>
- *
- * <dl>
- * <dt>html (String)</dt>
- * <dd>
- * <p>HTML content of the <option> element.</p>
- * </dd>
- *
- * <dt>index (Number)</dt>
- * <dd>
- * <p>Index of the <option> element in the list.</p>
- * </dd>
- *
- * <dt>node (Y.Node)</dt>
- * <dd>
- * <p>Node instance referring to the original <option> element.</p>
- * </dd>
- *
- * <dt>selected (Boolean)</dt>
- * <dd>
- * <p>Whether or not this item is currently selected in the
- * <select> list.</p>
- * </dd>
- *
- * <dt>text (String)</dt>
- * <dd>
- * <p>Text content of the <option> element.</p>
- * </dd>
- *
- * <dt>value (String)</dt>
- * <dd>
- * <p>Value of the <option> element.</p>
- * </dd>
- * </dl>
- * </dd>
- *
- * <dt>String (JSONP URL)</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>'http://example.com/search?q={query}&callback={callback}'</code>
- * </p>
- *
- * <p>
- * If a URL with a <code>{callback}</code> placeholder is provided, it
- * will be used to make a JSONP request. The <code>{query}</code>
- * placeholder will be replaced with the current query, and the
- * <code>{callback}</code> placeholder will be replaced with an
- * internally-generated JSONP callback name. Both placeholders must
- * appear in the URL, or the request will fail. An optional
- * <code>{maxResults}</code> placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- * </p>
- *
- * <p>
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a <code>resultListLocator</code> to
- * process the response and return an array.
- * </p>
- *
- * <p>
- * <strong>The <code>jsonp</code> module must be loaded in order for
- * JSONP URL sources to work.</strong> If the <code>jsonp</code> module
- * is not already loaded, it will be loaded on demand if possible.
- * </p>
- * </dd>
- *
- * <dt>String (XHR URL)</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>'http://example.com/search?q={query}'</code>
- * </p>
- *
- * <p>
- * If a URL without a <code>{callback}</code> placeholder is provided,
- * it will be used to make a same-origin XHR request. The
- * <code>{query}</code> placeholder will be replaced with the current
- * query. An optional <code>{maxResults}</code> placeholder may also be
- * provided, and will be replaced with the value of the maxResults
- * attribute (or 1000 if the maxResults attribute is 0 or less).
- * </p>
- *
- * <p>
- * The response is assumed to be a JSON array of results by default. If
- * the response is a JSON object and not an array, provide a
- * <code>resultListLocator</code> to process the response and return an
- * array. If the response is in some form other than JSON, you will
- * need to use a custom DataSource instance as the source.
- * </p>
- *
- * <p>
- * <strong>The <code>io-base</code> and <code>json-parse</code> modules
- * must be loaded in order for XHR URL sources to work.</strong> If
- * these modules are not already loaded, they will be loaded on demand
- * if possible.
- * </p>
- * </dd>
- *
- * <dt>String (YQL query)</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>'select * from search.suggest where query="{query}"'</code>
- * </p>
- *
- * <p>
- * If a YQL query is provided, it will be used to make a YQL request.
- * The <code>{query}</code> placeholder will be replaced with the
- * current autocomplete query. This placeholder must appear in the YQL
- * query, or the request will fail. An optional
- * <code>{maxResults}</code> placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- * </p>
- *
- * <p>
- * <strong>The <code>yql</code> module must be loaded in order for YQL
- * sources to work.</strong> If the <code>yql</code> module is not
- * already loaded, it will be loaded on demand if possible.
- * </p>
- * </dd>
- * </dl>
- *
- * <p>
- * As an alternative to providing a source, you could simply listen for
- * <code>query</code> events and handle them any way you see fit. Providing
- * a source is optional, but will usually be simpler.
- * </p>
- *
- * @attribute source
- * @type Array|DataSource|Function|Node|Object|String|null
- */
- source: {
- setter: '_setSource'
- },
-
- /**
- * <p>
- * May be used to force a specific source type, overriding the automatic
- * source type detection. It should almost never be necessary to do this,
- * but as they taught us in the Boy Scouts, one should always be prepared,
- * so it's here if you need it. Be warned that if you set this attribute and
- * something breaks, it's your own fault.
- * </p>
- *
- * <p>
- * Supported <code>sourceType</code> values are: 'array', 'datasource',
- * 'function', and 'object'.
- * </p>
- *
- * <p>
- * If the <code>autocomplete-sources</code> module is loaded, the following
- * additional source types are supported: 'io', 'jsonp', 'select',
- * 'string', 'yql'
- * </p>
- *
- * @attribute sourceType
- * @type String
- */
- sourceType: {
- value: null
- },
-
- /**
- * If the <code>inputNode</code> specified at instantiation time has a
- * <code>node-tokeninput</code> plugin attached to it, this attribute will
- * be a reference to the <code>Y.Plugin.TokenInput</code> instance.
- *
- * @attribute tokenInput
- * @type Plugin.TokenInput
- * @readonly
- */
- tokenInput: {
- readOnly: true
- },
-
- /**
- * Current value of the input node.
- *
- * @attribute value
- * @type String
- * @default ''
- */
- value: {
- // Why duplicate this._inputNode.get('value')? Because we need a
- // reliable way to track the source of value changes. We want to perform
- // completion when the user changes the value, but not when we change
- // the value.
- value: ''
- }
-};
-
-AutoCompleteBase.CSS_PREFIX = 'ac';
-AutoCompleteBase.UI_SRC = (Y.Widget && Y.Widget.UI_SRC) || 'ui';
-
-/**
- * Mapping of built-in source types to their setter functions. DataSource
- * instances and DataSource-like objects are handled natively, so are not
- * mapped here.
- *
- * @property SOURCE_TYPES
- * @type {Object}
- * @static
- */
-AutoCompleteBase.SOURCE_TYPES = {
- array : '_createArraySource',
- 'function': '_createFunctionSource',
- object : '_createObjectSource'
-};
-
-AutoCompleteBase.prototype = {
- // -- Public Prototype Methods ---------------------------------------------
-
- /**
- * <p>
- * Sends a request to the configured source. If no source is configured,
- * this method won't do anything.
- * </p>
- *
- * <p>
- * Usually there's no reason to call this method manually; it will be
- * called automatically when user input causes a <code>query</code> event to
- * be fired. The only time you'll need to call this method manually is if
- * you want to force a request to be sent when no user input has occurred.
- * </p>
- *
- * @method sendRequest
- * @param {String} query (optional) Query to send. If specified, the
- * <code>query</code> attribute will be set to this query. If not
- * specified, the current value of the <code>query</code> attribute will
- * be used.
- * @param {Function} requestTemplate (optional) Request template function.
- * If not specified, the current value of the <code>requestTemplate</code>
- * attribute will be used.
- * @chainable
- */
- sendRequest: function (query, requestTemplate) {
- var request,
- source = this.get('source');
-
- if (query || query === '') {
- this._set(QUERY, query);
- } else {
- query = this.get(QUERY) || '';
- }
-
- if (source) {
- if (!requestTemplate) {
- requestTemplate = this.get(REQUEST_TEMPLATE);
- }
-
- request = requestTemplate ?
- requestTemplate.call(this, query) : query;
-
- Y.log('sendRequest: ' + request, 'info', 'autocomplete-base');
-
- source.sendRequest({
- query : query,
- request: request,
-
- callback: {
- success: Y.bind(this._onResponse, this, query)
- }
- });
- }
-
- return this;
- },
-
- // -- Protected Lifecycle Methods ------------------------------------------
-
- /**
- * Attaches event listeners and behaviors.
- *
- * @method _bindUIACBase
- * @protected
- */
- _bindUIACBase: function () {
- var inputNode = this.get(INPUT_NODE),
- tokenInput = inputNode && inputNode.tokenInput;
-
- // If the inputNode has a node-tokeninput plugin attached, bind to the
- // plugin's inputNode instead.
- if (tokenInput) {
- inputNode = tokenInput.get(INPUT_NODE);
- this._set('tokenInput', tokenInput);
- }
-
- if (!inputNode) {
- Y.error('No inputNode specified.');
- return;
- }
-
- this._inputNode = inputNode;
-
- this._acBaseEvents = new Y.EventHandle([
- // This is the valueChange event on the inputNode, provided by the
- // event-valuechange module, not our own valueChange.
- inputNode.on(VALUE_CHANGE, this._onInputValueChange, this),
- inputNode.on('blur', this._onInputBlur, this),
-
- this.after(ALLOW_BROWSER_AC + 'Change', this._syncBrowserAutocomplete),
- this.after('sourceTypeChange', this._afterSourceTypeChange),
- this.after(VALUE_CHANGE, this._afterValueChange)
- ]);
- },
-
- /**
- * Detaches AutoCompleteBase event listeners.
- *
- * @method _destructorACBase
- * @protected
- */
- _destructorACBase: function () {
- this._acBaseEvents.detach();
- },
-
- /**
- * Synchronizes the UI state of the <code>inputNode</code>.
- *
- * @method _syncUIACBase
- * @protected
- */
- _syncUIACBase: function () {
- this._syncBrowserAutocomplete();
- this.set(VALUE, this.get(INPUT_NODE).get(VALUE));
- },
-
- // -- Protected Prototype Methods ------------------------------------------
-
- /**
- * Creates a DataSource-like object that simply returns the specified array
- * as a response. See the <code>source</code> attribute for more details.
- *
- * @method _createArraySource
- * @param {Array} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createArraySource: function (source) {
- var that = this;
-
- return {
- type: 'array',
- sendRequest: function (request) {
- that[_SOURCE_SUCCESS](source.concat(), request);
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that passes the query to a
- * custom-defined function, which is expected to call the provided callback
- * with an array of results. See the <code>source</code> attribute for more
- * details.
- *
- * @method _createFunctionSource
- * @param {Function} source Function that accepts a query and a callback as
- * parameters, and calls the callback with an array of results.
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createFunctionSource: function (source) {
- var that = this;
-
- return {
- type: 'function',
- sendRequest: function (request) {
- var value;
-
- function afterResults(results) {
- that[_SOURCE_SUCCESS](results || [], request);
- }
-
- // Allow both synchronous and asynchronous functions. If we get
- // a truthy return value, assume the function is synchronous.
- if ((value = source(request.query, afterResults))) {
- afterResults(value);
- }
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that looks up queries as properties on
- * the specified object, and returns the found value (if any) as a response.
- * See the <code>source</code> attribute for more details.
- *
- * @method _createObjectSource
- * @param {Object} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createObjectSource: function (source) {
- var that = this;
-
- return {
- type: 'object',
- sendRequest: function (request) {
- var query = request.query;
-
- that[_SOURCE_SUCCESS](
- YObject.owns(source, query) ? source[query] : [],
- request
- );
- }
- };
- },
-
- /**
- * Returns <code>true</code> if <i>value</i> is either a function or
- * <code>null</code>.
- *
- * @method _functionValidator
- * @param {Function|null} value Value to validate.
- * @protected
- */
- _functionValidator: function (value) {
- return value === null || isFunction(value);
- },
-
- /**
- * Faster and safer alternative to Y.Object.getValue(). Doesn't bother
- * casting the path to an array (since we already know it's an array) and
- * doesn't throw an error if a value in the middle of the object hierarchy
- * is neither <code>undefined</code> nor an object.
- *
- * @method _getObjectValue
- * @param {Object} obj
- * @param {Array} path
- * @return {mixed} Located value, or <code>undefined</code> if the value was
- * not found at the specified path.
- * @protected
- */
- _getObjectValue: function (obj, path) {
- if (!obj) {
- return;
- }
-
- for (var i = 0, len = path.length; obj && i < len; i++) {
- obj = obj[path[i]];
- }
-
- return obj;
- },
-
- /**
- * Parses result responses, performs filtering and highlighting, and fires
- * the <code>results</code> event.
- *
- * @method _parseResponse
- * @param {String} query Query that generated these results.
- * @param {Object} response Response containing results.
- * @param {Object} data Raw response data.
- * @protected
- */
- _parseResponse: function (query, response, data) {
- var facade = {
- data : data,
- query : query,
- results: []
- },
-
- listLocator = this.get(RESULT_LIST_LOCATOR),
- results = [],
- unfiltered = response && response.results,
-
- filters,
- formatted,
- formatter,
- highlighted,
- highlighter,
- i,
- len,
- maxResults,
- result,
- text,
- textLocator;
-
- if (unfiltered && listLocator) {
- unfiltered = listLocator.call(this, unfiltered);
- }
-
- if (unfiltered && unfiltered.length) {
- filters = this.get('resultFilters');
- textLocator = this.get('resultTextLocator');
-
- // Create a lightweight result object for each result to make them
- // easier to work with. The various properties on the object
- // represent different formats of the result, and will be populated
- // as we go.
- for (i = 0, len = unfiltered.length; i < len; ++i) {
- result = unfiltered[i];
-
- text = textLocator ?
- textLocator.call(this, result) :
- result.toString();
-
- results.push({
- display: Escape.html(text),
- raw : result,
- text : text
- });
- }
-
- // Run the results through all configured result filters. Each
- // filter returns an array of (potentially fewer) result objects,
- // which is then passed to the next filter, and so on.
- for (i = 0, len = filters.length; i < len; ++i) {
- results = filters[i].call(this, query, results.concat());
-
- if (!results) {
- Y.log("Filter didn't return anything.", 'warn', 'autocomplete-base');
- return;
- }
-
- if (!results.length) {
- break;
- }
- }
-
- if (results.length) {
- formatter = this.get('resultFormatter');
- highlighter = this.get('resultHighlighter');
- maxResults = this.get('maxResults');
-
- // If maxResults is set and greater than 0, limit the number of
- // results.
- if (maxResults && maxResults > 0 &&
- results.length > maxResults) {
- results.length = maxResults;
- }
-
- // Run the results through the configured highlighter (if any).
- // The highlighter returns an array of highlighted strings (not
- // an array of result objects), and these strings are then added
- // to each result object.
- if (highlighter) {
- highlighted = highlighter.call(this, query,
- results.concat());
-
- if (!highlighted) {
- Y.log("Highlighter didn't return anything.", 'warn', 'autocomplete-base');
- return;
- }
-
- for (i = 0, len = highlighted.length; i < len; ++i) {
- result = results[i];
- result.highlighted = highlighted[i];
- result.display = result.highlighted;
- }
- }
-
- // Run the results through the configured formatter (if any) to
- // produce the final formatted results. The formatter returns an
- // array of strings or Node instances (not an array of result
- // objects), and these strings/Nodes are then added to each
- // result object.
- if (formatter) {
- formatted = formatter.call(this, query, results.concat());
-
- if (!formatted) {
- Y.log("Formatter didn't return anything.", 'warn', 'autocomplete-base');
- return;
- }
-
- for (i = 0, len = formatted.length; i < len; ++i) {
- results[i].display = formatted[i];
- }
- }
- }
- }
-
- facade.results = results;
- this.fire(EVT_RESULTS, facade);
- },
-
- /**
- * <p>
- * Returns the query portion of the specified input value, or
- * <code>null</code> if there is no suitable query within the input value.
- * </p>
- *
- * <p>
- * If a query delimiter is defined, the query will be the last delimited
- * part of of the string.
- * </p>
- *
- * @method _parseValue
- * @param {String} value Input value from which to extract the query.
- * @return {String|null} query
- * @protected
- */
- _parseValue: function (value) {
- var delim = this.get(QUERY_DELIMITER);
-
- if (delim) {
- value = value.split(delim);
- value = value[value.length - 1];
- }
-
- return Lang.trimLeft(value);
- },
-
- /**
- * Setter for locator attributes.
- *
- * @method _setLocator
- * @param {Function|String|null} locator
- * @return {Function|null}
- * @protected
- */
- _setLocator: function (locator) {
- if (this[_FUNCTION_VALIDATOR](locator)) {
- return locator;
- }
-
- var that = this;
-
- locator = locator.toString().split('.');
-
- return function (result) {
- return result && that._getObjectValue(result, locator);
- };
- },
-
- /**
- * Setter for the <code>requestTemplate</code> attribute.
- *
- * @method _setRequestTemplate
- * @param {Function|String|null} template
- * @return {Function|null}
- * @protected
- */
- _setRequestTemplate: function (template) {
- if (this[_FUNCTION_VALIDATOR](template)) {
- return template;
- }
-
- template = template.toString();
-
- return function (query) {
- return Lang.sub(template, {query: encodeURIComponent(query)});
- };
- },
-
- /**
- * Setter for the <code>resultFilters</code> attribute.
- *
- * @method _setResultFilters
- * @param {Array|Function|String|null} filters <code>null</code>, a filter
- * function, an array of filter functions, or a string or array of strings
- * representing the names of methods on
- * <code>Y.AutoCompleteFilters</code>.
- * @return {Array} Array of filter functions (empty if <i>filters</i> is
- * <code>null</code>).
- * @protected
- */
- _setResultFilters: function (filters) {
- var acFilters, getFilterFunction;
-
- if (filters === null) {
- return [];
- }
-
- acFilters = Y.AutoCompleteFilters;
-
- getFilterFunction = function (filter) {
- if (isFunction(filter)) {
- return filter;
- }
-
- if (isString(filter) && acFilters &&
- isFunction(acFilters[filter])) {
- return acFilters[filter];
- }
-
- return false;
- };
-
- if (Lang.isArray(filters)) {
- filters = YArray.map(filters, getFilterFunction);
- return YArray.every(filters, function (f) { return !!f; }) ?
- filters : INVALID_VALUE;
- } else {
- filters = getFilterFunction(filters);
- return filters ? [filters] : INVALID_VALUE;
- }
- },
-
- /**
- * Setter for the <code>resultHighlighter</code> attribute.
- *
- * @method _setResultHighlighter
- * @param {Function|String|null} highlighter <code>null</code>, a
- * highlighter function, or a string representing the name of a method on
- * <code>Y.AutoCompleteHighlighters</code>.
- * @return {Function|null}
- * @protected
- */
- _setResultHighlighter: function (highlighter) {
- var acHighlighters;
-
- if (this._functionValidator(highlighter)) {
- return highlighter;
- }
-
- acHighlighters = Y.AutoCompleteHighlighters;
-
- if (isString(highlighter) && acHighlighters &&
- isFunction(acHighlighters[highlighter])) {
- return acHighlighters[highlighter];
- }
-
- return INVALID_VALUE;
- },
-
- /**
- * Setter for the <code>source</code> attribute. Returns a DataSource or
- * a DataSource-like object depending on the type of <i>source</i> and/or
- * the value of the <code>sourceType</code> attribute.
- *
- * @method _setSource
- * @param {mixed} source AutoComplete source. See the <code>source</code>
- * attribute for details.
- * @return {DataSource|Object}
- * @protected
- */
- _setSource: function (source) {
- var sourceType = this.get('sourceType') || Lang.type(source),
- sourceSetter;
-
- if ((source && isFunction(source.sendRequest))
- || source === null
- || sourceType === 'datasource') {
-
- // Quacks like a DataSource instance (or null). Make it so!
- this._rawSource = source;
- return source;
- }
-
- // See if there's a registered setter for this source type.
- if ((sourceSetter = AutoCompleteBase.SOURCE_TYPES[sourceType])) {
- this._rawSource = source;
- return Lang.isString(sourceSetter) ?
- this[sourceSetter](source) : sourceSetter(source);
- }
-
- Y.error("Unsupported source type '" + sourceType + "'. Maybe autocomplete-sources isn't loaded?");
- return INVALID_VALUE;
- },
-
- /**
- * Shared success callback for non-DataSource sources.
- *
- * @method _sourceSuccess
- * @param {mixed} data Response data.
- * @param {Object} request Request object.
- * @protected
- */
- _sourceSuccess: function (data, request) {
- request.callback.success({
- data: data,
- response: {results: data}
- });
- },
-
- /**
- * Synchronizes the UI state of the <code>allowBrowserAutocomplete</code>
- * attribute.
- *
- * @method _syncBrowserAutocomplete
- * @protected
- */
- _syncBrowserAutocomplete: function () {
- var inputNode = this.get(INPUT_NODE);
-
- if (inputNode.get('nodeName').toLowerCase() === 'input') {
- inputNode.setAttribute('autocomplete',
- this.get(ALLOW_BROWSER_AC) ? 'on' : 'off');
- }
- },
-
- /**
- * <p>
- * Updates the query portion of the <code>value</code> attribute.
- * </p>
- *
- * <p>
- * If a query delimiter is defined, the last delimited portion of the input
- * value will be replaced with the specified <i>value</i>.
- * </p>
- *
- * @method _updateValue
- * @param {String} newVal New value.
- * @protected
- */
- _updateValue: function (newVal) {
- var delim = this.get(QUERY_DELIMITER),
- insertDelim,
- len,
- prevVal;
-
- newVal = Lang.trimLeft(newVal);
-
- if (delim) {
- insertDelim = trim(delim); // so we don't double up on spaces
- prevVal = YArray.map(trim(this.get(VALUE)).split(delim), trim);
- len = prevVal.length;
-
- if (len > 1) {
- prevVal[len - 1] = newVal;
- newVal = prevVal.join(insertDelim + ' ');
- }
-
- newVal = newVal + insertDelim + ' ';
- }
-
- this.set(VALUE, newVal);
- },
-
- // -- Protected Event Handlers ---------------------------------------------
-
- /**
- * Updates the current <code>source</code> based on the new
- * <code>sourceType</code> to ensure that the two attributes don't get out
- * of sync when they're changed separately.
- *
- * @method _afterSourceTypeChange
- * @param {EventFacade} e
- * @protected
- */
- _afterSourceTypeChange: function (e) {
- if (this._rawSource) {
- this.set('source', this._rawSource);
- }
- },
-
- /**
- * Handles change events for the <code>value</code> attribute.
- *
- * @method _afterValueChange
- * @param {EventFacade} e
- * @protected
- */
- _afterValueChange: function (e) {
- var delay,
- fire,
- minQueryLength,
- newVal = e.newVal,
- query,
- that;
-
- // Don't query on value changes that didn't come from the user.
- if (e.src !== AutoCompleteBase.UI_SRC) {
- this._inputNode.set(VALUE, newVal);
- return;
- }
-
- Y.log('valueChange: new: "' + newVal + '"; old: "' + e.prevVal + '"', 'info', 'autocomplete-base');
-
- minQueryLength = this.get('minQueryLength');
- query = this._parseValue(newVal) || '';
-
- if (minQueryLength >= 0 && query.length >= minQueryLength) {
- delay = this.get('queryDelay');
- that = this;
-
- fire = function () {
- that.fire(EVT_QUERY, {
- inputValue: newVal,
- query : query
- });
- };
-
- if (delay) {
- clearTimeout(this._delay);
- this._delay = setTimeout(fire, delay);
- } else {
- fire();
- }
- } else {
- clearTimeout(this._delay);
-
- this.fire(EVT_CLEAR, {
- prevVal: e.prevVal ? this._parseValue(e.prevVal) : null
- });
- }
- },
-
- /**
- * Handles <code>blur</code> events on the input node.
- *
- * @method _onInputBlur
- * @param {EventFacade} e
- * @protected
- */
- _onInputBlur: function (e) {
- var delim = this.get(QUERY_DELIMITER),
- delimPos,
- newVal,
- value;
-
- // If a query delimiter is set and the input's value contains one or
- // more trailing delimiters, strip them.
- if (delim && !this.get('allowTrailingDelimiter')) {
- delim = Lang.trimRight(delim);
- value = newVal = this._inputNode.get(VALUE);
-
- if (delim) {
- while ((newVal = Lang.trimRight(newVal)) &&
- (delimPos = newVal.length - delim.length) &&
- newVal.lastIndexOf(delim) === delimPos) {
-
- newVal = newVal.substring(0, delimPos);
- }
- } else {
- // Delimiter is one or more space characters, so just trim the
- // value.
- newVal = Lang.trimRight(newVal);
- }
-
- if (newVal !== value) {
- this.set(VALUE, newVal);
- }
- }
- },
-
- /**
- * Handles <code>valueChange</code> events on the input node and fires a
- * <code>query</code> event when the input value meets the configured
- * criteria.
- *
- * @method _onInputValueChange
- * @param {EventFacade} e
- * @protected
- */
- _onInputValueChange: function (e) {
- var newVal = e.newVal;
-
- // Don't query if the internal value is the same as the new value
- // reported by valueChange.
- if (newVal === this.get(VALUE)) {
- return;
- }
-
- this.set(VALUE, newVal, {src: AutoCompleteBase.UI_SRC});
- },
-
- /**
- * Handles source responses and fires the <code>results</code> event.
- *
- * @method _onResponse
- * @param {EventFacade} e
- * @protected
- */
- _onResponse: function (query, e) {
- // Ignore stale responses that aren't for the current query.
- if (query === (this.get(QUERY) || '')) {
- this._parseResponse(query || '', e.response, e.data);
- }
- },
-
- // -- Protected Default Event Handlers -------------------------------------
-
- /**
- * Default <code>clear</code> event handler. Sets the <code>results</code>
- * property to an empty array and <code>query</code> to null.
- *
- * @method _defClearFn
- * @protected
- */
- _defClearFn: function () {
- this._set(QUERY, null);
- this._set(RESULTS, []);
- },
-
- /**
- * Default <code>query</code> event handler. Sets the <code>query</code>
- * property and sends a request to the source if one is configured.
- *
- * @method _defQueryFn
- * @param {EventFacade} e
- * @protected
- */
- _defQueryFn: function (e) {
- var query = e.query;
-
- Y.log('query: "' + query + '"; inputValue: "' + e.inputValue + '"', 'info', 'autocomplete-base');
- this.sendRequest(query); // sendRequest will set the 'query' attribute
- },
-
- /**
- * Default <code>results</code> event handler. Sets the <code>results</code>
- * property to the latest results.
- *
- * @method _defResultsFn
- * @param {EventFacade} e
- * @protected
- */
- _defResultsFn: function (e) {
- Y.log('results: ' + Y.dump(e.results), 'info', 'autocomplete-base');
- this._set(RESULTS, e[RESULTS]);
- }
-};
-
-Y.AutoCompleteBase = AutoCompleteBase;
-
-
-}, '3.4.1' ,{optional:['autocomplete-sources'], requires:['array-extras', 'base-build', 'escape', 'event-valuechange', 'node-base']});
=== removed file 'src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base-min.js'
--- src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base-min.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base-min.js 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add("autocomplete-base",function(f){var g=f.Escape,j=f.Lang,q=f.Array,i=f.Object,d=j.isFunction,r=j.isString,u=j.trim,l=f.Attribute.INVALID_VALUE,o="_functionValidator",x="_sourceSuccess",c="allowBrowserAutocomplete",h="inputNode",w="query",e="queryDelimiter",b="requestTemplate",m="results",n="resultListLocator",k="value",s="valueChange",a="clear",t=w,p=m;function v(){f.before(this._bindUIACBase,this,"bindUI");f.before(this._destructorACBase,this,"destructor");f.before(this._syncUIACBase,this,"syncUI");this.publish(a,{defaultFn:this._defClearFn});this.publish(t,{defaultFn:this._defQueryFn});this.publish(p,{defaultFn:this._defResultsFn});}v.ATTRS={allowBrowserAutocomplete:{value:false},allowTrailingDelimiter:{value:false},inputNode:{setter:f.one,writeOnce:"initOnly"},maxResults:{value:0},minQueryLength:{value:1},query:{readOnly:true,value:null},queryDelay:{value:100},queryDelimiter:{value:null},requestTemplate:{setter:"_setRequestTemplate",value:null},resultFilters:{setter:"_setResultFilters",value:[]},resultFormatter:{validator:o},resultHighlighter:{setter:"_setResultHighlighter"},resultListLocator:{setter:"_setLocator"},results:{readOnly:true,value:[]},resultTextLocator:{setter:"_setLocator"},source:{setter:"_setSource"},sourceType:{value:null},tokenInput:{readOnly:true},value:{value:""}};v.CSS_PREFIX="ac";v.UI_SRC=(f.Widget&&f.Widget.UI_SRC)||"ui";v.SOURCE_TYPES={array:"_createArraySource","function":"_createFunctionSource",object:"_createObjectSource"};v.prototype={sendRequest:function(A,B){var y,z=this.get("source");if(A||A===""){this._set(w,A);}else{A=this.get(w)||"";}if(z){if(!B){B=this.get(b);}y=B?B.call(this,A):A;z.sendRequest({query:A,request:y,callback:{success:f.bind(this._onResponse,this,A)}});}return this;},_bindUIACBase:function(){var z=this.get(h),y=z&&z.tokenInput;if(y){z=y.get(h);this._set("tokenInput",y);}if(!z){f.error("No inputNode specified.");return;}this._inputNode=z;this._acBaseEvents=new f.EventHandle([z.on(s,this._onInputValueChange,this),z.on("blur",this._onInputBlur,this),this.after(c+"Change",this._syncBrowserAutocomplete),this.after("sourceTypeChange",this._afterSourceTypeChange),this.after(s,this._afterValueChange)]);},_destructorACBase:function(){this._acBaseEvents.detach();},_syncUIACBase:function(){this._syncBrowserAutocomplete();this.set(k,this.get(h).get(k));},_createArraySource:function(z){var y=this;return{type:"array",sendRequest:function(A){y[x](z.concat(),A);}};},_createFunctionSource:function(z){var y=this;return{type:"function",sendRequest:function(A){var B;function C(D){y[x](D||[],A);}if((B=z(A.query,C))){C(B);}}};},_createObjectSource:function(z){var y=this;return{type:"object",sendRequest:function(A){var B=A.query;y[x](i.owns(z,B)?z[B]:[],A);}};},_functionValidator:function(y){return y===null||d(y);},_getObjectValue:function(B,A){if(!B){return;}for(var z=0,y=A.length;B&&z<y;z++){B=B[A[z]];}return B;},_parseResponse:function(A,y,P){var G={data:P,query:A,results:[]},I=this.get(n),H=[],F=y&&y.results,C,z,J,B,O,K,L,M,D,E,N;if(F&&I){F=I.call(this,F);}if(F&&F.length){C=this.get("resultFilters");N=this.get("resultTextLocator");for(K=0,L=F.length;K<L;++K){D=F[K];E=N?N.call(this,D):D.toString();H.push({display:g.html(E),raw:D,text:E});}for(K=0,L=C.length;K<L;++K){H=C[K].call(this,A,H.concat());if(!H){return;}if(!H.length){break;}}if(H.length){J=this.get("resultFormatter");O=this.get("resultHighlighter");M=this.get("maxResults");if(M&&M>0&&H.length>M){H.length=M;}if(O){B=O.call(this,A,H.concat());if(!B){return;}for(K=0,L=B.length;K<L;++K){D=H[K];D.highlighted=B[K];D.display=D.highlighted;}}if(J){z=J.call(this,A,H.concat());if(!z){return;}for(K=0,L=z.length;K<L;++K){H[K].display=z[K];}}}}G.results=H;this.fire(p,G);},_parseValue:function(y){var z=this.get(e);if(z){y=y.split(z);y=y[y.length-1];}return j.trimLeft(y);},_setLocator:function(y){if(this[o](y)){return y;}var z=this;y=y.toString().split(".");return function(A){return A&&z._getObjectValue(A,y);};},_setRequestTemplate:function(y){if(this[o](y)){return y;}y=y.toString();return function(z){return j.sub(y,{query:encodeURIComponent(z)});};},_setResultFilters:function(A){var y,z;if(A===null){return[];}y=f.AutoCompleteFilters;z=function(B){if(d(B)){return B;}if(r(B)&&y&&d(y[B])){return y[B];}return false;};if(j.isArray(A)){A=q.map(A,z);return q.every(A,function(B){return !!B;})?A:l;}else{A=z(A);return A?[A]:l;}},_setResultHighlighter:function(y){var z;if(this._functionValidator(y)){return y;}z=f.AutoCompleteHighlighters;if(r(y)&&z&&d(z[y])){return z[y];}return l;},_setSource:function(A){var y=this.get("sourceType")||j.type(A),z;if((A&&d(A.sendRequest))||A===null||y==="datasource"){this._rawSource=A;return A;}if((z=v.SOURCE_TYPES[y])){this._rawSource=A;return j.isString(z)?this[z](A):z(A);}f.error("Unsupported source type '"+y+"'. Maybe autocomplete-sources isn't loaded?");return l;},_sourceSuccess:function(z,y){y.callback.success({data:z,response:{results:z}});},_syncBrowserAutocomplete:function(){var y=this.get(h);if(y.get("nodeName").toLowerCase()==="input"){y.setAttribute("autocomplete",this.get(c)?"on":"off");}},_updateValue:function(z){var B=this.get(e),A,y,C;z=j.trimLeft(z);if(B){A=u(B);C=q.map(u(this.get(k)).split(B),u);y=C.length;if(y>1){C[y-1]=z;z=C.join(A+" ");}z=z+A+" ";}this.set(k,z);},_afterSourceTypeChange:function(y){if(this._rawSource){this.set("source",this._rawSource);}},_afterValueChange:function(E){var A,B,y,z=E.newVal,D,C;if(E.src!==v.UI_SRC){this._inputNode.set(k,z);return;}y=this.get("minQueryLength");D=this._parseValue(z)||"";if(y>=0&&D.length>=y){A=this.get("queryDelay");C=this;B=function(){C.fire(t,{inputValue:z,query:D});};if(A){clearTimeout(this._delay);this._delay=setTimeout(B,A);}else{B();}}else{clearTimeout(this._delay);this.fire(a,{prevVal:E.prevVal?this._parseValue(E.prevVal):null});}},_onInputBlur:function(B){var C=this.get(e),y,z,A;if(C&&!this.get("allowTrailingDelimiter")){C=j.trimRight(C);A=z=this._inputNode.get(k);if(C){while((z=j.trimRight(z))&&(y=z.length-C.length)&&z.lastIndexOf(C)===y){z=z.substring(0,y);
-}}else{z=j.trimRight(z);}if(z!==A){this.set(k,z);}}},_onInputValueChange:function(z){var y=z.newVal;if(y===this.get(k)){return;}this.set(k,y,{src:v.UI_SRC});},_onResponse:function(y,z){if(y===(this.get(w)||"")){this._parseResponse(y||"",z.response,z.data);}},_defClearFn:function(){this._set(w,null);this._set(m,[]);},_defQueryFn:function(z){var y=z.query;this.sendRequest(y);},_defResultsFn:function(y){this._set(m,y[m]);}};f.AutoCompleteBase=v;},"3.4.1",{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]});
\ No newline at end of file
=== removed file 'src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base.js'
--- src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base.js 2012-01-16 16:15:44 +0000
+++ src/maasserver/static/js/yui/3.4.1/autocomplete-base/autocomplete-base.js 1970-01-01 00:00:00 +0000
@@ -1,1635 +0,0 @@
-/*
-YUI 3.4.1 (build 4118)
-Copyright 2011 Yahoo! Inc. All rights reserved.
-Licensed under the BSD License.
-http://yuilibrary.com/license/
-*/
-YUI.add('autocomplete-base', function(Y) {
-
-/**
- * Provides automatic input completion or suggestions for text input fields and
- * textareas.
- *
- * @module autocomplete
- * @main autocomplete
- * @since 3.3.0
- */
-
-/**
- * <code>Y.Base</code> extension that provides core autocomplete logic (but no
- * UI implementation) for a text input field or textarea. Must be mixed into a
- * <code>Y.Base</code>-derived class to be useful.
- *
- * @submodule autocomplete-base
- */
-
-/**
- * <p>
- * Extension that provides core autocomplete logic (but no UI implementation)
- * for a text input field or textarea.
- * </p>
- *
- * <p>
- * The <code>AutoCompleteBase</code> class provides events and attributes that
- * abstract away core autocomplete logic and configuration, but does not provide
- * a widget implementation or suggestion UI. For a prepackaged autocomplete
- * widget, see <code>AutoCompleteList</code>.
- * </p>
- *
- * <p>
- * This extension cannot be instantiated directly, since it doesn't provide an
- * actual implementation. It's intended to be mixed into a
- * <code>Y.Base</code>-based class or widget.
- * </p>
- *
- * <p>
- * <code>Y.Widget</code>-based example:
- * </p>
- *
- * <pre>
- * YUI().use('autocomplete-base', 'widget', function (Y) {
- * var MyAC = Y.Base.create('myAC', Y.Widget, [Y.AutoCompleteBase], {
- * // Custom prototype methods and properties.
- * }, {
- * // Custom static methods and properties.
- * });
- *
- * // Custom implementation code.
- * });
- * </pre>
- *
- * <p>
- * <code>Y.Base</code>-based example:
- * </p>
- *
- * <pre>
- * YUI().use('autocomplete-base', function (Y) {
- * var MyAC = Y.Base.create('myAC', Y.Base, [Y.AutoCompleteBase], {
- * initializer: function () {
- * this._bindUIACBase();
- * this._syncUIACBase();
- * },
- *
- * // Custom prototype methods and properties.
- * }, {
- * // Custom static methods and properties.
- * });
- *
- * // Custom implementation code.
- * });
- * </pre>
- *
- * @class AutoCompleteBase
- */
-
-var Escape = Y.Escape,
- Lang = Y.Lang,
- YArray = Y.Array,
- YObject = Y.Object,
-
- isFunction = Lang.isFunction,
- isString = Lang.isString,
- trim = Lang.trim,
-
- INVALID_VALUE = Y.Attribute.INVALID_VALUE,
-
- _FUNCTION_VALIDATOR = '_functionValidator',
- _SOURCE_SUCCESS = '_sourceSuccess',
-
- ALLOW_BROWSER_AC = 'allowBrowserAutocomplete',
- INPUT_NODE = 'inputNode',
- QUERY = 'query',
- QUERY_DELIMITER = 'queryDelimiter',
- REQUEST_TEMPLATE = 'requestTemplate',
- RESULTS = 'results',
- RESULT_LIST_LOCATOR = 'resultListLocator',
- VALUE = 'value',
- VALUE_CHANGE = 'valueChange',
-
- EVT_CLEAR = 'clear',
- EVT_QUERY = QUERY,
- EVT_RESULTS = RESULTS;
-
-function AutoCompleteBase() {
- // AOP bindings.
- Y.before(this._bindUIACBase, this, 'bindUI');
- Y.before(this._destructorACBase, this, 'destructor');
- Y.before(this._syncUIACBase, this, 'syncUI');
-
- // -- Public Events --------------------------------------------------------
-
- /**
- * Fires after the query has been completely cleared or no longer meets the
- * minimum query length requirement.
- *
- * @event clear
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- * <dl>
- * <dt>prevVal (String)</dt>
- * <dd>
- * Value of the query before it was cleared.
- * </dd>
- * </dl>
- *
- * @preventable _defClearFn
- */
- this.publish(EVT_CLEAR, {
- defaultFn: this._defClearFn
- });
-
- /**
- * Fires when the contents of the input field have changed and the input
- * value meets the criteria necessary to generate an autocomplete query.
- *
- * @event query
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- * <dl>
- * <dt>inputValue (String)</dt>
- * <dd>
- * Full contents of the text input field or textarea that generated
- * the query.
- * </dd>
- *
- * <dt>query (String)</dt>
- * <dd>
- * Autocomplete query. This is the string that will be used to
- * request completion results. It may or may not be the same as
- * <code>inputValue</code>.
- * </dd>
- * </dl>
- *
- * @preventable _defQueryFn
- */
- this.publish(EVT_QUERY, {
- defaultFn: this._defQueryFn
- });
-
- /**
- * Fires after query results are received from the <code>source</code>. If
- * no source has been set, this event will not fire.
- *
- * @event results
- * @param {EventFacade} e Event facade with the following additional
- * properties:
- *
- * <dl>
- * <dt>data (Array|Object)</dt>
- * <dd>
- * Raw, unfiltered result data (if available).
- * </dd>
- *
- * <dt>query (String)</dt>
- * <dd>
- * Query that generated these results.
- * </dd>
- *
- * <dt>results (Array)</dt>
- * <dd>
- * Array of filtered, formatted, and highlighted results. Each item in
- * the array is an object with the following properties:
- *
- * <dl>
- * <dt>display (Node|HTMLElement|String)</dt>
- * <dd>
- * Formatted result HTML suitable for display to the user. If no
- * custom formatter is set, this will be an HTML-escaped version of
- * the string in the <code>text</code> property.
- * </dd>
- *
- * <dt>highlighted (String)</dt>
- * <dd>
- * Highlighted (but not formatted) result text. This property will
- * only be set if a highlighter is in use.
- * </dd>
- *
- * <dt>raw (mixed)</dt>
- * <dd>
- * Raw, unformatted result in whatever form it was provided by the
- * <code>source</code>.
- * </dd>
- *
- * <dt>text (String)</dt>
- * <dd>
- * Plain text version of the result, suitable for being inserted
- * into the value of a text input field or textarea when the result
- * is selected by a user. This value is not HTML-escaped and should
- * not be inserted into the page using innerHTML.
- * </dd>
- * </dl>
- * </dd>
- * </dl>
- *
- * @preventable _defResultsFn
- */
- this.publish(EVT_RESULTS, {
- defaultFn: this._defResultsFn
- });
-}
-
-// -- Public Static Properties -------------------------------------------------
-AutoCompleteBase.ATTRS = {
- /**
- * Whether or not to enable the browser's built-in autocomplete
- * functionality for input fields.
- *
- * @attribute allowBrowserAutocomplete
- * @type Boolean
- * @default false
- */
- allowBrowserAutocomplete: {
- value: false
- },
-
- /**
- * When a <code>queryDelimiter</code> is set, trailing delimiters will
- * automatically be stripped from the input value by default when the
- * input node loses focus. Set this to <code>true</code> to allow trailing
- * delimiters.
- *
- * @attribute allowTrailingDelimiter
- * @type Boolean
- * @default false
- */
- allowTrailingDelimiter: {
- value: false
- },
-
- /**
- * Node to monitor for changes, which will generate <code>query</code>
- * events when appropriate. May be either an input field or a textarea.
- *
- * @attribute inputNode
- * @type Node|HTMLElement|String
- * @writeonce
- */
- inputNode: {
- setter: Y.one,
- writeOnce: 'initOnly'
- },
-
- /**
- * Maximum number of results to return. A value of <code>0</code> or less
- * will allow an unlimited number of results.
- *
- * @attribute maxResults
- * @type Number
- * @default 0
- */
- maxResults: {
- value: 0
- },
-
- /**
- * Minimum number of characters that must be entered before a
- * <code>query</code> event will be fired. A value of <code>0</code>
- * allows empty queries; a negative value will effectively disable all
- * <code>query</code> events.
- *
- * @attribute minQueryLength
- * @type Number
- * @default 1
- */
- minQueryLength: {
- value: 1
- },
-
- /**
- * <p>
- * Current query, or <code>null</code> if there is no current query.
- * </p>
- *
- * <p>
- * The query might not be the same as the current value of the input
- * node, both for timing reasons (due to <code>queryDelay</code>) and
- * because when one or more <code>queryDelimiter</code> separators are
- * in use, only the last portion of the delimited input string will be
- * used as the query value.
- * </p>
- *
- * @attribute query
- * @type String|null
- * @default null
- * @readonly
- */
- query: {
- readOnly: true,
- value: null
- },
-
- /**
- * <p>
- * Number of milliseconds to delay after input before triggering a
- * <code>query</code> event. If new input occurs before this delay is
- * over, the previous input event will be ignored and a new delay will
- * begin.
- * </p>
- *
- * <p>
- * This can be useful both to throttle queries to a remote data source
- * and to avoid distracting the user by showing them less relevant
- * results before they've paused their typing.
- * </p>
- *
- * @attribute queryDelay
- * @type Number
- * @default 100
- */
- queryDelay: {
- value: 100
- },
-
- /**
- * Query delimiter string. When a delimiter is configured, the input value
- * will be split on the delimiter, and only the last portion will be used in
- * autocomplete queries and updated when the <code>query</code> attribute is
- * modified.
- *
- * @attribute queryDelimiter
- * @type String|null
- * @default null
- */
- queryDelimiter: {
- value: null
- },
-
- /**
- * <p>
- * Source request template. This can be a function that accepts a query as a
- * parameter and returns a request string, or it can be a string containing
- * the placeholder "{query}", which will be replaced with the actual
- * URI-encoded query. In either case, the resulting string will be appended
- * to the request URL when the <code>source</code> attribute is set to a
- * remote DataSource, JSONP URL, or XHR URL (it will not be appended to YQL
- * URLs).
- * </p>
- *
- * <p>
- * While <code>requestTemplate</code> may be set to either a function or
- * a string, it will always be returned as a function that accepts a
- * query argument and returns a string.
- * </p>
- *
- * @attribute requestTemplate
- * @type Function|String|null
- * @default null
- */
- requestTemplate: {
- setter: '_setRequestTemplate',
- value: null
- },
-
- /**
- * <p>
- * Array of local result filter functions. If provided, each filter
- * will be called with two arguments when results are received: the query
- * and an array of result objects. See the documentation for the
- * <code>results</code> event for a list of the properties available on each
- * result object.
- * </p>
- *
- * <p>
- * Each filter is expected to return a filtered or modified version of the
- * results array, which will then be passed on to subsequent filters, then
- * the <code>resultHighlighter</code> function (if set), then the
- * <code>resultFormatter</code> function (if set), and finally to
- * subscribers to the <code>results</code> event.
- * </p>
- *
- * <p>
- * If no <code>source</code> is set, result filters will not be called.
- * </p>
- *
- * <p>
- * Prepackaged result filters provided by the autocomplete-filters and
- * autocomplete-filters-accentfold modules can be used by specifying the
- * filter name as a string, such as <code>'phraseMatch'</code> (assuming
- * the necessary filters module is loaded).
- * </p>
- *
- * @attribute resultFilters
- * @type Array
- * @default []
- */
- resultFilters: {
- setter: '_setResultFilters',
- value: []
- },
-
- /**
- * <p>
- * Function which will be used to format results. If provided, this function
- * will be called with two arguments after results have been received and
- * filtered: the query and an array of result objects. The formatter is
- * expected to return an array of HTML strings or Node instances containing
- * the desired HTML for each result.
- * </p>
- *
- * <p>
- * See the documentation for the <code>results</code> event for a list of
- * the properties available on each result object.
- * </p>
- *
- * <p>
- * If no <code>source</code> is set, the formatter will not be called.
- * </p>
- *
- * @attribute resultFormatter
- * @type Function|null
- */
- resultFormatter: {
- validator: _FUNCTION_VALIDATOR
- },
-
- /**
- * <p>
- * Function which will be used to highlight results. If provided, this
- * function will be called with two arguments after results have been
- * received and filtered: the query and an array of filtered result objects.
- * The highlighter is expected to return an array of highlighted result
- * text in the form of HTML strings.
- * </p>
- *
- * <p>
- * See the documentation for the <code>results</code> event for a list of
- * the properties available on each result object.
- * </p>
- *
- * <p>
- * If no <code>source</code> is set, the highlighter will not be called.
- * </p>
- *
- * @attribute resultHighlighter
- * @type Function|null
- */
- resultHighlighter: {
- setter: '_setResultHighlighter'
- },
-
- /**
- * <p>
- * Locator that should be used to extract an array of results from a
- * non-array response.
- * </p>
- *
- * <p>
- * By default, no locator is applied, and all responses are assumed to be
- * arrays by default. If all responses are already arrays, you don't need to
- * define a locator.
- * </p>
- *
- * <p>
- * The locator may be either a function (which will receive the raw response
- * as an argument and must return an array) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * <code>result.foo.bar.baz</code> if the response is an object).
- * </p>
- *
- * <p>
- * While <code>resultListLocator</code> may be set to either a function or a
- * string, it will always be returned as a function that accepts a response
- * argument and returns an array.
- * </p>
- *
- * @attribute resultListLocator
- * @type Function|String|null
- */
- resultListLocator: {
- setter: '_setLocator'
- },
-
- /**
- * Current results, or an empty array if there are no results.
- *
- * @attribute results
- * @type Array
- * @default []
- * @readonly
- */
- results: {
- readOnly: true,
- value: []
- },
-
- /**
- * <p>
- * Locator that should be used to extract a plain text string from a
- * non-string result item. The resulting text value will typically be the
- * value that ends up being inserted into an input field or textarea when
- * the user of an autocomplete implementation selects a result.
- * </p>
- *
- * <p>
- * By default, no locator is applied, and all results are assumed to be
- * plain text strings. If all results are already plain text strings, you
- * don't need to define a locator.
- * </p>
- *
- * <p>
- * The locator may be either a function (which will receive the raw result
- * as an argument and must return a string) or a string representing an
- * object path, such as "foo.bar.baz" (which would return the value of
- * <code>result.foo.bar.baz</code> if the result is an object).
- * </p>
- *
- * <p>
- * While <code>resultTextLocator</code> may be set to either a function or a
- * string, it will always be returned as a function that accepts a result
- * argument and returns a string.
- * </p>
- *
- * @attribute resultTextLocator
- * @type Function|String|null
- */
- resultTextLocator: {
- setter: '_setLocator'
- },
-
- /**
- * <p>
- * Source for autocomplete results. The following source types are
- * supported:
- * </p>
- *
- * <dl>
- * <dt>Array</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>['first result', 'second result', 'etc']</code>
- * </p>
- *
- * <p>
- * The full array will be provided to any configured filters for each
- * query. This is an easy way to create a fully client-side autocomplete
- * implementation.
- * </p>
- * </dd>
- *
- * <dt>DataSource</dt>
- * <dd>
- * <p>
- * A <code>DataSource</code> instance or other object that provides a
- * DataSource-like <code>sendRequest</code> method. See the
- * <code>DataSource</code> documentation for details.
- * </p>
- * </dd>
- *
- * <dt>Function</dt>
- * <dd>
- * <p>
- * <i>Example (synchronous):</i> <code>function (query) { return ['foo', 'bar']; }</code><br>
- <i>Example (async):</i> <code>function (query, callback) { callback(['foo', 'bar']); }</code>
- * </p>
- *
- * <p>
- * A function source will be called with the current query and a
- * callback function as parameters, and should either return an array of
- * results (for synchronous operation) or return nothing and pass an
- * array of results to the provided callback (for asynchronous
- * operation).
- * </p>
- * </dd>
- *
- * <dt>Object</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>{foo: ['foo result 1', 'foo result 2'], bar: ['bar result']}</code>
- * </p>
- *
- * <p>
- * An object will be treated as a query hashmap. If a property on the
- * object matches the current query, the value of that property will be
- * used as the response.
- * </p>
- *
- * <p>
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a <code>resultListLocator</code> to
- * process the response and return an array.
- * </p>
- * </dd>
- * </dl>
- *
- * <p>
- * If the optional <code>autocomplete-sources</code> module is loaded, then
- * the following additional source types will be supported as well:
- * </p>
- *
- * <dl>
- * <dt><select> Node</dt>
- * <dd>
- * <p>
- * You may provide a YUI Node instance wrapping a <select>
- * element, and the options in the list will be used as results. You
- * will also need to specify a <code>resultTextLocator</code> of 'text'
- * or 'value', depending on what you want to use as the text of the
- * result.
- * </p>
- *
- * <p>
- * Each result will be an object with the following properties:
- * </p>
- *
- * <dl>
- * <dt>html (String)</dt>
- * <dd>
- * <p>HTML content of the <option> element.</p>
- * </dd>
- *
- * <dt>index (Number)</dt>
- * <dd>
- * <p>Index of the <option> element in the list.</p>
- * </dd>
- *
- * <dt>node (Y.Node)</dt>
- * <dd>
- * <p>Node instance referring to the original <option> element.</p>
- * </dd>
- *
- * <dt>selected (Boolean)</dt>
- * <dd>
- * <p>Whether or not this item is currently selected in the
- * <select> list.</p>
- * </dd>
- *
- * <dt>text (String)</dt>
- * <dd>
- * <p>Text content of the <option> element.</p>
- * </dd>
- *
- * <dt>value (String)</dt>
- * <dd>
- * <p>Value of the <option> element.</p>
- * </dd>
- * </dl>
- * </dd>
- *
- * <dt>String (JSONP URL)</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>'http://example.com/search?q={query}&callback={callback}'</code>
- * </p>
- *
- * <p>
- * If a URL with a <code>{callback}</code> placeholder is provided, it
- * will be used to make a JSONP request. The <code>{query}</code>
- * placeholder will be replaced with the current query, and the
- * <code>{callback}</code> placeholder will be replaced with an
- * internally-generated JSONP callback name. Both placeholders must
- * appear in the URL, or the request will fail. An optional
- * <code>{maxResults}</code> placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- * </p>
- *
- * <p>
- * The response is assumed to be an array of results by default. If the
- * response is not an array, provide a <code>resultListLocator</code> to
- * process the response and return an array.
- * </p>
- *
- * <p>
- * <strong>The <code>jsonp</code> module must be loaded in order for
- * JSONP URL sources to work.</strong> If the <code>jsonp</code> module
- * is not already loaded, it will be loaded on demand if possible.
- * </p>
- * </dd>
- *
- * <dt>String (XHR URL)</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>'http://example.com/search?q={query}'</code>
- * </p>
- *
- * <p>
- * If a URL without a <code>{callback}</code> placeholder is provided,
- * it will be used to make a same-origin XHR request. The
- * <code>{query}</code> placeholder will be replaced with the current
- * query. An optional <code>{maxResults}</code> placeholder may also be
- * provided, and will be replaced with the value of the maxResults
- * attribute (or 1000 if the maxResults attribute is 0 or less).
- * </p>
- *
- * <p>
- * The response is assumed to be a JSON array of results by default. If
- * the response is a JSON object and not an array, provide a
- * <code>resultListLocator</code> to process the response and return an
- * array. If the response is in some form other than JSON, you will
- * need to use a custom DataSource instance as the source.
- * </p>
- *
- * <p>
- * <strong>The <code>io-base</code> and <code>json-parse</code> modules
- * must be loaded in order for XHR URL sources to work.</strong> If
- * these modules are not already loaded, they will be loaded on demand
- * if possible.
- * </p>
- * </dd>
- *
- * <dt>String (YQL query)</dt>
- * <dd>
- * <p>
- * <i>Example:</i> <code>'select * from search.suggest where query="{query}"'</code>
- * </p>
- *
- * <p>
- * If a YQL query is provided, it will be used to make a YQL request.
- * The <code>{query}</code> placeholder will be replaced with the
- * current autocomplete query. This placeholder must appear in the YQL
- * query, or the request will fail. An optional
- * <code>{maxResults}</code> placeholder may also be provided, and will
- * be replaced with the value of the maxResults attribute (or 1000 if
- * the maxResults attribute is 0 or less).
- * </p>
- *
- * <p>
- * <strong>The <code>yql</code> module must be loaded in order for YQL
- * sources to work.</strong> If the <code>yql</code> module is not
- * already loaded, it will be loaded on demand if possible.
- * </p>
- * </dd>
- * </dl>
- *
- * <p>
- * As an alternative to providing a source, you could simply listen for
- * <code>query</code> events and handle them any way you see fit. Providing
- * a source is optional, but will usually be simpler.
- * </p>
- *
- * @attribute source
- * @type Array|DataSource|Function|Node|Object|String|null
- */
- source: {
- setter: '_setSource'
- },
-
- /**
- * <p>
- * May be used to force a specific source type, overriding the automatic
- * source type detection. It should almost never be necessary to do this,
- * but as they taught us in the Boy Scouts, one should always be prepared,
- * so it's here if you need it. Be warned that if you set this attribute and
- * something breaks, it's your own fault.
- * </p>
- *
- * <p>
- * Supported <code>sourceType</code> values are: 'array', 'datasource',
- * 'function', and 'object'.
- * </p>
- *
- * <p>
- * If the <code>autocomplete-sources</code> module is loaded, the following
- * additional source types are supported: 'io', 'jsonp', 'select',
- * 'string', 'yql'
- * </p>
- *
- * @attribute sourceType
- * @type String
- */
- sourceType: {
- value: null
- },
-
- /**
- * If the <code>inputNode</code> specified at instantiation time has a
- * <code>node-tokeninput</code> plugin attached to it, this attribute will
- * be a reference to the <code>Y.Plugin.TokenInput</code> instance.
- *
- * @attribute tokenInput
- * @type Plugin.TokenInput
- * @readonly
- */
- tokenInput: {
- readOnly: true
- },
-
- /**
- * Current value of the input node.
- *
- * @attribute value
- * @type String
- * @default ''
- */
- value: {
- // Why duplicate this._inputNode.get('value')? Because we need a
- // reliable way to track the source of value changes. We want to perform
- // completion when the user changes the value, but not when we change
- // the value.
- value: ''
- }
-};
-
-AutoCompleteBase.CSS_PREFIX = 'ac';
-AutoCompleteBase.UI_SRC = (Y.Widget && Y.Widget.UI_SRC) || 'ui';
-
-/**
- * Mapping of built-in source types to their setter functions. DataSource
- * instances and DataSource-like objects are handled natively, so are not
- * mapped here.
- *
- * @property SOURCE_TYPES
- * @type {Object}
- * @static
- */
-AutoCompleteBase.SOURCE_TYPES = {
- array : '_createArraySource',
- 'function': '_createFunctionSource',
- object : '_createObjectSource'
-};
-
-AutoCompleteBase.prototype = {
- // -- Public Prototype Methods ---------------------------------------------
-
- /**
- * <p>
- * Sends a request to the configured source. If no source is configured,
- * this method won't do anything.
- * </p>
- *
- * <p>
- * Usually there's no reason to call this method manually; it will be
- * called automatically when user input causes a <code>query</code> event to
- * be fired. The only time you'll need to call this method manually is if
- * you want to force a request to be sent when no user input has occurred.
- * </p>
- *
- * @method sendRequest
- * @param {String} query (optional) Query to send. If specified, the
- * <code>query</code> attribute will be set to this query. If not
- * specified, the current value of the <code>query</code> attribute will
- * be used.
- * @param {Function} requestTemplate (optional) Request template function.
- * If not specified, the current value of the <code>requestTemplate</code>
- * attribute will be used.
- * @chainable
- */
- sendRequest: function (query, requestTemplate) {
- var request,
- source = this.get('source');
-
- if (query || query === '') {
- this._set(QUERY, query);
- } else {
- query = this.get(QUERY) || '';
- }
-
- if (source) {
- if (!requestTemplate) {
- requestTemplate = this.get(REQUEST_TEMPLATE);
- }
-
- request = requestTemplate ?
- requestTemplate.call(this, query) : query;
-
-
- source.sendRequest({
- query : query,
- request: request,
-
- callback: {
- success: Y.bind(this._onResponse, this, query)
- }
- });
- }
-
- return this;
- },
-
- // -- Protected Lifecycle Methods ------------------------------------------
-
- /**
- * Attaches event listeners and behaviors.
- *
- * @method _bindUIACBase
- * @protected
- */
- _bindUIACBase: function () {
- var inputNode = this.get(INPUT_NODE),
- tokenInput = inputNode && inputNode.tokenInput;
-
- // If the inputNode has a node-tokeninput plugin attached, bind to the
- // plugin's inputNode instead.
- if (tokenInput) {
- inputNode = tokenInput.get(INPUT_NODE);
- this._set('tokenInput', tokenInput);
- }
-
- if (!inputNode) {
- Y.error('No inputNode specified.');
- return;
- }
-
- this._inputNode = inputNode;
-
- this._acBaseEvents = new Y.EventHandle([
- // This is the valueChange event on the inputNode, provided by the
- // event-valuechange module, not our own valueChange.
- inputNode.on(VALUE_CHANGE, this._onInputValueChange, this),
- inputNode.on('blur', this._onInputBlur, this),
-
- this.after(ALLOW_BROWSER_AC + 'Change', this._syncBrowserAutocomplete),
- this.after('sourceTypeChange', this._afterSourceTypeChange),
- this.after(VALUE_CHANGE, this._afterValueChange)
- ]);
- },
-
- /**
- * Detaches AutoCompleteBase event listeners.
- *
- * @method _destructorACBase
- * @protected
- */
- _destructorACBase: function () {
- this._acBaseEvents.detach();
- },
-
- /**
- * Synchronizes the UI state of the <code>inputNode</code>.
- *
- * @method _syncUIACBase
- * @protected
- */
- _syncUIACBase: function () {
- this._syncBrowserAutocomplete();
- this.set(VALUE, this.get(INPUT_NODE).get(VALUE));
- },
-
- // -- Protected Prototype Methods ------------------------------------------
-
- /**
- * Creates a DataSource-like object that simply returns the specified array
- * as a response. See the <code>source</code> attribute for more details.
- *
- * @method _createArraySource
- * @param {Array} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createArraySource: function (source) {
- var that = this;
-
- return {
- type: 'array',
- sendRequest: function (request) {
- that[_SOURCE_SUCCESS](source.concat(), request);
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that passes the query to a
- * custom-defined function, which is expected to call the provided callback
- * with an array of results. See the <code>source</code> attribute for more
- * details.
- *
- * @method _createFunctionSource
- * @param {Function} source Function that accepts a query and a callback as
- * parameters, and calls the callback with an array of results.
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createFunctionSource: function (source) {
- var that = this;
-
- return {
- type: 'function',
- sendRequest: function (request) {
- var value;
-
- function afterResults(results) {
- that[_SOURCE_SUCCESS](results || [], request);
- }
-
- // Allow both synchronous and asynchronous functions. If we get
- // a truthy return value, assume the function is synchronous.
- if ((value = source(request.query, afterResults))) {
- afterResults(value);
- }
- }
- };
- },
-
- /**
- * Creates a DataSource-like object that looks up queries as properties on
- * the specified object, and returns the found value (if any) as a response.
- * See the <code>source</code> attribute for more details.
- *
- * @method _createObjectSource
- * @param {Object} source
- * @return {Object} DataSource-like object.
- * @protected
- */
- _createObjectSource: function (source) {
- var that = this;
-
- return {
- type: 'object',
- sendRequest: function (request) {
- var query = request.query;
-
- that[_SOURCE_SUCCESS](
- YObject.owns(source, query) ? source[query] : [],
- request
- );
- }
- };
- },
-
- /**
- * Returns <code>true</code> if <i>value</i> is either a function or
- * <code>null</code>.
- *
- * @method _functionValidator
- * @param {Function|null} value Value to validate.
- * @protected
- */
- _functionValidator: function (value) {
- return value === null || isFunction(value);
- },
-
- /**
- * Faster and safer alternative to Y.Object.getValue(). Doesn't bother
- * casting the path to an array (since we already know it's an array) and
- * doesn't throw an error if a value in the middle of the object hierarchy
- * is neither <code>undefined</code> nor an object.
- *
- * @method _getObjectValue
- * @param {Object} obj
- * @param {Array} path
- * @return {mixed} Located value, or <code>undefined</code> if the value was
- * not found at the specified path.
- * @protected
- */
- _getObjectValue: function (obj, path) {
- if (!obj) {
- return;
- }
-
- for (var i = 0, len = path.length; obj && i < len; i++) {
- obj = obj[path[i]];
- }
-
- return obj;
- },
-
- /**
- * Parses result responses, performs filtering and highlighting, and fires
- * the <code>results</code> event.
- *
- * @method _parseResponse
- * @param {String} query Query that generated these results.
- * @param {Object} response Response containing results.
- * @param {Object} data Raw response data.
- * @protected
- */
- _parseResponse: function (query, response, data) {
- var facade = {
- data : data,
- query : query,
- results: []
- },
-
- listLocator = this.get(RESULT_LIST_LOCATOR),
- results = [],
- unfiltered = response && response.results,
-
- filters,
- formatted,
- formatter,
- highlighted,
- highlighter,
- i,
- len,
- maxResults,
- result,
- text,
- textLocator;
-
- if (unfiltered && listLocator) {
- unfiltered = listLocator.call(this, unfiltered);
- }
-
- if (unfiltered && unfiltered.length) {
- filters = this.get('resultFilters');
- textLocator = this.get('resultTextLocator');
-
- // Create a lightweight result object for each result to make them
- // easier to work with. The various properties on the object
- // represent different formats of the result, and will be populated
- // as we go.
- for (i = 0, len = unfiltered.length; i < len; ++i) {
- result = unfiltered[i];
-
- text = textLocator ?
- textLocator.call(this, result) :
- result.toString();
-
- results.push({
- display: Escape.html(text),
- raw : result,
- text : text
- });
- }
-
- // Run the results through all configured result filters. Each
- // filter returns an array of (potentially fewer) result objects,
- // which is then passed to the next filter, and so on.
- for (i = 0, len = filters.length; i < len; ++i) {
- results = filters[i].call(this, query, results.concat());
-
- if (!results) {
- return;
- }
-
- if (!results.length) {
- break;
- }
- }
-
- if (results.length) {
- formatter = this.get('resultFormatter');
- highlighter = this.get('resultHighlighter');
- maxResults = this.get('maxResults');
-
- // If maxResults is set and greater than 0, limit the number of
- // results.
- if (maxResults && maxResults > 0 &&
- results.length > maxResults) {
- results.length = maxResults;
- }
-
- // Run the results through the configured highlighter (if any).
- // The highlighter returns an array of highlighted strings (not
- // an array of result objects), and these strings are then added
- // to each result object.
- if (highlighter) {
- highlighted = highlighter.call(this, query,
- results.concat());
-
- if (!highlighted) {
- return;
- }
-
- for (i = 0, len = highlighted.length; i < len; ++i) {
- result = results[i];
- result.highlighted = highlighted[i];
- result.display = result.highlighted;
- }
- }
-
- // Run the results through the configured formatter (if any) to
- // produce the final formatted results. The formatter returns an
- // array of strings or Node instances (not an array of result
- // objects), and these strings/Nodes are then added to each
- // result object.
- if (formatter) {
- formatted = formatter.call(this, query, results.concat());
-
- if (!formatted) {
- return;
- }
-
- for (i = 0, len = formatted.length; i < len; ++i) {
- results[i].display = formatted[i];
- }
- }
- }
- }
-
- facade.results = results;
- this.fire(EVT_RESULTS, facade);
- },
-
- /**
- * <p>
- * Returns the query portion of the specified input value, or
- * <code>null</code> if there is no suitable query within the input value.
- * </p>
- *
- * <p>
- * If a query delimiter is defined, the query will be the last delimited
- * part of of the string.
- * </p>
- *
- * @method _parseValue
- * @param {String} value Input value from which to extract the query.
- * @return {String|null} query
- * @protected
- */
- _parseValue: function (value) {
- var delim = this.get(QUERY_DELIMITER);
-
- if (delim) {
- value = value.split(delim);
- value = value[value.length - 1];
- }
-
- return Lang.trimLeft(value);
- },
-
- /**
- * Setter for locator attributes.
- *
- * @method _setLocator
- * @param {Function|String|null} locator
- * @return {Function|null}
- * @protected
- */
- _setLocator: function (locator) {
- if (this[_FUNCTION_VALIDATOR](locator)) {
- return locator;
- }
-
- var that = this;
-
- locator = locator.toString().split('.');
-
- return function (result) {
- return result && that._getObjectValue(result, locator);
- };
- },
-
- /**
- * Setter for the <code>requestTemplate</code> attribute.
- *
- * @method _setRequestTemplate
- * @param {Function|String|null} template
- * @return {Function|null}
- * @protected
- */
- _setRequestTemplate: function (template) {
- if (this[_FUNCTION_VALIDATOR](template)) {
- return template;
- }
-
- template = template.toString();
-
- return function (query) {
- return Lang.sub(template, {query: encodeURIComponent(query)});
- };
- },
-
- /**
- * Setter for the <code>resultFilters</code> attribute.
- *
- * @method _setResultFilters
- * @param {Array|Function|String|null} filters <code>null</code>, a filter
- * function, an array of filter functions, or a string or array of strings
- * representing the names of methods on
- * <code>Y.AutoCompleteFilters</code>.
- * @return {Array} Array of filter functions (empty if <i>filters</i> is
- * <code>null</code>).
- * @protected
- */
- _setResultFilters: function (filters) {
- var acFilters, getFilterFunction;
-
- if (filters === null) {
- return [];
- }
-
- acFilters = Y.AutoCompleteFilters;
-
- getFilterFunction = function (filter) {
- if (isFunction(filter)) {
- return filter;
- }
-
- if (isString(filter) && acFilters &&
- isFunction(acFilters[filter])) {
- return acFilters[filter];
- }
-
- return false;
- };
-
- if (Lang.isArray(filters)) {
- filters = YArray.map(filters, getFilterFunction);
- return YArray.every(filters, function (f) { return !!f; }) ?
- filters : INVALID_VALUE;
- } else {
- filters = getFilterFunction(filters);
- return filters ? [filters] : INVALID_VALUE;
- }
- },
-
- /**
- * Setter for the <code>resultHighlighter</code> attribute.
- *
- * @method _setResultHighlighter
- * @param {Function|String|null} highlighter <code>null</code>, a
- * highlighter function, or a string representing the name of a method on
- * <code>Y.AutoCompleteHighlighters</code>.
- * @return {Function|null}
- * @protected
- */
- _setResultHighlighter: function (highlighter) {
- var acHighlighters;
-
- if (this._functionValidator(highlighter)) {
- return highlighter;
- }
-
- acHighlighters = Y.AutoCompleteHighlighters;
-
- if (isString(highlighter) && acHighlighters &&
- isFunction(acHighlighters[highlighter])) {
- return acHighlighters[highlighter];
- }
-
- return INVALID_VALUE;
- },
-
- /**
- * Setter for the <code>source</code> attribute. Returns a DataSource or
- * a DataSource-like object depending on the type of <i>source</i> and/or
- * the value of the <code>sourceType</code> attribute.
- *
- * @method _setSource
- * @param {mixed} source AutoComplete source. See the <code>source</code>
- * attribute for details.
- * @return {DataSource|Object}
- * @protected
- */
- _setSource: function (source) {
- var sourceType = this.get('sourceType') || Lang.type(source),
- sourceSetter;
-
- if ((source && isFunction(source.sendRequest))
- || source === null
- || sourceType === 'datasource') {
-
- // Quacks like a DataSource instance (or null). Make it so!
- this._rawSource = source;
- return source;
- }
-
- // See if there's a registered setter for this source type.
- if ((sourceSetter = AutoCompleteBase.SOURCE_TYPES[sourceType])) {
- this._rawSource = source;
- return Lang.isString(sourceSetter) ?
- this[sourceSetter](source) : sourceSetter(source);
- }
-
- Y.error("Unsupported source type '" + sourceType + "'. Maybe autocomplete-sources isn't loaded?");
- return INVALID_VALUE;
- },
-
- /**
- * Shared success callback for non-DataSource sources.
- *
- * @method _sourceSuccess
- * @param {mixed} data Response data.
- * @param {Object} request Request object.
- * @protected
- */
- _sourceSuccess: function (data, request) {
- request.callback.success({
- data: data,
- response: {results: data}
- });
- },
-
- /**
- * Synchronizes the UI state of the <code>allowBrowserAutocomplete</code>
- * attribute.
- *
- * @method _syncBrowserAutocomplete
- * @protected
- */
- _syncBrowserAutocomplete: function () {
- var inputNode = this.get(INPUT_NODE);
-
- if (inputNode.get('nodeName').toLowerCase() === 'input') {
- inputNode.setAttribute('autocomplete',
- this.get(ALLOW_BROWSER_AC) ? 'on' : 'off');
- }
- },
-
- /**
- * <p>
- * Updates the query portion of the <code>value</code> attribute.
- * </p>
- *
- * <p>
- * If a query delimiter is defined, the last delimited portion of the input
- * value will be replaced with the specified <i>value</i>.
- * </p>
- *
- * @method _updateValue
- * @param {String} newVal New value.
- * @protected
- */
- _updateValue: function (newVal) {
- var delim = this.get(QUERY_DELIMITER),
- insertDelim,
- len,
- prevVal;
-
- newVal = Lang.trimLeft(newVal);
-
- if (delim) {
- insertDelim = trim(delim); // so we don't double up on spaces
- prevVal = YArray.map(trim(this.get(VALUE)).split(delim), trim);
- len = prevVal.length;
-
- if (len > 1) {
- prevVal[len - 1] = newVal;
- newVal = prevVal.join(insertDelim + ' ');
- }
-
- newVal = newVal + insertDelim + ' ';
- }
-
- this.set(VALUE, newVal);
- },
-
- // -- Protected Event Handlers ---------------------------------------------
-
- /**
- * Updates the current <code>source</code> based on the new
- * <code>sourceType</code> to ensure that the two attributes don't get out
- * of sync when they're changed separately.
- *
- * @method _afterSourceTypeChange
- * @param {EventFacade} e
- * @protected
- */
- _afterSourceTypeChange: function (e) {
- if (this._rawSource) {
- this.set('source', this._rawSource);
- }
- },
-
- /**
- * Handles change events for the <code>value</code> attribute.
- *
- * @method _afterValueChange
- * @param {EventFacade} e
- * @protected
- */
- _afterValueChange: function (e) {
- var delay,
- fire,
- minQueryLength,
- newVal = e.newVal,
- query,
- that;
-
- // Don't query on value changes that didn't come from the user.
- if (e.src !== AutoCompleteBase.UI_SRC) {
- this._inputNode.set(VALUE, newVal);
- return;
- }
-
-
- minQueryLength = this.get('minQueryLength');
- query = this._parseValue(newVal) || '';
-
- if (minQueryLength >= 0 && query.length >= minQueryLength) {
- delay = this.get('queryDelay');
- that = this;
-
- fire = function () {
- that.fire(EVT_QUERY, {
- inputValue: newVal,
- query : query
- });
- };
-
- if (delay) {
- clearTimeout(this._delay);
- this._delay = setTimeout(fire, delay);
- } else {
- fire();
- }
- } else {
- clearTimeout(this._delay);
-
- this.fire(EVT_CLEAR, {
- prevVal: e.prevVal ? this._parseValue(e.prevVal) : null
- });
- }
- },
-
- /**
- * Handles <code>blur</code> events on the input node.
- *
- * @method _onInputBlur
- * @param {EventFacade} e
- * @protected
- */
- _onInputBlur: function (e) {
- var delim = this.get(QUERY_DELIMITER),
- delimPos,
- newVal,
- value;
-
- // If a query delimiter is set and the input's value contains one or
- // more trailing delimiters, strip them.
- if (delim && !this.get('allowTrailingDelimiter')) {
- delim = Lang.trimRight(delim);
- value = newVal = this._inputNode.get(VALUE);
-
- if (delim) {
- while ((newVal = Lang.trimRight(newVal)) &&
- (delimPos = newVal.length - delim.length) &&
- newVal.lastIndexOf(delim) === delimPos) {
-
- newVal = newVal.substring(0, delimPos);
- }
- } else {
- // Delimiter is one or more space characters, so just trim the
- // value.
- newVal = Lang.trimRight(newVal);
- }
-
- if (newVal !== value) {
- this.set(VALUE, newVal);
- }
- }
- },
-
- /**
- * Handles <code>valueChange</code> events on the input node and fires a
- * <code>query</code> event when the input value meets the configured
- * criteria.
- *
- * @method _onInputValueChange
- * @param {EventFacade} e
- * @protected
- */
- _onInputValueChange: function (e) {
- var newVal = e.newVal;
-
- // Don't query if the internal value is the same as the new value
- // reported by valueChange.
- if (newVal === this.get(VALUE)) {
- return;
- }
-
- this.set(VALUE, newVal, {src: AutoCompleteBase.UI_SRC});
- },
-
- /**
- * Handles source responses and fires the <code>results</code> event.
- *
- * @method _onResponse
- * @param {EventFacade} e
- * @protected
- */
- _onResponse: function (query, e) {
- // Ignore stale responses that aren't for the current query.
- if (query === (this.get(QUERY) || '')) {
- this._parseResponse(query || '', e.response, e.data);
- }
- },
-
- // -- Protected Default Event Handlers -------------------------------------
-
- /**
- * Default <code>clear</code> event handler. Sets the <code>results</code>
- * property to an empty array and <code>query</code> to null.
- *
- * @method _defClearFn
- * @protected
- */
- _defClearFn: function () {
- this._set(QUERY, null);
- this._set(RESULTS, []);
- },
-
- /**
- * Default <code>query</code> event handler. Sets the <code>query</code>
- * property and sends a request to the source if one is configured.
- *
- * @method _defQue