Skip to content

Commit

Permalink
fix lightbox support for thumbnail macro // fixes #28
Browse files Browse the repository at this point in the history
# Conflicts solved by tofi86
#	assets/javascripts/lightbox.js
#	init.rb
  • Loading branch information
tofi86 committed Aug 6, 2017
1 parent 7bec4f3 commit 7f6e7a8
Showing 1 changed file with 1 addition and 1 deletion.
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 and add filename to url to support fancybox preview
$("div.wiki a.thumbnail").attr('href', function(i, v){
return v + '/' + $(this).attr('title');
return v.replace(/\/attachments\/(\d+)/g,'/attachments/download/$1') + '/' + $(this).attr('title').replace(/(.*\.[^.]*)\s\(.*\)/g,'$1');
});

// add rel attribute to thumbnails of the same journal entry
Expand Down

0 comments on commit 7f6e7a8

Please sign in to comment.