status == 'closed' ? 'disabled' : '';?>
- status != 'closed' and $browseType != 'involved') common::printLink('kanban', 'create', "spaceID={$space->id}&type={$space->type}", '
' . $lang->kanban->create, '', "class='iframe' data-width='75%'", '', true);?>
+ status != 'closed' and $browseType != 'involved' and !empty($unclosedSpace)) common::printLink('kanban', 'create', "spaceID={$space->id}&type={$space->type}", '
' . $lang->kanban->create, '', "class='iframe' data-width='75%'", '', true);?>
id}", '
' . $lang->kanban->setting, '', "class='iframe' data-width='75%'", '', true);?>
id}", '
' . $lang->close, '', "class='iframe {$class}'", '', true);?>
id}", '
' . $lang->delete, 'hiddenwin', '', '', true);?>
diff --git a/module/kanban/view/viewcard.html.php b/module/kanban/view/viewcard.html.php
index 7de50aaf78..663f2527ca 100644
--- a/module/kanban/view/viewcard.html.php
+++ b/module/kanban/view/viewcard.html.php
@@ -39,12 +39,19 @@
//common::printLink('kanban', 'assigntoCard', "cardID=$card->id", "
{$lang->kanbancard->assign}", '', "class='btn btn-link iframe' title='{$lang->kanbancard->assign}'", true, true);
if($kanban->archived)
{
- common::printLink('kanban', 'archiveCard', "cardID=$card->id", "
{$lang->kanbancard->archive}", 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->archive}'", true, true);
+ common::printLink('kanban', 'archiveCard', "cardID=$card->id", "
{$lang->kanbancard->archive}", 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->archive}'", true, true);
echo "
";
}
common::printLink('kanban', 'editCard', "cardID=$card->id", '
', '', "class='btn btn-link iframe' data-width='80%' title='{$lang->kanbancard->edit}'", true, true);
+
+ if($kanban->performable)
+ {
+ if($card->status == 'done') common::printLink('kanban', 'activateCard', "cardID={$card->id}&kanbanID={$kanban->id}", '
', '', "class='btn btn-link iframe' title='{$lang->kanban->activateCard}'", true, true);
+ if($card->status == 'doing') common::printLink('kanban', 'finishCard', "cardID={$card->id}&kanbanID={$kanban->id}", '
', '', "class='btn btn-link iframe' title='{$lang->kanban->finishCard}'", true, true);
+ }
+
common::printLink('kanban', 'copyCard', "cardID=$card->id", '
', '', "class='btn btn-link iframe' title='{$lang->kanbancard->copy}'", true, true);
common::printLink('kanban', 'deleteCard', "cardID=$card->id", '
', 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->delete}'",true, true);
?>
diff --git a/module/project/lang/en.php b/module/project/lang/en.php
index bfc4d4f1f1..7678fff0d4 100644
--- a/module/project/lang/en.php
+++ b/module/project/lang/en.php
@@ -187,7 +187,7 @@ $lang->project->tenThousand = '';
$lang->project->unitList['CNY'] = 'RMB';
$lang->project->unitList['USD'] = 'USD';
$lang->project->unitList['HKD'] = 'HKD';
-$lang->project->unitList['NTD'] = 'NTW';
+$lang->project->unitList['NTD'] = 'NTD';
$lang->project->unitList['EUR'] = 'EUR';
$lang->project->unitList['DEM'] = 'DEM';
$lang->project->unitList['CHF'] = 'CHF';
diff --git a/module/report/lang/en.php b/module/report/lang/en.php
index c7d84faebe..78310de1bc 100644
--- a/module/report/lang/en.php
+++ b/module/report/lang/en.php
@@ -18,6 +18,7 @@ $lang->report->undefined = 'Undefined';
$lang->report->query = 'Query';
$lang->report->annual = 'Annual Summary';
$lang->report->project = 'Project';
+$lang->report->PO = 'PO';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
diff --git a/module/report/lang/zh-cn.php b/module/report/lang/zh-cn.php
index c88541dcd9..fda2ec11c4 100644
--- a/module/report/lang/zh-cn.php
+++ b/module/report/lang/zh-cn.php
@@ -18,6 +18,7 @@ $lang->report->undefined = '未设定';
$lang->report->query = '查询';
$lang->report->annual = '年度总结';
$lang->report->project = '项目';
+$lang->report->PO = 'PO';
$lang->report->colors[] = 'AFD8F8';
$lang->report->colors[] = 'F6BD0F';
diff --git a/module/report/view/productsummary.html.php b/module/report/view/productsummary.html.php
index ea2f786865..a0e07824e3 100644
--- a/module/report/view/productsummary.html.php
+++ b/module/report/view/productsummary.html.php
@@ -44,7 +44,7 @@
| product->name;?> |
- product->PO;?> |
+ report->PO;?> |
productplan->common;?> |
productplan->begin;?> |
productplan->end;?> |
diff --git a/module/story/control.php b/module/story/control.php
index 04d12eb0f6..4823d8cb2c 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -157,7 +157,21 @@ class story extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $storyID));
/* If link from no head then reload. */
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($this->session->execution);
+ if($this->app->tab == 'execution' and $execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, 0)"));
+ }
+ else
+ {
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ }
+ }
if($this->post->newStory)
{
@@ -398,13 +412,13 @@ class story extends control
if($storyID)
{
$story = $this->story->getById($storyID);
- if($story->status != 'active' or $story->stage != 'wait' or $story->parent > 0) die(js::alert($this->lang->story->errorNotSubdivide) . js::locate('back'));
+ if($story->status != 'active' or $story->stage != 'wait' or $story->parent > 0) return print(js::alert($this->lang->story->errorNotSubdivide) . js::locate('back'));
}
if(!empty($_POST))
{
$mails = $this->story->batchCreate($productID, $branch, $type);
- if(dao::isError()) die(js::error(dao::getError()));
+ if(dao::isError()) return print(js::error(dao::getError()));
$stories = array();
foreach($mails as $mail) $stories[] = $mail->storyID;
@@ -426,11 +440,25 @@ class story extends control
}
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $stories));
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($this->session->execution);
+ if($this->app->tab == 'execution' and $execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
if($storyID)
{
- die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
+ return print(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
}
elseif($executionID)
{
@@ -438,13 +466,13 @@ class story extends control
$moduleName = $execution->type == 'project' ? 'projectstory' : 'execution';
$param = $execution->type == 'project' ? "projectID=$executionID&productID=$productID" : "executionID=$executionID&orderBy=id_desc&browseType=unclosed";
$link = $this->createLink($moduleName, 'story', $param);
- die(js::locate($link, 'parent'));
+ return print(js::locate($link, 'parent'));
}
else
{
setcookie('storyModule', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
$locateLink = $this->session->storyList ? $this->session->storyList : $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=unclosed&queryID=0&type=$type");
- die(js::locate($locateLink, 'parent'));
+ return print(js::locate($locateLink, 'parent'));
}
}
@@ -921,9 +949,24 @@ class story extends control
$module = $this->app->tab == 'project' ? 'projectstory' : 'story';
- if(isonlybody()) die(js::reload('parent.parent'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($this->session->execution);
+ if($this->app->tab == 'execution' and $execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::reload('parent.parent'));
+ }
+ }
+
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
- die(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
+ return print(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
}
$this->commonAction($storyID);
@@ -974,8 +1017,22 @@ class story extends control
$this->executeHooks($storyID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
- die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($this->session->execution);
+ if($this->app->tab == 'execution' and $execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
+ return print(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
}
$this->commonAction($storyID);
@@ -1243,7 +1300,7 @@ class story extends control
if(!empty($_POST))
{
$changes = $this->story->close($storyID);
- if(dao::isError()) die(js::error(dao::getError()));
+ if(dao::isError()) return print(js::error(dao::getError()));
if($changes)
{
@@ -1253,14 +1310,29 @@ class story extends control
$this->executeHooks($storyID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($this->session->execution);
+ if($this->app->tab == 'execution' and $execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
+
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
- die(array('status' => 'success', 'data' => $storyID));
+ return print(array('status' => 'success', 'data' => $storyID));
}
else
{
- die(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
+ return print(js::locate(inlink('view', "storyID=$storyID"), 'parent'));
}
}
@@ -1586,8 +1658,22 @@ class story extends control
$this->executeHooks($storyID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this', 'function(){parent.parent.$(\'[data-ride="searchList"]\').searchList();}'));
- die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($this->session->execution);
+ if($this->app->tab == 'execution' and $execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this', 'function(){parent.parent.$(\'[data-ride="searchList"]\').searchList();}'));
+ }
+ }
+ return print(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
}
/* Get story and product. */
diff --git a/module/story/model.php b/module/story/model.php
index 388842e6a6..6d4c9572aa 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -2142,6 +2142,12 @@ class storyModel extends model
$releases = $this->dao->select('*')->from(TABLE_RELEASE)->where("CONCAT(',', stories, ',')")->like("%,$storyID,%")->andWhere('deleted')->eq(0)->fetchPairs('branch', 'branch');
foreach($releases as $branch) $stages[$branch] = 'released';
+ $currentStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch();
+ foreach($executions as $executionID => $branch)
+ {
+ $this->kanban->updateLane($executionID, 'story', $storyID);
+ }
+
if(empty($stages)) return;
if($hasBranch)
{
@@ -2173,7 +2179,6 @@ class storyModel extends model
$this->dao->update(TABLE_STORY)->set('stage')->eq(current($stages))->where('id')->eq($storyID)->exec();
}
- $currentStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch();
if($story->stage != $currentStory->stage)
{
foreach($executions as $executionID => $branch)
diff --git a/module/task/control.php b/module/task/control.php
index 45dc885341..d90eb0eccd 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -146,7 +146,20 @@ class task extends control
if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $taskID));
/* If link from no head then reload. */
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ if(isonlybody())
+ {
+ if($execution->type == 'kanban')
+ {
+ $kanbanData = $this->kanban->getRDKanban($executionID, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, 0)"));
+ }
+ else
+ {
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ }
+ }
/* Locate the browser. */
if($this->app->getViewType() == 'xhtml')
@@ -235,7 +248,7 @@ class task extends control
$this->view->position = $position;
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID=$executionID") : '';
$this->view->execution = $execution;
- $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject(0, 'all', 0, true);
+ $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject(0, 'undone', 0, true);
$this->view->task = $task;
$this->view->users = $users;
$this->view->storyID = $storyID;
@@ -309,7 +322,20 @@ class task extends control
if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $taskIDList));
/* If link from no head then reload. */
- if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ if(isonlybody())
+ {
+ if($execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, 0)"));
+ }
+ else
+ {
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ }
+ }
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $taskLink));
}
@@ -424,7 +450,22 @@ class task extends control
}
}
- if(isonlybody()) die(js::reload('parent.parent'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::reload('parent.parent'));
+ }
+ }
+
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
return $this->send(array('status' => 'success', 'data' => $taskID));
@@ -622,8 +663,23 @@ class task extends control
$this->executeHooks($taskID);
if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'success'));
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
- die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
+ if(isonlybody())
+ {
+ $task = $this->task->getById($taskID);
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
+ return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$members = $this->loadModel('user')->getTeamMemberPairs($executionID, 'execution', 'nodeleted');
@@ -809,6 +865,9 @@ class task extends control
{
$this->commonAction($taskID);
+ $extra = str_replace(array(',', ' '), array('&', ''), $extra);
+ parse_str($extra, $output);
+
$task = $this->task->getById($taskID);
if(!empty($_POST))
@@ -848,7 +907,23 @@ class task extends control
}
if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'success'));
- if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
+
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $regionID = isset($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
+ }
+ }
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
@@ -895,8 +970,22 @@ class task extends control
}
}
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
- die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
+ if(isonlybody())
+ {
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
+ return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->session->set('estimateList', $this->app->getURI(true), 'execution');
@@ -1021,6 +1110,7 @@ class task extends control
{
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
$kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, 'all', 'id_desc', $regionID);
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
@@ -1083,6 +1173,9 @@ class task extends control
{
$this->commonAction($taskID);
+ $extra = str_replace(array(',', ' '), array('&', ''), $extra);
+ parse_str($extra, $output);
+
if(!empty($_POST))
{
$this->loadModel('action');
@@ -1097,8 +1190,25 @@ class task extends control
$this->executeHooks($taskID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
- die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
+ if(isonlybody())
+ {
+ $task = $this->task->getById($taskID);
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $regionID = isset($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
+
+ return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->task->pause;
@@ -1136,8 +1246,23 @@ class task extends control
$this->executeHooks($taskID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
- die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
+ if(isonlybody())
+ {
+ $task = $this->task->getById($taskID);
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
+ return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->task->restart;
@@ -1161,6 +1286,9 @@ class task extends control
{
$this->commonAction($taskID);
+ $extra = str_replace(array(',', ' '), array('&', ''), $extra);
+ parse_str($extra, $output);
+
if(!empty($_POST))
{
$this->loadModel('action');
@@ -1176,7 +1304,24 @@ class task extends control
$this->executeHooks($taskID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
+ if(isonlybody())
+ {
+ $task = $this->task->getById($taskID);
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $regionID = isset($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this', "function(){parent.parent.location.reload();}"));
+ }
+ }
+
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
return $this->send(array('status' => 'success', 'data' => $taskID));
@@ -1293,6 +1438,9 @@ class task extends control
{
$this->commonAction($taskID);
+ $extra = str_replace(array(',', ' '), array('&', ''), $extra);
+ parse_str($extra, $output);
+
if(!empty($_POST))
{
$this->loadModel('action');
@@ -1307,7 +1455,23 @@ class task extends control
$this->executeHooks($taskID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
+ if(isonlybody())
+ {
+ $task = $this->task->getById($taskID);
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $regionID = isset($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
@@ -1330,6 +1494,9 @@ class task extends control
{
$this->commonAction($taskID);
+ $extra = str_replace(array(',', ' '), array('&', ''), $extra);
+ parse_str($extra, $output);
+
if(!empty($_POST))
{
$this->loadModel('action');
@@ -1344,8 +1511,24 @@ class task extends control
$this->executeHooks($taskID);
- if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
- die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
+ if(isonlybody())
+ {
+ $task = $this->task->getById($taskID);
+ $execution = $this->execution->getByID($task->execution);
+ if($execution->type == 'kanban')
+ {
+ $regionID = isset($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
+ $kanbanData = json_encode($kanbanData);
+
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ return print(js::closeModal('parent.parent', 'this'));
+ }
+ }
+ return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
if(!empty($this->view->task->team))
diff --git a/module/task/view/start.html.php b/module/task/view/start.html.php
index 7067c50679..741c5e4bb2 100644
--- a/module/task/view/start.html.php
+++ b/module/task/view/start.html.php
@@ -37,7 +37,7 @@
-