* adjust code for task #2577.
This commit is contained in:
@@ -1,12 +1,30 @@
|
||||
$(document).on('keyup', 'form textarea', function()
|
||||
{
|
||||
var preSelect = $(this).parent().prev().find('select');
|
||||
var preSelect = $(this).closest('table').parent().prev().find('select');
|
||||
if($(this).val() == '' && $(preSelect).val() == 'fail')
|
||||
{
|
||||
$(preSelect).val('pass');
|
||||
}
|
||||
else if($(this).val() != '' && $(preSelect).val() == 'pass')
|
||||
{
|
||||
$(preSelect).val('fail');
|
||||
$(preSelect).val('fail').parent().addClass('has-error');
|
||||
setTimeout(function(){$(preSelect).parent().removeClass('has-error');},'1000');
|
||||
}
|
||||
})
|
||||
|
||||
/* Delete a file. */
|
||||
function deleteFile(fileID)
|
||||
{
|
||||
if(!fileID) return;
|
||||
hiddenwin.location.href =createLink('file', 'delete', 'fileID=' + fileID);
|
||||
}
|
||||
|
||||
/* Download a file, append the mouse to the link. Thus we call decide to open the file in browser no download it. */
|
||||
function downloadFile(fileID)
|
||||
{
|
||||
if(!fileID) return;
|
||||
var sessionString = '<?php echo $sessionString;?>';
|
||||
var url = createLink('file', 'download', 'fileID=' + fileID + '&mouse=left') + sessionString;
|
||||
window.open(url, '_blank');
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user