summaryrefslogtreecommitdiff
path: root/public/js/lib/views/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-06 13:04:24 -0400
committerJules Laplace <jules@okfoc.us>2015-08-06 13:04:24 -0400
commit277e73e9d7e118b5cc1bd5888eb502b3d7380ec8 (patch)
treef1b2f03ad2728cfa2a8b10fcbf10f5f3030dc216 /public/js/lib/views/index.js
parentfd3e6661d8911fc0ede063ade5c094c7188443e5 (diff)
parent18ebdc7abb9982ceeba1aac651b1c874fad2b6c0 (diff)
Merge branch 'master' of ghghgh.us:asdf-yt
Diffstat (limited to 'public/js/lib/views/index.js')
-rw-r--r--public/js/lib/views/index.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/public/js/lib/views/index.js b/public/js/lib/views/index.js
index d5ec35d..a333b45 100644
--- a/public/js/lib/views/index.js
+++ b/public/js/lib/views/index.js
@@ -1,9 +1,9 @@
+var lobby, room
+
var SiteRouter = Router.extend({
+
el: "body",
- events: {
- },
-
routes: {
"/": 'lobby',
"/v/:name": 'room',
@@ -11,7 +11,7 @@ var SiteRouter = Router.extend({
initialize: function(){
if (! user.username) {
- $("#login").show()
+ app.view = new LoginView()
}
else {
this.route()
@@ -19,11 +19,12 @@ var SiteRouter = Router.extend({
},
lobby: function(){
- this.view = new LobbyView ()
+ lobby = app.view = new LobbyView ()
},
room: function(name){
- this.view = new RoomView (name)
+ console.log("hi")
+ room = app.view = new RoomView (name)
},
}) \ No newline at end of file