|
|
|
@ -92,15 +92,18 @@ define(function() {
|
|
|
|
|
socket.on('user.anonConnect', updateAnonCount)
|
|
|
|
|
|
|
|
|
|
function updateAnonCount() {
|
|
|
|
|
socket.emit('user.getOnlineAnonCount', {} , function(err, anonCount) {
|
|
|
|
|
|
|
|
|
|
if(parseInt(anonCount, 10) > 0) {
|
|
|
|
|
$('#users-container .anon-user').removeClass('hide');
|
|
|
|
|
$('#online_anon_count').html(anonCount);
|
|
|
|
|
} else {
|
|
|
|
|
$('#users-container .anon-user').addClass('hide');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
var section = getActiveSection();
|
|
|
|
|
if((section.indexOf('online') === 0 || section.indexOf('users') === 0) && !loadingMoreUsers) {
|
|
|
|
|
socket.emit('user.getOnlineAnonCount', {} , function(err, anonCount) {
|
|
|
|
|
|
|
|
|
|
if(parseInt(anonCount, 10) > 0) {
|
|
|
|
|
$('#users-container .anon-user').removeClass('hide');
|
|
|
|
|
$('#online_anon_count').html(anonCount);
|
|
|
|
|
} else {
|
|
|
|
|
$('#users-container .anon-user').addClass('hide');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onUsersLoaded(users, emptyContainer) {
|
|
|
|
|