summaryrefslogtreecommitdiff
path: root/public/js/lib/views/lobby/index.js
diff options
context:
space:
mode:
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