From 08bdb708e7698c21b0e6fc9f21d19996fc3d593d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 28 Aug 2016 22:30:48 -0400 Subject: Add the possibility to move tasks without drag and drop --- app/Controller/TaskMovePositionController.php | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 app/Controller/TaskMovePositionController.php (limited to 'app/Controller') diff --git a/app/Controller/TaskMovePositionController.php b/app/Controller/TaskMovePositionController.php new file mode 100644 index 00000000..0db742c3 --- /dev/null +++ b/app/Controller/TaskMovePositionController.php @@ -0,0 +1,43 @@ +getTask(); + + $this->response->html($this->template->render('task_move_position/show', array( + 'task' => $task, + 'board' => BoardFormatter::getInstance($this->container) + ->withProjectId($task['project_id']) + ->withQuery($this->taskFinderModel->getExtendedQuery()) + ->format() + ))); + } + + public function save() + { + $task = $this->getTask(); + $values = $this->request->getJson(); + + $result = $this->taskPositionModel->movePosition( + $task['project_id'], + $task['id'], + $values['column_id'], + $values['position'], + $values['swimlane_id'] + ); + + $this->response->json(array('result' => $result)); + } +} -- cgit v1.2.3