diff --git a/assets/javascripts/lightbox.js b/assets/javascripts/lightbox.js index efbda50..cc3da15 100644 --- a/assets/javascripts/lightbox.js +++ b/assets/javascripts/lightbox.js @@ -2,7 +2,7 @@ $(document).ready(function() { // modify thumbnail links in wiki content -> add filename to url to support fancybox preview $("div.wiki a.thumbnail").attr('href', function(i, v){ - return v + '/' + $(this).attr('title').replace(/(.*\.[^.]*)\s\(.*\)/g,'$1'); + return v.replace(/\/attachments\/(\d+)/g,'/attachments/download/$1') + '/' + $(this).attr('title').replace(/(.*\.[^.]*)\s\(.*\)/g,'$1'); }); // modify thumbnails and magnifier links in journal details -> add filename to url to support fancybox preview diff --git a/init.rb b/init.rb index 198d1a8..6ad58f2 100644 --- a/init.rb +++ b/init.rb @@ -7,7 +7,7 @@ name 'Redmine Lightbox 2' author 'Tobias Fischer' description 'This plugin lets you preview image, pdf and swf attachments in a lightbox.' - version '0.3.0' + version '0.3.1' url 'https://github.com/paginagmbh/redmine_lightbox2' requires_redmine :version_or_higher => '3.3.0' end