improve adminpanel w/ ajax, enum fixes, misc fixes
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
window.onload = function() {
|
||||
$(window).on("load", function () {
|
||||
changeFilter();
|
||||
};
|
||||
$(".admin-searchinput").keyup(function(){
|
||||
adminSearch();
|
||||
});
|
||||
// all inputs and labels directly under admin filter and groupfilter
|
||||
$("#admin-filter, #admin-groupfilter > input, label").click(function(){
|
||||
adminSearch();
|
||||
});
|
||||
$("#pagetype").change(function(){
|
||||
adminSearch();
|
||||
});
|
||||
|
||||
adminSearch();
|
||||
});
|
||||
|
||||
function checkAll(allbox) {
|
||||
var checkboxes = document.getElementsByClassName('checkbox-list');
|
||||
@@ -32,13 +44,32 @@ function changeFilter() {
|
||||
document.getElementById('admin-filter').style.display = 'none';
|
||||
document.getElementById('admin-groupfilter').style.display = 'inline-block';
|
||||
|
||||
document.getElementById('admin-batchactions').style.display = 'none';
|
||||
document.getElementById('admin-groupbatchactions').style.display = 'inline-block';
|
||||
document.getElementById('admin-batchform').style.display = 'none';
|
||||
document.getElementById('admin-groupbatchform').style.display = 'inline-block';
|
||||
} else {
|
||||
document.getElementById('admin-filter').style.display = 'inline-block';
|
||||
document.getElementById('admin-groupfilter').style.display = 'none';
|
||||
|
||||
document.getElementById('admin-batchactions').style.display = 'inline-block';
|
||||
document.getElementById('admin-groupbatchactions').style.display = 'none';
|
||||
document.getElementById('admin-batchform').style.display = 'inline-block';
|
||||
document.getElementById('admin-groupbatchform').style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function adminSearch() {
|
||||
$.post(
|
||||
"API/adminSearchUsers.php",
|
||||
$("#admin-searchform").serialize()
|
||||
).done(function (data) {
|
||||
console.log(data);
|
||||
$("#usertable").html(data);
|
||||
})
|
||||
}
|
||||
|
||||
function updatePageN() {
|
||||
$.post(
|
||||
"API/adminPageNumber.php",
|
||||
$("#admin-searchform").serialize()
|
||||
).done(function (data) {
|
||||
$("#admin-pageinfo").html(data);
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user