summaryrefslogtreecommitdiff
path: root/public/js/lib/views/lobby
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/lib/views/lobby')
-rw-r--r--public/js/lib/views/lobby/index.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/public/js/lib/views/lobby/index.js b/public/js/lib/views/lobby/index.js
new file mode 100644
index 0000000..0306445
--- /dev/null
+++ b/public/js/lib/views/lobby/index.js
@@ -0,0 +1,17 @@
+var LobbyView = View.extend({
+
+ events: {
+ "form submit": "join"
+ },
+
+ initialize: function(){
+ this.$createRoom = this.$("#create-room")
+ },
+
+ join: function(){
+ var name = this.$createRoom.sanitizeName()
+ if (! name) { return }
+ window.location.href = "/v/" + name
+ }
+
+}) \ No newline at end of file