Add drag and drop to change swimlane positions

This commit is contained in:
Frederic Guillot
2016-02-20 18:11:08 -05:00
parent da7259819b
commit 5fe68d4d49
41 changed files with 588 additions and 645 deletions

View File

@@ -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)
public function changeSwimlanePosition($project_id, $swimlane_id, $position)
{
return $this->swimlane->moveUp($project_id, $swimlane_id);
}
public function moveSwimlaneDown($project_id, $swimlane_id)
{
return $this->swimlane->moveDown($project_id, $swimlane_id);
return $this->swimlane->changePosition($project_id, $swimlane_id, $position);
}
}