From: Robin Appelman Date: Sat, 4 Jun 2011 20:02:27 +0000 (+0200) Subject: fix fileactions following the link instead X-Git-Tag: v3.0~267^2~551 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cde38eb00a16461ed5bdd612c18b2d821ca5c2ca;p=nextcloud-server.git fix fileactions following the link instead --- 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');