aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-09-19 11:56:31 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-09-19 11:56:31 +0200
commit1e880feab1300eb54e9ce82438733ef3c5548a8c (patch)
treeb4c5f14c0250320f3f1be454cf92caccab0c64ae /apps
parent842cd57fa780029e60d0fb8094d4dd794bb33cb7 (diff)
downloadnextcloud-server-1e880feab1300eb54e9ce82438733ef3c5548a8c.tar.gz
nextcloud-server-1e880feab1300eb54e9ce82438733ef3c5548a8c.zip
execute lastAction() before add new one
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js21
1 files changed, 12 insertions, 9 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index f2b558496e0..f2e04256231 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -255,20 +255,23 @@ var FileList={
},
do_delete:function(files){
// Finish any existing actions
- if (FileList.lastAction || !FileList.useUndo) {
- if(!FileList.deleteFiles) {
- FileList.prepareDeletion(files);
- }
+ if (FileList.lastAction) {
FileList.lastAction();
}
+
FileList.prepareDeletion(files);
- // NOTE: Temporary fix to change the text to unshared for files in root of Shared folder
- if ($('#dir').val() == '/Shared') {
- $('#notification').html(t('files', 'unshared')+' '+files+'<span class="undo">'+t('files', 'undo')+'</span>');
+
+ if (!FileList.useUndo) {
+ FileList.lastAction();
} else {
- $('#notification').html(t('files', 'deleted')+' '+files+'<span class="undo">'+t('files', 'undo')+'</span>');
+ // NOTE: Temporary fix to change the text to unshared for files in root of Shared folder
+ if ($('#dir').val() == '/Shared') {
+ $('#notification').html(t('files', 'unshared')+' '+files+'<span class="undo">'+t('files', 'undo')+'</span>');
+ } else {
+ $('#notification').html(t('files', 'deleted')+' '+files+'<span class="undo">'+t('files', 'undo')+'</span>');
+ }
+ $('#notification').fadeIn();
}
- $('#notification').fadeIn();
},
finishDelete:function(ready,sync){
if(!FileList.deleteCanceled && FileList.deleteFiles){