fix acp users page

v1.18.x
barisusakli 11 years ago
parent f53d783d3d
commit 1202322700

@ -195,8 +195,6 @@ define('forum/admin/users', function() {
});
}
$('document').ready(function() {
var timeoutId = 0,
loadingMoreUsers = false;
@ -222,7 +220,7 @@ define('forum/admin/users', function() {
timeoutId = setTimeout(function() {
var username = $('#search-user').val();
$('.fa-spinner').removeClass('none');
$('.fa-spinner').removeClass('hidden');
socket.emit('admin.user.search', username, function(err, data) {
if(err) {
@ -232,7 +230,7 @@ define('forum/admin/users', function() {
ajaxify.loadTemplate('admin/users', function(adminUsers) {
$('.users').html(templates.parse(templates.getBlock(adminUsers, 'users'), data));
$('.fa-spinner').addClass('none');
$('.fa-spinner').addClass('hidden');
if (data && data.users.length === 0) {
$('#user-notfound-notify').html('User not found!')
@ -293,7 +291,7 @@ define('forum/admin/users', function() {
}
});
});
};
return Users;

@ -7,7 +7,7 @@ var usersController = {};
usersController.search = function(req, res, next) {
res.render('admin/users', {
search_display: 'block',
search_display: '',
loadmore_display: 'none',
users: []
});
@ -31,7 +31,7 @@ function getUsers(set, req, res, next) {
return next(err);
}
res.render('admin/users', {
search_display: 'none',
search_display: 'hidden',
loadmore_display: 'block',
users: users,
yourid: req.user.uid

@ -34,7 +34,7 @@ usersController.getOnlineUsers = function(req, res, next) {
var anonymousUserCount = websockets.getOnlineAnonCount();
var userData = {
search_display: 'none',
search_display: 'hidden',
loadmore_display: results.count > 50 ? 'block' : 'hide',
users: results.users,
anonymousUserCount: anonymousUserCount,
@ -74,7 +74,7 @@ function getUsers(set, res, next) {
});
var userData = {
search_display: 'none',
search_display: 'hidden',
loadmore_display: results.count > 50 ? 'block' : 'hide',
users: results.users,
show_anon: 'hide'
@ -87,7 +87,7 @@ function getUsers(set, res, next) {
usersController.getUsersForSearch = function(req, res, next) {
var data = {
search_display: 'block',
loadmore_display: 'none',
loadmore_display: 'hidden',
users: [],
show_anon: 'hide'
};

@ -29,12 +29,12 @@
<div class="search {search_display} well">
<input class="form-control" id="search-user" type="text" placeholder="Enter a username to search"/><br />
<i class="fa fa-spinner fa-spin none"></i>
<i class="fa fa-spinner fa-spin hidden"></i>
<span id="user-notfound-notify" class="label label-danger hide">User not found!</span><br/>
</div>
<ul id="users-container" class="users admin">
<ul id="users-container" class="users">
<!-- BEGIN users -->
<div class="users-box" data-uid="{users.uid}" data-username="{users.username}">

Loading…
Cancel
Save