From 4514c2c49f0e0ec7cf9911dc254a8d20644d5def Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 5 Aug 2015 21:28:20 -0400 Subject: pushing messages into a div --- public/js/lib/views/lobby/lobby.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 public/js/lib/views/lobby/lobby.js (limited to 'public/js/lib/views/lobby/lobby.js') diff --git a/public/js/lib/views/lobby/lobby.js b/public/js/lib/views/lobby/lobby.js new file mode 100644 index 0000000..6821436 --- /dev/null +++ b/public/js/lib/views/lobby/lobby.js @@ -0,0 +1,23 @@ +var LobbyView = View.extend({ + + el: "#lobby", + + events: { + "submit form": "join" + }, + + initialize: function(){ + this.$createRoom = this.$("#create-room") + }, + + join: function(e){ + console.log("hwat") + e && e.preventDefault() + var name = this.$createRoom.sanitizeName() + console.log("name") + + if (! name) { return } + window.location.href = "/v/" + name + } + +}) -- cgit v1.2.3-70-g09d2