* Finish Task #7711.

This commit is contained in:
holan20180123
2020-08-27 13:42:16 +08:00
parent f13b0b9e1f
commit 1062033526
119 changed files with 251 additions and 2891 deletions
-19
View File
@@ -46,17 +46,6 @@ $config->bug->custom->createFields = $config->bug->list->customCreateFields
$config->bug->custom->batchCreateFields = 'project,deadline,steps,type,severity,os,browser';
$config->bug->custom->batchEditFields = 'type,severity,pri,branch,assignedTo,deadline,status,resolvedBy,resolution';
if($config->global->flow == 'onlyTest')
{
$config->bug->list->allFields = str_replace(array('project, ', 'story, ', 'task,'), '', $config->bug->list->allFields);
$config->bug->list->exportFields = str_replace(array('project, ', 'story, ', 'task,'), '', $config->bug->list->exportFields);
$config->bug->list->customCreateFields = str_replace(array('project,', 'story,', 'task,'), '', $config->bug->list->customCreateFields);
$config->bug->list->customBatchCreateFields = str_replace('project,', '', $config->bug->list->customBatchCreateFields);
$config->bug->custom->batchCreateFields = str_replace('project,', '', $config->bug->custom->batchCreateFields);
}
$config->bug->editor = new stdclass();
$config->bug->editor->create = array('id' => 'steps', 'tools' => 'bugTools');
$config->bug->editor->edit = array('id' => 'steps,comment', 'tools' => 'bugTools');
@@ -113,14 +102,6 @@ $config->bug->search['fields']['closedDate'] = $lang->bug->closedDate;
$config->bug->search['fields']['lastEditedDate'] = $lang->bug->lastEditedDateAB;
$config->bug->search['fields']['deadline'] = $lang->bug->deadline;
if($config->global->flow == 'onlyTest')
{
unset($config->bug->search['fields']['project']);
unset($config->bug->search['fields']['plan']);
unset($config->bug->search['fields']['toTask']);
unset($config->bug->search['fields']['toStory']);
}
$config->bug->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->bug->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->bug->search['params']['steps'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
-8
View File
@@ -31,14 +31,6 @@ class bug extends control
$this->loadModel('task');
$this->view->products = $this->products = $this->product->getPairs('nocode');
if($this->config->global->flow == 'onlyTest')
{
$this->config->bug->list->customCreateFields = str_replace(array('project,', 'story,', 'task,'), '', $this->config->bug->list->customCreateFields);
$this->config->bug->list->customBatchCreateFields = str_replace('project,', '', $this->config->bug->list->customBatchCreateFields);
$this->config->bug->custom->batchCreateFields = str_replace('project,', '', $this->config->bug->custom->batchCreateFields);
}
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=bug")));
}
-39
View File
@@ -1,43 +1,4 @@
$(function()
{
if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150);
if(flow == 'onlyTest')
{
$('#subNavbar > .nav li[data-id=' + browseType + ']').addClass('active');
var $more = $('#subNavbar > .nav > li[data-id=more]');
if($more.find('.dropdown-menu').children().length)
{
$more.find('.dropdown-menu').children().each(function()
{
if($(this).hasClass('active')) $more.addClass('active');
});
}
var navWidth = $('#subNavbar > .nav').width();
var leftWidth = 0;
var rightWidth = 0;
$rightNav = $('#subNavbar > .nav > li.right');
rightLength = $rightNav.length;
for(i = 0; i < rightLength; i++) rightWidth += $rightNav.eq(i).width();
var maxWidth = navWidth - $('#subNavbar > .nav > #bysearchTab').width() - rightWidth - 100;
$('#subNavbar > .nav > li:not(.right)').each(function()
{
if(leftWidth > maxWidth)
{
if($(this).attr('id') != 'moreMenus' && $(this).attr('id') != 'bysearchTab')
{
$('#subNavbar').removeClass('hidden');
$('#subNavbar > ul').append($(this)[0]);
}
}
else
{
leftWidth += $(this).width();
}
})
}
});
-1
View File
@@ -495,7 +495,6 @@ function notice()
var branch = $('#branch').val();
if(typeof(branch) == 'undefined') branch = 0;
var link = createLink('release', 'create', 'productID=' + $('#product').val() + '&branch=' + branch);
if(typeof(flow) != 'undefined' && flow == 'onlyTest') link = createLink('build', 'create','projectID=' + $('#product').val());
link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createBuild + '</a> ';
html += '<a href="javascript:loadProductBuilds(' + $('#product').val() + ')">' + refresh + '</a>';
+2 -29
View File
@@ -91,35 +91,8 @@ class bugModel extends model
$this->lang->modulePageActions = $pageActions;
foreach($this->lang->bug->menu as $key => $menu)
{
if($this->config->global->flow == 'full') $this->loadModel('qa')->setSubMenu('bug', $key, $productID);
if($this->config->global->flow != 'onlyTest')
{
$replace = $productID;
}
else
{
$replace = array();
$replace['productID'] = $productID;
$replace['branch'] = $branch;
$replace['param'] = $moduleID;
/* Replace for dropdown submenu. */
if(isset($this->lang->bug->subMenu->$key))
{
$subMenu = common::createSubMenu($this->lang->bug->subMenu->$key, $replace);
/* Avoid the menu shaking when change it by js. */
if(isset($subMenu[$browseType]))
{
$currentSubMenu = $subMenu[$browseType];
$this->lang->bug->menu->more['link'] = "$currentSubMenu->text|" . implode('|', $currentSubMenu->link);
}
if(!empty($subMenu)) $this->lang->bug->menu->{$key}['subMenu'] = $subMenu;
}
if($this->app->getMethodName() != 'view') $this->lang->bug->menu->bysearch = "<a class='querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'> </i>{$this->lang->bug->byQuery}</a>";
}
$this->loadModel('qa')->setSubMenu('bug', $key, $productID);
$replace = $productID;
common::setMenuVars($this->lang->bug->menu, $key, $replace);
}
}
-7
View File
@@ -11,13 +11,6 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php if($config->global->flow == 'onlyTest'):?>
<style>
.nav > li > .btn-group > a, .nav > li > .btn-group > a:hover, .nav > li > .btn-group > a:focus{background: #1a4f85; border-color: #164270;}
.outer.with-side #featurebar {background: none; border: none; line-height: 0; margin: 0; min-height: 0; padding: 0; }
#querybox #searchform{border-bottom: 1px solid #ddd; margin-bottom: 20px;}
</style>
<?php endif;?>
<?php
include '../../common/view/datatable.fix.html.php';
js::set('browseType', $browseType);
+3 -3
View File
@@ -60,7 +60,7 @@ js::set('flow', $config->global->flow);
</div>
</td>
</tr>
<?php $showProject = (strpos(",$showFields,", ',project,') !== false && $config->global->flow != 'onlyTest');?>
<?php $showProject = (strpos(",$showFields,", ',project,') !== false);?>
<tr>
<th><?php echo ($showProject) ? $lang->bug->project : $lang->bug->type;?></th>
@@ -111,7 +111,7 @@ js::set('flow', $config->global->flow);
</td>
</tr>
<?php endif;?>
<?php if($this->config->global->flow != 'onlyTest' && $showProject):?>
<?php if($showProject):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<tr>
@@ -228,7 +228,7 @@ js::set('flow', $config->global->flow);
$showStory = strpos(",$showFields,", ',story,') !== false;
$showTask = strpos(",$showFields,", ',task,') !== false;
?>
<?php if(($showStory or $showTask) and $this->config->global->flow != 'onlyTest'):?>
<?php if(($showStory or $showTask)):?>
<tr>
<th><?php echo ($showStory) ? $lang->bug->story : $lang->bug->task;?></th>
<?php if($showStory):?>
-4
View File
@@ -112,14 +112,12 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
</div>
</td>
</tr>
<?php if($config->global->flow != 'onlyTest'):?>
<tr>
<th><?php echo $lang->bug->productplan;?></th>
<td>
<span id="planIdBox"><?php echo html::select('plan', $plans, $bug->plan, "class='form-control chosen'");?></span>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->bug->type;?></th>
<td><?php echo html::select('type', $lang->bug->typeList, $bug->type, "class='form-control chosen'"); ?></td>
@@ -172,7 +170,6 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
</tbody>
</table>
</div>
<?php if($config->global->flow != 'onlyTest'):?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->bug->legendPrjStoryTask;?></div>
<table class='table table-form'>
@@ -193,7 +190,6 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
</tbody>
</table>
</div>
<?php endif;?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->bug->legendLife;?></div>
<table class='table table-form'>
+1 -7
View File
@@ -77,7 +77,7 @@
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
if($config->global->flow != 'onlyTest') common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&project=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', '', $lang->bug->toStory);
common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&project=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', '', $lang->bug->toStory);
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
echo $this->buildOperateMenu($bug, 'view');
@@ -96,9 +96,7 @@
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a href='#legendBasicInfo' data-toggle='tab'><?php echo $lang->bug->legendBasicInfo;?></a></li>
<?php if($config->global->flow != 'onlyTest'):?>
<li><a href='#legendPrjStoryTask' data-toggle='tab'><?php echo $lang->bug->legendPrjStoryTask;?></a></li>
<?php endif;?>
</ul>
<div class='tab-content'>
<div class='tab-pane active' id='legendBasicInfo'>
@@ -229,7 +227,6 @@
</tbody>
</table>
</div>
<?php if($config->global->flow != 'onlyTest'):?>
<div class='tab-pane' id='legendPrjStoryTask'>
<table class='table table-data'>
<tbody>
@@ -258,7 +255,6 @@
</tbody>
</table>
</div>
<?php endif;?>
</div>
</div>
</div>
@@ -356,7 +352,6 @@
</td>
</tr>
<?php endif;?>
<?php if($config->global->flow != 'onlyTest'):?>
<?php if($bug->toStory != 0):?>
<tr>
<th><?php echo $lang->bug->toStory;?></th>
@@ -369,7 +364,6 @@
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$bug->toTask", '', true), "#$bug->toTask $bug->toTaskTitle", '', "class='iframe' data-width='80%'");?></td>
</tr>
<?php endif;?>
<?php endif;?>
</tbody>
</table>
</div>