Merge branch 'sprint/206_tianshujie_23958' into 'master'
* Fix bug #23958. See merge request easycorp/zentaopms!4128
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(','));
|
||||
var url = createLink('kanban', 'sortCard', 'kanbanID=' + executionID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',') + '&cardID=' + toID);
|
||||
$.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(','));
|
||||
var url = createLink('kanban', 'sortCard', 'kanbanID=' + executionID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',') + '&cardID=' + toID);
|
||||
$.getJSON(url, function(response)
|
||||
{
|
||||
if(response.result === 'fail')
|
||||
|
||||
@@ -1299,13 +1299,20 @@ 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 = '')
|
||||
public function sortCard($kanbanID, $laneID, $columnID, $cards = '', $cardID = 0)
|
||||
{
|
||||
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()));
|
||||
|
||||
@@ -886,7 +886,6 @@ function finishCard(cardID, kanbanID, regionID)
|
||||
*/
|
||||
function updateRegion(regionID, regionData)
|
||||
{
|
||||
console.log('> updateRegion', {regionID, regionData});
|
||||
if(typeof(regionData) == 'undefined') regionData = [];
|
||||
if(!regionID) return false;
|
||||
|
||||
@@ -1307,7 +1306,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=' + kanbanID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(','));
|
||||
var url = createLink('kanban', 'sortCard', 'kanbanID=' + kanbanID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',') + '&cardID=' + fromID);
|
||||
$.getJSON(url, function(response)
|
||||
{
|
||||
if(response.result === 'fail')
|
||||
|
||||
Reference in New Issue
Block a user