diff --git a/pages/category.html b/pages/category.html
index 7e4a0dc..bd6a49a 100644
--- a/pages/category.html
+++ b/pages/category.html
@@ -48,6 +48,27 @@
+
+
+
+
+
+
+
Text:
+
Created:
+
Due:
+
Completion time:
+
+
+
+
+
+
@@ -107,7 +128,7 @@
{{ range .Todos }}
{{ if not .IsDone }}
-
+
{{ if not .Image }}
|
@@ -143,7 +164,7 @@
{{ range .Todos }}
{{ if .IsDone }}
-
+
{{ if not .Image }}
|
@@ -250,6 +271,24 @@ async function drop(event) {
window.location.reload();
}
+function openTodoModal(id, text, created, due, completionTime, image) {
+ document.getElementById('modalTodoText').innerText = text;
+ document.getElementById('modalTodoCreated').innerText = created;
+ document.getElementById('modalTodoDue').innerText = due;
+ document.getElementById('modalTodoCompletionTime').innerText = completionTime;
+
+ let img = document.getElementById('modalTodoImage');
+ if (img) {
+ img.src = image;
+ img.style.display = 'block';
+ } else {
+ img.style.display = 'none';
+ }
+
+ const todoModal = new bootstrap.Modal(document.getElementById('todoModal'));
+ todoModal.show();
+}
+
document.addEventListener('DOMContentLoaded', async function() {
document.getElementById("newTodoText").focus();