Merge branch 'sprint/177_zhengrunyu_45819' into 'kanban'
*Finish task 45822. See merge request easycorp/zentaopms!904
This commit is contained in:
@@ -209,9 +209,10 @@ class kanban extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$laneID = $this->kanban->createLane($kanbanID, $regionID, $lane = null);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'callback' => 'closeModalAndUpdateKanban', 'callback_params' => $regionID));
|
||||
$this->loadModel('action')->create('kanbanLane', $laneID, 'created');
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->lanes = $this->kanban->getLanePairsByRegion($regionID);
|
||||
@@ -235,9 +236,9 @@ class kanban extends control
|
||||
$order = $position == 'left' ? $column->order : $column->order + 1;
|
||||
$columnID = $this->kanban->createColumn($column->region, null, $order);
|
||||
$this->loadModel('action')->create('kanbanColumn', $columnID, 'Created');
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent', 'callback' => 'closeModalAndUpdateKanban', 'callback_params' => $column->region));
|
||||
die(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->kanban->createColumn;
|
||||
|
||||
@@ -826,7 +826,6 @@ class kanbanModel extends model
|
||||
$this->dao->insert(TABLE_KANBANLANE)->data($lane, $skip = 'mode,otherLane')
|
||||
->batchCheck($this->config->kanban->require->createlane, 'notempty')
|
||||
->autoCheck()
|
||||
->checkIF(!empty($lane->name), 'name', 'unique', "`type`='common'")
|
||||
->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
@@ -835,7 +834,7 @@ class kanbanModel extends model
|
||||
|
||||
return $laneID;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Create a kanban.
|
||||
*
|
||||
|
||||
@@ -32,10 +32,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton($lang->cancel);?>
|
||||
<td class='text-center form-actions' colspan='2'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::commonButton($lang->cancel, "data-dismiss='modal'", 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user