fix fileactions following the link instead

remotes/origin/stable
Robin Appelman 14 years ago
parent 4b9665a952
commit cde38eb00a
  1. 2
      files/js/fileactions.js
  2. 4
      files/js/files.js

@ -53,7 +53,7 @@ FileActions={
var html='<li><a href="" alt="'+name+'">'+name+'</a></li>';
var element=$(html);
element.data('action',name);
element.click(function(){
element.click(function(event){
event.preventDefault();
actions[$(this).data('action')](FileActions.getCurrentFile());
});

@ -14,13 +14,13 @@ $(document).ready(function() {
);
// Sets the file-action buttons behaviour :
$('td.fileaction a').live('click',function() {
$('td.fileaction a').live('click',function(event) {
event.preventDefault();
FileActions.display($(this).parent());
});
// Sets the file link behaviour :
$('td.filename a').live('click',function() {
$('td.filename a').live('click',function(event) {
event.preventDefault();
var filename=$(this).text();
var mime=$(this).parent().parent().attr('data-mime');

Loading…
Cancel
Save