Added default route.

This commit is contained in:
fergal.moran
2012-08-10 13:01:26 +01:00
parent db0cf8559c
commit f155157573

View File

@@ -1,6 +1,6 @@
var AppRouter = Backbone.Router.extend({
routes:{
"application/":"defaultRoute",
"":"defaultRoute",
"/mixes":"mixList",
"/mixes/:type":"mixList",
"/mix/:id":"mixDetails",
@@ -15,8 +15,10 @@ var AppRouter = Backbone.Router.extend({
$('#site-content-fill').html('');
},
defaultRoute:function (path) {
if (path == "" || path == "/")
this.mixList(0);
if (!path)
this.mixList('latest');
else if (path == "" || path == "/")
this.mixList('latest');
},
mixList:function (type) {
var mixList = new MixCollection();