initial commit

This commit is contained in:
jan.skoda
2024-01-10 12:26:54 +01:00
commit c65052e5c4
62 changed files with 4307 additions and 0 deletions

37
admin/js/categories.js Executable file
View File

@@ -0,0 +1,37 @@
$(document).ready(function(){
var categoryData = $('#categoryList').DataTable({
"lengthChange": false,
"processing":true,
"serverSide":true,
"order":[],
"ajax":{
url:"manage_categories.php",
type:"POST",
data:{action:'categoryListing'},
dataType:"json"
},
"columnDefs":[
{
"targets":[0, 2, 3],
"orderable":false,
},
],
"pageLength": 10
});
$(document).on('click', '.delete', function(){
var categoryId = $(this).attr("id");
var action = "categoryDelete";
if(confirm("Are you sure you want to delete this category?")) {
$.ajax({
url:"manage_categories.php",
method:"POST",
data:{categoryId:categoryId, action:action},
success:function(data) {
categoryData.ajax.reload();
}
})
} else {
return false;
}
});
});