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

allow toggle of automated penalties display on the webfront

issue #112
fix small issue with script plugin loading
This commit is contained in:
RaidMax
2020-02-12 13:13:59 -06:00
parent af380d3744
commit 7230654da2
9 changed files with 134 additions and 36 deletions

View File

@ -23,7 +23,11 @@ function loadMorePenalties() {
showLoader();
isLoading = true;
$.get('/Penalty/ListAsync', { offset: offset, showOnly : $('#penalty_filter_selection').val() })
$.get('/Penalty/ListAsync', {
offset: offset,
showOnly: $('#penalty_filter_selection').val(),
hideAutomatedPenalties: document.getElementById('hide_automated_penalties_checkbox').checked
})
.done(function (response) {
$('#penalty_table').append(response);
if (response.trim().length === 0) {
@ -40,9 +44,13 @@ function loadMorePenalties() {
}
if ($('#penalty_table').length === 1) {
$('#penalty_filter_selection').change(function() {
location = location.href.split('?')[0] + "?showOnly=" + $('#penalty_filter_selection').val();
$('#penalty_filter_selection').change(function () {
location = location.href.split('?')[0] + "?showOnly=" + $('#penalty_filter_selection').val() + '&hideAutomatedPenalties=' + document.getElementById('hide_automated_penalties_checkbox').checked;
});
$('#hide_automated_penalties_checkbox').click(function () {
location = location.href.split('?')[0] + "?showOnly=" + $('#penalty_filter_selection').val() + '&hideAutomatedPenalties=' + document.getElementById('hide_automated_penalties_checkbox').checked;
});
/*