修复"文件保险箱删除仅右侧按钮可用"问题

*应该是从文件管理搬代码到保险箱时多删了点代码
This commit is contained in:
Chenx221 2024-04-11 16:28:58 +08:00
parent 797cf47605
commit b3f7cd6f45
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021

View File

@ -156,6 +156,25 @@ $(document).on('click', 'tr', function (event) {
} }
updateButtons(); updateButtons();
}); });
$(document).on('click', '.batch-delete-btn', function () {
var relativePaths = $('.select-item:checked').map(function () {
return $(this).data('relativePath');
}).get();
$.ajax({
type: "POST",
url: "index.php?r=vault%2Fdelete",
data: {relativePath: relativePaths},
success: function () {
// 处理响应
location.reload();
},
error: function () {
// 处理错误
console.error('AJAX request failed.');
location.reload();
}
});
});
function updateButtons() { function updateButtons() {
var checkboxes = $('.select-item:checked'); var checkboxes = $('.select-item:checked');