diff options
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r-- | apps/files/js/files.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index ec2f159b4ca..0c00fe8c922 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -336,7 +336,7 @@ $(document).ready(function() { if(response[0] != undefined && response[0].status == 'success') { var file=response[0]; delete uploadingFiles[file.name]; - $('tr').filterAttr('data-file',file.name).data('mime',file.mime); + $('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(); if(size==t('files','Pending')){ $('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size); @@ -366,7 +366,7 @@ $(document).ready(function() { if(response[0] != undefined && response[0].status == 'success') { var file=response[0]; delete uploadingFiles[file.name]; - $('tr').filterAttr('data-file',file.name).data('mime',file.mime); + $('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(); if(size==t('files','Pending')){ $('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size); @@ -512,7 +512,7 @@ $(document).ready(function() { var date=new Date(); FileList.addFile(name,0,date,false,hidden); var tr=$('tr').filterAttr('data-file',name); - tr.data('mime','text/plain'); + tr.data('mime','text/plain').data('id',result.data.id); getMimeIcon('text/plain',function(path){ tr.find('td.filename').attr('style','background-image:url('+path+')'); }); @@ -560,11 +560,12 @@ $(document).ready(function() { eventSource.listen('success',function(data){ var mime=data.mime; var size=data.size; + var id=data.id; $('#uploadprogressbar').fadeOut(); var date=new Date(); FileList.addFile(localName,size,date,false,hidden); var tr=$('tr').filterAttr('data-file',localName); - tr.data('mime',mime); + tr.data('mime',mime).data('id',id); getMimeIcon(mime,function(path){ tr.find('td.filename').attr('style','background-image:url('+path+')'); }); |