mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-30 00:50:25 -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:
@ -112,7 +112,7 @@ form *, select {
|
||||
border-left: none !important;
|
||||
border-right: none !important;
|
||||
border-bottom: none !important;
|
||||
border-top: 2px solid $blue !important;
|
||||
border-top: 1px solid $text-muted;
|
||||
}
|
||||
|
||||
.oi-fix-navbar {
|
||||
@ -341,3 +341,53 @@ title {
|
||||
color: #ff0000;
|
||||
}
|
||||
}
|
||||
|
||||
.toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin:0;
|
||||
padding: 0;
|
||||
}
|
||||
label.toggle-switch {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.toggle-switch {
|
||||
position: relative;
|
||||
height: calc(1.5em + 0.75rem + 2px);
|
||||
width: 6rem;
|
||||
border: 1px solid $text-muted;
|
||||
}
|
||||
|
||||
.toggle-switch-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: $dark;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
.toggle-switch-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: calc(1.5em + 0.75rem);
|
||||
width: 3em;
|
||||
background-color: $light;
|
||||
-webkit-transition: 0.25s;
|
||||
transition: 0.25s;
|
||||
}
|
||||
|
||||
input:checked + .toggle-switch-slider {
|
||||
background-color: $primary;
|
||||
}
|
||||
|
||||
input:checked + .toggle-switch-slider:before {
|
||||
-webkit-transform: translateX(3em);
|
||||
-ms-transform: translateX(3em);
|
||||
transform: translateX(3em);
|
||||
}
|
||||
|
@ -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