From 5fe68d4d499a8496229763369b50d71c9fa16200 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 20 Feb 2016 18:11:08 -0500 Subject: Add drag and drop to change swimlane positions --- app/Api/Swimlane.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'app/Api') diff --git a/app/Api/Swimlane.php b/app/Api/Swimlane.php index 84c699ab..03a2819f 100644 --- a/app/Api/Swimlane.php +++ b/app/Api/Swimlane.php @@ -48,9 +48,11 @@ class Swimlane extends \Kanboard\Core\Base public function updateSwimlane($swimlane_id, $name, $description = null) { $values = array('id' => $swimlane_id, 'name' => $name); + if (!is_null($description)) { $values['description'] = $description; } + return $this->swimlane->update($values); } @@ -69,13 +71,8 @@ class Swimlane extends \Kanboard\Core\Base return $this->swimlane->enable($project_id, $swimlane_id); } - public function moveSwimlaneUp($project_id, $swimlane_id) - { - return $this->swimlane->moveUp($project_id, $swimlane_id); - } - - public function moveSwimlaneDown($project_id, $swimlane_id) + public function changeSwimlanePosition($project_id, $swimlane_id, $position) { - return $this->swimlane->moveDown($project_id, $swimlane_id); + return $this->swimlane->changePosition($project_id, $swimlane_id, $position); } } -- cgit v1.2.3