Made webfront optional for decreased ram usage

initialization should be better asynced
clean up publish folder after publish
added chevron hover icon for loading more penalties
added T6M maps to config
This commit is contained in:
RaidMax
2018-04-16 15:31:14 -05:00
parent 2fc2109a2e
commit 9aea9e1c02
19 changed files with 255 additions and 86 deletions

View File

@ -1,16 +1,24 @@
let offset = 15;
let offset = 12;
let isLoading = false;
function loadMorePenalties() {
if (isLoading) {
return false;
}
showLoader();
isLoading = true;
$.get('/Penalty/ListAsync', { offset: offset })
.done(function (response) {
$('#penalty_table').append(response);
hideLoader();
isLoading = false;
})
.fail(function (jqxhr, statis, error) {
errorLoader();
isLoading = false;
});
offset += 15;
offset += 12;
}
if ($('#penalty_table').length === 1) {
@ -37,10 +45,13 @@ if ($('#penalty_table').length === 1) {
var hasScrollBar = false;
$document.ready(function () {
$window
.off('scroll', ScrollHandler)
.on('scroll', ScrollHandler);
$('#load_penalties_button').hover(function () {
loadMorePenalties();
});
});
function ScrollHandler(e) {