Merge branch 'ticket_330' into 'master'

Ticket 330

See merge request easycorp/zentaopms!6866
This commit is contained in:
王怡栋
2023-02-07 03:09:06 +00:00
6 changed files with 27 additions and 15 deletions
+2
View File
@@ -46,6 +46,8 @@
.minw-80px {min-width: 80px;}
.title-group.required:after {display: none;}
.title-group.required > .required:after {display: block; right: 29px; top: 5px;}
#titleBox.required:after{display: block; right: 29px; top: 5px;}
#priRequiredBox.required:after{display: block; right: -12px; top: 5px;}
.pri-selector > .btn {padding: 5px 8px !important; width: 100%;}
.pri-selector > .dropdown-menu {padding: 10px;}
+5 -5
View File
@@ -25,13 +25,13 @@
<thead>
<tr class='text-center'>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='c-module<?php echo strpos($config->testcase->create->requiredFields, 'module') ? ' required' : '';?>'><?php echo $lang->testcase->module;?></th>
<th class='c-module<?php echo strpos($config->testcase->create->requiredFields, 'module') !== false ? ' required' : '';?>'><?php echo $lang->testcase->module;?></th>
<th class='required'><?php echo $lang->testcase->title;?></th>
<th class='c-status required'><?php echo $lang->testcase->type;?></th>
<th class='c-status'><?php echo $lang->testcase->pri;?></th>
<th class='c-text'><?php echo $lang->testcase->precondition;?></th>
<th class='c-text'><?php echo $lang->testcase->keywords;?></th>
<th class='c-text'><?php echo $lang->testcase->stage;?></th>
<th class='c-status<?php echo strpos($config->testcase->create->requiredFields, 'pri') !== false ? ' required' : '';?>'><?php echo $lang->testcase->pri;?></th>
<th class='c-text<?php echo strpos($config->testcase->create->requiredFields, 'precondition') !== false ? ' required' : '';?>'><?php echo $lang->testcase->precondition;?></th>
<th class='c-text<?php echo strpos($config->testcase->create->requiredFields, 'keywords') !== false ? ' required' : '';?>'><?php echo $lang->testcase->keywords;?></th>
<th class='c-text<?php echo strpos($config->testcase->create->requiredFields, 'stage') !== false ? ' required' : '';?>'><?php echo $lang->testcase->stage;?></th>
</tr>
</thead>
<tbody>
+7 -6
View File
@@ -33,7 +33,7 @@
<?php echo html::select('lib', $libraries, $libID, "onchange='loadLibModules(this.value);' class='form-control chosen'");?>
</div>
</td>
<td style='padding-left:15px;'<?php echo strpos($config->testcase->create->requiredFields, 'module') ? ' class="required"' : '';?>>
<td style='padding-left:15px;'<?php echo strpos($config->testcase->create->requiredFields, 'module') !== false ? ' class="required"' : '';?>>
<div class='input-group' id='moduleIdBox'>
<span class="input-group-addon w-80px"><?php echo $lang->testcase->module?></span>
<?php
@@ -55,7 +55,7 @@
<th><?php echo $lang->testcase->type;?></th>
<td><?php echo html::select('type', $lang->testcase->typeList, $type, "class='form-control chosen'");?></td>
<?php if(strpos(",$showFields,", 'stage') !== false):?>
<td style='padding-left:15px'>
<td style='padding-left:15px'<?php echo strpos($config->testcase->create->requiredFields, 'stage') !== false ? ' class="required"' : '';?>>
<div class='input-group'>
<span class='input-group-addon w-80px'><?php echo $lang->testcase->stage?></span>
<?php echo html::select('stage[]', $lang->testcase->stageList, $stage, "class='form-control chosen' multiple='multiple'");?>
@@ -67,7 +67,7 @@
<th><?php echo $lang->testcase->title;?></th>
<td colspan='2'>
<div class="input-group title-group">
<div class="input-control has-icon-right">
<div id="titleBox" class="input-control has-icon-right">
<?php echo html::input('title', $caseTitle, "class='form-control'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
@@ -101,7 +101,8 @@
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
<?php else: ?>
<?php ksort($priList);?>
<div class="input-group-btn pri-selector" data-type="pri">
<?php $hasPri = strpos($config->testcase->create->requiredFields, 'pri') !== false ? True : False;?>
<div <?php echo $hasPri ? "id='priRequiredBox'" : '';?> class="input-group-btn pri-selector <?php echo $hasPri ? 'required' : '';?>" data-type="pri">
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($pri) ? '0' : $pri?>" title="<?php echo $pri?>"><?php echo $pri?></span></span> &nbsp;<span class="caret"></span>
</button>
@@ -116,7 +117,7 @@
</tr>
<tr>
<th><?php echo $lang->testcase->precondition;?></th>
<td colspan='2'><?php echo html::textarea('precondition', $precondition, " rows='2' class='form-control'");?></td>
<td colspan='2' <?php echo strpos($config->testcase->create->requiredFields, 'precondition') !== false ? ' class="required"' : '';?>><?php echo html::textarea('precondition', $precondition, " rows='2' class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->testcase->steps;?></th>
@@ -189,7 +190,7 @@
<?php if(strpos(",$showFields,", ',keywords,') !== false):?>
<tr>
<th><?php echo $lang->testcase->keywords;?></th>
<td colspan='2'><?php echo html::input('keywords', '', "class='form-control'");?></td>
<td colspan='2' <?php echo strpos($config->testcase->create->requiredFields, 'keywords') !== false ? ' class="required"' : '';?>><?php echo html::input('keywords', '', "class='form-control'");?></td>
</tr>
<?php endif;?>
<tr>
+2
View File
@@ -39,6 +39,8 @@
.title-group.required:after {display: none;}
.title-group.required > .required:after {display: block; right: 29px; top: 5px;}
#titleBox.required:after{display: block; right: 29px; top: 5px;}
#priRequiredBox.required:after{display: block; right: -12px; top: 5px;}
.pri-selector > .btn {padding: 5px 8px !important; width: 100%;}
.pri-selector > .dropdown-menu {padding: 10px;}
.stageBox {padding-left: 15px !important;}
+6
View File
@@ -36,11 +36,17 @@ $(function()
$searchInput.focus();
});
};
$(document).on('change', '#story', function()
{
if($(this).val() === 'showmore') showSearchModal();
});
$(document).on('click', '#priRequiredBox', function()
{
$('#priSelect').removeClass('required');
});
$(document).on('click', '#story_chosen .chosen-results > li.no-results', showSearchModal);
$searchStories.on('hide.zui.modal', function()
+5 -4
View File
@@ -111,7 +111,7 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
<th><?php echo $lang->testcase->title;?></th>
<td colspan='2'>
<div class="input-group title-group">
<div class="input-control has-icon-right">
<div id='titleBox' class="input-control has-icon-right">
<?php echo html::input('title', $caseTitle, "class='form-control'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
@@ -145,11 +145,12 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control priBox $hiddenPri'");?>
<?php else: ?>
<?php ksort($priList);?>
<div class="input-group-btn pri-selector priBox <?php echo $hiddenPri;?>" data-type="pri">
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
<?php $hasPri = strpos($config->testcase->create->requiredFields, 'pri') !== false ? True : False;?>
<div class="input-group-btn pri-selector <?php echo $hiddenPri;?>" data-type="pri">
<button <?php echo $hasPri ? "id='priRequiredBox'" : '';?> type="button" class="btn dropdown-toggle br-0 <?php echo $hasPri ? 'required' : '';?>" data-toggle="dropdown">
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($pri) ? '0' : $pri?>" title="<?php echo $pri?>"><?php echo $pri?></span></span> &nbsp;<span class="caret"></span>
</button>
<div class='dropdown-menu pull-right'>
<div class='dropdown-menu pull-right' id="priSelect">
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
</div>
</div>