* Finish task #55675.

This commit is contained in:
tianshujie
2022-06-01 13:50:53 +08:00
parent b076635c79
commit 7a70ae8481
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -3692,7 +3692,7 @@ class execution extends control
}
$moduleName = 'execution';
if(empty($param)) $param = "executionID=$executionID";
if(empty($param)) $param = "executionID=$executionID";
if(!empty($param)) $param = str_replace(array(',', ' '), array('&', ''), $param);
if($execution->type == 'project')
{
+6 -3
View File
@@ -778,6 +778,8 @@ function renderLaneName($lane, lane, $kanban, columns, kanban)
*/
function updateRegion(regionID, regionData = [])
{
if(groupBy != 'default') regionID = executionID;
if(!regionID) return false;
var $region = $('#kanban'+ regionID).kanban();
@@ -819,7 +821,7 @@ function handleDropTask($element, event, kanban)
var cardID = $card.data().id;
var fromColType = $oldCol.data('type');
var toColType = $newCol.data('type');
var regionID = groupBy == 'default' ? $card.closest('.region').data().id : executionID;
var regionID = $card.closest('.region').data().id;
changeCardColType(cardID, oldCol.id, newCol.id, oldLane.id, newLane.id, cardType, fromColType, toColType, regionID);
}
@@ -860,6 +862,8 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
var showIframe = false;
var moveCard = false;
regionID = regionID ? regionID : 0;
/* Task lane. */
if(cardType == 'task')
{
@@ -1037,8 +1041,7 @@ function deleteCard(objectType, objectID, regionID)
url: url,
success: function(data)
{
data = groupBy == 'default' ? data[regionID] : data[groupBy];
regionID = groupBy == 'default' ? regionID : executionID;
data = groupBy == 'default' ? data[regionID] : data[groupBy];
updateRegion(regionID, data);
}
});
+1 -1
View File
@@ -1592,9 +1592,9 @@ class kanban extends control
if($from == 'RDKanban')
{
if(dao::isError()) return $this->sendError(dao::getError());
$regionID = $column->region;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$regionID = $execGroupBy == 'default' ? $column->region : 0;
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $execLaneType, 'id_desc', $regionID, $execGroupBy);
$kanbanData = json_encode($kanbanData);
+1 -1
View File
@@ -992,7 +992,7 @@ class task extends control
$execution = $this->execution->getByID($task->execution);
if($execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
$regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy);