Do not refresh the whole page when changing subtask status (work in progress)

This commit is contained in:
Frederic Guillot
2016-02-04 21:38:53 -05:00
parent 346151e103
commit 0f2b46dd6a
21 changed files with 243 additions and 254 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Kanboard\Controller;
/**
* Subtask Status
*
* @package controller
* @author Frederic Guillot
*/
class SubtaskStatus extends Base
{
/**
* Change status to the next status: Toto -> In Progress -> Done
*
* @access public
*/
public function change()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$status = $this->subtask->toggleStatus($subtask['id']);
$subtask['status'] = $status;
$this->response->html($this->helper->subtask->toggleStatus($subtask, $task['project_id']));
}
}