summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/_router.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/_router.js')
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/_router.js61
1 files changed, 61 insertions, 0 deletions
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()
+ },
+
+})