add span around fileactions

This commit is contained in:
Robin Appelman 2012-04-15 13:25:31 +02:00
parent a6a8e2c553
commit b669c846b0
1 changed files with 3 additions and 2 deletions

View File

@ -59,6 +59,7 @@ FileActions={
if($('tr').filterAttr('data-file',file).data('renaming')){ if($('tr').filterAttr('data-file',file).data('renaming')){
return; return;
} }
parent.children('a.name').append('<span class="fileactions" />');
var defaultAction=FileActions.getDefault(FileActions.getCurrentMimeType(),FileActions.getCurrentType()); var defaultAction=FileActions.getDefault(FileActions.getCurrentMimeType(),FileActions.getCurrentType());
for(name in actions){ for(name in actions){
if((name=='Download' || actions[name]!=defaultAction) && name!='Delete'){ if((name=='Download' || actions[name]!=defaultAction) && name!='Delete'){
@ -81,7 +82,7 @@ FileActions={
action(currentFile); action(currentFile);
}); });
element.hide(); element.hide();
parent.children('a.name').append(element); parent.find('a.name>span.fileactions').append(element);
} }
} }
if(actions['Delete']){ if(actions['Delete']){
@ -113,7 +114,7 @@ FileActions={
return false; return false;
}, },
hide:function(){ hide:function(){
$('#fileList .action').fadeOut(200,function(){ $('#fileList span.fileactions').fadeOut(200,function(){
$(this).remove(); $(this).remove();
}); });
}, },