socket rooms! and almost finished rep (socket updates) except for one small bug where current_user isnt being pulled

This commit is contained in:
psychobunny
2013-05-03 19:31:21 +00:00
parent 5e48b4cdc5
commit bcb672e1fe
6 changed files with 75 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
var socket,
config,
app = {},
current_room,
API_URL = null;
// todo: cleanup,etc
@@ -173,6 +173,12 @@ var socket,
};
jQuery('document').ready(function() {
if (current_room != 'global') {
socket.emit('event:enter_room', 'global');
current_room = 'global';
}
// On menu click, change "active" state
var menuEl = document.querySelector('.nav'),
liEls = menuEl.querySelectorAll('li'),