|
|
|
@ -47,16 +47,13 @@ define(function() {
|
|
|
|
|
jQuery('#user-notfound-notify').html('<i class="fa fa-spinner fa-spin"></i>');
|
|
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
socket.emit('api:admin.user.search', username);
|
|
|
|
|
}, 500); //replace this with global throttling function/constant
|
|
|
|
|
|
|
|
|
|
}, 250);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
socket.removeAllListeners('api:admin.user.search');
|
|
|
|
|
socket.emit('api:admin.user.search', username, function(err, data) {
|
|
|
|
|
console.log(err, data);
|
|
|
|
|
if(err) {
|
|
|
|
|
return app.alert(err.message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
socket.on('api:admin.user.search', function(data) {
|
|
|
|
|
if (data === null) {
|
|
|
|
|
if (!data) {
|
|
|
|
|
$('#user-notfound-notify').html('You need to be logged in to search!');
|
|
|
|
|
$('#user-notfound-notify').parent().addClass('btn-warning label-warning');
|
|
|
|
|
return;
|
|
|
|
@ -79,6 +76,10 @@ define(function() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}, 500); //replace this with global throttling function/constant
|
|
|
|
|
|
|
|
|
|
}, 250);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
socket.on('api:user.isOnline', function(data) {
|
|
|
|
|
if(getActiveSection() == 'online' && !loadingMoreUsers) {
|
|
|
|
|