From cde38eb00a16461ed5bdd612c18b2d821ca5c2ca Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 4 Jun 2011 22:02:27 +0200 Subject: [PATCH] fix fileactions following the link instead --- files/js/fileactions.js | 2 +- files/js/files.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/js/fileactions.js b/files/js/fileactions.js index bb02b639c57..0722708e683 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -53,7 +53,7 @@ FileActions={ var html='
  • '+name+'
  • '; var element=$(html); element.data('action',name); - element.click(function(){ + element.click(function(event){ event.preventDefault(); actions[$(this).data('action')](FileActions.getCurrentFile()); }); diff --git a/files/js/files.js b/files/js/files.js index c758432a4f6..2e95a7881ef 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -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');