summaryrefslogtreecommitdiff
path: root/public/js/lib/views/lobby/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-05 01:21:38 -0400
committerJules Laplace <jules@okfoc.us>2015-08-05 01:21:38 -0400
commit18f6f0219474f0f43e7403a5f5f8cff7c3dd0246 (patch)
tree228fd343f36da554e540a70a0522eae489ad62fc /public/js/lib/views/lobby/index.js
parentd0b4cd4f7e6364a35a420f2f3b0fcdbb502d8a9a (diff)
login view, lobby view
Diffstat (limited to 'public/js/lib/views/lobby/index.js')
-rw-r--r--public/js/lib/views/lobby/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/public/js/lib/views/lobby/index.js b/public/js/lib/views/lobby/index.js
index 5ed1966..70b63c4 100644
--- a/public/js/lib/views/lobby/index.js
+++ b/public/js/lib/views/lobby/index.js
@@ -1,9 +1,17 @@
var LobbyView = View.extend({
events: {
+ "form submit": "join"
},
initialize: function(){
+ this.$createRoom = this.$("#create-room")
+ },
+
+ join: function(){
+ var name = this.$createRoom.sanitize()
+ if (! name) { return }
+ window.location.href = "/v/" + name
}
}) \ No newline at end of file