diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-11 04:19:36 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-11 04:19:36 -0500 |
| commit | eddafb95b69c9591d3ccf752eecb064695f26244 (patch) | |
| tree | 7970d2cf7b7e394e836773fe57c95d43b80819c8 /StoneIsland/www/js/lib/_router.js | |
| parent | 93b3bded0286b2ec2e8b2f8210590ae7d052f09f (diff) | |
cart routing
Diffstat (limited to 'StoneIsland/www/js/lib/_router.js')
| -rw-r--r-- | StoneIsland/www/js/lib/_router.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index d316ffe2..bf4af40b 100644 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -24,7 +24,12 @@ var SiteRouter = Router.extend({ '/faq': 'faq', '/search': 'search', - '/cart': 'cart', + '/cart': 'cart.summary', + '/cart/summary': 'cart.summary', + '/cart/payment': 'cart.payment', + '/cart/shipping': 'cart.shipping', + '/cart/confirm': 'cart.confirm', + '/cart/thanks': 'cart.thanks', }, initialize: function(){ @@ -48,8 +53,15 @@ var SiteRouter = Router.extend({ default_view: function(name){ var fn = function(){ console.log(name) - app.view = app[name] - app[name].show() + if (name.match(".")) { + var n = name.split(".") + console.log(name, n) + app.view = app[n[0]][n[1]] + } + else { + app.view = app[name] + } + app.view.show() }.bind(this) return fn }, |
