aboutsummaryrefslogtreecommitdiffstats
path: root/files/js/filelist.js
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2011-10-17 20:39:01 +0200
committerBrice Maron <brice@bmaron.net>2011-10-17 20:39:01 +0200
commit3c5a6a356a6d07df4111444620b578f22951f939 (patch)
treeabbad6bede13c8be0813d4ad9b06c539daf89ddf /files/js/filelist.js
parent492931562fda62b1495af197b10e39f6c89a9949 (diff)
downloadnextcloud-server-3c5a6a356a6d07df4111444620b578f22951f939.tar.gz
nextcloud-server-3c5a6a356a6d07df4111444620b578f22951f939.zip
Use notification to inform about errors in file list.
Diffstat (limited to 'files/js/filelist.js')
-rw-r--r--files/js/filelist.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/files/js/filelist.js b/files/js/filelist.js
index e6da922700d..3e85a35f6ef 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -173,6 +173,7 @@ FileList={
FileList.deleteCanceled=false;
FileList.deleteFiles=files;
$('#notification').text(t('files','undo deletion'));
+ $('#notification').data('deletefile',true);
$('#notification').fadeIn();
},
finishDelete:function(ready,sync){
@@ -204,14 +205,18 @@ FileList={
$(document).ready(function(){
$('#notification').hide();
$('#notification').click(function(){
- FileList.deleteCanceled=true;
- $('#notification').fadeOut();
- $.each(FileList.deleteFiles,function(index,file){
- $('tr[data-file="'+file+'"]').show();
+ if($('#notification').data('deletefile'))
+ {
+ $.each(FileList.deleteFiles,function(index,file){
+ $('tr[data-file="'+file+'"]').show();
// alert(file);
- });
- FileList.deleteFiles=null;
+ });
+ FileList.deleteCanceled=true;
+ FileList.deleteFiles=null;
+ }
+ $('#notification').fadeOut();
});
+
$(window).bind('beforeunload', function (){
FileList.finishDelete(null,true);
});