fixes #1463 - file size is now displayed correctly in IE8

This commit is contained in:
Thomas Mueller 2013-03-26 21:28:01 +01:00
parent e0e5cb73bf
commit 586a47b186
1 changed files with 6 additions and 2 deletions

View File

@ -407,7 +407,9 @@ $(document).ready(function() {
$('tr').filterAttr('data-file',file.name).data('mime',file.mime).data('id',file.id); $('tr').filterAttr('data-file',file.name).data('mime',file.mime).data('id',file.id);
var size = $('tr').filterAttr('data-file',file.name).find('td.filesize').text(); var size = $('tr').filterAttr('data-file',file.name).find('td.filesize').text();
if(size==t('files','Pending')){ if(size==t('files','Pending')){
$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size); var sizeElement = $('tr').filterAttr('data-file',file.name).find('td.filesize');
sizeElement.text(simpleFileSize(file.size));
sizeElement.attr('title',humanFileSize(file.size));
} }
//TODO update file upload size limit //TODO update file upload size limit
FileList.loadingDone(file.name, file.id); FileList.loadingDone(file.name, file.id);
@ -438,7 +440,9 @@ $(document).ready(function() {
$('tr').filterAttr('data-file',file.name).data('mime',file.mime).data('id',file.id); $('tr').filterAttr('data-file',file.name).data('mime',file.mime).data('id',file.id);
var size = $('tr').filterAttr('data-file',file.name).find('td.filesize').text(); var size = $('tr').filterAttr('data-file',file.name).find('td.filesize').text();
if(size==t('files','Pending')){ if(size==t('files','Pending')){
$('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size); var sizeElement = $('tr').filterAttr('data-file',file.name).find('td.filesize');
sizeElement.text(simpleFileSize(file.size));
sizeElement.attr('title',humanFileSize(file.size));
} }
//TODO update file upload size limit //TODO update file upload size limit
FileList.loadingDone(file.name, file.id); FileList.loadingDone(file.name, file.id);