diff --git a/build/app-base/app-base-debug.js b/build/app-base/app-base-debug.js index 160b1b24404..d96b9751695 100644 --- a/build/app-base/app-base-debug.js +++ b/build/app-base/app-base-debug.js @@ -8,9 +8,10 @@ Provides a top-level application component which manages navigation and views. **/ var Lang = Y.Lang, - View = Y.View, - Router = Y.Router, PjaxBase = Y.PjaxBase, + Router = Y.Router, + View = Y.View, + YObject = Y.Object, win = Y.config.win, @@ -109,13 +110,24 @@ App = Y.Base.create('app', Y.Base, [View, Router, PjaxBase], { initializer: function (config) { config || (config = {}); - // Create a shallow copy of specified `config.views` metadata to - // preserve the caller's intention. - var views = Y.merge(config.views); + var views = {}; + + // Merges-in specified view metadata into local `views` object. + function mergeViewConfig(view, name) { + views[name] = Y.merge(views[name], view); + } + + // First, each view in the `views` prototype object has its metadata + // merged-in, providing the defaults. + YObject.each(this.views, mergeViewConfig); + + // Then, each view in the specified in the `config.views` object has its + // metadata merged-in. + YObject.each(config.views, mergeViewConfig); - // Mix-in default `views` metadata from the prototype (deep merge), and - // give every instance its own copy of a `views` Object. - this.views = Y.mix(views, this.views, false, null, 0, true); + // The resulting hodgepodge of metadata is then stored as the instance's + // `views` object, and no one's objects were harmed in the making. + this.views = views; this._viewInfoMap = {}; diff --git a/build/app-base/app-base-min.js b/build/app-base/app-base-min.js index d2f2445946f..36aaf62758e 100644 --- a/build/app-base/app-base-min.js +++ b/build/app-base/app-base-min.js @@ -1 +1 @@ -YUI.add("app-base",function(g){var c=g.Lang,f=g.View,a=g.Router,e=g.PjaxBase,d=g.config.win,b;b=g.Base.create("app",g.Base,[f,a,e],{views:{},initializer:function(i){i||(i={});var h=g.merge(i.views);this.views=g.mix(h,this.views,false,null,0,true);this._viewInfoMap={};this.after("activeViewChange",this._afterActiveViewChange);if(!this.get("serverRouting")){this._pjaxBindUI();}},create:function(){var h=f.prototype.create.apply(this,arguments);return h&&h.addClass(b.CSS_CLASS);},createView:function(k,j){var i=this.getViewInfo(k),l=(i&&i.type)||f,m=c.isString(l)?g[l]:l,h;h=new m(j);this._viewInfoMap[g.stamp(h,true)]=i;return h;},createViewContainer:function(h){h=g.one(h);return h&&h.addClass(b.VIEWS_CSS_CLASS);},getViewInfo:function(h){if(h instanceof f){return this._viewInfoMap[g.stamp(h,true)];}return this.views[h];},render:function(){var i=this.get("container"),h=this.get("viewContainer"),j=this.get("activeView"),k=i.compareTo(h);if(j&&h){h.setContent(j.get("container"));}if(i&&!i.contains(h)&&!k){i.appendChild(h);}return this;},showView:function(h,k,j,l){var i;if(c.isString(h)){i=this.getViewInfo(h);if(i&&i.preserve&&i.instance){h=i.instance;this._viewInfoMap[g.stamp(h,true)]=i;}else{h=this.createView(h,k);h.render();}}j||(j={});if(l){j.callback=l;}else{if(c.isFunction(j)){j={callback:j};}}return this._set("activeView",h,j);},_attachView:function(i,j){if(!i){return;}var k=this.getViewInfo(i),h=this.get("viewContainer");i.addTarget(this);k&&(k.instance=i);h[j?"prepend":"append"](i.get("container"));},_destroyContainer:function(){var i=this.get("container"),h=this.get("viewContainer"),j=i.compareTo(h);if(g.one("body").compareTo(i)){this.detachEvents();i&&i.removeClass(b.CSS_CLASS);if(j){i&&i.removeClass(b.VIEWS_CSS_CLASS);}else{h&&h.remove(true);}return;}h&&h.remove(true);!j&&i&&i.remove(true);},_detachView:function(h){if(!h){return;}var i=this.getViewInfo(h)||{};if(i.preserve){h.remove();}else{h.destroy();delete this._viewInfoMap[g.stamp(h,true)];if(h===i.instance){delete i.instance;}}h.removeTarget(this);},_initHtml5:function(){if(this.get("serverRouting")===false){return false;}else{return a.html5;}},_isChildView:function(h,k){var j=this.getViewInfo(h),i=this.getViewInfo(k);if(j&&i){return this.getViewInfo(j.parent)===i;}return false;},_isParentView:function(h,k){var i=this.getViewInfo(h),j=this.getViewInfo(k);if(i&&j){return this.getViewInfo(j.parent)===i;}return false;},_navigate:function(i,h){i=this._upgradeURL(i);h||(h={});if(!this.get("serverRouting")){c.isValue(h.force)||(h.force=true);if(!c.isValue(h.replace)){h.replace=i===this._upgradeURL(this._getURL());}}return e.prototype._navigate.call(this,i,h);},_save:function(h,i){if(this.get("serverRouting")&&!this.get("html5")){if(!this._hasSameOrigin(h)){g.error("Security error: The new URL must be of the same origin as the current URL.");return this;}h=this._joinURL(h||"");if(i){d&&d.location.replace(h);}else{d&&(d.location=h);}return this;}return a.prototype._save.apply(this,arguments);},_upgradeURL:function(i){if(!this._hasSameOrigin(i)){return i;}var j=(i.match(/#(.*)$/)||[])[1]||"",h=g.HistoryHash.hashPrefix;if(h&&j.indexOf(h)===0){j=j.replace(h,"");}if(j&&j.charAt(0)==="/"){i=this._resolveURL(this._joinURL(j));}return i;},_afterActiveViewChange:function(l){var n=l.newVal,k=l.prevVal,m=l.callback,h=this._isChildView(n,k),j=!h&&this._isParentView(n,k),i=!!l.prepend||j;if(n===k){return m&&m.call(this,n);}this._attachView(n,i);this._detachView(k);m&&m.call(this,n);}},{ATTRS:{activeView:{value:null,readOnly:true},container:{valueFn:function(){return g.one("body");}},html5:{valueFn:"_initHtml5"},linkSelector:{value:"a"},serverRouting:{value:undefined,writeOnce:"initOnly"},viewContainer:{valueFn:function(){return g.Node.create("
");},setter:"createViewContainer",writeOnce:"initOnly"}},CSS_CLASS:g.ClassNameManager.getClassName("app"),VIEWS_CSS_CLASS:g.ClassNameManager.getClassName("app","views")});g.namespace("App").Base=b;g.App=g.mix(g.Base.create("app",g.App.Base,[]),g.App,true);},"@VERSION@",{requires:["classnamemanager","pjax-base","router","view"]}); \ No newline at end of file +YUI.add("app-base",function(g){var c=g.Lang,e=g.PjaxBase,a=g.Router,f=g.View,h=g.Object,d=g.config.win,b;b=g.Base.create("app",g.Base,[f,a,e],{views:{},initializer:function(j){j||(j={});var i={};function k(l,m){i[m]=g.merge(i[m],l);}h.each(this.views,k);h.each(j.views,k);this.views=i;this._viewInfoMap={};this.after("activeViewChange",this._afterActiveViewChange);if(!this.get("serverRouting")){this._pjaxBindUI();}},create:function(){var i=f.prototype.create.apply(this,arguments);return i&&i.addClass(b.CSS_CLASS);},createView:function(l,k){var j=this.getViewInfo(l),m=(j&&j.type)||f,n=c.isString(m)?g[m]:m,i;i=new n(k);this._viewInfoMap[g.stamp(i,true)]=j;return i;},createViewContainer:function(i){i=g.one(i);return i&&i.addClass(b.VIEWS_CSS_CLASS);},getViewInfo:function(i){if(i instanceof f){return this._viewInfoMap[g.stamp(i,true)];}return this.views[i];},render:function(){var j=this.get("container"),i=this.get("viewContainer"),k=this.get("activeView"),l=j.compareTo(i);if(k&&i){i.setContent(k.get("container"));}if(j&&!j.contains(i)&&!l){j.appendChild(i);}return this;},showView:function(i,l,k,m){var j;if(c.isString(i)){j=this.getViewInfo(i);if(j&&j.preserve&&j.instance){i=j.instance;this._viewInfoMap[g.stamp(i,true)]=j;}else{i=this.createView(i,l);i.render();}}k||(k={});if(m){k.callback=m;}else{if(c.isFunction(k)){k={callback:k};}}return this._set("activeView",i,k);},_attachView:function(j,k){if(!j){return;}var l=this.getViewInfo(j),i=this.get("viewContainer");j.addTarget(this);l&&(l.instance=j);i[k?"prepend":"append"](j.get("container"));},_destroyContainer:function(){var j=this.get("container"),i=this.get("viewContainer"),k=j.compareTo(i);if(g.one("body").compareTo(j)){this.detachEvents();j&&j.removeClass(b.CSS_CLASS);if(k){j&&j.removeClass(b.VIEWS_CSS_CLASS);}else{i&&i.remove(true);}return;}i&&i.remove(true);!k&&j&&j.remove(true);},_detachView:function(i){if(!i){return;}var j=this.getViewInfo(i)||{};if(j.preserve){i.remove();}else{i.destroy();delete this._viewInfoMap[g.stamp(i,true)];if(i===j.instance){delete j.instance;}}i.removeTarget(this);},_initHtml5:function(){if(this.get("serverRouting")===false){return false;}else{return a.html5;}},_isChildView:function(i,l){var k=this.getViewInfo(i),j=this.getViewInfo(l);if(k&&j){return this.getViewInfo(k.parent)===j;}return false;},_isParentView:function(i,l){var j=this.getViewInfo(i),k=this.getViewInfo(l);if(j&&k){return this.getViewInfo(k.parent)===j;}return false;},_navigate:function(j,i){j=this._upgradeURL(j);i||(i={});if(!this.get("serverRouting")){c.isValue(i.force)||(i.force=true);if(!c.isValue(i.replace)){i.replace=j===this._upgradeURL(this._getURL());}}return e.prototype._navigate.call(this,j,i);},_save:function(i,j){if(this.get("serverRouting")&&!this.get("html5")){if(!this._hasSameOrigin(i)){g.error("Security error: The new URL must be of the same origin as the current URL.");return this;}i=this._joinURL(i||"");if(j){d&&d.location.replace(i);}else{d&&(d.location=i);}return this;}return a.prototype._save.apply(this,arguments);},_upgradeURL:function(j){if(!this._hasSameOrigin(j)){return j;}var k=(j.match(/#(.*)$/)||[])[1]||"",i=g.HistoryHash.hashPrefix;if(i&&k.indexOf(i)===0){k=k.replace(i,"");}if(k&&k.charAt(0)==="/"){j=this._resolveURL(this._joinURL(k));}return j;},_afterActiveViewChange:function(m){var o=m.newVal,l=m.prevVal,n=m.callback,i=this._isChildView(o,l),k=!i&&this._isParentView(o,l),j=!!m.prepend||k;if(o===l){return n&&n.call(this,o);}this._attachView(o,j);this._detachView(l);n&&n.call(this,o);}},{ATTRS:{activeView:{value:null,readOnly:true},container:{valueFn:function(){return g.one("body");}},html5:{valueFn:"_initHtml5"},linkSelector:{value:"a"},serverRouting:{value:undefined,writeOnce:"initOnly"},viewContainer:{valueFn:function(){return g.Node.create("
");},setter:"createViewContainer",writeOnce:"initOnly"}},CSS_CLASS:g.ClassNameManager.getClassName("app"),VIEWS_CSS_CLASS:g.ClassNameManager.getClassName("app","views")});g.namespace("App").Base=b;g.App=g.mix(g.Base.create("app",g.App.Base,[]),g.App,true);},"@VERSION@",{requires:["classnamemanager","pjax-base","router","view"]}); \ No newline at end of file diff --git a/build/app-base/app-base.js b/build/app-base/app-base.js index 160b1b24404..d96b9751695 100644 --- a/build/app-base/app-base.js +++ b/build/app-base/app-base.js @@ -8,9 +8,10 @@ Provides a top-level application component which manages navigation and views. **/ var Lang = Y.Lang, - View = Y.View, - Router = Y.Router, PjaxBase = Y.PjaxBase, + Router = Y.Router, + View = Y.View, + YObject = Y.Object, win = Y.config.win, @@ -109,13 +110,24 @@ App = Y.Base.create('app', Y.Base, [View, Router, PjaxBase], { initializer: function (config) { config || (config = {}); - // Create a shallow copy of specified `config.views` metadata to - // preserve the caller's intention. - var views = Y.merge(config.views); + var views = {}; + + // Merges-in specified view metadata into local `views` object. + function mergeViewConfig(view, name) { + views[name] = Y.merge(views[name], view); + } + + // First, each view in the `views` prototype object has its metadata + // merged-in, providing the defaults. + YObject.each(this.views, mergeViewConfig); + + // Then, each view in the specified in the `config.views` object has its + // metadata merged-in. + YObject.each(config.views, mergeViewConfig); - // Mix-in default `views` metadata from the prototype (deep merge), and - // give every instance its own copy of a `views` Object. - this.views = Y.mix(views, this.views, false, null, 0, true); + // The resulting hodgepodge of metadata is then stored as the instance's + // `views` object, and no one's objects were harmed in the making. + this.views = views; this._viewInfoMap = {}; diff --git a/build/get-nodejs/get-debug.js b/build/get-nodejs/get-debug.js index bc1eda5faa4..3f98b7d70dd 100644 --- a/build/get-nodejs/get-debug.js +++ b/build/get-nodejs/get-debug.js @@ -2,9 +2,8 @@ YUI.add('get', function(Y) { /** * NodeJS specific Get module used to load remote resources. It contains the same signature as the default Get module so there is no code change needed. - * Note: There is an added method called Get.domScript, which is the same as Get.script in a browser, it simply loads the script into the dom tree - * so that you can call outerHTML on the document to print it to the screen. * @module get-nodejs + * @class GetNodeJS */ var path = require('path'), @@ -15,26 +14,81 @@ YUI.add('get', function(Y) { https = require('https'); Y.Get = function() {}; - Y.config.base = path.join(__dirname, '../'); + //Setup the default config base path + Y.config.base = path.join(__dirname, '../'); + /** + * Get the port number from a URL based on the port from the URL module or http(s) + * @method urlInfoPort + * @param {Object} urlInfo Info from `require('url').parse(url)` + * @return {Number} The port number + */ Y.Get.urlInfoPort = function(urlInfo) { return urlInfo.port ? parseInt(urlInfo.port, 10) : urlInfo.protocol === 'http:' ? 80 : 443; }; + YUI.require = require; + YUI.process = process; + /** + * Escape the path for Windows, they need to be double encoded when used as `__dirname` or `__filename` + * @method escapeWinPath + * @protected + * @param {String} p The path to modify + * @return {String} The encoded path + */ + var escapeWinPath = function(p) { + return p.replace(/\\/g, '\\\\'); + }; + /** + * Takes the raw JS files and wraps them to be executed in the YUI context so they can be loaded + * into the YUI object + * @method _exec + * @private + * @param {String} data The JS to execute + * @param {String} url The path to the file that was parsed + * @param {Callback} cb The callback to execute when this is completed + * @param {Error} cb.err=null Error object + * @param {String} cb.url The URL that was just parsed + */ Y.Get._exec = function(data, url, cb) { - var mod = "(function(YUI) { " + data + ";return YUI; })"; + var dirName = escapeWinPath(path.dirname(url)); + var fileName = escapeWinPath(url); + + if (dirName.match(/^https?:\/\//)) { + dirName = '.'; + fileName = 'remoteResource'; + } + + var mod = "(function(YUI) { var __dirname = '" + dirName + "'; "+ + "var __filename = '" + fileName + "'; " + + "var process = YUI.process;" + + "var require = function(file) {" + + " if (file.indexOf('./') === 0) {" + + " file = __dirname + file.replace('./', '/'); }" + + " return YUI.require(file); }; " + + data + " ;return YUI; })"; + + //var mod = "(function(YUI) { " + data + ";return YUI; })"; var script = vm.createScript(mod, url); var fn = script.runInThisContext(mod); YUI = fn(YUI); - cb(null); + cb(null, url); }; - + + /** + * Fetches the content from a remote URL or a file from disc and passes the content + * off to `_exec` for parsing + * @method _include + * @private + * @param {String} url The URL/File path to fetch the content from + * @param {Callback} cb The callback to fire once the content has been executed via `_exec` + */ Y.Get._include = function(url, cb) { if (url.match(/^https?:\/\//)) { var u = n_url.parse(url, parseQueryString=false), @@ -99,17 +153,28 @@ YUI.add('get', function(Y) { /** * Override for Get.script for loading local or remote YUI modules. + * @method script + * @param {Array|String} s The URL's to load into this context + * @param {Callback} cb The callback to execute once the transaction is complete. */ Y.Get.script = function(s, cb) { var A = Y.Array, - urls = A(s), url, i, l = urls.length; + urls = A(s), url, i, l = urls.length, c= 0, + check = function() { + if (c === l) { + pass(cb); + } + }; + + + for (i=0; i or node references so we + don't have to look the node up each time we want to insert a request node. + + @property _insertCache + @type Object + @protected + @static + @since 3.5.0 + **/ + _insertCache: {}, + /** Information about the currently pending transaction, if any. @@ -233,18 +247,20 @@ Y.Get = Get = { @method abort @param {Get.Transaction} transaction Transaction to abort. @deprecated Use the `abort()` method on the transaction instead. + @static **/ abort: function (transaction) { - var i, id, item, len; + var i, id, item, len, pending; Y.log('`Y.Get.abort()` is deprecated as of 3.5.0. Use the `abort()` method on the transaction instead.', 'warn', 'get'); - if (!(typeof transaction === 'object')) { - id = transaction; + if (!transaction.abort) { + id = transaction; + pending = this._pending; transaction = null; - if (this._pending && this._pending.transaction.id === id) { - transaction = this._pending.transaction; + if (pending && pending.transaction.id === id) { + transaction = pending.transaction; this._pending = null; } else { for (i = 0, len = this._queue.length; i < len; ++i) { @@ -259,9 +275,7 @@ Y.Get = Get = { } } - if (transaction) { - transaction.abort(); - } + transaction && transaction.abort(); }, /** @@ -328,11 +342,12 @@ Y.Get = Get = { callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options` object. - @param {Array|null} err Array of errors that occurred during the - transaction, or `null` on success. - @param {Get.Transaction} Transaction object. + @param {Array|null} callback.err Array of errors that occurred during + the transaction, or `null` on success. + @param {Get.Transaction} callback.transaction Transaction object. @return {Get.Transaction} Transaction object. + @static **/ css: function (urls, options, callback) { return this._load('css', urls, options, callback); @@ -406,12 +421,13 @@ Y.Get = Get = { callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options` object. - @param {Array|null} err Array of errors that occurred during the - transaction, or `null` on success. - @param {Get.Transaction} Transaction object. + @param {Array|null} callback.err Array of errors that occurred during + the transaction, or `null` on success. + @param {Get.Transaction} callback.transaction Transaction object. @return {Get.Transaction} Transaction object. @since 3.5.0 + @static **/ js: function (urls, options, callback) { return this._load('js', urls, options, callback); @@ -459,6 +475,7 @@ Y.Get = Get = { @return {Get.Transaction} Transaction object. @since 3.5.0 + @static **/ load: function (urls, options, callback) { return this._load(null, urls, options, callback); @@ -473,6 +490,7 @@ Y.Get = Get = { @param {Number} threshold Purge threshold to use, in milliseconds. @protected @since 3.5.0 + @static **/ _autoPurge: function (threshold) { if (threshold && this._purgeNodes.length >= threshold) { @@ -489,6 +507,7 @@ Y.Get = Get = { @return {Object} Environment information. @protected @since 3.5.0 + @static **/ _getEnv: function () { var doc = Y.config.doc, @@ -497,7 +516,7 @@ Y.Get = Get = { // Note: some of these checks require browser sniffs since it's not // feasible to load test files on every pageview just to perform a // feature test. I'm sorry if this makes you sad. - return this._env = { + return (this._env = { // True if this is a browser that supports disabling async mode on // dynamically created script nodes. See // https://developer.mozilla.org/En/HTML/Element/Script#Attributes @@ -513,14 +532,14 @@ Y.Get = Get = { // loading scripts in parallel as long as the script node's `async` // attribute is set to false to explicitly disable async execution. preservesScriptOrder: !!(ua.gecko || ua.opera) - }; + }); }, _getTransaction: function (urls, options) { var requests = [], i, len, req, url; - if (typeof urls === 'string') { + if (!Lang.isArray(urls)) { urls = [urls]; } @@ -592,6 +611,12 @@ Y.Get = Get = { _load: function (type, urls, options, callback) { var transaction; + // Allow callback as third param. + if (typeof options === 'function') { + callback = options; + options = {}; + } + options || (options = {}); options.type = type; @@ -635,24 +660,10 @@ Y.Get = Get = { _purge: function (nodes) { var purgeNodes = this._purgeNodes, isTransaction = nodes !== purgeNodes, - attr, index, node, parent; + index, node; - while (node = nodes.pop()) { - parent = node.parentNode; - - if (node.clearAttributes) { - // IE. - node.clearAttributes(); - } else { - // Everyone else. - for (attr in node) { - if (node.hasOwnProperty(attr)) { - delete node[attr]; - } - } - } - - parent && parent.removeChild(node); + while (node = nodes.pop()) { // assignment + node.parentNode && node.parentNode.removeChild(node); // If this is a transaction-level purge and this node also exists in // the Get-level _purgeNodes array, we need to remove it from @@ -674,7 +685,7 @@ Y.Get = Get = { /** Alias for `js()`. -@method js +@method script @static **/ Get.script = Get.js; @@ -832,6 +843,7 @@ Transaction.prototype = { if (state === 'done') { callback && callback(self.errors.length ? self.errors : null, self); + return; } else { callback && self._callbacks.push(callback); @@ -906,26 +918,22 @@ Transaction.prototype = { this._callbacks[i].call(thisObj, errors, this); } - if (options.onEnd || options.onFailure || options.onSuccess - || options.onTimeout) { + data = this._getEventData(); - data = this._getEventData(); - - if (errors) { - if (options.onTimeout && errors[errors.length - 1] === 'Timeout') { - options.onTimeout.call(thisObj, data); - } - - if (options.onFailure) { - options.onFailure.call(thisObj, data); - } - } else if (options.onSuccess) { - options.onSuccess.call(thisObj, data); + if (errors) { + if (options.onTimeout && errors[errors.length - 1] === 'Timeout') { + options.onTimeout.call(thisObj, data); } - if (options.onEnd) { - options.onEnd.call(thisObj, data); + if (options.onFailure) { + options.onFailure.call(thisObj, data); } + } else if (options.onSuccess) { + options.onSuccess.call(thisObj, data); + } + + if (options.onEnd) { + options.onEnd.call(thisObj, data); } }, @@ -946,23 +954,41 @@ Transaction.prototype = { _getInsertBefore: function (req) { var doc = req.doc, - el = req.insertBefore || doc.getElementsByTagName('base')[0]; + el = req.insertBefore, + cache, cachedNode, docStamp; + + if (el) { + return typeof el === 'string' ? doc.getElementById(el) : el; + } + + cache = Get._insertCache; + docStamp = Y.stamp(doc); + + if ((el = cache[docStamp])) { // assignment + return el; + } // Inserting before a tag apparently works around an IE bug // (according to a comment from pre-3.5.0 Y.Get), but I'm not sure what // bug that is, exactly. Better safe than sorry? + if ((el = doc.getElementsByTagName('base')[0])) { // assignment + return (cache[docStamp] = el); + } + + // Look for a element. + el = doc.head || doc.getElementsByTagName('head')[0]; if (el) { - return typeof el === 'string' ? doc.getElementById(el) : el; + // Create a marker node at the end of to use as an insertion + // point. Inserting before this node will ensure that all our CSS + // gets inserted in the correct order, to maintain style precedence. + el.appendChild(doc.createTextNode('')); + return (cache[docStamp] = el.lastChild); } - // Barring an explicit insertBefore config or a element, we'll - // try to insert before the first child of . If doesn't - // exist, we'll throw our hands in the air and insert before the first - // - - - - - - - - - - - - - - - - - - - - -
-
-
- - -
- -
- - -
-
-
-
-
- -
-
-

Pork tail short loin ground round. Spare ribs bresaola cow prosciutto. Ground round shoulder shankle venison tongue, beef ribs spare ribs salami frankfurter bacon turducken tri-tip tail ribeye pork chop. Chicken tail bacon, biltong corned beef shankle pancetta shoulder brisket pork belly ham pork bresaola pig. Kielbasa filet mignon beef ribs, brisket ham ribeye pig ground round jerky flank turkey ham hock. Bacon swine jowl, pancetta salami boudin rump venison meatloaf strip steak. Fatback shoulder beef capicola.

-
-
-

Meatball cow leberkäse, tenderloin sirloin spare ribs beef ribs turkey ball tip flank pork loin fatback andouille strip steak tri-tip. Kielbasa drumstick pastrami tongue, strip steak shank tail beef ribs pork turducken pork loin pork chop. Capicola ground round tail t-bone pork chop kielbasa, chicken prosciutto bacon brisket sausage jowl. Andouille shoulder pork pig swine. Venison beef ribs turducken pork chop, sausage turkey drumstick sirloin ham swine chicken. Kielbasa pancetta t-bone ham. Brisket tenderloin meatball turducken, hamburger ball tip rump pork flank ground round spare ribs kielbasa beef ribs bacon.

-
-
-

Salami short ribs corned beef, pancetta ham hock jowl frankfurter tail rump flank capicola tri-tip andouille sirloin. Biltong bresaola sausage hamburger ground round, pork loin tri-tip pig andouille fatback short ribs pork jowl. Capicola boudin sirloin tongue, beef prosciutto spare ribs shankle ball tip ham beef ribs turducken tenderloin. Drumstick tenderloin ribeye leberkäse, pork belly pancetta turducken frankfurter bresaola pig biltong. Pastrami beef ribs meatball tri-tip, chuck jerky prosciutto beef rump drumstick bresaola jowl. Hamburger leberkäse pork chop, ball tip meatball ham andouille fatback corned beef pork loin shoulder boudin. Shoulder short loin flank filet mignon tri-tip.

-
-
-
-
- -
- -
-
-
-
Add A New Product
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
-
-
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
    -
  • Sir DZL
  • -
  • Casual
  • -
  • A-Plus
  • -
  • Opio
  • -
  • Phesto
  • -
  • Tajai
  • -
  • Pep Love
  • -
  • Domino
  • -
  • Toure
  • -
  • Bukue One
  • -
  • Z-Man
  • -
-
-
- - -
-
-
- -
-
-
- - - - - -
-
- - - diff --git a/src/common/tests/manual/skins.html b/src/common/tests/manual/skins.html index 4aba9a93447..5ba8c9b5f80 100644 --- a/src/common/tests/manual/skins.html +++ b/src/common/tests/manual/skins.html @@ -14,6 +14,7 @@ + + +
+ +
+
+ \ No newline at end of file diff --git a/src/graphics/docs/partials/graphics-pathutility-promotion.mustache b/src/graphics/docs/partials/graphics-path-tool-promotion.mustache similarity index 61% rename from src/graphics/docs/partials/graphics-pathutility-promotion.mustache rename to src/graphics/docs/partials/graphics-path-tool-promotion.mustache index f133d3574d4..c27a74bacfe 100644 --- a/src/graphics/docs/partials/graphics-pathutility-promotion.mustache +++ b/src/graphics/docs/partials/graphics-path-tool-promotion.mustache @@ -1,15 +1,15 @@

- - Screen capture of Graphics path utility + + Screen capture of Graphics path tool
- Read More + Read More
- Try this simple utility that helps you by generating code while you interactively + Try this simple tool that helps you by generating code while you interactively draw graphic paths.

@@ -18,5 +18,5 @@ the paths you created with the pencil.

- The violin example was created with this utility. + The violin example was created with this tool.

diff --git a/src/graphics/docs/partials/graphics-pathutility-source.mustache b/src/graphics/docs/partials/graphics-path-tool-source.mustache similarity index 100% rename from src/graphics/docs/partials/graphics-pathutility-source.mustache rename to src/graphics/docs/partials/graphics-path-tool-source.mustache diff --git a/src/io/HISTORY.md b/src/io/HISTORY.md index 0ca120f5c72..653861bd15c 100644 --- a/src/io/HISTORY.md +++ b/src/io/HISTORY.md @@ -1,13 +1,21 @@ IO Utility Change History ========================= +3.5.0 +----- + + * Fixed error in sending an XML document as POST data. [Ticket #2531257] + + * Configuration data can now include an instance of FormData for HTTP + POST requests. [Ticket #2531274] + 3.4.1 ----- * HTTP 304 now treated as a success condition. [Ticket #2530931] * Fixed transport creation error when both io-xdr and io-upload-iframe - modules are in use [Ticket #2530999] + modules are in use. [Ticket #2530999] * Querystring stringify added to io-upload-iframe. [Ticket #2531037] diff --git a/src/io/js/io-base.js b/src/io/js/io-base.js index 5cfd2ac5d38..bb0123fedfb 100644 --- a/src/io/js/io-base.js +++ b/src/io/js/io-base.js @@ -5,18 +5,15 @@ Base IO functionality. Provides basic XHR transport support. @for IO **/ -var isNumber = Y.Lang.isNumber, - isObject = Y.Lang.isObject, - - // List of events that comprise the IO event lifecycle. - EVENTS = ['start', 'complete', 'end', 'success', 'failure'], +var // List of events that comprise the IO event lifecycle. + EVENTS = ['start', 'complete', 'end', 'success', 'failure', 'progress'], // Whitelist of used XHR response object properties. XHR_PROPS = ['status', 'statusText', 'responseText', 'responseXML'], win = Y.config.win, - NativeXHR = win.XMLHttpRequest, - NativeXDR = win.XDomainRequest, + XHR = win.XMLHttpRequest, + XDR = win.XDomainRequest, uid = 0; /** @@ -79,12 +76,12 @@ IO.prototype = { //-------------------------------------- _init: function(config) { - var io = this, i; + var io = this, i, len; io.cfg = config || {}; Y.augment(io, Y.EventTarget); - for (i = 0; i < 5; i++) { + for (i = 0, len = EVENTS.length; i < len; ++i) { // Publish IO global events with configurations, if any. // IO global events are set to broadcast by default. // These events use the "io:" namespace. @@ -109,12 +106,12 @@ IO.prototype = { _create: function(config, id) { var io = this, transaction = { - id : isNumber(id) ? id : io._id++, + id : Y.Lang.isNumber(id) ? id : io._id++, uid: io._uid }, xdrConfig = config.xdr, use = xdrConfig && xdrConfig.use, - ie = (xdrConfig && xdrConfig.use === 'native' && NativeXDR), + ie = (xdrConfig && xdrConfig.use === 'native' && XDR), transport = io._transport; if (!use) { @@ -125,25 +122,44 @@ IO.prototype = { case 'native': case 'xhr': transaction.c = ie ? - new NativeXDR() : - NativeXHR ? - new NativeXHR() : + new XDR() : + XHR ? + new XHR() : new ActiveXObject('Microsoft.XMLHTTP'); - transaction.t = ie ? true : false; + + if (win && win.FormData && config.data instanceof FormData) { + //u = Y.UA.chrome ? transaction.c : transaction.c.upload; + transaction.c.upload.onprogress = function (e) { + io.progress(transaction, e, config); + }; + transaction.c.onload = function (e) { + io.load(transaction, e, config); + }; + transaction.c.onerror = function (e) { + io.error(transaction, e, config); + }; + transaction.upload = true; + } + + transaction.transport = ie ? true : false; break; default: transaction.c = (transport && transport[use]) || {}; - transaction.t = true; + transaction.transport = true; } return transaction; }, _destroy: function(transaction) { - if (win && !transaction.t) { - if (NativeXHR) { + if (win && !transaction.transport) { + if (XHR && !transaction.upload) { transaction.c.onreadystatechange = null; - } else if (Y.UA.ie && !transaction.e) { + } else if (transaction.upload) { + transaction.c.upload.onprogress = null; + transaction.c.onload = null; + transaction.c.onerror = null; + } else if (Y.UA.ie && !transaction.e) { // IE, when using XMLHttpRequest as an ActiveX Object, will throw // a "Type Mismatch" error if the event handler is set to "null". transaction.c.abort(); @@ -174,7 +190,7 @@ IO.prototype = { } // Fire event with parameters or an Event Facade. - params = [(emitFacade) ? + params = [ emitFacade ? { id: transaction.id, data: transaction.c, @@ -185,12 +201,16 @@ IO.prototype = { ]; if (!emitFacade) { - if (eventName === EVENTS[0] || eventName === EVENTS[2]) { + if (eventName === EVENTS[0] || eventName === EVENTS[2] && args) { if (args) { params.push(args); } } else { - params.push(transaction.c); + if (transaction.evt) { + params.push(transaction.evt); + } else { + params.push(transaction.c); + } if (args) { params.push(args); } @@ -296,6 +316,56 @@ IO.prototype = { this.end(transaction, config); }, + /** + * Fires event "io:progress" and creates, fires a transaction-specific + * "progress" event -- for XMLHttpRequest file upload -- if + * config.on.progress is defined. + * + * @method progress + * @param {Object} transaction Transaction object. + * @param {Object} progress event. + * @param {Object} config Configuration object for the transaction. + */ + progress: function(transaction, e, config) { + /** + * Signals the interactive state during a file upload transaction. + * This event fires after io:start and before io:complete. + * @event io:progress + */ + transaction.evt = e; + this._evt(EVENTS[5], transaction, config); + }, + + /** + * Fires event "io:complete" and creates, fires a transaction-specific + * "complete" event -- for XMLHttpRequest file upload -- if + * config.on.complete is defined. + * + * @method load + * @param {Object} transaction Transaction object. + * @param {Object} load event. + * @param {Object} config Configuration object for the transaction. + */ + load: function (transaction, e, config) { + transaction.evt = e.target; + this._evt(EVENTS[1], transaction, config); + }, + + /** + * Fires event "io:failure" and creates, fires a transaction-specific + * "failure" event -- for XMLHttpRequest file upload -- if + * config.on.failure is defined. + * + * @method error + * @param {Object} transaction Transaction object. + * @param {Object} error event. + * @param {Object} config Configuration object for the transaction. + */ + error: function (transaction, e, config) { + transaction.evt = e; + this._evt(EVENTS[4], transaction, config); + }, + /** * Retry an XDR transaction, using the Flash tranport, if the native * transport fails. @@ -572,9 +642,9 @@ IO.prototype = { sync = config.sync; data = config.data; - // Serialize an object into a key-value string using + // Serialize an map object into a key-value string using // querystring-stringify-simple. - if (isObject(data)) { + if ((Y.Lang.isObject(data) && !data.nodeType) && !transaction.upload) { data = Y.QueryString.stringify(data); } @@ -603,19 +673,19 @@ IO.prototype = { // If Content-Type is defined in the configuration object, or // or as a default header, it will be used instead of // 'application/x-www-form-urlencoded; charset=UTF-8' - config.headers = Y.merge({ - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' - }, config.headers); + config.headers = Y.merge({ + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' + }, config.headers); break; } } - if (transaction.t) { + if (transaction.transport) { // Cross-domain request or custom transport configured. return io.xdr(u, transaction, config); } - if (!sync) { + if (!sync && !transaction.upload) { transaction.c.onreadystatechange = function() { io._rS(transaction, config); }; @@ -662,7 +732,7 @@ IO.prototype = { return response; } } catch(e) { - if (transaction.t) { + if (transaction.transport) { // This exception is usually thrown by browsers // that do not support XMLHttpRequest Level 2. // Retry the request with the XDR transport set diff --git a/src/loader/HISTORY.md b/src/loader/HISTORY.md index b7d7d72841b..55378bade11 100644 --- a/src/loader/HISTORY.md +++ b/src/loader/HISTORY.md @@ -1,6 +1,23 @@ YUI Loader Change History ========================= +### 3.5.0 + +The biggest change made was the use of the `async` flag on `Y.Get` requests. Loader will now use the +`Y.Loader.resolve()` method under the hood to calculate all the dependencies that it is aware of, then +build the URL's to complete this request. It will then batch those into one `Y.Get` transation and fetch +all of them asynchronously, then return to loader for post processing of the injected dependencies. + + * 2529521 Consider making the presence of YUI CSS detectable by the loader + * 2530135 Add support for loading YUI modules in parallel in all browsers, since execution order is unimportan... + * 2530177 [Pull Request] - Bug #2530111 If the condition block is defined w/o a test fn or UA check, assume i... + * 2530343 Loader.sorted does not contain conditional modules + * 2530565 Slider one-off skins not being loaded + * 2530958 Loader.resolve not properly handling CSS modules + * 2531319 The aliased modules are reported as missing + * 2531324 Support regular expressions in the patterns configuration + + ### 3.4.1 * No changes. diff --git a/src/node-menunav/HISTORY.md b/src/node-menunav/HISTORY.md index 9931593f8fc..30aa5721a0b 100644 --- a/src/node-menunav/HISTORY.md +++ b/src/node-menunav/HISTORY.md @@ -1,6 +1,12 @@ MenuNav Change History ====================== +3.5.0 +----- + + * Added Night skin for MenuNav + + 3.4.1 ----- diff --git a/src/node-menunav/assets/skins/night/horizontal-menu-submenu-indicator.png b/src/node-menunav/assets/skins/night/horizontal-menu-submenu-indicator.png new file mode 100644 index 00000000000..a2482ac792d Binary files /dev/null and b/src/node-menunav/assets/skins/night/horizontal-menu-submenu-indicator.png differ diff --git a/src/node-menunav/assets/skins/night/node-menunav-skin.css b/src/node-menunav/assets/skins/night/node-menunav-skin.css new file mode 100644 index 00000000000..b761164cd12 --- /dev/null +++ b/src/node-menunav/assets/skins/night/node-menunav-skin.css @@ -0,0 +1,292 @@ +/* Vertical menus and submenus */ + +.yui3-skin-night .yui3-menu-content, +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-content { + + font-size: 93%; /* 12px */ + line-height: 1.5; /* 18px */ + *line-height: 1.45; /* For IE */ + border: solid 1px #000; + background: #6D6E6E; + padding: 3px 0; + +} + +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-content { + + font-size: 100%; + +} + + +/* Horizontal menus */ +.yui3-skin-night .yui3-menu-horizontal .yui3-menu-content { + + line-height: 2; /* ~24px */ + *line-height: 1.9; /* For IE */ + background-color:#3b3c3d; + background: -moz-linear-gradient( + 0% 100% 90deg, + #242526 0%, + #3b3c3d 96%, + #2C2D2F 100% + ); + background: -webkit-gradient( + linear, + left bottom, + left top, + from(#242526), + color-stop(0.96, #3b3c3d), + to(#2C2D2F) + ); + padding: 0; + +} + + +.yui3-skin-night .yui3-menu ul, +.yui3-skin-night .yui3-menu ul ul { + + margin-top: 3px; + padding-top: 3px; + border-top: solid 1px #5E5E5E; + +} + +.yui3-skin-night .yui3-menu ul.first-of-type { + + border: 0; + margin: 0; + padding: 0; + +} + +.yui3-skin-night .yui3-menu-horizontal ul { + + padding: 0; + margin: 0; + border: 0; + +} + + +.yui3-skin-night .yui3-menu li, +.yui3-skin-night .yui3-menu .yui3-menu li { + + /* + For and IE 6 (Strict Mode and Quirks Mode) and IE 7 (Quirks Mode only): + Used to collapse superfluous white space between
  • elements that is + triggered by the "display" property of the elements being set to + "block" by node-menunav-core.css file. + */ + + _border-bottom: solid 1px #6D6E6E; + +} + +.yui3-skin-night .yui3-menu-horizontal li { + + _border-bottom: 0; + +} + +.yui3-skin-night .yui3-menubuttonnav li { + + border-right: solid 1px #ccc; + +} + +.yui3-skin-night .yui3-splitbuttonnav li { + + border-right: solid 1px #303030; + +} + +.yui3-skin-night .yui3-menubuttonnav li li, +.yui3-skin-night .yui3-splitbuttonnav li li { + + border-right: 0; + +} + + +/* Menuitems and menu labels */ + + +.yui3-skin-night .yui3-menu-label, +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-label, +.yui3-skin-night .yui3-menuitem-content, +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menuitem-content { + + padding: 0 20px; + color: #fff; + text-decoration: none; + cursor: default; + + /* + Necessary specify values for border, position and margin to override + values specified in the selectors that follow. + */ + + float: none; + border: 0; + margin: 0; + +} + +.yui3-skin-night .yui3-menu-horizontal .yui3-menu-label, +.yui3-skin-night .yui3-menu-horizontal .yui3-menuitem-content { + + padding: 0 10px; + border-style: solid; + border-color: #303030; + border-width: 1px 0; + margin: -1px 0; + + float: left; /* Ensures that menu labels clear floated descendents. + Also gets negative margins working in IE 7 + (Strict Mode). */ + width: auto; + +} + +.yui3-skin-night .yui3-menu-label, +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-label { + + background: url(vertical-menu-submenu-indicator.png) right center no-repeat; + +} + +.yui3-skin-night .yui3-menu-horizontal .yui3-menu-label { + + background: none; + +} + +.yui3-skin-night .yui3-menubuttonnav .yui3-menu-label, +.yui3-skin-night .yui3-splitbuttonnav .yui3-menu-label { + + background-image: none; + +} + +.yui3-skin-night .yui3-menubuttonnav .yui3-menu-label { + + padding-right: 0; + +} + +.yui3-skin-night .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-night .yui3-splitbuttonnav .yui3-menu-label { + + padding: 0; + +} + +.yui3-skin-night .yui3-splitbuttonnav .yui3-menu-label a { + + float: left; + width: auto; + color: #fff; + text-decoration: none; + cursor: default; + padding: 0 5px 0 10px; + +} + +.yui3-skin-night .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle { + + padding: 0; /* Overide padding applied by the preceeding rule. */ + border-left: solid 1px #303030; + width: 15px; + overflow: hidden; + text-indent: -1000px; + background: url(horizontal-menu-submenu-indicator.png) 3px center no-repeat; + +} + + +/* Selected menuitem */ + +.yui3-skin-night .yui3-menu-label-active, +.yui3-skin-night .yui3-menu-label-menuvisible, +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-label-active, +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menu-label-menuvisible { + + background-color: #575858; + +} + +.yui3-skin-night .yui3-menuitem-active .yui3-menuitem-content, +.yui3-skin-night .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content { + + background-image: none; + background-color: #575858; + + /* + Undo values set for "border-left-width" and "margin-left" when the root + menu has a class of "yui-menubuttonnav" or "yui-splitbuttonnav" applied. + */ + + border-left-width: 0; + margin-left: 0; + +} + +.yui3-skin-night .yui3-menu-horizontal .yui3-menu-label-active, +.yui3-skin-night .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content, +.yui3-skin-night .yui3-menu-horizontal .yui3-menu-label-menuvisible { + + border-color: #303030; + background-color:#555658; + background: -moz-linear-gradient( + 0% 100% 90deg, + #343536 0%, + #555658 96%, + #3E3F41 100% + ); + background: -webkit-gradient( + linear, + left bottom, + left top, + from(#343536), + color-stop(0.96, #555658), + to(#3E3F41) + ); + +} + +.yui3-skin-night .yui3-menubuttonnav .yui3-menu-label-active, +.yui3-skin-night .yui3-menubuttonnav .yui3-menuitem-active .yui3-menuitem-content, +.yui3-skin-night .yui3-menubuttonnav .yui3-menu-label-menuvisible, +.yui3-skin-night .yui3-splitbuttonnav .yui3-menu-label-active, +.yui3-skin-night .yui3-splitbuttonnav .yui3-menuitem-active .yui3-menuitem-content, +.yui3-skin-night .yui3-splitbuttonnav .yui3-menu-label-menuvisible { + + border-left-width: 1px; + margin-left: -1px; + +} + +.yui3-skin-night .yui3-splitbuttonnav .yui3-menu-label-menuvisible { + + border-color: #303030; + background: transparent; + +} + +.yui3-skin-night .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle { + + border-color: #303030; + background-color: #505050; + +} \ No newline at end of file diff --git a/src/node-menunav/assets/skins/night/vertical-menu-submenu-indicator.png b/src/node-menunav/assets/skins/night/vertical-menu-submenu-indicator.png new file mode 100644 index 00000000000..cfc46b8ac76 Binary files /dev/null and b/src/node-menunav/assets/skins/night/vertical-menu-submenu-indicator.png differ diff --git a/src/node-menunav/assets/skins/sam/horizontal-menu-submenu-indicator.png b/src/node-menunav/assets/skins/sam/horizontal-menu-submenu-indicator.png index e242a668125..a2482ac792d 100644 Binary files a/src/node-menunav/assets/skins/sam/horizontal-menu-submenu-indicator.png and b/src/node-menunav/assets/skins/sam/horizontal-menu-submenu-indicator.png differ diff --git a/src/node-menunav/assets/skins/sam/vertical-menu-submenu-indicator.png b/src/node-menunav/assets/skins/sam/vertical-menu-submenu-indicator.png index 8a8a1aff748..cfc46b8ac76 100644 Binary files a/src/node-menunav/assets/skins/sam/vertical-menu-submenu-indicator.png and b/src/node-menunav/assets/skins/sam/vertical-menu-submenu-indicator.png differ diff --git a/src/overlay/docs/overlay-align.mustache b/src/overlay/docs/overlay-align.mustache index 4da5e8993e8..77dfebd8f38 100644 --- a/src/overlay/docs/overlay-align.mustache +++ b/src/overlay/docs/overlay-align.mustache @@ -3,9 +3,9 @@ /* Example Layout CSS */ .overlay-example { - position:relative; - padding:5px; - height:30em; + position: relative; + padding: 5px; + height: 34.5em; } #overlay-align { @@ -13,18 +13,18 @@ } .overlay-example button { - margin-left:1px; + margin-left: 1px; } .overlay-example .yui3-g { - color:#999; + color: #999; } .align-box { background-color: #ddd; border: solid 1px #ddd; - margin:0px; - text-align:center; + margin: 0px; + text-align: center; width: 100%; } @@ -35,9 +35,22 @@ .overlay-example .example-head { border-bottom: solid 1px #ddd; - text-align:center; margin-bottom: 2em; padding-bottom: 1em; + height: 8.6em; +} + +.overlay-example .example-head pre{ + margin: 0; +} + +#alignment { + position: absolute; + right: 5px; + text-align: left; + top: 0; + height: 9em; + width: 40em; } .nav{ @@ -58,8 +71,8 @@ } .align-box .title { - color:#000; - padding:2px; + color: #000; + padding: 2px; } #align2 { @@ -72,18 +85,10 @@ line-height: 3em; } -#alignment { - padding:5px; - margin: 8px auto 6px; - background-color: #F5F7FE; - border: 1px solid #CDD2E4; - border-left-width: 5px; - font-family: Menlo,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Consolas','Monaco',fixed; -} #step { - font-size:55%; - margin-left:22px; + font-size: 55%; + margin-left: 22px; font-weight: normal; } #main .aligned-to{ /* highlight the node that overlay is currently aligned to */ @@ -163,30 +168,30 @@ overlay.render("#overlay-align"); ``` /* Setup local variable for Y.WidgetPositionAlign, since we use it multiple times */ -var wPA = Y.WidgetPositionAlign; +var a = Y.WidgetPositionAlign; ... /* Align top-left corner of overlay, with top-right corner of #align1 */ overlay.set("align", {node:"#align1", - points:[wPA.TL, wPA.TR]}); + points:[a.TL, a.TR]}); /* Center overlay in #align2 */ overlay.set("centered", "#align2"); /* Align top-center edge of overlay with bottom-center edge of #align3 */ overlay.set("align", {node:"#align3", - points:[wPA.TC, wPA.BC]}); + points:[a.TC, a.BC]}); /* Align right-center edge of overlay with right-center edge of viewport */ -overlay.set("align", {points:[wPA.RC, wPA.RC]}); +overlay.set("align", {points:[a.RC, a.RC]}); /* Center overlay in viewport */ overlay.set("centered", true); /* Center in #overlay-align (example box) */ overlay.set("align", {node:"#overlay-align", - points:[wPA.CC, wPA.CC]}); + points:[a.CC, a.CC]}); ```

    CSS: Overlay Look/Feel

    diff --git a/src/overlay/docs/partials/overlay-align-source.mustache b/src/overlay/docs/partials/overlay-align-source.mustache index 9bebbb1794b..c53126e713b 100644 --- a/src/overlay/docs/partials/overlay-align-source.mustache +++ b/src/overlay/docs/partials/overlay-align-source.mustache @@ -1,7 +1,8 @@
    -

    +
    +
    
         
    @@ -49,7 +50,7 @@ YUI().use("overlay", function(Y) { var overlay = new Y.Overlay({ width:"16em", headerContent: 'Aligned Overlay', - bodyContent: '
    ', + bodyContent: '
    ', zIndex:2 }); @@ -61,48 +62,50 @@ YUI().use("overlay", function(Y) { var descr = Y.one('.yui3-widget-bd .descr'); /* Setup local variable for Y.WidgetPositionAlign, since we use it multiple times */ - var wPA = Y.WidgetPositionAlign; + var a = Y.WidgetPositionAlign, + declareA = "var a = Y.WidgetPostionAlign; // Local variable

    ", + dontDeclareA = "

    "; var steps = [ function() { /* Align top-left corner of overlay, with top-right corner of #align1 */ - alignment.setContent('overlay.set("align", {node:"#align1", points:[wPA.TL, wPA.TR]});'); + alignment.setContent(declareA + 'overlay.set("align", {
    node: "#align1",
    points: [a.TL, a.TR]
    });'); descr.setContent('Align top-left corner of overlay, with top-right corner of #align1'); Y.one('#align1').addClass('aligned-to'); - overlay.set("align", {node:"#align1", points:[wPA.TL, wPA.TR]}); + overlay.set("align", {node:"#align1", points: [a.TL, a.TR]}); }, function() { /* Center overlay in #align2 */ - alignment.setContent('overlay.set("centered", "#align2");'); - descr.setContent('Center overlay in #align2'); + alignment.setContent(dontDeclareA + 'overlay.set("centered", "#align2");'); + descr.setContent('Center overlay in #align2
    (an image)'); Y.one('#align2').addClass('aligned-to'); overlay.set("centered", "#align2"); }, function() { /* Align top-center edge of overlay with bottom-center edge of #align3 */ - alignment.setContent('overlay.set("align", {node:"#align3", points:[wPA.TC, wPA.BC]});'); + alignment.setContent(declareA + 'overlay.set("align", {
    node: "#align3",
    points: [a.TC, a.BC]
    });'); descr.setContent('Align top-center edge of overlay with bottom-center edge of #align3'); Y.one('#align3').addClass('aligned-to'); - overlay.set("align", {node:"#align3", points:[wPA.TC, wPA.BC]}); + overlay.set("align", {node:"#align3", points:[a.TC, a.BC]}); }, function() { /* Align right-center edge of overlay with right-center edge of viewport */ - alignment.setContent('overlay.set("align", {points:[wPA.RC, wPA.RC]});'); + alignment.setContent(declareA + 'overlay.set("align", {
    points: [a.RC, a.RC]
    });'); descr.setContent('Align right-center edge of overlay with right-center edge of viewport'); - overlay.set("align", {points:[wPA.RC, wPA.RC]}); + overlay.set("align", {points:[a.RC, a.RC]}); }, function() { /* Center overlay in viewport */ - alignment.setContent('overlay.set("centered", true);'); + alignment.setContent(dontDeclareA + 'overlay.set("centered", true);'); descr.setContent('Center overlay in viewport'); overlay.set("centered", true); }, function() { /* Center in #overlay-align */ - alignment.setContent('overlay.set("align", {node:"#overlay-align", points:[wPA.CC, wPA.CC]});'); + alignment.setContent(declareA + 'overlay.set("align", {
    node: "#overlay-align",
    points: [a.CC, a.CC]
    });'); descr.setContent('Center in #overlay-align'); Y.one('#overlay-align').addClass('aligned-to'); - overlay.set("align", {node:"#overlay-align", points:[wPA.CC, wPA.CC]}); + overlay.set("align", {node:"#overlay-align", points:[a.CC, a.CC]}); } ]; diff --git a/src/panel/tests/unit-tests.html b/src/panel/tests/unit-tests.html index a22962b9901..6137d56b60b 100644 --- a/src/panel/tests/unit-tests.html +++ b/src/panel/tests/unit-tests.html @@ -2,13 +2,13 @@ Panel Tests - +

    Panel Tests

    -

    +