diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-01-31 13:56:58 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-01-31 13:56:58 +0100 |
commit | 7ff86cfebe27c6cf3fc1926faeea541b84b5eff9 (patch) | |
tree | 6d86107ee2bf83dd572ad9d5c2a787bdf12fd2ea /files/js/files.js | |
parent | 803f86e0fcd77e3888daa387142fd197083d5fd3 (diff) | |
download | nextcloud-server-7ff86cfebe27c6cf3fc1926faeea541b84b5eff9.tar.gz nextcloud-server-7ff86cfebe27c6cf3fc1926faeea541b84b5eff9.zip |
provide live feedback while scanning files
Diffstat (limited to 'files/js/files.js')
-rw-r--r-- | files/js/files.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/files/js/files.js b/files/js/files.js index 28259606cea..a896314faf0 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){ |