summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2018-04-09 13:20:52 +0200
committerGitHub <noreply@github.com>2018-04-09 13:20:52 +0200
commit3f19eb06a0f0f1a599aeea13457bae3c3164dd8b (patch)
tree0751a23db6f5ac1cd1e2168b74c8ae8691971ad7
parent2b0b717258c7ed7b6addab3e4503561fc5c1cbfc (diff)
parent9e9e053b73f329bab28841c39dac5525f3265cfd (diff)
downloadnextcloud-server-3f19eb06a0f0f1a599aeea13457bae3c3164dd8b.tar.gz
nextcloud-server-3f19eb06a0f0f1a599aeea13457bae3c3164dd8b.zip
Merge pull request #9124 from nextcloud/stable13-9085-fix-progress-bar-hidden-before-the-upload-ends
[stable13] Fix progress bar hidden before the upload ends
-rw-r--r--apps/files/js/file-upload.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index ad56492730e..6bee3c3bdc2 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -958,7 +958,6 @@ OC.Uploader.prototype = _.extend({
status = upload.getResponseStatus();
}
self.log('fail', e, upload);
- self._hideProgressBar();
if (data.textStatus === 'abort') {
self.showUploadCancelMessage();
@@ -1109,14 +1108,11 @@ OC.Uploader.prototype = _.extend({
self.log('progress handle fileuploadstop', e, data);
self.clear();
+ self._hideProgressBar();
self.trigger('stop', e, data);
});
fileupload.on('fileuploadfail', function(e, data) {
self.log('progress handle fileuploadfail', e, data);
- //if user pressed cancel hide upload progress bar and cancel button
- if (data.errorThrown === 'abort') {
- self._hideProgressBar();
- }
self.trigger('fail', e, data);
});
var disableDropState = function() {
@@ -1175,11 +1171,9 @@ OC.Uploader.prototype = _.extend({
fileupload.on('fileuploaddone', function(e, data) {
var upload = self.getUpload(data);
upload.done().then(function() {
- self._hideProgressBar();
self.trigger('done', e, upload);
}).fail(function(status, response) {
var message = response.message;
- self._hideProgressBar();
if (status === 507) {
// not enough space
OC.Notification.show(message || t('files', 'Not enough free space'), {type: 'error'});