[Pkg-owncloud-commits] [owncloud] 11/129: showTemporary instead of show for notifications

David Prévot taffit at moszumanska.debian.org
Thu Nov 5 01:04:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit a4cbdfdc1f7d5d0bc13f025d5d9cd359a4120fa2
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed Oct 7 18:16:09 2015 +0200

    showTemporary instead of show for notifications
---
 apps/files/js/filelist.js | 28 ++++++++--------------------
 1 file changed, 8 insertions(+), 20 deletions(-)

diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 6cf8239..1a3291d 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1350,7 +1350,7 @@
 				) {
 					OC.redirect(OC.generateUrl('apps/files'));
 				}
-				OC.Notification.show(result.data.message);
+				OC.Notification.showTemporary(result.data.message);
 				return false;
 			}
 
@@ -1358,7 +1358,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;
 			}
 
@@ -1366,7 +1366,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;
 			}
 
@@ -1640,15 +1640,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'));
@@ -2013,15 +2009,11 @@
 							self.updateStorageStatistics();
 						} 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
@@ -2262,11 +2254,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);
 		},
 
 		/**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list