Integrate tooltips and code cleanup/fix bugs, see #166

This commit is contained in:
Frédéric Guillot
2014-11-24 21:32:03 -05:00
parent 5d7cff3526
commit 37c6616e50
20 changed files with 464 additions and 35 deletions

View File

@@ -183,15 +183,9 @@ class Subtask extends Base
public function toggleStatus()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$subtask_id = $this->request->getIntegerParam('subtask_id');
$value = array(
'id' => $subtask['id'],
'status' => ($subtask['status'] + 1) % 3,
'task_id' => $task['id'],
);
if (! $this->subTask->update($value)) {
if (! $this->subTask->toggleStatus($subtask_id)) {
$this->session->flashError(t('Unable to update your sub-task.'));
}