summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/_router.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/_router.js')
-rw-r--r--StoneIsland/www/js/lib/_router.js18
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
},