summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-14 12:50:55 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-14 12:50:55 +0200
commitd8f0afaf9f0e8f373895a1b280e7a525d1f63160 (patch)
tree878bbdc92dd3469d6a2ed68e6dae2ceb88dc831e /apps/files
parent0a5349eec624eb016ed75a4c35d2fa3ef8b00f16 (diff)
parent5bf43ec60af4d16a8693b88834afe1c698202824 (diff)
downloadnextcloud-server-d8f0afaf9f0e8f373895a1b280e7a525d1f63160.tar.gz
nextcloud-server-d8f0afaf9f0e8f373895a1b280e7a525d1f63160.zip
Merge pull request #19634 from owncloud/notif-showtemporary
showTemporary instead of show for notifications
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/filelist.js28
1 files changed, 8 insertions, 20 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 721ebb8c836..7ad2e1952e2 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1354,7 +1354,7 @@
) {
OC.redirect(OC.generateUrl('apps/files'));
}
- OC.Notification.show(result.data.message);
+ OC.Notification.showTemporary(result.data.message);
return false;
}
@@ -1362,7 +1362,7 @@
if (result.status === 403) {
// Go home
this.changeDirectory('/');
- OC.Notification.show(t('files', 'This operation is forbidden'));
+ OC.Notification.showTemporary(t('files', 'This operation is forbidden'));
return false;
}
@@ -1370,7 +1370,7 @@
if (result.status === 500) {
// Go home
this.changeDirectory('/');
- OC.Notification.show(t('files', 'This directory is unavailable, please check the logs or contact the administrator'));
+ OC.Notification.showTemporary(t('files', 'This directory is unavailable, please check the logs or contact the administrator'));
return false;
}
@@ -1644,15 +1644,11 @@
} else {
OC.Notification.hide();
if (result.status === 'error' && result.data.message) {
- OC.Notification.show(result.data.message);
+ OC.Notification.showTemporary(result.data.message);
}
else {
- OC.Notification.show(t('files', 'Error moving file.'));
+ OC.Notification.showTemporary(t('files', 'Error moving file.'));
}
- // hide notification after 10 sec
- setTimeout(function() {
- OC.Notification.hide();
- }, 10000);
}
} else {
OC.dialogs.alert(t('files', 'Error moving file'), t('files', 'Error'));
@@ -2019,15 +2015,11 @@
OC.Notification.hide();
} else {
if (result.status === 'error' && result.data.message) {
- OC.Notification.show(result.data.message);
+ OC.Notification.showTemporary(result.data.message);
}
else {
- OC.Notification.show(t('files', 'Error deleting file.'));
+ OC.Notification.showTemporary(t('files', 'Error deleting file.'));
}
- // hide notification after 10 sec
- setTimeout(function() {
- OC.Notification.hide();
- }, 10000);
if (params.allfiles) {
// reload the page as we don't know what files were deleted
// and which ones remain
@@ -2268,11 +2260,7 @@
*/
_showPermissionDeniedNotification: function() {
var message = t('core', 'You don’t have permission to upload or create files here');
- OC.Notification.show(message);
- //hide notification after 10 sec
- setTimeout(function() {
- OC.Notification.hide();
- }, 5000);
+ OC.Notification.showTemporary(message);
},
/**