summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-14 16:48:04 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-19 15:05:11 +0100
commita7962faa5621c5a52e4fab3a94eab0b5b975e742 (patch)
tree1f71e50cf60ffa2f95313503d260b41e377415b9
parentb55a66187c4abed63218460b675d555f82ab9142 (diff)
downloadnextcloud-server-a7962faa5621c5a52e4fab3a94eab0b5b975e742.tar.gz
nextcloud-server-a7962faa5621c5a52e4fab3a94eab0b5b975e742.zip
Fixed delete action to show error message as notification
-rw-r--r--apps/files/js/filelist.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index f20d9429271..5cab0707bda 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');
});
}