diff options
Diffstat (limited to 'files/js/filelist.js')
-rw-r--r-- | files/js/filelist.js | 17 |
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); }); |