From e209511f86ec33222f92c80db1c59c3305bef9d5 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 4 Aug 2011 00:22:44 +0200 Subject: provide undo button when deleting files from the web interface --- files/js/fileactions.js | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'files/js/fileactions.js') diff --git a/files/js/fileactions.js b/files/js/fileactions.js index 359e54dda3c..a8de2f9977b 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -118,29 +118,7 @@ FileActions.register('all','Download',OC.imagePath('core','actions/download'),fu }); FileActions.register('all','Delete',OC.imagePath('core','actions/delete'),function(filename){ - $( "#delete-confirm" ).dialog({ - resizable: false, - height:200, - title:"Delete "+filename, - modal: true, - buttons: { - "Delete": function() { - $( this ).dialog( "close" ); - $.ajax({ - url: 'ajax/delete.php', - data: "dir="+encodeURIComponent($('#dir').val())+"&file="+encodeURIComponent(filename), - complete: function(data){ - boolOperationFinished(data, function(){ - FileList.remove(filename); - }); - } - }); - }, - Cancel: function() { - $( this ).dialog( "close" ); - } - } - }); + FileList.delete(filename); }); FileActions.register('all','Rename',OC.imagePath('core','actions/rename'),function(filename){ -- cgit v1.2.3