LEFT | RIGHT |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 var spinner; | 3 var spinner; |
4 | 4 |
5 /** | 5 /** |
6 * Provide the main App class, based on the YUI App framework. Also provide | 6 * Provide the main App class, based on the YUI App framework. Also provide |
7 * the routing definitions, which map the request paths to the top-level | 7 * the routing definitions, which map the request paths to the top-level |
8 * views defined by the App class. | 8 * views defined by the App class. |
9 * | 9 * |
10 * @module app | 10 * @module app |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 subApp = self.get('subApps')[namespace]; | 463 subApp = self.get('subApps')[namespace]; |
464 | 464 |
465 if (subApp && typeof subApp[callback] === 'function') { | 465 if (subApp && typeof subApp[callback] === 'function') { |
466 callback = subApp[callback]; | 466 callback = subApp[callback]; |
467 callingContext = subApp; | 467 callingContext = subApp; |
468 } else if (typeof self[callback] === 'function') { | 468 } else if (typeof self[callback] === 'function') { |
469 callback = self[callback]; | 469 callback = self[callback]; |
470 callingContext = self; | 470 callingContext = self; |
471 } else { | 471 } else { |
472 console.error('Callback function `', callback, | 472 console.error('Callback function `', callback, |
473 '` does not exist under the namespace `', namespace, | 473 '` does not exist under the namespace `', namespace, |
474 '` at the path `', path, '`.'); | 474 '` at the path `', path, '`.'); |
475 } | 475 } |
476 } | 476 } |
477 | 477 |
478 // Allow access to the num or remaining callbacks for the route. | 478 // Allow access to the num or remaining callbacks for the route. |
479 req.pendingCallbacks = callbacks.length; | 479 req.pendingCallbacks = callbacks.length; |
480 // Attach the callback id to the request. | 480 // Attach the callback id to the request. |
481 req.callbackId = Y.stamp(callback, true); | 481 req.callbackId = Y.stamp(callback, true); |
482 callback.call(callingContext, req, res, req.next); | 482 callback.call(callingContext, req, res, req.next); |
483 | 483 |
484 } else if ((route = routes.shift())) { | 484 } else if ((route = routes.shift())) { |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 'io', | 1204 'io', |
1205 'json-parse', | 1205 'json-parse', |
1206 'app-base', | 1206 'app-base', |
1207 'app-transitions', | 1207 'app-transitions', |
1208 'base', | 1208 'base', |
1209 'node', | 1209 'node', |
1210 'model', | 1210 'model', |
1211 'app-subapp-extension', | 1211 'app-subapp-extension', |
1212 'sub-app'] | 1212 'sub-app'] |
1213 }); | 1213 }); |
LEFT | RIGHT |