diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-06-09 17:41:00 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-06-09 17:41:00 -0400 |
| commit | b4fd7ddd7cf6fb2a68613bc0257a650055360ea7 (patch) | |
| tree | bf4117322c8682fea24e2be169bd901bd1e978c5 /public/assets/javascripts/ui/Router.js | |
| parent | 50046f0197c5ef3d997dd06e95f3dcd008a654f6 (diff) | |
environment working again
Diffstat (limited to 'public/assets/javascripts/ui/Router.js')
| -rw-r--r-- | public/assets/javascripts/ui/Router.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/public/assets/javascripts/ui/Router.js b/public/assets/javascripts/ui/Router.js index fea3698..a7aa566 100644 --- a/public/assets/javascripts/ui/Router.js +++ b/public/assets/javascripts/ui/Router.js @@ -19,7 +19,8 @@ var Router = View.extend({ "/profile/edit": 'editProfile', "/about/:name/edit": 'editDocument', "/about/new": 'newDocument', - "/app": 'launch', + "/editor": 'launchEditor', + "/builder": 'launchBuilder', }, initialize: function(){ @@ -33,13 +34,11 @@ var Router = View.extend({ this.originalPath = window.location.pathname var path = window.location.pathname.split("/") - console.log(path) + // console.log(path) for (var route in this.routes) { var routePath = route.split("/") if (routePath[1] == path[1]) { if (routePath[2] && routePath[2].indexOf(":") !== -1 && path[2] && (path[3] === routePath[3]) ) { - console.log("GOT :") - console.log(routePath) this[this.routes[route]](null, path[2]) break; } @@ -57,7 +56,13 @@ var Router = View.extend({ $("body").removeClass("loading") }, - launch: function(){ + launchBuilder: function(){ + app.mode.builder = true + app.launch() + }, + + launchEditor: function(){ + app.mode.editor = true app.launch() }, |
