From 8d4d53928371b6bbddbeb51f0b7692346f5a8ec7 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Sun, 22 Feb 2026 17:23:54 +0100 Subject: [PATCH] Add inline task title editing in popup --- autoload/controls/class.Tasks.php | 11 ++++ templates/tasks/task_popup.php | 91 ++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 1 deletion(-) diff --git a/autoload/controls/class.Tasks.php b/autoload/controls/class.Tasks.php index 27d45fa..02ef578 100644 --- a/autoload/controls/class.Tasks.php +++ b/autoload/controls/class.Tasks.php @@ -342,6 +342,17 @@ class Tasks exit; } + static public function task_change_title() { + global $mdb; + + if ( $mdb -> update( 'tasks', [ 'name' => \S::get( 'title' ) ], [ 'id' => \S::get( 'task_id' ) ] ) ) { + echo json_encode( [ 'status' => 'success' ] ); + } else { + echo json_encode( [ 'status' => 'error' ] ); + } + exit; + } + static public function task_change_users() { global $mdb, $user; diff --git a/templates/tasks/task_popup.php b/templates/tasks/task_popup.php index 711517d..7bf02ce 100644 --- a/templates/tasks/task_popup.php +++ b/templates/tasks/task_popup.php @@ -9,7 +9,17 @@ - # task['id'];?> task['name'];?> + + # task['id'];?> + task['name'];?> + + + + task['actions'] ) ? count( $this -> task['actions'] ) : 0; @@ -378,6 +388,34 @@ line-height: 1; text-shadow: 0 0 8px rgba(0,0,0,.6); } + + .task_popup .task_details .title .task-title-wrapper { + display: inline-flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + } + .task_popup .task_details .title .task-title-edit-btn { + font-size: 14px; + color: #999; + margin-left: 5px; + opacity: 0.6; + transition: opacity 0.2s; + } + .task_popup .task_details .title .task-title-edit-btn:hover { + opacity: 1; + color: #333; + } + .task_popup .task_details .title .task-title-edit-box { + align-items: center; + gap: 5px; + } + .task_popup .task_details .title .task-title-input { + font-size: 18px; + padding: 4px 8px; + width: 400px; + max-width: 100%; + }