summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/Router.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/ui/Router.js')
-rw-r--r--public/assets/javascripts/ui/Router.js15
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()
},