do no offer 'undo delete' on opera

opera lacks the onunload to make it work
This commit is contained in:
Robin Appelman 2012-04-15 15:48:02 +02:00
parent cdf9f8c42a
commit 75a4e46872
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,5 @@
FileList={
useUndo:true,
update:function(fileListHtml) {
$('#fileList').empty().html(fileListHtml);
},
@ -163,7 +164,7 @@ FileList={
});
},
do_delete:function(files){
if(FileList.deleteFiles){//finish any ongoing deletes first
if(FileList.deleteFiles || !FileList.useUndo){//finish any ongoing deletes first
FileList.finishDelete(function(){
FileList.do_delete(files);
});
@ -196,7 +197,6 @@ FileList={
boolOperationFinished(data, function(){
$('#notification').fadeOut();
$.each(FileList.deleteFiles,function(index,file){
// alert(file);
FileList.remove(file);
});
FileList.deleteCanceled=true;
@ -225,7 +225,7 @@ $(document).ready(function(){
}
$('#notification').fadeOut();
});
FileList.useUndo=('onbeforeunload' in window)
$(window).bind('beforeunload', function (){
FileList.finishDelete(null,true);
});