From 164fc4407621b4bd6448dd7790d684635a023726 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 16 Sep 2015 15:07:05 -0400 Subject: build --- StoneIsland/platforms/ios/www/js/lib/_router.js | 61 +++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 StoneIsland/platforms/ios/www/js/lib/_router.js (limited to 'StoneIsland/platforms/ios/www/js/lib/_router.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/_router.js b/StoneIsland/platforms/ios/www/js/lib/_router.js new file mode 100644 index 00000000..08b8b819 --- /dev/null +++ b/StoneIsland/platforms/ios/www/js/lib/_router.js @@ -0,0 +1,61 @@ +var SiteRouter = Router.extend({ + + el: 'body', + routeByHash: true, + + routes: { + '/': 'intro', + '/intro': 'intro', + '/store': 'store', + '/hub': 'hub', + '/story': 'story', + '/archive': 'archive', + + '/faq': 'faq', + '/search': 'search', + + '/cart': 'cart', + }, + + initialize: function(){ + }, + + go: function(url){ + if (app.view && app.view.hide) { + app.view.hide() + } + window.location.href = "#/" + url + this.parseRoute(url) + }, + + intro: function(){ + app.view = app.intro + app.intro.show() + }, + + store: function(){ + app.view = app.store + app.collection.show() + }, + + hub: function(){ + app.view = app.hub + app.hub.show() + }, + + story: function(){ + app.view = app.story + app.story.show() + }, + + archive: function(){ + app.view = app.archive + app.archive.show() + }, + + cart: function(){ + app.view = app.cart + app.cart.show() + }, + +}) -- cgit v1.2.3-70-g09d2