summaryrefslogtreecommitdiff
path: root/public/js/lib/views/lobby/lobby.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-05 21:28:20 -0400
committerJules Laplace <jules@okfoc.us>2015-08-05 21:28:20 -0400
commit4514c2c49f0e0ec7cf9911dc254a8d20644d5def (patch)
treeb4ac5caea8dca1cdefebb8873adf9d957ce7ae2a /public/js/lib/views/lobby/lobby.js
parent4d6b5e96fbab0602c1781a8b7c06f32aa9d56d99 (diff)
pushing messages into a div
Diffstat (limited to 'public/js/lib/views/lobby/lobby.js')
-rw-r--r--public/js/lib/views/lobby/lobby.js23
1 files changed, 23 insertions, 0 deletions
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
+ }
+
+})