diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-12 14:56:23 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-12 14:56:23 +0200 |
commit | eb445103e9caaaba41e30b4e53379aa6030ac65d (patch) | |
tree | e91b2d900d9bdba0ca01adab3162d2316bb121c6 | |
parent | 5108f48c97448c4a7eff4d26b2a453882a2b44be (diff) | |
parent | aedb7a7e702037acb02dc82d94fe651aaa969539 (diff) | |
download | nextcloud-server-eb445103e9caaaba41e30b4e53379aa6030ac65d.tar.gz nextcloud-server-eb445103e9caaaba41e30b4e53379aa6030ac65d.zip |
Merge pull request #19708 from owncloud/revert-19628-files-canceluploaddebounce
Revert "Debounce cancel upload message"
-rw-r--r-- | apps/files/js/file-upload.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 77b85ecd7da..8bae8567a05 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -75,9 +75,6 @@ OC.Upload = { this._uploads.push(jqXHR); } }, - showUploadCancelMessage: _.debounce(function() { - OC.Notification.showTemporary(t('files', 'Upload cancelled.'), {timeout: 10}); - }, 500), /** * Checks the currently known uploads. * returns true if any hxr has the state 'pending' @@ -418,10 +415,10 @@ OC.Upload = { OC.Upload.log('fail', e, data); if (typeof data.textStatus !== 'undefined' && data.textStatus !== 'success' ) { if (data.textStatus === 'abort') { - OC.Upload.showUploadCancelMessage(); + OC.Notification.show(t('files', 'Upload cancelled.')); } else { // HTTP connection problem - OC.Notification.showTemporary(data.errorThrown, {timeout: 10}); + OC.Notification.show(data.errorThrown); if (data.result) { var result = JSON.parse(data.result); if (result && result[0] && result[0].data && result[0].data.code === 'targetnotfound') { @@ -430,6 +427,10 @@ OC.Upload = { } } } + //hide notification after 10 sec + setTimeout(function() { + OC.Notification.hide(); + }, 10000); } OC.Upload.deleteUpload(data); }, |