From 18f6f0219474f0f43e7403a5f5f8cff7c3dd0246 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 5 Aug 2015 01:21:38 -0400 Subject: login view, lobby view --- public/js/lib/views/lobby/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'public/js/lib/views/lobby/index.js') 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 -- cgit v1.2.3-70-g09d2