- Delete the privilege of kanban-laneMove.
This commit is contained in:
@@ -999,10 +999,6 @@ function createLaneMenu(options)
|
||||
|
||||
var items = [];
|
||||
if(priv.canSetLane) items.push({label: kanbanLang.setLane, icon: 'edit', url: $.createLink('kanban', 'setLane', 'lane=' + lane.laneID + '&executionID=' + executionID + '&from=execution'), className: 'iframe'});
|
||||
if(priv.canMoveLane) items.push(
|
||||
{label: kanbanLang.moveUp, icon: 'arrow-up', url: $.createLink('kanban', 'laneMove', 'executionID=' + executionID + '¤tLane=' + lane.id + '&targetLane=' + upTargetKanban), className: 'iframe', disabled: !$kanban.prev('.kanban').length},
|
||||
{label: kanbanLang.moveDown, icon: 'arrow-down', url: $.createLink('kanban', 'laneMove', 'executionID=' + executionID + '¤tLane=' + lane.id + '&targetLane=' + downTargetKanban), className: 'iframe', disabled: !$kanban.next('.kanban').length}
|
||||
);
|
||||
|
||||
var bounds = options.$trigger[0].getBoundingClientRect();
|
||||
items.$options = {x: bounds.right, y: bounds.top};
|
||||
|
||||
@@ -189,7 +189,6 @@ js::set('priv',
|
||||
'canEditName' => common::hasPriv('kanban', 'setColumn'),
|
||||
'canSetWIP' => common::hasPriv('kanban', 'setWIP'),
|
||||
'canSetLane' => common::hasPriv('kanban', 'setLane'),
|
||||
'canMoveLane' => common::hasPriv('kanban', 'laneMove'),
|
||||
'canSortCards' => common::hasPriv('kanban', 'cardsSort'),
|
||||
'canCreateTask' => $canCreateTask,
|
||||
'canBatchCreateTask' => $canBatchCreateTask,
|
||||
|
||||
@@ -737,7 +737,6 @@ $lang->resource->kanban->assigntoCard = 'assigntoCard';
|
||||
$lang->resource->kanban->deleteCard = 'deleteCard';
|
||||
$lang->resource->kanban->moveCard = 'moveCard';
|
||||
$lang->resource->kanban->setCardColor = 'setCardColor';
|
||||
$lang->resource->kanban->laneMove = 'laneMove';
|
||||
$lang->resource->kanban->viewArchivedColumn = 'viewArchivedColumn';
|
||||
$lang->resource->kanban->viewArchivedCard = 'viewArchivedCard';
|
||||
$lang->resource->kanban->restoreCard = 'restoreCard';
|
||||
@@ -779,7 +778,6 @@ $lang->kanban->methodOrder[165] = 'deleteCard';
|
||||
$lang->kanban->methodOrder[170] = 'assigntoCard';
|
||||
$lang->kanban->methodOrder[175] = 'moveCard';
|
||||
$lang->kanban->methodOrder[180] = 'setCardColor';
|
||||
$lang->kanban->methodOrder[185] = 'laneMove';
|
||||
$lang->kanban->methodorder[190] = 'cardsSort';
|
||||
$lang->kanban->methodOrder[195] = 'viewArchivedColumn';
|
||||
$lang->kanban->methodorder[200] = 'viewArchivedCard';
|
||||
|
||||
@@ -1923,30 +1923,6 @@ class kanban extends control
|
||||
echo json_encode($kanbanGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the order through the lane move up and down.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $currentType
|
||||
* @param string $targetType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function laneMove($executionID, $currentType, $targetType)
|
||||
{
|
||||
if(empty($targetType)) return false;
|
||||
|
||||
$this->kanban->updateLaneOrder($executionID, $currentType, $targetType);
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$laneID = $this->dao->select('id')->from(TABLE_KANBANLANE)->where('execution')->eq($executionID)->andWhere('type')->eq($currentType)->fetch('id');
|
||||
$this->loadModel('action')->create('kanbanlane', $laneID, 'Moved');
|
||||
}
|
||||
|
||||
echo js::locate($this->createLink('execution', 'kanban', 'executionID=' . $executionID . '&type=all'), 'parent');
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get contact users.
|
||||
*
|
||||
|
||||
@@ -196,7 +196,6 @@ $lang->kanban->columnName = 'Column Name';
|
||||
$lang->kanban->columnColor = 'Column Color';
|
||||
$lang->kanban->moveUp = 'Swimlane Up';
|
||||
$lang->kanban->moveDown = 'Swimlane Down';
|
||||
$lang->kanban->laneMove = 'Swimlane Move';
|
||||
$lang->kanban->laneGroup = 'Lane Group';
|
||||
$lang->kanban->cardsSort = 'Cards Sortting';
|
||||
$lang->kanban->more = 'More';
|
||||
|
||||
@@ -196,7 +196,6 @@ $lang->kanban->columnName = 'Column Name';
|
||||
$lang->kanban->columnColor = 'Column Color';
|
||||
$lang->kanban->moveUp = 'Swimlane Up';
|
||||
$lang->kanban->moveDown = 'Swimlane Down';
|
||||
$lang->kanban->laneMove = 'Swimlane Move';
|
||||
$lang->kanban->laneGroup = 'Lane Group';
|
||||
$lang->kanban->cardsSort = 'Cards Sortting';
|
||||
$lang->kanban->more = 'More';
|
||||
|
||||
@@ -196,7 +196,6 @@ $lang->kanban->columnName = 'Column Name';
|
||||
$lang->kanban->columnColor = 'Column Color';
|
||||
$lang->kanban->moveUp = 'Swimlane Up';
|
||||
$lang->kanban->moveDown = 'Swimlane Down';
|
||||
$lang->kanban->laneMove = 'Swimlane Move';
|
||||
$lang->kanban->laneGroup = 'Lane Group';
|
||||
$lang->kanban->cardsSort = 'Cards Sortting';
|
||||
$lang->kanban->more = 'More';
|
||||
|
||||
@@ -196,7 +196,6 @@ $lang->kanban->columnName = '看板列名称';
|
||||
$lang->kanban->columnColor = '看板列颜色';
|
||||
$lang->kanban->moveUp = '泳道上移';
|
||||
$lang->kanban->moveDown = '泳道下移';
|
||||
$lang->kanban->laneMove = '泳道移动';
|
||||
$lang->kanban->laneGroup = '泳道分组';
|
||||
$lang->kanban->cardsSort = '卡片排序';
|
||||
$lang->kanban->more = '更多';
|
||||
|
||||
@@ -3050,33 +3050,6 @@ class kanbanModel extends model
|
||||
return $changes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the order through the lane move up and down.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $currentType
|
||||
* @param string $targetType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateLaneOrder($executionID, $currentType, $targetType)
|
||||
{
|
||||
$orderList = $this->dao->select('id,type,`order`')->from(TABLE_KANBANLANE)
|
||||
->where('execution')->eq($executionID)
|
||||
->andWhere('type')->in(array($currentType, $targetType))
|
||||
->andWhere('groupby')->eq('')
|
||||
->fetchAll('type');
|
||||
|
||||
$this->dao->update(TABLE_KANBANLANE)->set('`order`')->eq($orderList[$targetType]->order)
|
||||
->where('id')->eq($orderList[$currentType]->id)
|
||||
->andWhere('groupby')->eq('')
|
||||
->exec();
|
||||
|
||||
$this->dao->update(TABLE_KANBANLANE)->set('`order`')->eq($orderList[$currentType]->order)
|
||||
->where('id')->eq($orderList[$targetType]->id)
|
||||
->andWhere('groupby')->eq('')
|
||||
->exec();
|
||||
}
|
||||
/**
|
||||
* Activate a card.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user