test

dotx

1632816000ArbZG

2 MB15.09.2021
dotx

1632816000G37

2 MB15.09.2021
dotx

1632297600G25

2 MB15.09.2021
dotx

1632297600G25

2 MB15.09.2021
dotx

1631520000G25

2 MB15.09.2021

'); printWindow.document.close(); printWindow.focus(); setTimeout(function() { printWindow.print(); }, 250); } else { alert(response.data.message || 'Invalid code or verification failed.'); } $btn.prop('disabled', false).css('opacity', '1'); }, error: function() { alert('Request failed. Please try again.'); $btn.prop('disabled', false).css('opacity', '1'); } }); }); // DELETE FILE BUTTON $(document).on('click', '.wah-btn-delete', function(e) { e.preventDefault(); e.stopPropagation(); var $btn = $(this); var fileId = $btn.data('file-id'); var $box = $btn.closest('.wah-file-box'); var fileName = $box.find('.wah-file-title').text().trim() || 'this file'; console.log('[WAH Buttons] Delete file:', fileId, fileName); if (!confirm('Are you sure you want to delete "' + fileName + '"?\n\nThis action cannot be undone.')) { return; } $btn.prop('disabled', true).css('opacity', '0.5'); if ($box.length) { $box.css('opacity', '0.5'); } $.ajax({ url: ajaxUrl, type: 'POST', cache: false, data: { action: 'wah_delete_file', nonce: '551ad8e7b5', file_id: fileId, _: new Date().getTime() }, success: function(response) { if (response.success) { if ($box.length) { $box.slideUp(300, function() { $(this).remove(); }); } alert(response.data.message || 'File deleted successfully'); } else { $btn.prop('disabled', false).css('opacity', '1'); if ($box.length) { $box.css('opacity', '1'); } alert(response.data.message || 'Failed to delete file'); } }, error: function() { $btn.prop('disabled', false).css('opacity', '1'); if ($box.length) { $box.css('opacity', '1'); } alert('Network error. Please try again.'); } }); }); }); })(jQuery);