Merge branch 'master' into 'sprint/183_zhengrunyu_48003'

# Conflicts:
#   module/kanban/lang/en.php
#   module/kanban/lang/zh-cn.php
#   module/kanban/model.php
This commit is contained in:
孙广明
2022-01-24 01:26:45 +00:00
44 changed files with 975 additions and 225 deletions
+1
View File
@@ -3,6 +3,7 @@ UPDATE `zt_kanbanspace` SET `type` = 'cooperation';
ALTER TABLE `zt_kanban` ADD `importObject` varchar(255) NOT NULL AFTER `displayCards`;
ALTER TABLE `zt_kanban` ADD `performable` enum ('0', '1') NOT NULL DEFAULT '0' AFTER `archived`;
ALTER TABLE `zt_kanbancard` ADD `status` varchar(30) NOT NULL AFTER `name`;
ALTER TABLE `zt_kanbancard` ADD `fromID` int(8) NOT NULL AFTER `group`;
ALTER TABLE `zt_kanbancard` ADD `fromType` varchar(50) NOT NULL AFTER `fromID`;
+1 -1
View File
@@ -622,7 +622,7 @@ $lang->action->label->issue = 'Issue|issue|view|issueID=%s';
$lang->action->label->design = 'Design|design|view|designID=%s';
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
$lang->action->label->api = 'Interface|api|index|libID=%s&moduleID=%s&apiID=%s';
$lang->action->label->kanbanspace = 'Kanban Space|kanban|space|browseType=all';
$lang->action->label->kanbanspace = 'Kanban Space|kanban|space|browseType=%s';
$lang->action->label->kanbanregion = 'Kanban Region|kanban|view|kanbanID=%s';
$lang->action->label->kanban = 'Kanban|kanban|view|kanbanID=%s';
$lang->action->label->kanbancolumn = 'Kanban Column|execution|kanban|execution=%s';
+1 -1
View File
@@ -622,7 +622,7 @@ $lang->action->label->issue = '问题|issue|view|issueID=%s';
$lang->action->label->design = '设计|design|view|designID=%s';
$lang->action->label->stakeholder = '干系人|stakeholder|view|userID=%s';
$lang->action->label->api = '接口|api|index|libID=%s&moduleID=%s&apiID=%s';
$lang->action->label->kanbanspace = '看板空间|kanban|space|browseType=all';
$lang->action->label->kanbanspace = '看板空间|kanban|space|browseType=%s';
$lang->action->label->kanbanregion = '看板区域|kanban|view|kanbanID=%s';
$lang->action->label->kanban = '看板|kanban|view|kanbanID=%s';
$lang->action->label->kanbancolumn = '看板列|execution|kanban|execution=%s';
+5
View File
@@ -1289,6 +1289,11 @@ class actionModel extends model
{
$params = sprintf($vars, trim($action->product, ','));
}
elseif($action->objectType == 'kanbanspace')
{
$kanbanSpace = $this->dao->select('type')->from(TABLE_KANBANSPACE)->where('id')->eq($action->objectID)->fetch();
$params = sprintf($vars, $kanbanSpace->type);
}
elseif($action->objectType == 'kanbancolumn' or $action->objectType == 'kanbanlane')
{
$params = sprintf($vars, $action->extra);
-19
View File
@@ -106,25 +106,6 @@ $lang->block->spent = 'Has Been Spent';
$lang->block->budget = 'Budget';
$lang->block->left = 'Residuals';
$lang->block->titleList['flowchart'] = 'Flowchart';
$lang->block->titleList['statistic'] = 'Statistic';
$lang->block->titleList['recentproject'] = 'Recent Project';
$lang->block->titleList['assigntome'] = 'Assign To Me';
$lang->block->titleList['projectteam'] = 'Project Team';
$lang->block->titleList['project'] = 'Project';
$lang->block->titleList['dynamic'] = 'Dynamic';
$lang->block->titleList['list'] = 'List';
$lang->block->titleList['contribute'] = 'Contribute';
$lang->block->titleList['scrumoverview'] = 'Scrum Overview';
$lang->block->titleList['scrumtest'] = 'Scrum Test';
$lang->block->titleList['scrumlist'] = 'Scrum List';
$lang->block->titleList['sprint'] = 'Sprint';
$lang->block->titleList['projectdynamic'] = 'Project Dynamic';
$lang->block->titleList['bug'] = 'Bug';
$lang->block->titleList['case'] = 'Case';
$lang->block->titleList['testtask'] = 'Testtask';
$lang->block->default['waterfall']['project']['3']['title'] = 'Plan Gantt Chart';
$lang->block->default['waterfall']['project']['3']['block'] = 'waterfallgantt';
$lang->block->default['waterfall']['project']['3']['source'] = 'project';
-19
View File
@@ -106,25 +106,6 @@ $lang->block->spent = '已花费';
$lang->block->budget = '预算';
$lang->block->left = '剩余';
$lang->block->titleList['flowchart'] = '流程图';
$lang->block->titleList['statistic'] = '项目统计';
$lang->block->titleList['recentproject'] = '我近期参与的项目';
$lang->block->titleList['assigntome'] = '待处理';
$lang->block->titleList['projectteam'] = '项目人力投入';
$lang->block->titleList['project'] = '项目列表';
$lang->block->titleList['dynamic'] = '最新动态';
$lang->block->titleList['list'] = '我的待办';
$lang->block->titleList['contribute'] = '我的贡献';
$lang->block->titleList['scrumoverview'] = '项目概况';
$lang->block->titleList['scrumtest'] = '待测版本';
$lang->block->titleList['scrumlist'] = '迭代列表';
$lang->block->titleList['sprint'] = '迭代总览';
$lang->block->titleList['projectdynamic'] = '最新动态';
$lang->block->titleList['bug'] = '指派给我的Bug';
$lang->block->titleList['case'] = '指派给我的用例';
$lang->block->titleList['testtask'] = '待测版本列表';
$lang->block->default['waterfall']['project']['3']['title'] = "项目计划";
$lang->block->default['waterfall']['project']['3']['block'] = 'waterfallgantt';
$lang->block->default['waterfall']['project']['3']['source'] = 'project';
+2 -2
View File
@@ -35,7 +35,7 @@ $useGuest = $this->app->user->account == 'guest';
<?php $hasHeading = ($block->block != 'welcome');?>
<?php if($hasHeading):?>
<div class='panel-heading'>
<div class='panel-title'><?php echo zget($lang->block->titleList, $block->block);?></div>
<div class='panel-title'><?php echo $block->title;?></div>
<?php endif;?>
<nav class='panel-actions nav nav-default'>
<?php if(!empty($block->moreLink)) echo '<li>' . html::a($block->moreLink, '<i class="icon icon-more"></i>', '', "title='{$lang->more}'") . '</li>'; ?>
@@ -70,7 +70,7 @@ $useGuest = $this->app->user->account == 'guest';
<?php $hasHeading = ($block->block != 'welcome');?>
<?php if($hasHeading):?>
<div class='panel-heading'>
<div class='panel-title'><?php echo zget($lang->block->titleList, $block->block);?></div>
<div class='panel-title'><?php echo $block->title;?></div>
<?php endif;?>
<nav class='panel-actions nav nav-default'>
<?php if(!empty($block->moreLink)) echo '<li>' . html::a($block->moreLink, '<i class="icon icon-more"></i>', '', "title='{$lang->more}'") . '</li>';?>
+114 -41
View File
@@ -402,17 +402,22 @@ class bug extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $bugID));
/* If link from no head then reload. */
if(isset($output['laneID']) and isset($output['columnID']) and isset($output['executionID']) and isonlybody())
if(isset($output['executionID']) and isonlybody())
{
$this->loadModel('kanban');
$column = $this->kanban->getColumnByID($output['columnID']);
$kanbanData = $this->kanban->getRDKanban($output['executionID'], 'all', 'id_desc', $column->region);
$kanbanData = json_encode($kanbanData);
return $this->send(array('result' => 'success', 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, $column->region)"));
$executionID = $this->post->execution ? $this->post->execution : $output['executionID'];
if($executionID == $output['executionID'])
{
$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, 'closeModal' => true));
}
}
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success', 'data' => $bugID));
if($this->app->tab == 'execution')
@@ -694,16 +699,23 @@ class bug extends control
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
/* If link from no head then reload. */
if(isset($output['laneID']) and isset($output['columnID']) and isonlybody())
{
$this->loadModel('kanban');
$column = $this->kanban->getColumnByID($output['columnID']);
$kanbanData = $this->kanban->getRDKanban($output['executionID'], 'all', 'id_desc', $column->region);
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $column->region)"));
/* If link from no head then reload. */
if(isonlybody() and $executionID)
{
$execution = $this->loadModel('execution')->getByID($executionID);
if($execution->type == 'kanban')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $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(isonlybody()) return print(js::reload('parent.parent'));
return print(js::locate($this->createLink('bug', 'browse', "productID={$productID}&branch=$branch&browseType=unclosed&param=0&orderBy=id_desc"), 'parent'));
}
@@ -1200,7 +1212,22 @@ class bug extends control
$this->executeHooks($bugID);
if(isonlybody()) return print(js::closeModal('parent.parent'));
if(isonlybody())
{
$bug = $this->bug->getById($bugID);
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->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'));
}
}
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
@@ -1374,6 +1401,7 @@ class bug extends control
*/
public function confirmBug($bugID, $extra = '')
{
$bug = $this->bug->getById($bugID);
if(!empty($_POST))
{
$changes = $this->bug->confirm($bugID, $extra);
@@ -1385,20 +1413,25 @@ class bug extends control
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
if(isset($output['fromLaneID']) and isset($output['fromColID']) and isset($output['executionID']) and isonlybody())
if(isonlybody())
{
$this->loadModel('kanban');
$column = $this->kanban->getColumnByID($output['fromColID']);
$kanbanData = $this->kanban->getRDKanban($output['executionID'], 'all', 'id_desc', $column->region);
$kanbanData = json_encode($kanbanData);
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban')
{
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->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, $column->region)"));
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
else
{
return print(js::closeModal('parent.parent'));
}
}
if(isonlybody()) return print(js::closeModal('parent.parent'));
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$this->bug->checkBugExecutionPriv($bug);
$this->qa->setMenu($this->products, $productID, $bug->branch);
@@ -1441,6 +1474,7 @@ class bug extends control
*/
public function resolve($bugID, $extra = '')
{
$bug = $this->bug->getById($bugID);
if(!empty($_POST))
{
$changes = $this->bug->resolve($bugID, $extra);
@@ -1470,28 +1504,33 @@ class bug extends control
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
if(isset($output['fromLaneID']) and isset($output['fromColID']) and isset($output['executionID']) and isonlybody())
if(isonlybody())
{
$this->loadModel('kanban');
$column = $this->kanban->getColumnByID($output['fromColID']);
$kanbanData = $this->kanban->getRDKanban($output['executionID'], 'all', 'id_desc', $column->region);
$kanbanData = json_encode($kanbanData);
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban')
{
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->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, $column->region)"));
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
}
else
{
return print(js::closeModal('parent.parent'));
}
}
if(isonlybody()) die(js::reload('parent.parent'));
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
die(array('status' => 'success', 'data' => $bugID));
return print(array('status' => 'success', 'data' => $bugID));
}
else
{
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
}
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : 0;
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$users = $this->user->getPairs('noclosed');
$assignedTo = $bug->openedBy;
@@ -1547,6 +1586,7 @@ class bug extends control
*/
public function activate($bugID, $extra = '')
{
$bug = $this->bug->getById($bugID);
if(!empty($_POST))
{
$changes = $this->bug->activate($bugID, $extra);
@@ -1559,11 +1599,27 @@ class bug extends control
$this->executeHooks($bugID);
if(isonlybody()) die(js::closeModal('parent.parent'));
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
if(isonlybody())
{
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban')
{
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->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'));
}
}
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$this->bug->checkBugExecutionPriv($bug);
$this->qa->setMenu($this->products, $productID, $bug->branch);
@@ -1590,6 +1646,7 @@ class bug extends control
*/
public function close($bugID, $extra = '')
{
$bug = $this->bug->getById($bugID);
if(!empty($_POST))
{
$changes = $this->bug->close($bugID, $extra);
@@ -1600,18 +1657,34 @@ class bug extends control
$this->executeHooks($bugID);
if(isonlybody()) die(js::closeModal('parent.parent'));
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
if(isonlybody())
{
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban')
{
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
$kanbanData = $this->loadModel('kanban')->getRDKanban($bug->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'));
}
}
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
die(array('status' => 'success', 'data' => $bugID));
return print(array('status' => 'success', 'data' => $bugID));
}
else
{
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
}
}
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$this->bug->checkBugExecutionPriv($bug);
$this->qa->setMenu($this->products, $productID, $bug->branch);
+69 -14
View File
@@ -1709,10 +1709,11 @@ class execution extends control
* Start execution.
*
* @param int $executionID
* @param string $from
* @access public
* @return void
*/
public function start($executionID)
public function start($executionID, $from = 'execution')
{
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1732,7 +1733,14 @@ class execution extends control
$this->loadModel('common')->syncPPEStatus($executionID);
$this->executeHooks($executionID);
die(js::reload('parent.parent'));
if(isonlybody() and $from == 'kanban')
{
return print(js::closeModal('parent.parent', '', "parent.parent.changeStatus('doing')"));
}
else
{
return print(js::reload('parent.parent'));
}
}
$this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->execution->start;
@@ -1747,10 +1755,11 @@ class execution extends control
* Delay execution.
*
* @param int $executionID
* @param string $from
* @access public
* @return void
*/
public function putoff($executionID)
public function putoff($executionID, $from = 'execution')
{
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1767,7 +1776,14 @@ class execution extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($executionID);
die(js::reload('parent.parent'));
if(isonlybody() and $from == 'kanban')
{
return print(js::closeModal('parent.parent', '', "parent.parent.changeStatus('doing')"));
}
else
{
return print(js::reload('parent.parent'));
}
}
$this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->execution->putoff;
@@ -1782,10 +1798,11 @@ class execution extends control
* Suspend execution.
*
* @param int $executionID
* @param string $from
* @access public
* @return void
*/
public function suspend($executionID)
public function suspend($executionID, $from = 'execution')
{
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1803,7 +1820,14 @@ class execution extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($executionID);
die(js::reload('parent.parent'));
if(isonlybody() and $from == 'kanban')
{
return print(js::closeModal('parent.parent', '', "parent.parent.changeStatus('suspended')"));
}
else
{
return print(js::reload('parent.parent'));
}
}
$this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->execution->suspend;
@@ -1818,10 +1842,11 @@ class execution extends control
* Activate execution.
*
* @param int $executionID
* @param string $frim
* @access public
* @return void
*/
public function activate($executionID)
public function activate($executionID, $from = 'execution')
{
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1839,7 +1864,14 @@ class execution extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($executionID);
die(js::reload('parent.parent'));
if(isonlybody() and $from == 'kanban')
{
return print(js::closeModal('parent.parent', '', "parent.parent.changeStatus('doing')"));
}
else
{
return print(js::reload('parent.parent'));
}
}
$newBegin = date('Y-m-d');
@@ -1861,10 +1893,11 @@ class execution extends control
* Close execution.
*
* @param int $executionID
* @param string $from
* @access public
* @return void
*/
public function close($executionID)
public function close($executionID, $from = 'execution')
{
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -1882,7 +1915,14 @@ class execution extends control
$this->action->logHistory($actionID, $changes);
}
$this->executeHooks($executionID);
die(js::reload('parent.parent'));
if(isonlybody() and $from == 'kanban')
{
return print(js::closeModal('parent.parent', '', "parent.parent.changeStatus('closed')"));
}
else
{
return print(js::reload('parent.parent'));
}
}
$this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->execution->close;
@@ -1969,6 +2009,7 @@ class execution extends control
$this->app->loadLang('bug');
$this->app->loadLang('story');
if(empty($groupBy)) $groupBy = 'default';
$this->session->set('execLaneType', $browseType);
$this->lang->execution->menu = new stdclass();
$execution = $this->commonAction($executionID);
@@ -2658,7 +2699,7 @@ class execution extends control
if(empty($products))
{
echo js::alert($this->lang->execution->errorNoLinkedProducts);
die(js::locate($this->createLink('execution', 'manageproducts', "executionID=$objectID")));
return print(js::locate($this->createLink('execution', 'manageproducts', "executionID=$objectID")));
}
if(!empty($_POST))
@@ -2666,8 +2707,22 @@ class execution extends control
$this->execution->linkStory($objectID, array(), array(), $extra);
if($object->type != 'project' and $object->project != 0) $this->execution->linkStory($object->project);
if(isonlybody()) die(js::reload('parent'));
die(js::locate($browseLink));
if(isonlybody())
{
if($this->app->tab == 'execution' and $object->type == 'kanban')
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($objectID, $this->session->execLaneType ? $this->session->execLaneType : 'all');
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent', '', "parent.updateKanban($kanbanData)"));
}
else
{
return print(js::reload('parent'));
}
}
return print(js::locate($browseLink));
}
if($object->type == 'project')
@@ -3441,7 +3496,7 @@ class execution extends control
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
}
if($count != 0) echo js::alert(sprintf($this->lang->execution->haveDraft, $count)) . js::locate($this->createLink($moduleName, $execution->type == 'sprint' ? 'story' : 'kanban', $param));
die(js::locate(helper::createLink($moduleName, $fromMethod, $param)));
return print(js::locate(helper::createLink($moduleName, $fromMethod, $param)));
}
/**
+60 -21
View File
@@ -1,3 +1,46 @@
/**
* When execution status change.
*
* @param stirng executionStatus
* @access public
* @return void
*/
function changeStatus(executionStatus)
{
if(executionStatus == 'wait')
{
$('.startButton').removeClass('hidden');
$('.putoffButton').removeClass('hidden');
$('.suspendButton').removeClass('hidden');
$('.closeButton').removeClass('hidden');
$('.activateButton').addClass('hidden');
}
else if(executionStatus == 'doing')
{
$('.startButton').addClass('hidden');
$('.putoffButton').removeClass('hidden');
$('.suspendButton').removeClass('hidden');
$('.closeButton').removeClass('hidden');
$('.activateButton').addClass('hidden');
}
else if(executionStatus == 'suspended')
{
$('.startButton').addClass('hidden');
$('.putoffButton').addClass('hidden');
$('.suspendButton').addClass('hidden');
$('.closeButton').removeClass('hidden');
$('.activateButton').removeClass('hidden');
}
else if(executionStatus == 'closed')
{
$('.startButton').addClass('hidden');
$('.putoffButton').addClass('hidden');
$('.suspendButton').addClass('hidden');
$('.closeButton').addClass('hidden');
$('.activateButton').removeClass('hidden');
}
}
/**
* Display the kanban in full screen.
*
@@ -788,7 +831,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
{
if(fromColType == 'developing' && priv.canPauseTask)
{
var link = createLink('task', 'pause', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID, '', true);
var link = createLink('task', 'pause', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -796,12 +839,12 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
{
if((fromColType == 'pause' || fromColType == 'canceled' || fromColType == 'closed' || fromColType == 'developed') && priv.canActivateTask)
{
var link = createLink('task', 'activate', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID, '', true);
var link = createLink('task', 'activate', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
if(fromColType == 'wait' && priv.canStartTask)
{
var link = createLink('task', 'start', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID, '', true);
var link = createLink('task', 'start', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -809,7 +852,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
{
if((fromColType == 'developing' || fromColType == 'wait' || fromColType == 'pause') && priv.canCancelTask)
{
var link = createLink('task', 'cancel', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID, '', true);
var link = createLink('task', 'cancel', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -817,7 +860,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
{
if((fromColType == 'developed' || fromColType == 'canceled') && priv.canCloseTask)
{
var link = createLink('task', 'close', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID, '', true);
var link = createLink('task', 'close', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -832,7 +875,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
{
if(fromColType == 'unconfirmed' && priv.canConfirmBug)
{
var link = createLink('bug', 'confirmBug', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',executionID=' + executionID, '', true);
var link = createLink('bug', 'confirmBug', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -841,7 +884,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
if(fromColType == 'confirmed' || fromColType == 'unconfirmed') moveCard = true;
if((fromColType == 'closed' || fromColType == 'fixed' || fromColType == 'testing' || fromColType == 'tested') && priv.canActivateBug)
{
var link = createLink('bug', 'activate', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',executionID=' + executionID, '', true);
var link = createLink('bug', 'activate', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -849,7 +892,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
{
if(fromColType == 'fixing' || fromColType == 'confirmed' || fromColType == 'unconfirmed')
{
var link = createLink('bug', 'resolve', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',executionID=' + executionID, '', true);
var link = createLink('bug', 'resolve', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -865,7 +908,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
{
if(fromColType == 'testing' || fromColType == 'tested')
{
var link = createLink('bug', 'close', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID, '', true);
var link = createLink('bug', 'close', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true);
showIframe = true;
}
}
@@ -884,6 +927,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
method: 'post',
dataType: 'json',
url: link,
async: false,
success: function(data)
{
updateRegion(regionID, data[regionID]);
@@ -911,7 +955,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car
* @access public
* @return void
*/
function updateKanban(kanbanData, regionID)
function updateKanban(kanbanData, regionID = 0)
{
setTimeout(function()
{
@@ -950,6 +994,7 @@ function shiftCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID)
method: 'post',
dataType: 'json',
url: link,
async: false,
success: function(data)
{
updateRegion(regionID, data[regionID]);
@@ -1046,6 +1091,10 @@ function initKanban($kanban)
*/
$(function()
{
changeStatus(execution.status);
if($.cookie('isFullScreen') == 1) $.cookie('isFullScreen', 0);
window.kanbanScaleSize = +$.zui.store.get('executionKanbanScaleSize', 1);
$('#kanbanScaleSize').text(window.kanbanScaleSize);
$('#kanbanScaleControl .btn[data-type="+"]').attr('disabled', window.kanbanScaleSize >= 4 ? 'disabled' : null);
@@ -1182,13 +1231,6 @@ $(function()
return $ele.parent().children('.kanban-lane');
}
/* Sort lanes */
if($ele.hasClass('kanban-item'))
{
sortType = 'item';
return $ele.parent().children('.kanban-item');
}
},
start: function(e)
{
@@ -1237,10 +1279,7 @@ $(function()
var region = e.element.parent().parent().data('id');
url = createLink('kanban', 'sortLane', 'region=' + region + '&lanes=' + orders.join(','));
}
if(sortType == 'item')
{
url = createLink('task', 'sort', 'kanbanID=' + kanbanID + '&tasks=' + orders.join(','));
}
if(!url) return true;
$.getJSON(url, function(response)
+5 -5
View File
@@ -126,11 +126,11 @@ js::set('hasTaskButton', $hasTaskButton);
if(common::hasPriv('kanban', 'setLaneHeight')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setLaneHeight', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-size-height"></i>' . $lang->kanban->laneHeight, '', "class='iframe btn btn-link text-left' data-width=$width") . '</li>';
$kanbanActions = '';
if(common::hasPriv('execution', 'edit')) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'edit', "executionID=$execution->id", '', true), '<i class="icon icon-edit"></i>' . $lang->kanban->edit, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(in_array('start', $executionActions)) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'start', "executionID=$execution->id", '', true), '<i class="icon icon-play"></i>' . $lang->execution->start, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(in_array('putoff', $executionActions)) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'putoff', "executionID=$execution->id", '', true), '<i class="icon icon-calendar"></i>' . $lang->execution->putoff, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(in_array('suspend', $executionActions)) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'suspend', "executionID=$execution->id", '', true), '<i class="icon icon-pause"></i>' . $lang->execution->suspend, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(in_array('close', $executionActions)) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'close', "executionID=$execution->id", '', true), '<i class="icon icon-off"></i>' . $lang->execution->close, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(in_array('activate', $executionActions)) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'activate', "executionID=$execution->id", '', true), '<i class="icon icon-magic"></i>' . $lang->execution->activate, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(common::hasPriv('execution', 'start')) $kanbanActions .= '<li class="startButton hidden">' . html::a(helper::createLink('execution', 'start', "executionID=$execution->id&from=kanban", '', true), '<i class="icon icon-play"></i>' . $lang->execution->start, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(common::hasPriv('execution', 'putoff')) $kanbanActions .= '<li class="putoffButton hidden">' . html::a(helper::createLink('execution', 'putoff', "executionID=$execution->id&from=kanban", '', true), '<i class="icon icon-calendar"></i>' . $lang->execution->putoff, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(common::hasPriv('execution', 'suspend')) $kanbanActions .= '<li class="suspendButton hidden">' . html::a(helper::createLink('execution', 'suspend', "executionID=$execution->id&from=kanban", '', true), '<i class="icon icon-pause"></i>' . $lang->execution->suspend, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(common::hasPriv('execution', 'close')) $kanbanActions .= '<li class="closeButton hidden">' . html::a(helper::createLink('execution', 'close', "executionID=$execution->id&from=kanban", '', true), '<i class="icon icon-off"></i>' . $lang->execution->close, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(common::hasPriv('execution', 'activate')) $kanbanActions .= '<li class="activateButton hidden">' . html::a(helper::createLink('execution', 'activate', "executionID=$execution->id&from=kanban", '', true), '<i class="icon icon-magic"></i>' . $lang->execution->activate, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(common::hasPriv('execution', 'delete')) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'delete', "executionID=$execution->id"), '<i class="icon icon-trash"></i>' . $lang->delete, 'hiddenwin', "class='btn btn-link text-left'") . '</li>';
if($kanbanActions)
{
+6 -1
View File
@@ -644,6 +644,7 @@ $lang->resource->kanban->close = 'close';
$lang->resource->kanban->delete = 'delete';
$lang->resource->kanban->createRegion = 'createRegion';
$lang->resource->kanban->editRegion = 'editRegion';
$lang->resource->kanban->performable = 'performable';
$lang->resource->kanban->sortRegion = 'sortRegion';
$lang->resource->kanban->sortGroup = 'sortGroup';
$lang->resource->kanban->deleteRegion = 'deleteRegion';
@@ -668,12 +669,15 @@ $lang->resource->kanban->assigntoCard = 'assigntoCard';
//$lang->resource->kanban->copyCard = 'copyCard';
$lang->resource->kanban->deleteCard = 'deleteCard';
$lang->resource->kanban->moveCard = 'moveCard';
$lang->resource->kanban->finishCard = 'finishCard';
$lang->resource->kanban->activateCard = 'activateCard';
$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';
$lang->resource->kanban->setLaneHeight = 'setLaneHeight';
$lang->resource->kanban->batchCreateCard = 'batchCreateCard';
$lang->resource->kanban->import = 'import';
$lang->kanban->methodOrder[5] = 'space';
@@ -720,7 +724,8 @@ $lang->kanban->methodorder[200] = 'viewArchivedCard';
$lang->kanban->methodorder[205] = 'archiveColumn';
$lang->kanban->methodorder[210] = 'restoreCard';
$lang->kanban->methodorder[215] = 'setLaneHeight';
$lang->kanban->methodorder[220] = 'import';
$lang->kanban->methodOrder[220] = 'batchCreateCard';
$lang->kanban->methodorder[225] = 'import';
/* Execution. */
$lang->resource->execution = new stdclass();
+2
View File
@@ -102,3 +102,5 @@ $config->kanban->taskColumnStatusList['closed'] = 'closed';
$config->kanban->laneColorList = array('#7ec5ff', '#333', '#2b529c', '#e48600', '#d2323d', '#229f24', '#777', '#d2691e', '#008b8b', '#2e8b57', '#4169e1', '#4b0082', '#fa8072', '#ba55d3', '#6b8e23');
$config->kanban->columnColorList = array('#333', '#2b519c', '#e48610', '#d2313d', '#2a9f23', '#777', '#d2691e', '#2e8b8b', '#2f8b58', '#4168e0', '#4b0082', '#f58072', '#ba55d3', '#6a8e22');
$config->kanban->cardColorList = array('#fff', '#b10b0b', '#cfa227', '#2a5f29');
$config->kanban->batchCreate = 10;
+76 -8
View File
@@ -168,7 +168,7 @@ class kanban extends control
unset($this->lang->kanbanspace->featureBar['involved']);
$space = $this->kanban->getSpaceById($spaceID);
$spaceUsers = $space->owner . $space->team . $space->whitelist;
$spaceUsers = $spaceID == 0 ? ',' : trim($space->owner) . ',' . trim($space->team) . ',' . trim($space->whitelist);
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers);
$this->view->users = $users;
@@ -202,10 +202,12 @@ class kanban extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
$kanban = $this->kanban->getByID($kanbanID);
$space = $this->kanban->getSpaceById($kanban->space);
$kanban = $this->kanban->getByID($kanbanID);
$space = $this->kanban->getSpaceById($kanban->space);
$spaceUsers = trim($space->owner) . ',' . trim($space->team) . ',' . trim($space->whitelist);
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers);
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
$this->view->users = $users;
$this->view->spacePairs = array(0 => '') + $this->kanban->getSpacePairs($space->type);
$this->view->kanban = $kanban;
$this->view->type = $space->type;
@@ -707,6 +709,34 @@ class kanban extends control
$this->display();
}
/**
* Batch create cards.
*
* @param int $kanbanID
* @param int $regionID
* @param int $groupID
* @param int $laneID
* @param int $columnID
* @access public
* @return void
*/
public function batchCreateCard($kanbanID = 0, $regionID = 0, $groupID = 0, $laneID = 0, $columnID = 0)
{
$backLink = $this->createLink('kanban', 'view', "kanbanID=$kanbanID");
if($_POST)
{
$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, 'locate' => $backLink));
}
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->view->lanePairs = $this->kanban->getLanePairsByGroup($groupID);
$this->display();
}
/**
* Edit a card.
*
@@ -736,6 +766,44 @@ class kanban extends control
$this->display();
}
/**
* Finish a card.
*
* @param int $cardID
* @param int $kanbanID
* @access public
* @return void
*/
public function finishCard($cardID, $kanbanID)
{
$this->dao->update(TABLE_KANBANCARD)->set('status')->eq('done')->where('id')->eq($cardID)->exec();
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
if(isonlybody()) return print(js::reload('parent.parent'));
$kanbanGroup = $this->kanban->getKanbanData($kanbanID);
return print(json_encode($kanbanGroup));
}
/**
* Activate a card.
*
* @param int $cardID
* @param int $kanbanID
* @access public
* @return void
*/
public function activate($cardID, $kanbanID)
{
$this->dao->update(TABLE_KANBANCARD)->set('status')->eq('doing')->where('id')->eq($cardID)->exec();
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
if(isonlybody()) return print(js::reload('parent.parent'));
$kanbanGroup = $this->kanban->getKanbanData($kanbanID);
return print(json_encode($kanbanGroup));
}
/**
* View a card.
*
@@ -939,7 +1007,7 @@ class kanban extends control
{
if(dao::isError()) return $this->sendError(dao::getError());
$regionID = $column->region;
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, 'all', 'id_desc', $regionID);
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
$kanbanData = json_encode($kanbanData);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, $regionID)"));
@@ -1020,7 +1088,7 @@ class kanban extends control
{
if(dao::isError()) return $this->sendError(dao::getError());
$regionID = $column->region;
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, 'all', 'id_desc', $regionID);
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', $regionID);
$kanbanData = json_encode($kanbanData);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.updateKanban($kanbanData, $regionID)"));
@@ -1035,13 +1103,13 @@ class kanban extends control
}
/**
* Set done function.
* Setup done function.
*
* @param int $kanbanID
* @access public
* @return void
*/
public function setDoneFunction($kanbanID)
public function performable($kanbanID)
{
if(!empty($_POST))
{
+3 -2
View File
@@ -1,13 +1,14 @@
/**
* When type change.
* When space type or space value change.
*
* @oaram int spaceID
* @param string type
* @access public
* @return void
*/
function changeType(spaceID, type)
function changeValue(spaceID, type = '')
{
if(type == '') type = spaceType;
location.href = createLink('kanban', 'create', 'spaceID=' + spaceID + '&type=' + type);
}
+103 -12
View File
@@ -142,15 +142,14 @@ function renderHeaderCol($column, column, $header, kanbanData)
if(!$column.children('.actions').length) $column.append('<div class="actions"></div>');
var $actions = $column.children('.actions');
if(columnPrivs.includes('createCard') && column.parent != -1)
if(column.parent != -1)
{
var cardUrl = createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '&regionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID);
addItemBtn = ['<a data-contextmenu="columnCreate" data-toggle="modal" data-action="addItem" data-column="' + column.id + '" data-lane="' + laneID + '" href="' + cardUrl + '" class="text-primary iframe">', '<i class="icon icon-expand-alt"></i>', '</a>'].join('');
addItemBtn = ['<a data-contextmenu="columnCreate" data-action="addItem" data-column="' + column.id + '" data-lane="' + laneID + '" class="text-primary">', '<i class="icon icon-expand-alt"></i>', '</a>'].join('');
}
var moreAction = ' <button class="btn btn-link action" title="' + kanbanLang.moreAction + '" data-contextmenu="column" data-column="' + column.id + '"><i class="icon icon-ellipsis-v"></i></button>';
$actions.html(addItemBtn + moreAction);
}
}
@@ -257,7 +256,7 @@ function renderKanbanItem(item, $item)
{
var $title = $item.children('.title');
var privs = item.actions;
var printMoreBtn = (privs.includes('editCard') || privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor'));
var printMoreBtn = (privs.includes('editCard') || privs.includes('finishCard') || privs.includes('activateCard') ||privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor'));
if(kanban.performable == 1 && item.status == 'done' )
{
@@ -403,6 +402,7 @@ function moveCard(cardID, fromColID, toColID, fromLaneID, toLaneID, kanbanID, re
method: 'post',
dataType: 'json',
url: url,
async: false,
success: function(data)
{
regions = data;
@@ -446,7 +446,6 @@ function setCardColor(cardID, color, kanbanID, regionID)
url: url,
success: function(data)
{
regions = data;
updateRegion(regionID, data[regionID]);
},
error: function(xhr, status, error)
@@ -456,6 +455,56 @@ function setCardColor(cardID, color, kanbanID, regionID)
});
}
/**
* Finish a card.
*
* @param int $cardID
* @param int $kanbanID
* @param int $regionID
* @access public
* @return void
*/
function finishCard(cardID, kanbanID, regionID)
{
if(!cardID) return false;
var url = createLink('kanban', 'finishCard', 'cardID=' + cardID + '&kanbanID=' + kanbanID);
return $.ajax(
{
method: 'post',
dataType: 'json',
url: url,
success: function(data)
{
updateRegion(regionID, data[regionID]);
}
});
}
/**
* Activate a card.
*
* @param int $cardID
* @param int $kanbanID
* @param int $regionID
* @access public
* @return void
*/
function activateCard(cardID, kanbanID, regionID)
{
if(!cardID) return false;
var url = createLink('kanban', 'activateCard', 'cardID=' + cardID + '&kanbanID=' + kanbanID);
return $.ajax(
{
method: 'post',
dataType: 'json',
url: url,
success: function(data)
{
updateRegion(regionID, data[regionID]);
}
});
}
/**
* Update a region.
*
@@ -708,6 +757,17 @@ function createCardMenu(options)
var items = [];
if(privs.includes('editCard')) items.push({label: kanbanLang.editCard, icon: 'edit', url: createLink('kanban', 'editCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(kanban.performable == 1)
{
if(privs.includes('activateCard') && card.status != 'doing')
{
items.push({label: kanbanLang.activateCard, icon: 'magic', onClick: function(){activateCard(card.id, card.kanban, card.region);}});
}
else
{
items.push({label: kanbanLang.finishCard, icon: 'checked', onClick: function(){finishCard(card.id, card.kanban, card.region);}});
}
}
if(privs.includes('archiveCard') && kanban.archived == '1') items.push({label: kanbanLang.archiveCard, icon: 'card-archive', url: createLink('kanban', 'archiveCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}});
if(privs.includes('copyCard')) items.push({label: kanbanLang.copyCard, icon: 'copy', url: createLink('kanban', 'copyCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal'}});
if(privs.includes('deleteCard')) items.push({label: kanbanLang.deleteCard, icon: 'trash', url: createLink('kanban', 'deleteCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}});
@@ -777,6 +837,28 @@ function createColumnMenu(options)
return items;
}
/**
* Create create menu for column.
*
* @param object $options
* @access public
* @return object
*/
function createColumnCreateMenu(options)
{
var col = options.$trigger.closest('.kanban-col').data('col');
var privs = col.actions;
var items = [];
var regionID = col.region;
var groupID = col.group;
var laneID = col.$kanbanData.lanes[0].id ? col.$kanbanData.lanes[0].id : 0;
var columnID = col.id;
if(privs.includes('createCard')) items.push({label: kanbanLang.createCard, url: $.createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '&regionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(privs.includes('batchCreateCard')) items.push({label: kanbanLang.batchCreateCard, url: $.createLink('kanban', 'batchCreateCard', 'kanbanID=' + kanbanID + '&regionID=' + regionID + '&groupID=' + groupID + '&laneID=' + laneID + '&columnID=' + columnID), attrs: {'data-width': '80%'}});
return items;
}
/** Calculate column height */
function calcColHeight(col, lane, colCards, colHeight, kanban)
{
@@ -796,7 +878,8 @@ window.menuCreators =
{
card: createCardMenu,
lane: createLaneMenu,
column: createColumnMenu
column: createColumnMenu,
columnCreate: createColumnCreateMenu
};
/**
@@ -937,8 +1020,10 @@ $(function()
});
/* Init sortable */
var sortType = '';
var $cards = null;
var sortType = '';
var oldLaneID = '';
var oldColID = '';
var $cards = null;
$('#kanban').sortable(
{
selector: '.region, .kanban-board, .kanban-lane, .kanban-item.sort',
@@ -993,6 +1078,12 @@ $(function()
$('.region').find('.kanban').hide();
hideKanbanAction();
}
if(sortType == 'card')
{
oldLaneID = e.element.closest('.kanban-lane').data('id');
oldColID = e.element.closest('.kanban-col').data('id');
}
},
finish: function(e)
{
@@ -1028,9 +1119,9 @@ $(function()
}
if(sortType == 'card')
{
var laneID = e.element.closest('.kanban-lane').data('id');
var columnID = e.element.closest('.kanban-col').data('id');
url = createLink('kanban', 'sortCard', 'kanbanID=' + kanbanID + '&laneID=' + laneID + '&columnID=' + columnID + '&cards=' + orders.join(','));
var newLaneID = e.element.closest('.kanban-lane').data('id');
var newColID = e.element.closest('.kanban-col').data('id');
if(newLaneID == oldLaneID && newColID == oldColID) url = createLink('kanban', 'sortCard', 'kanbanID=' + kanbanID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(','));
}
if(!url) return true;
+5
View File
@@ -27,6 +27,8 @@ $lang->kanban->sortColumn = 'Sort Column';
$lang->kanban->deleteColumn = 'Delete Column';
$lang->kanban->createCard = 'Create Card';
$lang->kanban->editCard = 'Edit Card';
$lang->kanban->finishCard = 'Finish Card';
$lang->kanban->activateCard = 'Activate Card';
$lang->kanban->viewCard = 'View Card';
$lang->kanban->archiveCard = 'Archive Card';
$lang->kanban->sortCard = 'Sort Card';
@@ -39,6 +41,8 @@ $lang->kanban->assigntoCard = 'Assign';
$lang->kanban->setting = 'Setting';
$lang->kanban->enableArchived = 'Enable Archived';
$lang->kanban->archive = 'Archive';
$lang->kanban->performable = 'Set done function';
$lang->kanban->doneFunction = 'Done function';
$lang->kanban->splitColumn = 'Split Column';
$lang->kanban->createColumnOnLeft = 'Create Column On Left';
$lang->kanban->createColumnOnRight = 'Create Column On Right';
@@ -57,6 +61,7 @@ $lang->kanban->restoreColumn = 'Restore Column';
$lang->kanban->restoreCard = 'Restore Card';
$lang->kanban->restore = 'Restore';
$lang->kanban->child = 'Child';
$lang->kanban->batchCreateCard = 'Batchcreate Card';
$lang->kanban->import = 'Import';
$lang->kanban->showClosed = 'Closed';
+5
View File
@@ -27,6 +27,8 @@ $lang->kanban->sortColumn = '看板列排序';
$lang->kanban->deleteColumn = '删除看板列';
$lang->kanban->createCard = '创建卡片';
$lang->kanban->editCard = '编辑卡片';
$lang->kanban->finishCard = '完成卡片';
$lang->kanban->activateCard = '激活卡片';
$lang->kanban->viewCard = '查看卡片';
$lang->kanban->archiveCard = '归档卡片';
$lang->kanban->sortCard = '卡片排序';
@@ -39,6 +41,8 @@ $lang->kanban->assigntoCard = '指派';
$lang->kanban->setting = '设置';
$lang->kanban->enableArchived = '设置归档功能';
$lang->kanban->archive = '归档功能';
$lang->kanban->performable = '设置完成功能';
$lang->kanban->doneFunction = '完成功能';
$lang->kanban->splitColumn = '新增子看板列';
$lang->kanban->createColumnOnLeft = '左侧新增看板列';
$lang->kanban->createColumnOnRight = '右侧新增看板列';
@@ -57,6 +61,7 @@ $lang->kanban->restoreColumn = '还原看板列';
$lang->kanban->restoreCard = '还原卡片';
$lang->kanban->restore = '还原';
$lang->kanban->child = '子';
$lang->kanban->batchCreateCard = '批量创建卡片';
$lang->kanban->import = '导入功能';
$lang->kanban->showClosed = '显示已关闭';
+84 -6
View File
@@ -468,6 +468,78 @@ class kanbanModel extends model
return false;
}
/**
* Batch create kanban cards.
*
* @param int $kanbanID
* @param int $regionID
* @param int $groupID
* @param int $columnID
* @access public
* @return void
*/
public function batchCreateCard($kanbanID, $regionID, $groupID, $columnID)
{
foreach($_POST['name'] as $index => $value)
{
if($_POST['name'][$index] and isset($_POST['assignedTo'][$index])) $_POST['assignedTo'][$index] = implode(',', $_POST['assignedTo'][$index]);
}
$cards = fixer::input('post')->get();
$now = helper::now();
$data = array();
$lanes = array();
foreach($cards->name as $i => $name)
{
if(empty($cards->name[$i])) continue;
$data[$i] = new stdclass();
$data[$i]->name = trim($cards->name[$i]);
$data[$i]->begin = $cards->begin[$i];
$data[$i]->end = $cards->end[$i];
$data[$i]->assignedTo = $cards->assignedTo[$i];
$data[$i]->desc = nl2br($cards->desc[$i]);
$data[$i]->pri = $cards->pri[$i];
$data[$i]->kanban = $kanbanID;
$data[$i]->region = $regionID;
$data[$i]->group = $groupID;
$data[$i]->createdBy = $this->app->user->account;
$data[$i]->createdDate = $now;
$data[$i]->assignedDate = $now;
$data[$i]->color = '#fff';
$data[$i]->estimate = is_numeric($cards->estimate[$i]) ? (float)$cards->estimate[$i] : $cards->estimate[$i];
$lanes[$i] = $cards->lane[$i];
}
foreach($data as $i => $card)
{
$this->dao->insert(TABLE_KANBANCARD)->data($card)->autoCheck()
->checkIF($card->estimate != '', 'estimate', 'float')
->batchCheck($this->config->kanban->createcard->requiredFields, 'notempty')
->exec();
if($card->estimate < 0)
{
dao::$errors[] = $this->lang->kanbancard->error->recordMinus;
return false;
}
if($card->end && $card->begin > $card->end)
{
dao::$errors[] = $this->lang->kanbancard->error->endSmall;
return false;
}
if(!dao::isError())
{
$cardID = $this->dao->lastInsertID();
$lane = $lanes[$i];
$this->addKanbanCell($kanbanID, $lane, $columnID, 'common', $cardID);
$this->loadModel('action')->create('kanbancard', $cardID, 'created');
}
}
}
/**
* Get kanban by id.
*
@@ -807,7 +879,7 @@ class kanbanModel extends model
->orderBy($order)
->fetchGroup('group');
$actions = array('createColumn', 'setColumn', 'setWIP', 'archiveColumn', 'restoreColumn', 'deleteColumn', 'createCard', 'splitColumn');
$actions = array('createColumn', 'setColumn', 'setWIP', 'archiveColumn', 'restoreColumn', 'deleteColumn', 'createCard', 'batchCreateCard', 'splitColumn');
/* Group by parent. */
$parentColumnGroup = array();
@@ -872,7 +944,7 @@ class kanbanModel extends model
->andWhere('type')->eq('common')
->fetchAll();
$actions = array('editCard', 'archiveCard', 'deleteCard', 'moveCard', 'setCardColor', 'viewCard', 'sortCard');
$actions = array('editCard', 'finishCard', 'activateCard', 'archiveCard', 'deleteCard', 'moveCard', 'setCardColor', 'viewCard', 'sortCard');
$cardGroup = array();
foreach($cellList as $cell)
{
@@ -1448,7 +1520,6 @@ class kanbanModel extends model
->setDefault('createdBy', $account)
->setDefault('createdDate', helper::now())
->setdefault('team', '')
->setdefault('owner', $account)
->setdefault('whitelist', '')
->join('whitelist', ',')
->join('team', ',')
@@ -1456,6 +1527,8 @@ class kanbanModel extends model
->remove('uid,contactListMenu')
->get();
if($space->type == 'private') $space->owner = $account;
if(strpos(",{$space->team},", ",$account,") === false and $space->owner != $account) $space->team .= ",$account";
$space = $this->loadModel('file')->processImgURL($space, $this->config->kanban->editor->createspace['id'], $this->post->uid);
@@ -2538,7 +2611,7 @@ class kanbanModel extends model
$actions .= "<div class='btn-group'>";
$actions .= "<a href='javascript:fullScreen();' id='fullScreenBtn' class='btn btn-link'><i class='icon icon-fullscreen'></i> {$this->lang->kanban->fullScreen}</a>";
$printSettingBtn = (common::hasPriv('kanban', 'createRegion') or $printSetHeight or common::hasPriv('kanban', 'setDoneFunction') or common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'enableArchived') or common::hasPriv('kanban', 'delete'));
$printSettingBtn = (common::hasPriv('kanban', 'createRegion') or $printSetHeight or common::hasPriv('kanban', 'performable') or common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'enableArchived') or common::hasPriv('kanban', 'delete'));
if($printSettingBtn)
{
@@ -2553,7 +2626,7 @@ class kanbanModel extends model
$actions .= '<li>' . html::a(helper::createLink('kanban', 'setLaneHeight', "kanbanID=$kanban->id", '', true), '<i class="icon icon-size-height"></i>' . $this->lang->kanban->laneHeight, '', "class='iframe btn btn-link' data-width='$width'") . '</li>';
}
if(common::hasPriv('kanban', 'setDoneFunction')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setDoneFunction', "kanbanID=$kanban->id", '', true), '<i class="icon icon-checked"></i>' . $this->lang->kanban->doneFunction, '', "class='iframe btn btn-link'") . '</li>';
if(common::hasPriv('kanban', 'performable')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'performable', "kanbanID=$kanban->id", '', true), '<i class="icon icon-checked"></i>' . $this->lang->kanban->doneFunction, '', "class='iframe btn btn-link'") . '</li>';
$kanbanActions = '';
$attr = $kanban->status == 'closed' ? "disabled='disabled'" : '';
@@ -2562,7 +2635,11 @@ class kanbanModel extends model
if(common::hasPriv('kanban', 'delete')) $kanbanActions .= '<li>' . html::a(helper::createLink('kanban', 'delete', "kanbanID=$kanban->id"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->delete, 'hiddenwin', "class='btn btn-link'") . '</li>';
if($kanbanActions)
{
<<<<<<< module/kanban/model.php
$actions .= ((common::hasPriv('kanban', 'createRegion') or $printSetHeight or common::hasPriv('kanban', 'setDoneFunction')) and (common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'enableArchived') or common::hasPriv('kanban', 'delete'))) ? "<div class='divider'></div>" . $kanbanActions : $kanbanActions;
=======
$actions .= ((common::hasPriv('kanban', 'createRegion') or $printSetHeight or common::hasPriv('kanban', 'performable')) and (common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'delete'))) ? "<div class='divider'></div>" . $kanbanActions : $kanbanActions;
>>>>>>> module/kanban/model.php
}
$actions .= "</ul>";
}
@@ -2637,9 +2714,10 @@ class kanbanModel extends model
$fromCellCards = $this->dao->select('cards')->from(TABLE_KANBANCELL)->where('lane')->eq($fromLaneID)->andWhere('`column`')->eq($fromColID)->fetch('cards');
$toCellCards = $this->dao->select('cards')->from(TABLE_KANBANCELL)->where('lane')->eq($toLaneID)->andWhere('`column`')->eq($toColID)->fetch('cards');
$fromCardList = str_replace("$cardID,", '', $fromCellCards);
$fromCardList = str_replace(",$cardID,", ',', $fromCellCards);
$toCardList = rtrim($toCellCards, ',') . ",$cardID,";
if($fromCardList == ',') $fromCardList = '';
$this->dao->update(TABLE_KANBANCELL)->set('cards')->eq($fromCardList)->where('`column`')->eq($fromColID)->andWhere('lane')->eq($fromLaneID)->exec();
$this->dao->update(TABLE_KANBANCELL)->set('cards')->eq($toCardList)->where('`column`')->eq($toColID)->andWhere('lane')->eq($toLaneID)->exec();
}
@@ -0,0 +1,68 @@
<?php
/**
* The batch create view of kanban module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Xin Zhou <zhouxin@cnezsoft.com>
* @package kanban
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainContent" class="main-content fade">
<div class="main-header clearfix">
<h2 class="pull-left">
<?php echo $lang->kanban->batchCreateCard;?>
</h2>
</div>
<form method='post' class='load-indicator batch-actions-form form-ajax' enctype='multipart/form-data' id="batchCreateCardForm">
<div class="table-responsive">
<table class="table table-form">
<thead>
<tr>
<th class='c-id text-center'><?php echo $lang->idAB;?></th>
<th class='c-name required'><?php echo $lang->kanbancard->name?></th>
<th><?php echo $lang->kanbancard->lane;?></th>
<th><?php echo $lang->kanbancard->assignedTo;?></th>
<th class='c-estimate'><?php echo $lang->kanbancard->estimate;?></th>
<th><?php echo $lang->kanbancard->beginAndEnd;?></th>
<th><?php echo $lang->kanbancard->desc;?></th>
<th class='c-pri w-120px'><?php echo $lang->kanbancard->pri;?></th>
</tr>
</thead>
<tbody>
<?php $pri = 3;?>
<?php for($i = 0; $i < $config->kanban->batchCreate; $i++):?>
<tr>
<td class='text-center'><?php echo $i + 1;?></td>
<td class='text-center'><?php echo html::input("name[$i]", '', "class='form-control title-import'");?></td>
<td style='overflow:visible'><?php echo html::select("lane[$i]", $lanePairs, key($lanePairs), "class='form-control chosen'")?></td>
<td style='overflow:visible'><?php echo html::select("assignedTo[$i][]", $users, $app->user->account, "class='form-control chosen' multiple");?></td>
<td><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
<td>
<div class='input-group'>
<?php echo html::input("begin[$i]", '', "class='form-control form-date' placeholder='{$lang->kanbancard->begin}'");?>
<span class='input-group-addon fix-border'>~</span>
<?php echo html::input("end[$i]", '', "class='form-control form-date' placeholder='{$lang->kanbancard->end}'");?>
</div>
</td>
<td ><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td ><?php echo html::select("pri[$i]", (array)$lang->kanbancard->priList, $pri, 'class=form-control');?></td>
</tr>
<?php endfor;?>
</tbody>
<tfoot>
<tr>
<td colspan='8' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</tfoot>
</table>
</div>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+3 -6
View File
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('spaceType', $type);?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->kanban->create;?></h2>
@@ -20,22 +21,18 @@
<table class='table table-form'>
<tr>
<th><?php echo $lang->kanbanspace->type;?></th>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeType({$spaceID}, this.value)' class='form-control chosen'");?></td>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeValue({$spaceID}, this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->kanban->space;?></th>
<td><?php echo html::select('space', $spacePairs, $spaceID, "class='form-control chosen'");?></td>
<td><?php echo html::select('space', $spacePairs, $spaceID, "onchange='changeValue(this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->kanban->name;?></th>
<td><?php echo html::input('name', '', "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->kanban->archived;?></th>
<td><?php echo html::radio('archived', $lang->kanban->enableArchived, '0');?></td>
</tr>
<?php if($type != 'private'):?>
<tr>
<th><?php echo $lang->kanban->owner;?></th>
+1 -1
View File
@@ -5,7 +5,7 @@
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Shujie Tian<tianshujie@cnezsoft.com>
* @package kanban
* @package kanban
* @version $Id: createcard.html.php 5090 2021-12-13 13:49:24Z tainshujie@cnezsoft.com $
* @link https://www.zentao.net
*/
+1 -1
View File
@@ -20,7 +20,7 @@
<table class='table table-form'>
<tr>
<th><?php echo $lang->kanbanspace->type;?></th>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeType(this.value)' class='form-control'");?></td>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeType(this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
-4
View File
@@ -26,10 +26,6 @@
<th><?php echo $lang->kanban->name;?></th>
<td><?php echo html::input('name', $kanban->name, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->kanban->archived;?></th>
<td><?php echo html::radio('archived', $lang->kanban->enableArchived, $kanban->archived);?></td>
</tr>
<?php if($type != 'private'):?>
<tr>
<th><?php echo $lang->kanban->owner;?></th>
@@ -1,12 +1,12 @@
<?php
/**
* The setdonefunction file of kanban module of ZenTaoPMS.
* The performable file of kanban module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yue Ma <mayue@easycorp.ltd>
* @package kanban
* @version $Id: setdonefunction.html.php 935 2022-01-1 14:20:24Z $
* @version $Id: performable.html.php 935 2022-01-1 14:20:24Z $
* @link https://www.zentao.net
*/
?>
@@ -14,7 +14,7 @@
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->kanban->setDoneFunction;?></h2>
<h2><?php echo $lang->kanban->performable;?></h2>
</div>
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
+8 -1
View File
@@ -39,12 +39,19 @@
//common::printLink('kanban', 'assigntoCard', "cardID=$card->id", "<i class='icon icon-hand-right'></i><span class='text'>{$lang->kanbancard->assign}</span>", '', "class='btn btn-link iframe' title='{$lang->kanbancard->assign}'", true, true);
if($kanban->archived)
{
common::printLink('kanban', 'archiveCard', "cardID=$card->id", "<i class='icon icon-ban-circle'></i><span class='text'>{$lang->kanbancard->archive}</span>", 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->archive}'", true, true);
common::printLink('kanban', 'archiveCard', "cardID=$card->id", "<i class='icon icon-ban-circle'></i><span class='text'>{$lang->kanbancard->archive}</span>", 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->archive}'", true, true);
echo "<div class='divider'></div>";
}
common::printLink('kanban', 'editCard', "cardID=$card->id", '<i class="icon icon-edit"></i>', '', "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}", '<i class="icon icon-magic"></i>', '', "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}", '<i class="icon icon-checked"></i>', '', "class='btn btn-link iframe' title='{$lang->kanban->finishCard}'", true, true);
}
common::printLink('kanban', 'copyCard', "cardID=$card->id", '<i class="icon icon-copy"></i>', '', "class='btn btn-link iframe' title='{$lang->kanbancard->copy}'", true, true);
common::printLink('kanban', 'deleteCard', "cardID=$card->id", '<i class="icon icon-trash"></i>', 'hiddenwin', "class='btn btn-link' title='{$lang->kanbancard->delete}'",true, true);
?>
+1 -1
View File
@@ -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';
+103 -17
View File
@@ -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. */
+6 -1
View File
@@ -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)
+200 -17
View File
@@ -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))
+1 -1
View File
@@ -37,7 +37,7 @@
<?php endif;?>
</h2>
</div>
<form method='post' target='hiddenwin' onsubmit='return checkLeft();'>
<form method='post' target='hiddenwin' <?php if($app->rawMethod == 'start') echo "onsubmit='return checkLeft();'"?>>
<table class='table table-form'>
<tr>
<th class='w-90px'><?php echo $lang->task->assignedTo;?></th>
+13 -2
View File
@@ -517,8 +517,19 @@ class testcase extends control
if(!empty($_POST))
{
$caseIDList = $this->testcase->batchCreate($productID, $branch, $storyID);
if(dao::isError()) die(js::error(dao::getError()));
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
if(dao::isError()) return print(js::error(dao::getError()));
if(isonlybody())
{
$execution = $this->execution->getByID($this->session->execution);
if($this->app->tab == 'execution' and $execution->type == 'kanban')
{
return print(js::closeModal('parent.parent', ''));
}
else
{
return print(js::closeModal('parent.parent', 'this'));
}
}
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $caseIDList));
+1 -1
View File
@@ -58,7 +58,7 @@ $lang->testreport->bugOpenedByGroups = 'Nach Ersteller';
$lang->testreport->bugResolvedByGroups = 'Nach Löser';
$lang->testreport->bugResolutionGroups = 'Nach Lösung';
$lang->testreport->bugModuleGroups = 'Nach Modul';
$lang->testreport->bugStageGroups = 'Bug Priority distribution';
$lang->testreport->bugStageGroups = 'Bug Priority Distribution';
$lang->testreport->bugHandleGroups = 'Distribution of daily bug processing';
$lang->testreport->legacyBugs = 'Legacy Bugs';
$lang->testreport->bugConfirmedRate = 'Bestätigte Bugs Rate (Lösung ist gelöst oder verschoben / Status ist gelöst oder Geschlossen)';
+1 -1
View File
@@ -59,7 +59,7 @@ $lang->testreport->bugOpenedByGroups = 'Bug ReportedBy Distribution';
$lang->testreport->bugResolvedByGroups = 'Bug ResolvedBy Distribution';
$lang->testreport->bugResolutionGroups = 'Bug Resolution Distribution';
$lang->testreport->bugModuleGroups = 'Bug Module Distribution';
$lang->testreport->bugStageGroups = 'Bug Priority distribution';
$lang->testreport->bugStageGroups = 'Bug Priority Distribution';
$lang->testreport->bugHandleGroups = 'Distribution of daily bug processing';
$lang->testreport->legacyBugs = 'Left Bugs';
$lang->testreport->bugConfirmedRate = 'Confirmed-Bug Rate (Resolution is fixed or postponed / status is resolved or closed)';
+1 -1
View File
@@ -58,7 +58,7 @@ $lang->testreport->bugOpenedByGroups = 'Distribution Bug Signalé par';
$lang->testreport->bugResolvedByGroups = 'Distribution Bug Résolu par';
$lang->testreport->bugResolutionGroups = 'Distribution Bug Résolution';
$lang->testreport->bugModuleGroups = 'Distribution Bug Module';
$lang->testreport->bugStageGroups = 'Bug Priority distribution';
$lang->testreport->bugStageGroups = 'Bug Priority Distribution';
$lang->testreport->bugHandleGroups = 'Distribution of daily bug processing';
$lang->testreport->legacyBugs = 'Bugs Restants';
$lang->testreport->bugConfirmedRate = 'Taux de Bugs confirmés (Résolution est corrigée ou reportée / statut est résolu ou fermé)';
+1 -1
View File
@@ -58,7 +58,7 @@ $lang->testreport->bugOpenedByGroups = 'Phân chia người báo cáo Bug';
$lang->testreport->bugResolvedByGroups = 'Phân chia người giải quyết Bug';
$lang->testreport->bugResolutionGroups = 'Phân chia giải pháp Bug';
$lang->testreport->bugModuleGroups = 'Phân chia Module Bug';
$lang->testreport->bugStageGroups = 'Bug Priority distribution';
$lang->testreport->bugStageGroups = 'Bug Priority Distribution';
$lang->testreport->bugHandleGroups = 'Distribution of daily bug processing';
$lang->testreport->legacyBugs = 'Bug còn lại';
$lang->testreport->bugConfirmedRate = 'Đánh giá Bug đã xác nhận (Nghị quyết đã ban hành hoặc tạm hoãn / tình trạng được giải quyết hoặc đóng)';
+1 -1
View File
@@ -179,7 +179,7 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Bugersteller Bericht'
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Gelöst von Bericht';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Lösungsbersicht';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug Modul Bericht';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority distribution';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
+1 -1
View File
@@ -189,7 +189,7 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug ReportedBy Distri
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Bug ResolvedBy Distribution';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Bug Resolution Distribution';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug Module Distribution';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority distribution';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
+1 -1
View File
@@ -179,7 +179,7 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Distribution signalem
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Distribution Résolus par';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Distribution Résolution';
$lang->testtask->report->charts['bugModuleGroups'] = 'Distribution Bug Module';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority distribution';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
+1 -1
View File
@@ -179,7 +179,7 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Phân chia người b
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Phân chia người giải quyết Bug';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Phân chia giải pháp Bug';
$lang->testtask->report->charts['bugModuleGroups'] = 'Phân chia Module Bug';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority distribution';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
File diff suppressed because one or more lines are too long
@@ -1,4 +1,8 @@
<?php
$lang->setting->common = 'Settings';
$lang->setting->xuanxuan = 'Client';
$lang->setting->downloadXXD = 'Download XXD';
<?php
$lang->setting->common = 'Settings';
$lang->setting->xuanxuan = 'Client';
$lang->setting->downloadXXD = 'Download XXD';
$lang->setting->langs['zh-cn'] = 'Simplified Chinese';
$lang->setting->langs['zh-tw'] = 'Traditional Chinese';
$lang->setting->langs['en'] = 'English';
@@ -1,4 +1,7 @@
<?php
$lang->setting->common = '设置';
$lang->setting->xuanxuan = '客户端集成';
$lang->setting->downloadXXD = '下载喧喧服务端';
$lang->setting->common = '设置';
$lang->setting->xuanxuan = '客户端集成';
$lang->setting->downloadXXD = '下载喧喧服务端';
$lang->setting->langs['zh-cn'] = '简体';
$lang->setting->langs['zh-tw'] = '繁體';
$lang->setting->langs['en'] = 'English';
@@ -44,7 +44,7 @@
</tr>
<tr>
<th><?php echo $lang->im->backendLang;?></th>
<td><?php echo $type == 'edit' ? html::select('backendLang', $config->langs, $config->xuanxuan->backendLang, "class='form-control'") : zget($config->langs, $config->xuanxuan->backendLang, '');?></td>
<td><?php echo $type == 'edit' ? html::select('backendLang', $config->langs, $config->xuanxuan->backendLang, "class='form-control'") : zget($lang->setting->langs, $config->xuanxuan->backendLang, '');?></td>
<td></td>
</tr>
<tr>