From c8c1242c26a11dc2abc7126829d76430612e7107 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 20 Feb 2016 11:24:43 -0500 Subject: Add drag and drop to change column positions --- app/Model/Subtask.php | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'app/Model/Subtask.php') diff --git a/app/Model/Subtask.php b/app/Model/Subtask.php index 3707af13..b5898fcf 100644 --- a/app/Model/Subtask.php +++ b/app/Model/Subtask.php @@ -262,27 +262,6 @@ class Subtask extends Base return $this->db->table(self::TABLE)->eq('task_id', $task_id)->update(array('status' => self::STATUS_DONE)); } - /** - * Get subtasks with consecutive positions - * - * If you remove a subtask, the positions are not anymore consecutives - * - * @access public - * @param integer $task_id - * @return array - */ - public function getNormalizedPositions($task_id) - { - $subtasks = $this->db->hashtable(self::TABLE)->eq('task_id', $task_id)->asc('position')->getAll('id', 'position'); - $position = 1; - - foreach ($subtasks as $subtask_id => $subtask_position) { - $subtasks[$subtask_id] = $position++; - } - - return $subtasks; - } - /** * Save subtask position * -- cgit v1.2.3