[Pkg-owncloud-commits] [owncloud] 85/111: Fixed delete action to show error message as notification

David Prévot taffit at moszumanska.debian.org
Wed Nov 20 21:38:45 UTC 2013


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

taffit pushed a commit to branch master
in repository owncloud.

commit a7962faa5621c5a52e4fab3a94eab0b5b975e742
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Thu Nov 14 16:48:04 2013 +0100

    Fixed delete action to show error message as notification
---
 apps/files/js/filelist.js |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index f20d942..5cab070 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -569,8 +569,18 @@ var FileList={
 						FileList.updateEmptyContent();
 						Files.updateStorageStatistics();
 					} else {
+						if (result.status === 'error' && result.data.message) {
+							OC.Notification.show(result.data.message);
+						}
+						else {
+							OC.Notification.show(t('files', 'Error deleting file.'));
+						}
+						// hide notification after 10 sec
+						setTimeout(function() {
+							OC.Notification.hide();
+						}, 10000);
 						$.each(files,function(index,file) {
-							var deleteAction = $('tr[data-file="'+files[i]+'"]').children("td.date").children(".action.delete");
+							var deleteAction = $('tr[data-file="' + file + '"] .action.delete');
 							deleteAction.removeClass('progress-icon').addClass('delete-icon');
 						});
 					}

-- 
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