diff --git a/files/js/files.js b/files/js/files.js index 28259606ce..a896314faf 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -347,10 +347,15 @@ $(document).ready(function() { function scanFiles(force){ force=!!force; //cast to bool + var fileCount=0; $('#scanning-message').show(); + $('#fileList').remove(); var scannerEventSource=new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force:force}); + scanFiles.cancel=scannerEventSource.close.bind(scannerEventSource); scannerEventSource.listen('scanned',function(file){ - console.log(file);//TODO: make this into proper feedback + fileCount++; + $('#scan-count').text(fileCount+' files scanned'); + $('#scan-current').text(file); }); scannerEventSource.listen('success',function(success){ if(success){ diff --git a/files/templates/index.php b/files/templates/index.php index 92c579c244..fa4643de75 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -61,7 +61,10 @@
- t('Files are being scanned, please wait.');?> + t('Current scanning');?>