* Restore code.
This commit is contained in:
@@ -1274,7 +1274,7 @@ function handleSortCards(event)
|
||||
orders.splice(orders.indexOf(fromID), 1);
|
||||
orders.splice(orders.indexOf(toID) + (event.insert === 'before' ? 0 : 1), 0, fromID);
|
||||
|
||||
var url = createLink('kanban', 'sortCard', 'kanbanID=' + executionID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',') + '&cardID=' + toID);
|
||||
var url = createLink('kanban', 'sortCard', 'kanbanID=' + executionID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(','));
|
||||
$.getJSON(url, function(response)
|
||||
{
|
||||
if(response.result === 'fail')
|
||||
|
||||
@@ -1109,7 +1109,7 @@ function handleSortCards(event)
|
||||
orders.splice(orders.indexOf(fromID), 1);
|
||||
orders.splice(orders.indexOf(toID) + (event.insert === 'before' ? 0 : 1), 0, fromID);
|
||||
|
||||
var url = createLink('kanban', 'sortCard', 'kanbanID=' + executionID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',') + '&cardID=' + toID);
|
||||
var url = createLink('kanban', 'sortCard', 'kanbanID=' + executionID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(','));
|
||||
$.getJSON(url, function(response)
|
||||
{
|
||||
if(response.result === 'fail')
|
||||
|
||||
@@ -1299,20 +1299,13 @@ class kanban extends control
|
||||
* @param int $laneID
|
||||
* @param int $columnID
|
||||
* @param string $cards
|
||||
* @param int $cardID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function sortCard($kanbanID, $laneID, $columnID, $cards = '', $cardID = 0)
|
||||
public function sortCard($kanbanID, $laneID, $columnID, $cards = '')
|
||||
{
|
||||
if(empty($cards)) return;
|
||||
|
||||
if($cardID)
|
||||
{
|
||||
$fromCell = $this->dao->select('cards, lane, column')->from(TABLE_KANBANCELL)->where('cards')->like("%,$cardID,%")->fetch();
|
||||
if($fromCell->lane != $laneID or $fromCell->column != $columnID) return;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_KANBANCELL)->set('cards')->eq(",$cards,")->where('kanban')->eq($kanbanID)->andWhere('lane')->eq($laneID)->andWhere('`column`')->eq($columnID)->exec();
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
Reference in New Issue
Block a user