diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-09-17 16:11:20 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-09-17 16:11:20 +0200 |
commit | 3273beb887fb8fd4c317a0263caa38a26e34f95e (patch) | |
tree | fe8eb14cbf53e2f9f52455b5aad7cf987308c55b /apps/files/js | |
parent | b1a6acde30232367f4e8d66372fedfd1065c5d5a (diff) | |
parent | f85b709fae1869f684a4c91067b6a38b4e629163 (diff) | |
download | nextcloud-server-3273beb887fb8fd4c317a0263caa38a26e34f95e.tar.gz nextcloud-server-3273beb887fb8fd4c317a0263caa38a26e34f95e.zip |
Merge branch 'master' of github.com:owncloud/core into vcategories_db
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/files.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 101e2bad2e4..aefd6f20bec 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -253,10 +253,10 @@ $(document).ready(function() { var img = OC.imagePath('core', 'loading.gif'); var tr=$('tr').filterAttr('data-file',dirName); tr.find('td.filename').attr('style','background-image:url('+img+')'); - uploadtext.text('1 file uploading'); + uploadtext.text(t('files', '1 file uploading')); uploadtext.show(); } else { - uploadtext.text(currentUploads + ' files uploading') + uploadtext.text(currentUploads + ' ' + t('files', 'files uploading')); } } } @@ -301,7 +301,7 @@ $(document).ready(function() { uploadtext.text(''); uploadtext.hide(); } else { - uploadtext.text(currentUploads + ' files uploading') + uploadtext.text(currentUploads + ' ' + t('files', 'files uploading')); } }) .error(function(jqXHR, textStatus, errorThrown) { @@ -316,7 +316,7 @@ $(document).ready(function() { uploadtext.text(''); uploadtext.hide(); } else { - uploadtext.text(currentUploads + ' files uploading') + uploadtext.text(currentUploads + ' ' + t('files', 'files uploading')); } $('#notification').hide(); $('#notification').text(t('files', 'Upload cancelled.')); @@ -556,10 +556,12 @@ $(document).ready(function() { eventSource.listen('progress',function(progress){ $('#uploadprogressbar').progressbar('value',progress); }); - eventSource.listen('success',function(mime){ + eventSource.listen('success',function(data){ + var mime=data.mime; + var size=data.size; $('#uploadprogressbar').fadeOut(); var date=new Date(); - FileList.addFile(localName,0,date,false,hidden); + FileList.addFile(localName,size,date,false,hidden); var tr=$('tr').filterAttr('data-file',localName); tr.data('mime',mime); getMimeIcon(mime,function(path){ @@ -661,7 +663,7 @@ function scanFiles(force,dir){ var scannerEventSource=new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force:force,dir:dir}); scanFiles.cancel=scannerEventSource.close.bind(scannerEventSource); scannerEventSource.listen('scanning',function(data){ - $('#scan-count').text(data.count+' files scanned'); + $('#scan-count').text(data.count + ' ' + t('files', 'files scanned')); $('#scan-current').text(data.file+'/'); }); scannerEventSource.listen('success',function(success){ @@ -669,7 +671,7 @@ function scanFiles(force,dir){ if(success){ window.location.reload(); }else{ - alert('error while scanning'); + alert(t('files', 'error while scanning')); } }); } |