From 75a4e4687262ec10ab579b881ddfcc70c887e594 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Sun, 15 Apr 2012 15:48:02 +0200
Subject: [PATCH] do no offer 'undo delete' on opera

opera lacks the onunload to make it work
---
 files/js/filelist.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/files/js/filelist.js b/files/js/filelist.js
index 533e03b43c..5bd85fc29e 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -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);
 	});
-- 
GitLab