* Finish batchcreatecard page.
This commit is contained in:
+10
-10
@@ -495,10 +495,9 @@ class kanban extends control
|
||||
$actionID = $this->action->create('kanbanregion', $regionID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
$region = $this->kanban->getRegionByID($regionID);
|
||||
$kanbanData = $this->kanban->getKanbanData($region->kanban, array($regionID));
|
||||
$kanbanData = reset($kanbanData);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => array('name' => 'updateKanbanRegion', 'params' => array('region' . $regionID, $kanbanData))));
|
||||
$region = $this->kanban->getRegionByID($regionID);
|
||||
$callback = $this->kanban->getKanbanCallback($region->kanban, $regionID);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => $callback));
|
||||
}
|
||||
|
||||
$this->view->region = $this->kanban->getRegionByID($regionID);
|
||||
@@ -590,9 +589,8 @@ class kanban extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, $regionID)"));
|
||||
}
|
||||
|
||||
$kanbanData = $this->kanban->getKanbanData($kanbanID, $regionID);
|
||||
$kanbanData = reset($kanbanData);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => array('name' => 'updateKanbanRegion', 'params' => array('region' . $regionID, $kanbanData))));
|
||||
$callback = $this->kanban->getKanbanCallback($kanbanID, $regionID);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => $callback));
|
||||
}
|
||||
|
||||
$this->view->lanes = $this->kanban->getLanePairsByRegion($regionID, $from == 'kanban' ? 'all' : 'story');
|
||||
@@ -894,8 +892,8 @@ class kanban extends control
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('kanbancard', $cardID, 'created');
|
||||
|
||||
$kanbanGroup = $this->kanban->getKanbanData($kanbanID, $regionID);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => array('target' => 'parent', 'name' => 'updateRegion', 'params' => array($regionID, $kanbanGroup))));
|
||||
$callback = $this->kanban->getKanbanCallback($kanbanID, $regionID);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => $callback));
|
||||
}
|
||||
|
||||
$kanban = $this->kanban->getById($kanbanID);
|
||||
@@ -927,7 +925,9 @@ class kanban extends control
|
||||
{
|
||||
$this->kanban->batchCreateCard($kanbanID, $regionID, $groupID, $columnID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => 'back'));
|
||||
|
||||
$callback = $this->kanban->getKanbanCallback($kanbanID, $regionID);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => $callback));
|
||||
}
|
||||
|
||||
$kanbanUsers = $kanbanID == 0 ? ',' : trim($kanban->owner) . ',' . trim($kanban->team);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.panel-body>.form-batch {margin-top: 0;}
|
||||
@@ -66,7 +66,7 @@ window.buildColCardActions = function(col)
|
||||
let actions = [];
|
||||
|
||||
if(col.actionList.includes('createCard')) actions.push({text: kanbanLang.createCard, url: $.createLink('kanban', 'createCard', `kanbanID=${kanbanID}®inID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal'});
|
||||
if(col.actionList.includes('batchCreateCard')) actions.push({text: kanbanLang.batchCreateCard, url: $.createLink('kanban', 'batchCreateCard', `kanbanID=${kanbanID}®inID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal'});
|
||||
if(col.actionList.includes('batchCreateCard')) actions.push({text: kanbanLang.batchCreateCard, url: $.createLink('kanban', 'batchCreateCard', `kanbanID=${kanbanID}®inID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal', 'data-size': 'lg'});
|
||||
if(kanban.object.indexOf('cards') != -1) actions.push({text: kanbanLang.importCard, url: $.createLink('kanban', 'importCard', `kanbanID=${kanbanID}®ionID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal'});
|
||||
if(kanban.object && kanban.object != 'cards' && vision != 'lite')
|
||||
{
|
||||
|
||||
+17
-1
@@ -753,7 +753,7 @@ class kanbanModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getKanbanData($kanbanID, $regionIDList = '')
|
||||
public function getKanbanData($kanbanID, $regionIDList = '', $groupID = 0)
|
||||
{
|
||||
$regions = $this->getRegionPairs($kanbanID);
|
||||
|
||||
@@ -4096,4 +4096,20 @@ class kanbanModel extends model
|
||||
if(!preg_match("/^-?\d+$/", $count) or $count <= DEFAULT_CARDCOUNT or $count > MAX_CARDCOUNT) dao::$errors['displayCards'] = $this->lang->kanbanlane->error->mustBeInt;
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取看板动态刷新的回调函数数组。
|
||||
* Get kanban callback data.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getKanbanCallback($kanbanID, $regionID)
|
||||
{
|
||||
$kanbanData = $this->getKanbanData($kanbanID, $regionID);
|
||||
$kanbanData = reset($kanbanData);
|
||||
return array('name' => 'updateKanbanRegion', 'params' => array('region' . $regionID, $kanbanData));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,15 +12,13 @@ namespace zin;
|
||||
modalHeader(set::title($lang->kanban->batchCreateCard), set::titleClass('article-h1'));
|
||||
|
||||
$items = array();
|
||||
$items[] = array('name' => 'id', 'label' => $lang->idAB, 'control' => 'index', 'width' => '32px');
|
||||
$items[] = array('name' => 'name', 'label' => $lang->kanbancard->name, 'control' => 'input', 'width' => '240px', 'required' => true);
|
||||
$items[] = array('name' => 'lane', 'label' => $lang->kanbancard->lane, 'control' => 'picker', 'width' => 'auto', 'items' => $lanePairs, 'ditto' => true);
|
||||
$items[] = array('name' => 'assignedTo', 'label' => $lang->kanbancard->assignedTo, 'control' => 'picker', 'width' => 'auto', 'items' => $users, 'value' => $app->user->account);
|
||||
$items[] = array('name' => 'estimate', 'label' => $lang->kanbancard->estimate, 'control' => 'input', 'width' => '80px');
|
||||
$items[] = array('name' => 'name', 'label' => $lang->kanbancard->name, 'control' => 'input', 'width' => '180px', 'required' => true);
|
||||
$items[] = array('name' => 'lane', 'label' => $lang->kanbancard->lane, 'control' => 'picker', 'width' => '160px', 'items' => $lanePairs, 'ditto' => true, 'required' => true);
|
||||
$items[] = array('name' => 'assignedTo', 'label' => $lang->kanbancard->assignedTo, 'control' => 'picker', 'width' => 'auto', 'multiple' => true, 'items' => $users, 'value' => $app->user->account);
|
||||
$items[] = array('name' => 'estimate', 'label' => $lang->kanbancard->estimate, 'control' => 'input', 'width' => '60px');
|
||||
$items[] = array('name' => 'begin', 'label' => $lang->kanbancard->begin, 'control' => 'datePicker', 'width' => '160px', 'ditto' => true);
|
||||
$items[] = array('name' => 'end', 'label' => $lang->kanbancard->end, 'control' => 'datePicker', 'width' => '160px', 'ditto' => true);
|
||||
$items[] = array('name' => 'desc', 'label' => $lang->kanbancard->desc, 'control' => 'input', 'width' => '240px');
|
||||
$items[] = array('name' => 'pri', 'label' => $lang->kanbancard->pri, 'control' => 'priPicker', 'width' => '120px', 'items' => $lang->kanbancard->priList, 'value' => '3');
|
||||
$items[] = array('name' => 'pri', 'label' => $lang->kanbancard->pri, 'control' => 'priPicker', 'width' => '60px', 'items' => $lang->kanbancard->priList, 'value' => '3');
|
||||
|
||||
formBatchPanel
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user