From bc8a4ed841459eb456f3fd7aa2b89d8a8085562b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 4 Dec 2014 13:54:51 +0100 Subject: [PATCH] ImageViewer could not properly find the thumbnail for attachment tab --- wcfsetup/install/files/js/WCF.ImageViewer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index 040e12f73d..55d18ebc77 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -1180,6 +1180,10 @@ $.widget('ui.wcfImageViewer', { $(this.options.imageSelector).each(function(index, link) { var $link = $(link); + var $thumbnail = $link.children('img'); + if (!$thumbnail.length) { + $thumbnail = $link.parentsUntil('.formAttachmentList').last().find('.attachmentTinyThumbnail'); + } $images.push({ image: { @@ -1190,7 +1194,7 @@ $.widget('ui.wcfImageViewer', { }, series: null, thumbnail: { - url: $link.children('img').prop('src') + url: $thumbnail.prop('src') }, user: null }); -- 2.20.1