From 8ea80e114ae508586947db614b37db6b35972a9c Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 19 Feb 2016 12:09:46 +0100 Subject: Accumulate notifications instead of blinking This makes it possible to display multiple notifications. If the options.type is set to "error", it will also add a close button. --- apps/files/js/file-upload.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/files/js/file-upload.js') diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 8ba294e2a7f..bd80afd072c 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -472,7 +472,11 @@ OC.Upload = { OC.Upload.showUploadCancelMessage(); } else { // HTTP connection problem - OC.Notification.showTemporary(data.errorThrown, {timeout: 10}); + var message = t('files', 'Error uploading file "{fileName}": {message}', { + fileName: data.files[0].name, + message: data.errorThrown + }); + OC.Notification.show(message, {timeout: 0, type: 'error'}); if (data.result) { var result = JSON.parse(data.result); if (result && result[0] && result[0].data && result[0].data.code === 'targetnotfound') { -- cgit v1.2.3