mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 15:41:20 +02:00
- Added sorting capabilities to file metadata lists, including SortBy and SortDir fields. - Integrated a toast notification system for user feedback on actions. - Updated templates and JavaScript for improved user interaction and responsiveness. - Refactored file metadata handlers to utilize new sorting features and ensure proper data flow. - Introduced new notification dialog components for better user confirmation on actions.
20 lines
877 B
Templ
20 lines
877 B
Templ
package dialog
|
|
|
|
// DialogScripts provides the JavaScript function specific to the notification delete confirmation dialog.
|
|
templ DialogScripts() {
|
|
<script type="text/javascript">
|
|
// Called when the delete confirmation button is clicked.
|
|
// Primarily closes the modal; the actual delete is handled by hx-delete.
|
|
function triggerServiceDelete(dialogId, serviceId, serviceName) {
|
|
console.log(`Confirmed delete for service: ${serviceName} (ID: ${serviceId}). Closing modal: ${dialogId}`);
|
|
// Call the global closeModal function defined elsewhere (e.g., app.js)
|
|
if (typeof closeModal === 'function') {
|
|
closeModal(dialogId);
|
|
} else {
|
|
console.error('Global closeModal function not found.');
|
|
}
|
|
// Optional: Show a "Deleting..." toast here if desired.
|
|
// The hx-delete attribute on the button will trigger the actual backend request.
|
|
}
|
|
</script>
|
|
} |