From: Alexander Ebert Date: Thu, 4 Dec 2014 12:54:51 +0000 (+0100) Subject: ImageViewer could not properly find the thumbnail for attachment tab X-Git-Tag: 2.1.0_Beta_1~98^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bc8a4ed841459eb456f3fd7aa2b89d8a8085562b;p=GitHub%2FWoltLab%2FWCF.git ImageViewer could not properly find the thumbnail for attachment tab --- 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 });