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

Commit

Permalink
use page object to store/use staticAppConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
drewfish committed Apr 2, 2013
1 parent c43503c commit 47218d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/app/autoload/action-context.common.js
Expand Up @@ -308,7 +308,7 @@ YUI.add('mojito-action-context', function(Y, NAME) {
this._adapter = opts.adapter; this._adapter = opts.adapter;


// pathToRoot, viewEngine, amoung others will be available through this. // pathToRoot, viewEngine, amoung others will be available through this.
this.staticAppConfig = store.getStaticAppConfig(); this.staticAppConfig = (this._adapter.page && this._adapter.page.staticAppConfig) || store.getStaticAppConfig();


// Create a function which will properly delegate to the dispatcher to // Create a function which will properly delegate to the dispatcher to
// perform the actual processing. // perform the actual processing.
Expand Down
3 changes: 3 additions & 0 deletions lib/app/autoload/mojito-client.client.js
Expand Up @@ -338,6 +338,9 @@ YUI.add('mojito-client', function(Y, NAME) {
// pass globalHookhandler to addons that may want to use hooks // pass globalHookhandler to addons that may want to use hooks
globalHookHandler: globalHookHandler globalHookHandler: globalHookHandler
}; };

this.page.staticAppConfig = config.appConfig;

fireLifecycle('pre-init', forwardConfig); fireLifecycle('pre-init', forwardConfig);
// if we didn't originaly have hooks enabled, copy back from config object. // if we didn't originaly have hooks enabled, copy back from config object.
// This is the case where an add-on module wants to turn on hooks and // This is the case where an add-on module wants to turn on hooks and
Expand Down
2 changes: 2 additions & 0 deletions lib/mojito.js
Expand Up @@ -340,6 +340,8 @@ MojitoServer.prototype._configureAppInstance = function(app, options) {
log: Y.log log: Y.log
}); });


outputHandler.page.staticAppConfig = store.getStaticAppConfig();

// HookSystem::StartBlock // HookSystem::StartBlock
// enabling perf group // enabling perf group
if (appConfig.perf) { if (appConfig.perf) {
Expand Down

0 comments on commit 47218d0

Please sign in to comment.