Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-15 17:48:02 +0400
committerRobin Appelman <icewind@owncloud.com>2012-04-15 17:48:19 +0400
commit75a4e4687262ec10ab579b881ddfcc70c887e594 (patch)
tree0d47cbb9926d43ecfb67df579ef9c7652d36209f /files
parentcdf9f8c42a6adbd57781c92caabfed5ff86f4021 (diff)
do no offer 'undo delete' on opera
opera lacks the onunload to make it work
Diffstat (limited to 'files')
-rw-r--r--files/js/filelist.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/files/js/filelist.js b/files/js/filelist.js
index 533e03b43cd..5bd85fc29ef 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);
});