Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -21,7 +21,7 @@ $lang->block->lblBlock = 'Widget';
|
||||
$lang->block->lblNum = 'Number';
|
||||
$lang->block->lblHtml = 'HTML';
|
||||
$lang->block->dynamic = 'Dynamic';
|
||||
$lang->block->lblFlowchart = 'Flowchart';
|
||||
$lang->block->lblFlowchart = 'Workflow';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = 'Name';
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
.col-side {width: 250px}
|
||||
|
||||
.panel-heading > strong > span {float: right; color: red;}
|
||||
.panel-heading > strong > span {float: right; color: #29a8cd;}
|
||||
|
||||
@@ -5,25 +5,49 @@ $(function()
|
||||
})
|
||||
|
||||
/**
|
||||
* Load project builds
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param int $index
|
||||
* Set branch related.
|
||||
*
|
||||
* @param int $branchID
|
||||
* @param int $productID
|
||||
* @param int $num
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadProjectBuilds(productID, projectID, index)
|
||||
function setBranchRelated(branchID, productID, num)
|
||||
{
|
||||
if(projectID)
|
||||
moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=bug&branch=' + branchID + '&num=' + num);
|
||||
$.get(moduleLink, function(modules)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index);
|
||||
}
|
||||
else
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index);
|
||||
}
|
||||
if(!modules) modules = '<select id="modules' + num + '" name="modules[' + num + ']" class="form-control"></select>';
|
||||
$('#modules' + num).replaceWith(modules);
|
||||
$("#modules" + num + "_chosen").remove();
|
||||
$("#modules" + num).chosen(defaultChosenOptions);
|
||||
});
|
||||
|
||||
projectLink = createLink('product', 'ajaxGetProjects', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&num=' + num);
|
||||
$.get(projectLink, function(projects)
|
||||
{
|
||||
if(!projects) projects = '<select id="projects' + num + '" name="projects[' + num + ']" class="form-control"></select>';
|
||||
$('#projects' + num).replaceWith(projects);
|
||||
$("#projects" + num + "_chosen").remove();
|
||||
$("#projects" + num).chosen(defaultChosenOptions);
|
||||
});
|
||||
|
||||
buildLink = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branchID + "&index=" + num);
|
||||
|
||||
setOpenedBuilds(buildLink, num);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set opened builds.
|
||||
*
|
||||
* @param string $link
|
||||
* @param int $index
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setOpenedBuilds(link, index)
|
||||
{
|
||||
$.get(link, function(builds)
|
||||
{
|
||||
var row = $('#buildBox' + index).closest('tbody').find('tr').size()
|
||||
@@ -45,6 +69,30 @@ function loadProjectBuilds(productID, projectID, index)
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load project builds
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param int $index
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadProjectBuilds(productID, projectID, index)
|
||||
{
|
||||
branch = $('#branches' + index).val();
|
||||
if(projectID)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index);
|
||||
}
|
||||
else
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index);
|
||||
}
|
||||
|
||||
setOpenedBuilds(link, index);
|
||||
}
|
||||
|
||||
$(document).on('click', '.chosen-with-drop', function()
|
||||
{
|
||||
var select = $(this).prev('select');
|
||||
|
||||
@@ -79,7 +79,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange='loadProjectBuilds($productID, this.value, $i)'");?></td>
|
||||
<td class='text-left' style='overflow:visible' id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, 'trunk', "class='form-control chosen' multiple");?></td>
|
||||
@@ -112,7 +112,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange='loadProjectBuilds($productID, this.value, $i)'");?></td>
|
||||
<td class='text-left' style='overflow:visible' id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='form-control chosen' multiple");?></td>
|
||||
@@ -141,7 +141,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<tbody>
|
||||
<tr class='text-center'>
|
||||
<td>%s</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control' onchange='loadProjectBuilds($productID, this.value, \"%s\")'");?></td>
|
||||
<td class='text-left' style='overflow:visible' id='buildBox%s'><?php echo html::select("openedBuilds[%s][]", $builds, '', "class='form-control' multiple");?></td>
|
||||
|
||||
@@ -157,13 +157,13 @@ $lang->install->ranzhi->desc = <<<EOD
|
||||
<li>Forum/Blog and Dynamic/News</li>
|
||||
</ul>
|
||||
EOD;
|
||||
$lang->install->yidou = new stdclass();
|
||||
$lang->install->yidou->name = '亿斗进销存Management运营系统';
|
||||
$lang->install->yidou->desc = <<<EOD
|
||||
$lang->install->zdoo = new stdclass();
|
||||
$lang->install->zdoo->name = 'Integrated Cloud Platform';
|
||||
$lang->install->zdoo->desc = <<<EOD
|
||||
<ul>
|
||||
<li>销售订单处理,信息及时反馈</li>
|
||||
<li>采销业务状况,时时查询跟进</li>
|
||||
<li>仓储配货送货,轻松便利快捷</li>
|
||||
<li>财务收款付款,简单实用准确</li>
|
||||
<li>Safe, Stable and Effective</li>
|
||||
<li>Data isolation by docker</li>
|
||||
<li>Code level customization</li>
|
||||
<li>An integrated and collaborative platform</li>
|
||||
</ul>
|
||||
EOD;
|
||||
|
||||
@@ -489,10 +489,11 @@ class product extends control
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param string $number
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetProjects($productID, $projectID = 0, $branch = 0)
|
||||
public function ajaxGetProjects($productID, $projectID = 0, $branch = 0, $number = '')
|
||||
{
|
||||
if($productID == 0)
|
||||
{
|
||||
@@ -504,7 +505,16 @@ class product extends control
|
||||
}
|
||||
if($this->app->getViewType() == 'json') die(json_encode($projects));
|
||||
|
||||
die(html::select('project', $projects, $projectID, 'class=form-control onchange=loadProjectRelated(this.value)'));
|
||||
if($number === '')
|
||||
{
|
||||
die(html::select('project', $projects, $projectID, 'class=form-control onchange=loadProjectRelated(this.value)'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$projectName = "projects[$number]";
|
||||
$projects = empty($projects) ? array('' => '') : $projects;
|
||||
die(html::select($projectName, $projects, '', "class='form-control' onchange='loadProjectBuilds($productID, this.value, $number)'"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -242,13 +242,17 @@ class productplan extends control
|
||||
* Ajax: Get product plans.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $number
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetProductplans($productID, $branch = 0)
|
||||
public function ajaxGetProductplans($productID, $branch = 0, $number = '')
|
||||
{
|
||||
$plans = $this->productplan->getPairs($productID, $branch);
|
||||
die(html::select('plan', $plans, '', "class='form-control'"));
|
||||
|
||||
$planName = $number === '' ? 'plan' : "plan[$number]";
|
||||
$plans = empty($plans) ? array('' => '') : $plans;
|
||||
die(html::select($planName, $plans, '', "class='form-control'"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1643,7 +1643,7 @@ class project extends control
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('project', 'linkStory', "projectID=$projectID&browseType=bySearch&queryID=myQueryID");
|
||||
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
|
||||
$this->project->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL);
|
||||
$this->project->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'linkStory');
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
#importTeams {padding: 0}
|
||||
#importTeams {padding: 0 2px}
|
||||
#importTeams > div {position: relative;}
|
||||
#importTeams a {display: block; min-height: 30px; line-height: 30px; padding: 5px 15px; border: 1px solid #e5e5e5; color: #333; margin: 5px 0}
|
||||
#importTeams a > i {display: inline-block; margin-right: 5px;}
|
||||
#importTeams a:hover {border:1px solid #39B3D7; background-color: #E5F9FF; text-decoration: none}
|
||||
#importTeams a.active {border-color: #229F24; color: #229F24; background-color: #E5FFE6}
|
||||
#importTeams a.active:after {position: absolute; content: '\e60d'; font-family: NewZenIcon; font-size: 20px; right: 25px;}
|
||||
#importTeams a.cancel {color: #D2322D}
|
||||
|
||||
.outer .container .table-form {margin-top: 0;}
|
||||
.outer .table tr > th:first-child, .outer .table tr > td:first-child {padding-left: 5px;}
|
||||
|
||||
@@ -18,8 +8,13 @@
|
||||
#titlebar {min-height: 46px}
|
||||
#titlebar > .heading {float: left; padding-right: 10px!important}
|
||||
#titlebar > .heading > .icon {display: inline;}
|
||||
#deptSelector {float: left; min-width: 220px; position: relative; top: -7px}
|
||||
#copyTeam {float: left; min-width: 220px; position: relative; top: -7px; padding-left:5px}
|
||||
|
||||
#importTeams {float: left; position: relative; top: -7px}
|
||||
#importTeams .input-group {width: 250px; float: left;}
|
||||
#importTeams .input-group +.input-group {margin-left: 5px;}
|
||||
|
||||
#dept_chosen .chosen-single{width: 220px;}
|
||||
#project_chosen .chosen-single{width: 220px;}
|
||||
|
||||
.outer .main .table tr > td:first-child {padding-left: 10px;}
|
||||
.outer .main .table tr > td:last-child {padding-right: 10px;}
|
||||
|
||||
@@ -178,6 +178,7 @@ $lang->project->howToUpdateBurn = "<a href='http://api.zentao.net/goto.php?item=
|
||||
$lang->project->whyNoStories = "No Story can be linked. Please check whether there is Story in {$lang->projectCommon} related {$lang->productCommon} and make sure it has been reviewed.";
|
||||
$lang->project->doneProjects = 'Done';
|
||||
$lang->project->selectDept = 'Select Department';
|
||||
$lang->project->selectDeptTitle = 'Select Department';
|
||||
$lang->project->copyTeam = 'Duplicate Team';
|
||||
$lang->project->copyFromTeam = "Duplicated from {$lang->projectCommon} Team: <strong>%s</strong>";
|
||||
$lang->project->noMatched = "No $lang->projectCommon including '%s'can be found.";
|
||||
|
||||
@@ -179,7 +179,8 @@ $lang->project->howToUpdateBurn = "<a href='http://api.zentao.net/goto.php?item=
|
||||
$lang->project->whyNoStories = "看起来没有需求可以关联。请检查下{$lang->projectCommon}关联的{$lang->productCommon}中有没有需求,而且要确保它们已经审核通过。";
|
||||
$lang->project->productStories = "{$lang->projectCommon}关联的需求是{$lang->productCommon}需求的子集,并且只有评审通过的需求才能关联。请<a href='%s'>关联需求</a>。";
|
||||
$lang->project->doneProjects = '已结束';
|
||||
$lang->project->selectDept = '选择一个部门的成员';
|
||||
$lang->project->selectDept = '选择部门';
|
||||
$lang->project->selectDeptTitle = '选择一个部门的成员';
|
||||
$lang->project->copyTeam = '复制团队';
|
||||
$lang->project->copyFromTeam = "复制自{$lang->projectCommon}团队: <strong>%s</strong>";
|
||||
$lang->project->noMatched = "找不到包含'%s'的$lang->projectCommon";
|
||||
|
||||
@@ -981,9 +981,10 @@ class projectModel extends model
|
||||
*/
|
||||
public function buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, $type = 'projectStory')
|
||||
{
|
||||
$branchPairs = array();
|
||||
$productType = 'normal';
|
||||
$productNum = count($products);
|
||||
$branchPairs = array();
|
||||
$productType = 'normal';
|
||||
$productNum = count($products);
|
||||
$productPairs = array(0 => '');
|
||||
foreach($products as $product)
|
||||
{
|
||||
$productPairs[$product->id] = $product->name;
|
||||
|
||||
@@ -19,10 +19,18 @@
|
||||
<strong><?php echo $lang->project->manageMembers;?></strong>
|
||||
<i class='icon icon-angle-right text-muted'></i>
|
||||
</div>
|
||||
<div id='deptSelector'><?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDept}'");?></div>
|
||||
<?php if(count($teams2Import) != 1):?>
|
||||
<div id='copyTeam'><?php echo html::select('project', $teams2Import, $team2Import, "class='form-control chosen' onchange='choseTeam2Copy(this)' data-placeholder='{$lang->project->copyTeamTitle}'");?></div>
|
||||
<?php endif;?>
|
||||
<div id='importTeams' class='clearfix'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->project->selectDept?></span>
|
||||
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDeptTitle}'");?>
|
||||
</div>
|
||||
<?php if(count($teams2Import) != 1):?>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->project->copyTeam?></span>
|
||||
<?php echo html::select('project', $teams2Import, $team2Import, "class='form-control chosen' onchange='choseTeam2Copy(this)' data-placeholder='{$lang->project->copyTeamTitle}'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<form class='form-condensed' method='post' id='teamForm'>
|
||||
|
||||
@@ -61,7 +61,8 @@ class searchModel extends model
|
||||
$valueName = "value$i";
|
||||
|
||||
/* Skip empty values. */
|
||||
if($this->post->$valueName == false and $this->post->$valueName !== '0') continue;
|
||||
if($this->post->$fieldName == 'activatedCount' and $this->post->$valueName == '0') $this->post->$valueName = 'ZERO';
|
||||
if($this->post->$valueName == false) continue;
|
||||
if($this->post->$valueName == 'null') $this->post->$valueName = ''; // Null is special, stands to empty.
|
||||
if($this->post->$valueName == 'ZERO') $this->post->$valueName = 0; // ZERO is special, stands to 0.
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
.table-bordered tr > th:first-child, .table-bordered tr > td:first-child {border-left: 1px solid #ddd!important}
|
||||
.table-bordered tr > th:last-child, .table-bordered tr > td:last-child {border-right: 1px solid #ddd!important}
|
||||
|
||||
.panel-heading > strong > span {float: right; color: red;}
|
||||
.panel-heading > strong > span {float: right; color: #29a8cd;}
|
||||
|
||||
@@ -43,3 +43,33 @@ if(navigator.userAgent.indexOf("Firefox") < 0)
|
||||
this.style.height = (this.scrollHeight + 2) + "px";
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set modules and plans.
|
||||
*
|
||||
* @param int $branchID
|
||||
* @param int $productID
|
||||
* @param int $num
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setModuleAndPlan(branchID, productID, num)
|
||||
{
|
||||
moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=story&branch=' + branchID + '&num=' + num);
|
||||
$.get(moduleLink, function(modules)
|
||||
{
|
||||
if(!modules) modules = '<select id="module' + num + '" name="module[' + num + ']" class="form-control"></select>';
|
||||
$('#module' + num).replaceWith(modules);
|
||||
$("#module" + num + "_chosen").remove();
|
||||
$("#module" + num).chosen(defaultChosenOptions);
|
||||
});
|
||||
|
||||
planLink = createLink('productPlan', 'ajaxGetProductPlans', 'productID=' + productID + '&branch=' + branchID + '&num=' + num);
|
||||
$.get(planLink, function(plans)
|
||||
{
|
||||
if(!plans) plans = '<select id="plan' + num + '" name="plan[' + num + ']" class="form-control"></select>';
|
||||
$('#plan' + num).replaceWith(plans);
|
||||
$("#plan" + num + "_chosen").remove();
|
||||
$("#plan" + num).chosen(defaultChosenOptions);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<?php $source = $i == 0 ? '' : 'ditto';?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
@@ -90,7 +90,7 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<?php $source = $i - $nextStart == 0 ? '' : 'ditto';?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
@@ -115,7 +115,7 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<tbody>
|
||||
<tr class='text-center'>
|
||||
<td>%s</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[%s]", $branch, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[%s]", $branch, $branch, "class='form-control' onchange='setModuleAndPlan(this.value, $productID, \"%s\")'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[%s]", $plans, $planID, "class='form-control'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
.chosen-container {max-width: 980px}
|
||||
|
||||
#priRowCol, #estRowCol {width: 110px;}
|
||||
#priRowCol .input-group-btn .btn {width: 55px;}
|
||||
#priRowCol.has-custom-pri {width: 150px!important}
|
||||
.col-table .input-group {width: 100%}
|
||||
|
||||
#taskPlanCol, #mailCol {width: 50%}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
.table-bordered tr > th:first-child, .table-bordered tr > td:first-child {border-left: 1px solid #ddd!important}
|
||||
.table-bordered tr > th:last-child, .table-bordered tr > td:last-child {border-right: 1px solid #ddd!important}
|
||||
|
||||
.panel-heading > strong > span {float: right; color: red;}
|
||||
.panel-heading > strong > span {float: right; color: #29a8cd;}
|
||||
|
||||
@@ -19,7 +19,7 @@ $lang->task->delete = "Delete";
|
||||
$lang->task->deleted = "Deleted";
|
||||
$lang->task->view = "Info";
|
||||
$lang->task->logEfforts = "Man-Hour Log";
|
||||
$lang->task->record = "Estimate";
|
||||
$lang->task->record = "Est.";
|
||||
$lang->task->start = "Start";
|
||||
$lang->task->restart = "Continue";
|
||||
$lang->task->finish = "Finish";
|
||||
@@ -48,7 +48,7 @@ $lang->task->name = 'Name';
|
||||
$lang->task->type = 'Type';
|
||||
$lang->task->pri = 'Priority';
|
||||
$lang->task->mailto = 'Mailto';
|
||||
$lang->task->estimate = 'Estimation';
|
||||
$lang->task->estimate = 'Est.';
|
||||
$lang->task->estimateAB = 'Estimated';
|
||||
$lang->task->left = 'Est. Reamined';
|
||||
$lang->task->leftAB = 'Remained';
|
||||
@@ -176,7 +176,7 @@ $lang->task->report->charts['tasksPerType'] = 'Type';
|
||||
$lang->task->report->charts['tasksPerPri'] = 'Priority';
|
||||
$lang->task->report->charts['tasksPerStatus'] = 'Status';
|
||||
$lang->task->report->charts['tasksPerDeadline'] = 'Deadline';
|
||||
$lang->task->report->charts['tasksPerEstimate'] = 'Estimated Time';
|
||||
$lang->task->report->charts['tasksPerEstimate'] = 'Estimation';
|
||||
$lang->task->report->charts['tasksPerLeft'] = 'Time Left';
|
||||
$lang->task->report->charts['tasksPerConsumed'] = 'Time Consumed';
|
||||
$lang->task->report->charts['tasksPerFinishedBy'] = 'Finished By';
|
||||
|
||||
@@ -73,20 +73,20 @@
|
||||
$hiddenEst = strpos(",$showFields,", ',estimate,') === false;
|
||||
?>
|
||||
<?php if(!$hiddenPri):?>
|
||||
<div class='col-table' id='priRowCol'>
|
||||
<?php
|
||||
$hasCustomPri = false;
|
||||
foreach($lang->task->priList as $priKey => $priValue)
|
||||
{
|
||||
if($priKey != $priValue)
|
||||
{
|
||||
$hasCustomPri = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class='col-table<?php if($hasCustomPri) echo ' has-custom-pri';?>' id='priRowCol'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon fix-border br-0'><?php echo $lang->task->pri;?></span>
|
||||
<?php
|
||||
$hasCustomPri = false;
|
||||
foreach($lang->task->priList as $priKey => $priValue)
|
||||
{
|
||||
if($priKey != $priValue)
|
||||
{
|
||||
$hasCustomPri = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if($hasCustomPri):?>
|
||||
<?php echo html::select('pri', $lang->task->priList, '', "class='form-control'");?>
|
||||
<?php else: ?>
|
||||
|
||||
@@ -389,8 +389,8 @@ class testcase extends control
|
||||
$showFields = $this->config->testcase->custom->batchCreateFields;
|
||||
if($product->type == 'normal')
|
||||
{
|
||||
str_replace(array(0 => ",branch,", 1 => ",platform,"), '', $showFields);
|
||||
trim($showFields, ',');
|
||||
$showFields = str_replace(array(0 => ",branch,", 1 => ",platform,"), '', ",$showFields,");
|
||||
$showFields = trim($showFields, ',');
|
||||
}
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $showFields;
|
||||
|
||||
@@ -10,6 +10,7 @@ $(document).ready(function()
|
||||
{
|
||||
index = id.substring(5);
|
||||
module = $('#module' + index).val();
|
||||
branch = $('#branch' + index).val();
|
||||
if(module == 'ditto')
|
||||
{
|
||||
for(var i = index - 1; i >=0; i--)
|
||||
@@ -57,3 +58,24 @@ $(document).ready(function()
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Set modules.
|
||||
*
|
||||
* @param int $branchID
|
||||
* @param int $productID
|
||||
* @param int $num
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setModules(branchID, productID, num)
|
||||
{
|
||||
moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=story&branch=' + branchID + '&num=' + num);
|
||||
$.get(moduleLink, function(modules)
|
||||
{
|
||||
if(!modules) modules = '<select id="module' + num + '" name="module[' + num + ']" class="form-control"></select>';
|
||||
$('#module' + num).replaceWith(modules);
|
||||
$("#module" + num + "_chosen").remove();
|
||||
$("#module" + num).chosen(defaultChosenOptions);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
$visibleFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
if($field) $visibleFields[$field] = '';
|
||||
}
|
||||
$colspan = count($visibleFields) + 3;
|
||||
$hiddenStory = (isonlybody() and $story) ? ' hidden' : '';
|
||||
@@ -69,7 +69,7 @@ if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
|
||||
?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control' onchange='setModules(this.value, $productID, $i)'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $currentModuleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>' style='overflow:visible'> <?php echo html::select("story[$i]", $storyList, $story ? $story->id : '', 'class="form-control chosen"');?></td>
|
||||
<td style='overflow:visible'>
|
||||
@@ -94,7 +94,7 @@ if($hiddenStory and isset($visibleFields['story'])) $colspan -= 1;
|
||||
<tbody>
|
||||
<tr class='text-center'>
|
||||
<td>%s</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[%s]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[%s]", $branches, $branch, "class='form-control' onchange='setModules(this.value, $productID, \"%s\")'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[%s]", $moduleOptionMenu, $currentModuleID, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'story', ' hidden'); echo $hiddenStory;?>' style='overflow:visible'> <?php echo html::select("story[%s]", '', '', 'class="form-control"');?></td>
|
||||
<td style='overflow:visible'>
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
tfoot .table-actions #assignedTo_chosen a.chosen-default{height:26px;line-height:15px}
|
||||
tfoot .table-actions .input-group-addon{padding:5px 12px;}
|
||||
|
||||
tfoot.fixedTfootAction .chosen-results li.active-result {color: black;}
|
||||
|
||||
@@ -323,6 +323,25 @@ class tree extends control
|
||||
if($returnType == 'json') die(json_encode($optionMenu));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get modules.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $viewType
|
||||
* @param int $branchID
|
||||
* @param int $number
|
||||
* @access public
|
||||
* @return string the html select string.
|
||||
*/
|
||||
public function ajaxGetModules($productID, $viewType = 'story', $branchID, $number)
|
||||
{
|
||||
$modules = $this->tree->getOptionMenu($productID, $viewType, $startModuleID = 0, $branchID);
|
||||
|
||||
$moduleName = $viewType == 'bug' ? "modules[$number]" : "module[$number]";
|
||||
$modules = empty($modules) ? array('' => '') : $modules;
|
||||
die(html::select($moduleName, $modules, '', 'class=form-control'));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get a module's son modules.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user