Merge branch 'sprint/182_tianshujie_18496' into 'kanban'

* Fix bug.

See merge request easycorp/zentaopms!1428
This commit is contained in:
孙广明
2022-01-17 02:27:20 +00:00
5 changed files with 10 additions and 7 deletions

View File

@@ -172,9 +172,10 @@ function createColumnMenu(options)
*/ */
function createColumnCreateMenu(options) function createColumnCreateMenu(options)
{ {
var $col = options.$trigger.closest('.kanban-col'); var $col = options.$trigger.closest('.kanban-col');
var col = $col.data('col'); var col = $col.data('col');
var items = []; var items = [];
var laneID = col.$kanbanData.lanes[0].id ? col.$kanbanData.lanes[0].id : 0;
if(col.type == 'backlog') if(col.type == 'backlog')
{ {
@@ -190,7 +191,7 @@ function createColumnCreateMenu(options)
} }
else if(col.type == 'wait') else if(col.type == 'wait')
{ {
if(priv.canCreateTask) items.push({label: taskLang.create, url: $.createLink('task', 'create', 'executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canCreateTask) items.push({label: taskLang.create, url: $.createLink('task', 'create', 'executionID=' + executionID + "&storyID=0&moduleID=0&taskID=0&todoID=0&extra=laneID=" + laneID + ",columnID=" + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canBatchCreateTask) items.push({label: taskLang.batchCreate, url: $.createLink('task', 'batchcreate', 'executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canBatchCreateTask) items.push({label: taskLang.batchCreate, url: $.createLink('task', 'batchcreate', 'executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
} }
return items; return items;

View File

@@ -1526,7 +1526,7 @@ class kanbanModel extends model
->add('region', $regionID) ->add('region', $regionID)
->add('order', $maxOrder ? $maxOrder + 1 : 1) ->add('order', $maxOrder ? $maxOrder + 1 : 1)
->add('lastEditedTime', helper::now()) ->add('lastEditedTime', helper::now())
->setIF(isset($this->post->laneType), 'execution', $kanbanID) ->setIF(isset($_POST['laneType']), 'execution', $kanbanID)
->trim('name') ->trim('name')
->setDefault('color', '#7ec5ff') ->setDefault('color', '#7ec5ff')
->remove('laneType') ->remove('laneType')

View File

@@ -1,3 +1,3 @@
.project-type-label.label-outline {width: 50px; min-width: 50px;} .project-type-label.label-outline {width: 50px; min-width: 50px;}
.project-type-label.label {overflow: unset !important; text-overflow: unset !important; white-space: unset !important;} .project-type-label.label {overflow: unset !important; text-overflow: unset !important; white-space: unset !important;}
[lang^='en'] #projectTableList .project-name > .label-warning {width: 55px;} [lang^='en'] .project-name > .label-warning {width: 55px !important;}

View File

@@ -17,4 +17,4 @@ th.c-name {width: 360px !important;}
{ {
th.c-name {width: auto;} th.c-name {width: auto;}
} }
[lang^='en'] #projectTableList .project-name > .label-warning {width: 55px;} [lang^='en'] .project-name > .label-warning {width: 55px !important;}

View File

@@ -106,6 +106,8 @@ class task extends control
return $this->send($response); return $this->send($response);
} }
if(isset($output['laneID']) and isset($output['columnID'])) $this->loadModel('kanban')->addKanbanCell($executionID, $output['laneID'], $output['columnID'], 'task', $taskID);
/* if the count of tasksID is 1 then check exists. */ /* if the count of tasksID is 1 then check exists. */
if(count($tasksID) == 1) if(count($tasksID) == 1)
{ {