online page changes

This commit is contained in:
Baris Usakli
2013-10-04 15:30:52 -04:00
parent 52f2e193d6
commit 1155eaf1f1
4 changed files with 68 additions and 15 deletions

View File

@@ -77,8 +77,11 @@ define(function() {
socket.on('api:user.isOnline', function(data) {
if(active == 'online' && !loadingMoreUsers) {
$('#users-container').empty();
$('#users-container .registered-user').remove();
startLoading('users:online', 0);
socket.emit('api:user.getOnlineAnonCount', {} , function(anonCount) {
$('#online_anon_count').html(anonCount);
});
}
});
@@ -86,7 +89,7 @@ define(function() {
var html = templates.prepare(templates['users'].blocks['users']).parse({
users: users
});
$('#users-container').append(html);
$('#users-container').prepend(html);
}
function loadMoreUsers() {