aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-11-26 00:03:54 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-11-26 00:03:54 +0100
commit46dff0677d3eff1aa4da94865e82698229dd71e0 (patch)
tree91b96385b6a5725592bf68169f9d862b007bf14c /apps/files/js
parentacf74b24f24e1c2ea9e454a1c09f6bcf404f6627 (diff)
parent5310a5924b18849c85b482819c350d72a6d0c67c (diff)
downloadnextcloud-server-46dff0677d3eff1aa4da94865e82698229dd71e0.tar.gz
nextcloud-server-46dff0677d3eff1aa4da94865e82698229dd71e0.zip
Merge branch 'master' into calc_version_size
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index f20d9429271..66453740f5d 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');
});
}
@@ -681,8 +691,9 @@ var FileList={
var $fileList = $('#fileList');
var permissions = $('#permissions').val();
var isCreatable = (permissions & OC.PERMISSION_CREATE) !== 0;
- $('#emptycontent').toggleClass('hidden', !isCreatable || $fileList.find('tr').exists());
- $('#filestable th').toggleClass('hidden', $fileList.find('tr').exists() === false);
+ var exists = $fileList.find('tr:first').exists();
+ $('#emptycontent').toggleClass('hidden', !isCreatable || exists);
+ $('#filestable th').toggleClass('hidden', !exists);
},
showMask: function() {
// in case one was shown before