Skip to content
This repository
Browse code

use page object to store/use staticAppConfig

  • Loading branch information...
commit 47218d0aeb4d8b519a75a62a9b42ae9d19bb790a 1 parent c43503c
Drew Folta authored April 02, 2013
2  lib/app/autoload/action-context.common.js
@@ -308,7 +308,7 @@ YUI.add('mojito-action-context', function(Y, NAME) {
308 308
         this._adapter = opts.adapter;
309 309
 
310 310
         // pathToRoot, viewEngine, amoung others will be available through this.
311  
-        this.staticAppConfig = store.getStaticAppConfig();
  311
+        this.staticAppConfig = (this._adapter.page && this._adapter.page.staticAppConfig) || store.getStaticAppConfig();
312 312
 
313 313
         // Create a function which will properly delegate to the dispatcher to
314 314
         // perform the actual processing.
3  lib/app/autoload/mojito-client.client.js
@@ -338,6 +338,9 @@ YUI.add('mojito-client', function(Y, NAME) {
338 338
                     // pass globalHookhandler to addons that may want to use hooks
339 339
                     globalHookHandler: globalHookHandler
340 340
                 };
  341
+
  342
+            this.page.staticAppConfig = config.appConfig;
  343
+
341 344
             fireLifecycle('pre-init', forwardConfig);
342 345
             // if we didn't originaly have hooks enabled, copy back from config object.
343 346
             // This is the case where an add-on module wants to turn on hooks and
2  lib/mojito.js
@@ -340,6 +340,8 @@ MojitoServer.prototype._configureAppInstance = function(app, options) {
340 340
             log: Y.log
341 341
         });
342 342
 
  343
+        outputHandler.page.staticAppConfig = store.getStaticAppConfig();
  344
+
343 345
         // HookSystem::StartBlock
344 346
         // enabling perf group
345 347
         if (appConfig.perf) {

0 notes on commit 47218d0

Please sign in to comment.
Something went wrong with that request. Please try again.