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:
@ -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;
|
||||
});
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user