diff --git a/static/js/file-grid.js b/static/js/file-grid.js index a728993..1ea0ddb 100644 --- a/static/js/file-grid.js +++ b/static/js/file-grid.js @@ -704,6 +704,8 @@ window.sortFiles = sortFiles; window.navigateToFile = navigateToFile; window.showEmptyTrashModal = showEmptyTrashModal; window.permanentDeleteFile = permanentDeleteFile; +window.toggleView = toggleView; +window.fetchFiles = fetchFiles; // Initialize search functionality document.addEventListener('DOMContentLoaded', function() { diff --git a/static/js/trash.js b/static/js/trash.js index 6034cc9..827806f 100644 --- a/static/js/trash.js +++ b/static/js/trash.js @@ -58,6 +58,9 @@ window.emptyTrash = function() { // No files to delete, just close the modal const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal')); modal.hide(); + // Remove the backdrop + document.querySelector('.modal-backdrop')?.remove(); + document.body.classList.remove('modal-open'); return Promise.resolve([]); } @@ -90,6 +93,9 @@ window.emptyTrash = function() { // Close the modal const modal = bootstrap.Modal.getInstance(document.getElementById('emptyTrashModal')); modal.hide(); + // Remove the backdrop + document.querySelector('.modal-backdrop')?.remove(); + document.body.classList.remove('modal-open'); // Refresh the view to ensure everything is up to date fetchFiles(); } else {