diff options
author | pdessauw <pdessauw@gmail.com> | 2014-06-19 14:11:57 -0400 |
---|---|---|
committer | pdessauw <pdessauw@gmail.com> | 2014-09-03 09:59:01 -0400 |
commit | 0d078e48ce71d35bf240ec2b3d48a37f1b96115a (patch) | |
tree | 2d3400060e6f31b18d9f7c239d0ef3cad682ec01 /apps/files/js/file-upload.js | |
parent | 373d1c5e9f4c85e86a0ac1b53b3e54a0d9cdf06e (diff) | |
download | nextcloud-server-0d078e48ce71d35bf240ec2b3d48a37f1b96115a.tar.gz nextcloud-server-0d078e48ce71d35bf240ec2b3d48a37f1b96115a.zip |
Highlight every uploaded files and scroll down to the last one
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r-- | apps/files/js/file-upload.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index ff999bae4ff..310799b9513 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -427,6 +427,14 @@ OC.Upload = { data.textStatus = 'servererror'; data.errorThrown = result[0].data.message; // error message has been translated on server fu._trigger('fail', e, data); + } else { // Successful upload + // Checking that the uploaded file is the last one and contained in the current directory + if (data.files[0] === data.originalFiles[data.originalFiles.length - 1] && + result[0].directory === FileList.getCurrentDirectory()) { + // Scroll to the last uploaded file and highlight all of them + var fileList = _.pluck(data.originalFiles, 'name'); + FileList.highlightFiles(fileList); + } } }, /** |