Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Version 0.9.8 #1389

Merged
merged 10 commits into from Dec 8, 2014
15 changes: 14 additions & 1 deletion 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
=============

Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions lib/app/addons/rs/dispatch-helper.js
Expand Up @@ -56,15 +56,15 @@ 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.

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;
}
}
Expand Down
54 changes: 25 additions & 29 deletions lib/app/autoload/output-handler.client.js
Expand Up @@ -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) {
Expand All @@ -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();
}
};
Expand Down
4 changes: 2 additions & 2 deletions 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 <folta@yahoo-inc.com>",
"contributors": [
Expand All @@ -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",
Expand Down