1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-09 23:00:57 -05:00

finish implementation of per server top stats page

This commit is contained in:
RaidMax
2019-02-27 20:13:15 -06:00
parent 1182b98336
commit 5d3fd30003
8 changed files with 38 additions and 20 deletions

View File

@ -4,11 +4,11 @@ let isLoaderLoading = false;
let loadUri = '';
let loaderResponseId = '';
function initLoader(location, loaderId, count = 10) {
function initLoader(location, loaderId, count = 10, start = count) {
loadUri = location;
loaderResponseId = loaderId;
loadCount = count;
loaderOffset = count;
loaderOffset = start;
setupListeners();
}

View File

@ -74,7 +74,9 @@ $(document).ready(function () {
});
$('.top-players-link').click(function (event) {
initLoader('/Stats/GetTopPlayersAsync?serverId=' + $(this).data('serverid'), $(this).attr('href'), 50);
$($(this).attr('href')).html('');
initLoader('/Stats/GetTopPlayersAsync?serverId=' + $(this).data('serverid'), $(this).attr('href'), 10, 0);
loadMoreItems();
});
});