|
|
|
@ -3,7 +3,7 @@ |
|
|
|
|
|
|
|
<div class="upload-container"> |
|
|
|
<!-- Loading Overlay --> |
|
|
|
<div class="upload-overlay htmx-indicator"> |
|
|
|
<div class="removal-overlay htmx-indicator"> |
|
|
|
<div class="upload-overlay-content"> |
|
|
|
<div class="overlay-spinner"></div> |
|
|
|
<h3>Removing Documents</h3> |
|
|
|
@ -32,7 +32,7 @@ |
|
|
|
|
|
|
|
<div id="bulk-removal-tab" style="display: none;"> |
|
|
|
<form id="bulk-remove-form" hx-post="/documents/remove/bulk" hx-target="#removal-results" |
|
|
|
hx-indicator=".upload-overlay"> |
|
|
|
hx-indicator=".removal-overlay"> |
|
|
|
<div class="form-group"> |
|
|
|
<label>Document Types to Remove:</label> |
|
|
|
<div class="checkbox-group"> |
|
|
|
@ -160,13 +160,13 @@ |
|
|
|
document.querySelectorAll('form').forEach(form => { |
|
|
|
form.addEventListener('htmx:beforeRequest', function (evt) { |
|
|
|
if (evt.detail.pathInfo.requestPath.includes('/documents/remove')) { |
|
|
|
document.querySelector('.upload-overlay').style.display = 'flex'; |
|
|
|
document.querySelector('.removal-overlay').style.display = 'flex'; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
form.addEventListener('htmx:afterRequest', function (evt) { |
|
|
|
if (evt.detail.pathInfo.requestPath.includes('/documents/remove')) { |
|
|
|
document.querySelector('.upload-overlay').style.display = 'none'; |
|
|
|
document.querySelector('.removal-overlay').style.display = 'none'; |
|
|
|
|
|
|
|
// If it's a removal action and successful, show step 3 and restart section |
|
|
|
if (evt.detail.successful && |
|
|
|
@ -179,7 +179,7 @@ |
|
|
|
}); |
|
|
|
|
|
|
|
form.addEventListener('htmx:error', function (evt) { |
|
|
|
document.querySelector('.upload-overlay').style.display = 'none'; |
|
|
|
document.querySelector('.removal-overlay').style.display = 'none'; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|