mirror of
https://github.com/nextcloud/server.git
synced 2026-03-05 15:01:16 -05:00
Increased upload error delay to 10 seconds
Fixes #5662 Also made it use OC.Notification instead of directly access the notification HTML element.
This commit is contained in:
parent
013444813e
commit
c16fbbf386
1 changed files with 5 additions and 6 deletions
|
|
@ -303,16 +303,15 @@ $(document).ready(function() {
|
|||
OC.Upload.log('fail', e, data);
|
||||
if (typeof data.textStatus !== 'undefined' && data.textStatus !== 'success' ) {
|
||||
if (data.textStatus === 'abort') {
|
||||
$('#notification').text(t('files', 'Upload cancelled.'));
|
||||
OC.Notification.show(t('files', 'Upload cancelled.'));
|
||||
} else {
|
||||
// HTTP connection problem
|
||||
$('#notification').text(data.errorThrown);
|
||||
OC.Notification.show(data.errorThrown);
|
||||
}
|
||||
$('#notification').fadeIn();
|
||||
//hide notification after 5 sec
|
||||
//hide notification after 10 sec
|
||||
setTimeout(function() {
|
||||
$('#notification').fadeOut();
|
||||
}, 5000);
|
||||
OC.Notification.hide();
|
||||
}, 10000);
|
||||
}
|
||||
OC.Upload.deleteUpload(data);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue