Skip to content
Snippets Groups Projects
Commit 40a96aab authored by Robin Appelman's avatar Robin Appelman
Browse files

fix file action dialog not reappearing after being used

parent dab65600
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ FileActions={
}
},
display:function(parent){
$('#file_menu>ul').empty();
$('#file_menu ul').empty();
parent.append($('#file_menu'));
var actions=FileActions.get(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
for(name in actions){
......@@ -55,7 +55,10 @@ FileActions={
element.data('action',name);
element.click(function(event){
event.preventDefault();
actions[$(this).data('action')](FileActions.getCurrentFile());
$('#file_menu').slideToggle(250);
var action=actions[$(this).data('action')];
$('#file_menu ul').empty();
action(FileActions.getCurrentFile());
});
$('#file_menu>ul').append(element);
}
......@@ -75,7 +78,6 @@ FileActions={
FileActions.register('all','Download',function(filename){
window.location='ajax/download.php?files='+filename+'&dir='+$('#dir').val();
$('#file_menu').slideToggle(250);
});
FileActions.register('all','Delete',function(filename){
......@@ -94,7 +96,6 @@ FileActions.setDefault('all','Download');
FileActions.register('dir','Open',function(filename){
window.location='index.php?dir='+$('#dir').val()+'/'+filename;
$('#file_menu').slideToggle(250);
});
FileActions.setDefault('dir','Open');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment