Skip to content

Commit

Permalink
fix lightbox support for thumbnail macro // fixes paginagmbh#28
Browse files Browse the repository at this point in the history
  • Loading branch information
tofi86 committed Jul 12, 2016
1 parent 8936cb5 commit 0015ff7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/javascripts/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0015ff7

Please sign in to comment.