From 7da3492ab5afc2b3df95ddbc30be13edf6db6c32 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 16 Sep 2012 17:05:08 +0200 Subject: show the size of new files when using New->From Url --- apps/files/js/files.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 101e2bad2e4..30c9b848434 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -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){ -- cgit v1.2.3 From 7a7d2a06b3884839d570cb426f91563edc5b8177 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Mon, 17 Sep 2012 10:54:06 +0300 Subject: Adding a few more string to translation --- apps/files/js/files.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 30c9b848434..55b48ff075b 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.')); @@ -663,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){ @@ -671,7 +671,7 @@ function scanFiles(force,dir){ if(success){ window.location.reload(); }else{ - alert('error while scanning'); + alert(t('files', 'error while scanning')); } }); } -- cgit v1.2.3 From 21bffbfb6964d46e36240d2001dd8bb4533b6d3d Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Mon, 17 Sep 2012 11:14:44 +0300 Subject: Enhanced space handling - thx fmms --- apps/files/js/files.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 55b48ff075b..aefd6f20bec 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -256,7 +256,7 @@ $(document).ready(function() { uploadtext.text(t('files', '1 file uploading')); uploadtext.show(); } else { - uploadtext.text(currentUploads + t('files', ' files uploading')); + uploadtext.text(currentUploads + ' ' + t('files', 'files uploading')); } } } @@ -301,7 +301,7 @@ $(document).ready(function() { uploadtext.text(''); uploadtext.hide(); } else { - uploadtext.text(currentUploads + t('files', ' 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 + t('files', ' files uploading')); + uploadtext.text(currentUploads + ' ' + t('files', 'files uploading')); } $('#notification').hide(); $('#notification').text(t('files', 'Upload cancelled.')); @@ -663,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+t('files',' files scanned')); + $('#scan-count').text(data.count + ' ' + t('files', 'files scanned')); $('#scan-current').text(data.file+'/'); }); scannerEventSource.listen('success',function(success){ -- cgit v1.2.3 From 597fed4fde9d1e3e39b8ca492dbfd324b17ffd58 Mon Sep 17 00:00:00 2001 From: Tom Needham Date: Mon, 17 Sep 2012 15:28:13 +0000 Subject: Fix oc-1726, cannot delete multiple files one by one without refresh --- apps/files/js/filelist.js | 1 - 1 file changed, 1 deletion(-) (limited to 'apps/files/js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 7ebfd4b68bb..f2b558496e0 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -260,7 +260,6 @@ var FileList={ FileList.prepareDeletion(files); } FileList.lastAction(); - return; } FileList.prepareDeletion(files); // NOTE: Temporary fix to change the text to unshared for files in root of Shared folder -- cgit v1.2.3