This commit is contained in:
tianshujie98
2021-03-10 15:27:04 +08:00
9 changed files with 27 additions and 11 deletions

View File

@@ -746,7 +746,6 @@ class commonModel extends model
{
$class = $key == $searchObject ? "class='selected'" : '';
if($key == 'program') $key = 'program-product';
if($key == 'project') $key = 'project-index';
if($key == 'deploystep') $key = 'deploy-viewstep';
echo "<li $class><a href='javascript:$.setSearchType(\"$key\");' data-value='{$key}'>{$value}</a></li>";

View File

@@ -678,9 +678,8 @@ function changeSearchObject()
if(searchObjectList.indexOf(',' + searchType + ',') == -1) var searchType = 'bug';
if(searchType == 'program') var searchType = 'program-pgmproduct';
if(searchType == 'project') var searchType = 'program-index';
if(searchType == 'execution') var searchType = 'project-view';
if(searchType == 'program') var searchType = 'program-product';
if(searchType == 'deploystep') var searchType = 'deploy-viewstep';
$("#searchType").val(searchType);
return searchType;

View File

@@ -155,6 +155,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
}
?>
</li>
<?php if(!empty($productID)): ?>
<?php $batchDisabled = common::hasPriv('story', 'batchCreate') ? '' : "class='disabled'";?>
<li <?php echo $batchDisabled;?>>
<?php
@@ -163,6 +164,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openApp'");
?>
</li>
<?php endif;?>
</ul>
</div>
<?php $isShow = $isProjectStory ? '' : "style='display: none;'";?>
@@ -180,7 +182,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
echo '</button>';
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
if(common::hasPriv('projectstory', 'linkStory')) echo '<li>' . html::a($this->createLink('projectstory', 'linkStory', "project={$this->session->PRJ}"), $lang->execution->linkStory). "</li>";
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
if(common::hasPriv('project', 'importPlanStories') and !empty($productID)) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
echo '</ul>';
}
?>

View File

@@ -293,7 +293,7 @@ class story extends control
$this->view->position[] = html::a($this->createLink('product', 'browse', "product=$productID&branch=$branch"), $product->name);
$this->view->position[] = $this->lang->story->common;
$this->view->position[] = $this->lang->story->create;
$this->view->products = $products;
$this->view->products = array('' => '') + $products;
$this->view->users = $users;
$this->view->moduleID = $moduleID ? $moduleID : (int)$this->cookie->lastStoryModule;
$this->view->moduleOptionMenu = $moduleOptionMenu;

View File

@@ -39,7 +39,7 @@
<?php if($product->type != 'normal'):?>
<div class='input-group'>
<?php endif;?>
<?php echo html::select('product', $products, $productID, "onchange='loadProduct(this.value);' class='form-control chosen control-product'");?>
<?php echo html::select('product', $products, empty($productID) ? '' : $productID, "onchange='loadProduct(this.value);' class='form-control chosen control-product'");?>
<?php if($product->type != 'normal'):?>
<span class='input-group-addon fix-border fix-padding'></span>
<?php echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control chosen control-branch'");?>

View File

@@ -522,8 +522,8 @@ class testcase extends control
if(!$case) die(js::error($this->lang->notFound) . js::locate('back'));
if($case->auto == 'unit')
{
$this->lang->testcase->subMenu->testcase->feature['alias'] = '';
$this->lang->testcase->subMenu->testcase->unit['alias'] = 'view';
$this->lang->testcase->subMenu->testcase->feature['alias'] = '';
$this->lang->testcase->subMenu->testcase->unit['alias'] = 'view';
$this->lang->testcase->subMenu->testcase->unit['subModule'] = 'testcase';
}
@@ -637,6 +637,14 @@ class testcase extends control
}
$case = $this->testcase->getById($caseID);
if(!$case) die(js::error($this->lang->notFound) . js::locate('back'));
if($case->auto == 'unit')
{
$this->lang->testcase->subMenu->testcase->feature['alias'] = '';
$this->lang->testcase->subMenu->testcase->unit['alias'] = 'view';
$this->lang->testcase->subMenu->testcase->unit['subModule'] = 'testcase';
}
if(empty($case->steps))
{
$step = new stdclass();

View File

@@ -270,4 +270,11 @@
</div>
</form>
</div>
<script>
$(function()
{
$('#subNavbar [data-id=testcase]').addClass('active');
$('#navbar [data-id=testcase]').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>

View File

@@ -354,6 +354,7 @@ js::set('retrack', $lang->retrack);
$(function()
{
$('#subNavbar [data-id=testcase]').addClass('active');
$('#navbar [data-id=testcase]').addClass('active');
})
</script>
<?php endif;?>

View File

@@ -67,8 +67,8 @@
<td class='text-center fail'><?php echo $task->failCount?></td>
<td class='c-actions'>
<?php
common::printIcon('testtask', 'unitCases', "taskID=$task->id", '', 'list', 'list-alt','','',true);
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list','','','',true);
common::printIcon('testtask', 'unitCases', "taskID=$task->id", '', 'list', 'list-alt', '', 'iframe', true, 'data-width="70%"');
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
if(common::hasPriv('testtask', 'delete', $task))
{
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");