Permalink
Browse files

use page object to store/use staticAppConfig

  • Loading branch information...
1 parent c43503c commit 47218d0aeb4d8b519a75a62a9b42ae9d19bb790a @drewfish drewfish committed Apr 2, 2013
Showing with 6 additions and 1 deletion.
  1. +1 −1 lib/app/autoload/action-context.common.js
  2. +3 −0 lib/app/autoload/mojito-client.client.js
  3. +2 −0 lib/mojito.js
@@ -308,7 +308,7 @@ YUI.add('mojito-action-context', function(Y, NAME) {
this._adapter = opts.adapter;
// 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
// perform the actual processing.
@@ -338,6 +338,9 @@ YUI.add('mojito-client', function(Y, NAME) {
// pass globalHookhandler to addons that may want to use hooks
globalHookHandler: globalHookHandler
};
+
+ this.page.staticAppConfig = config.appConfig;
+
fireLifecycle('pre-init', forwardConfig);
// 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
View
@@ -340,6 +340,8 @@ MojitoServer.prototype._configureAppInstance = function(app, options) {
log: Y.log
});
+ outputHandler.page.staticAppConfig = store.getStaticAppConfig();
+
// HookSystem::StartBlock
// enabling perf group
if (appConfig.perf) {

0 comments on commit 47218d0

Please sign in to comment.