summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/_router.js
blob: d45ffdc2331cc5ab7fe52720bdbf74df4e07bb91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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(){
	},

})