mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-25 11:07:35 +00:00
Refactored to coffeescript and Marionette
This commit is contained in:
34
static/js/app/lib/router.js
Normal file
34
static/js/app/lib/router.js
Normal file
@@ -0,0 +1,34 @@
|
||||
// Generated by CoffeeScript 1.6.2
|
||||
(function() {
|
||||
var __hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
define(['marionette', 'app.lib/controller'], function(Marionette, Controller) {
|
||||
var DssRouter, _ref;
|
||||
|
||||
return DssRouter = (function(_super) {
|
||||
__extends(DssRouter, _super);
|
||||
|
||||
function DssRouter() {
|
||||
_ref = DssRouter.__super__.constructor.apply(this, arguments);
|
||||
return _ref;
|
||||
}
|
||||
|
||||
DssRouter.prototype.controller = new Controller;
|
||||
|
||||
DssRouter.prototype.appRoutes = {
|
||||
"": "home",
|
||||
"/": "home",
|
||||
"mixes": "showMixList",
|
||||
"mixes/:type": "showMixList",
|
||||
"mix/:slug": "showMix",
|
||||
"mix/edit/:slug": "editMix",
|
||||
"user/:slug": "user"
|
||||
};
|
||||
|
||||
return DssRouter;
|
||||
|
||||
})(Marionette.AppRouter);
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
Reference in New Issue
Block a user