summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 49dd28517be..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');
});
}
@@ -723,7 +733,7 @@ var FileList={
},
filter:function(query) {
$('#fileList tr:not(.summary)').each(function(i,e) {
- if ($(e).data('file').toLowerCase().indexOf(query.toLowerCase()) !== -1) {
+ if ($(e).data('file').toString().toLowerCase().indexOf(query.toLowerCase()) !== -1) {
$(e).addClass("searchresult");
} else {
$(e).removeClass("searchresult");