* Finish task #4879.

This commit is contained in:
Yagami
2018-09-20 13:35:33 +08:00
parent ef95081be3
commit 8946190150
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -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)
{