diff --git a/HISTORY.md b/HISTORY.md index fbb7d8f64..ff8c8bdb3 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,16 @@ +version 0.9.8 +============= + +Features +-------- + +* Updated to the latest version of YUI (3.18.x). + +Bug Fixes +--------- + +* Action context now inherits the addons required by any yui module required by a controller. + version 0.9.7 ============= @@ -48,7 +61,7 @@ YUI.add('ImageResultController', function (Y, NAME) { // to call this controller's augmentResult method. Y.Do.after(this.augmentResult, this, 'createResultObject') }; - + Y.namespace('mojito.controllers')[NAME] = ImageResultController; // Extend the ResultController, adding the augmentResult custom method. diff --git a/lib/app/addons/rs/dispatch-helper.js b/lib/app/addons/rs/dispatch-helper.js index 5c7f1e2d1..118839700 100644 --- a/lib/app/addons/rs/dispatch-helper.js +++ b/lib/app/addons/rs/dispatch-helper.js @@ -56,7 +56,7 @@ YUI.add('addon-rs-dispatch-helper', function (Y, NAME) { * @return {nothing} */ addResourceVersion: function (res) { - if (res.type === 'controller' || (res.type === 'addon' && res.subtype === 'ac')) { + if (res.type === 'controller' || (res.type === 'addon' && res.subtype === 'ac') || res.type === 'binder' || res.type === 'yui-module') { // We only care about controllers and AC addons since a mojit's controller's addons // should be derived from its addons requirements, recursively including the addons of // the controllers and addons it requires. @@ -64,7 +64,7 @@ YUI.add('addon-rs-dispatch-helper', function (Y, NAME) { var affinity = res.affinity.toString(); // Do not overwrite a previous module with the same name; this ensures that // if there are duplicate modules, only the shallowest is considered. - if (!this.modules[affinity][res.yui.name]) { + if (this.modules[affinity] && !this.modules[affinity][res.yui.name]) { this.modules[affinity][res.yui.name] = res; } } diff --git a/lib/app/autoload/output-handler.client.js b/lib/app/autoload/output-handler.client.js index d209fd0de..c21d5ca58 100644 --- a/lib/app/autoload/output-handler.client.js +++ b/lib/app/autoload/output-handler.client.js @@ -27,34 +27,10 @@ YUI.add('mojito-output-handler', function(Y, NAME) { js: [] }, done = {}, - blobNode = '', + blobNode, doneChecker, executeInlinedScripts; - Y.Object.each(assets, function(types, location) { - Y.Object.each(types, function(list, type) { - var i; - - if (type === 'blob') { - for (i = 0; i < list.length; i += 1) { - blobNode += list[i]; - } - } else { - for (i = 0; i < list.length; i += 1) { - if (!loaded[type][list[i]]) { - toLoad[type].push(list[i]); - } - loaded[type][list[i]] = true; - } - } - }); - }); - - if (blobNode) { - blobNode = Y.Node.create(blobNode); - Y.one('head').append(blobNode); - } - // Any scripts contain in assets.blob must be created using document.createElment('script'), // and then replaced, otherwise the scripts never get executed. executeInlinedScripts = function (node) { @@ -80,15 +56,35 @@ YUI.add('mojito-output-handler', function(Y, NAME) { } }; + Y.Object.each(assets, function(types, location) { + Y.Object.each(types, function(list, type) { + var i; + + if (type === 'blob') { + for (i = 0; i < list.length; i += 1) { + blobNode = Y.Node.create(list[i]); + if (blobNode) { + Y.one('head').append(blobNode); + // Ensure that inlined script get executed. + executeInlinedScripts(blobNode._node); + } + } + } else { + for (i = 0; i < list.length; i += 1) { + if (!loaded[type][list[i]]) { + toLoad[type].push(list[i]); + } + loaded[type][list[i]] = true; + } + } + }); + }); + doneChecker = function(type) { if (type) { done[type] = true; } if (done.css && done.js) { - if (blobNode) { - // Ensure that any inlined script gets executed. - executeInlinedScripts(blobNode._node); - } cb(); } }; diff --git a/package.json b/package.json index 0c1a8e173..c9a386869 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mojito", - "version": "0.9.7", + "version": "0.9.8", "description": "Mojito provides an architecture, components and tools for developers to build complex web applications faster.", "author": "Drew Folta ", "contributors": [ @@ -26,7 +26,7 @@ "request": "2.34.x", "semver": "2.2.x", "ycb": "1.1.x", - "yui": "3.16.x" + "yui": "3.18.x" }, "keywords": [ "framework",