summaryrefslogtreecommitdiff
path: root/public/js/lib/views/lobby/lobby.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-06 13:04:24 -0400
committerJules Laplace <jules@okfoc.us>2015-08-06 13:04:24 -0400
commit277e73e9d7e118b5cc1bd5888eb502b3d7380ec8 (patch)
treef1b2f03ad2728cfa2a8b10fcbf10f5f3030dc216 /public/js/lib/views/lobby/lobby.js
parentfd3e6661d8911fc0ede063ade5c094c7188443e5 (diff)
parent18ebdc7abb9982ceeba1aac651b1c874fad2b6c0 (diff)
Merge branch 'master' of ghghgh.us:asdf-yt
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
+ }
+
+})