| Server IP : 172.67.168.138 / Your IP : 216.73.216.227 [ Web Server : Apache System : Linux frog 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web13 ( 5017) PHP Version : 8.3.31 Disable Function : NONE Domains : 41 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/clients/client12/web13/web/ahelos/resources/backend/js/ |
Upload File : |
if (checkIfExists('#category-form')) {
$('#type').on('change', function(){
var value = $('#type option:selected').val();
if (value == 1) {
$('.parent-categories-box').removeClass('d-none');
$('.icon-group').addClass('d-none');
}else{
$('.parent-categories-box').addClass('d-none');
$('.icon-group').removeClass('d-none');
}
}).change();
}
if (checkIfExists("#category-index")) {
$(document).on("change", "[name=type]", function(){
if ($(this).val() == 1) {
$(".parent-group").removeClass('d-none')
}else {
$("[name=parent_id] option:first").prop('selected', true)
$(".parent-group").addClass('d-none')
}
})
$(".sortable").sortable({
stop: function(){
var ids = [];
$('.ui-sortable-handle').each(function(){
ids.push($(this).attr('id'))
// var id = $(this).attr('id');
// if (ids == '') {
// ids = id;
// }else{
// ids = ids + ',' + id;
// }
});
var token = $("input[name=_token]").val()
var data = {
ids: ids,
_token: token
}
$.ajax({
url: "/admin/order-categories",
data: data,
dataType: "json",
type: "post",
success: function(data){
console.log(data);
}
})
}
})
$(".order").on("keyup", function(){
var sort = $(this).val()
var id = $(this).data('id')
var token = $("input[name=_token]").val()
var data = {
sort: sort,
id: id,
_token: token
}
$.ajax({
url: "/admin/order-categories",
data: data,
dataType: "json",
type: "post",
success: function(data){
console.log(data);
}
})
})
}