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- 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