* Finish task #4879.
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
custom = false;
|
||||
$(document).on('keyup', 'form textarea', function()
|
||||
{
|
||||
var preSelect = $(this).closest('table').parent().prev().find('select');
|
||||
if($(this).val() == '' && $(preSelect).val() == 'fail')
|
||||
if($(this).val() == '' && $(preSelect).val() == 'fail' && !custom)
|
||||
{
|
||||
$(preSelect).val('pass');
|
||||
}
|
||||
else if($(this).val() != '' && $(preSelect).val() == 'pass')
|
||||
else if($(this).val() != '' && $(preSelect).val() == 'pass' && !custom)
|
||||
{
|
||||
$(preSelect).val('fail').parent().addClass('has-error');
|
||||
setTimeout(function(){$(preSelect).parent().removeClass('has-error');},'1000');
|
||||
}
|
||||
})
|
||||
|
||||
function checkStepValue(result)
|
||||
{
|
||||
if(result == 'pass') custom = true;
|
||||
}
|
||||
|
||||
/* Delete a file. */
|
||||
function deleteFile(fileID)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</td>
|
||||
<?php if($step->type != 'group'):?>
|
||||
<td class='text-left'><?php echo nl2br($step->expect);?></td>
|
||||
<td class='text-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, 'pass', "class='form-control'");?></td>
|
||||
<td class='text-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, 'pass', "class='form-control' onchange='checkStepValue(this.value)'");?></td>
|
||||
<td>
|
||||
<table class='w-p100'>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user