From d35f16da6a318b7b930457389c7ed8ba9660e11f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 16 Jan 2015 14:23:17 +0100 Subject: [PATCH] Added search icon overlay on embedded attachments/images --- wcfsetup/install/files/js/WCF.ImageViewer.js | 2 +- wcfsetup/install/files/style/attachment.less | 32 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index 1277166334..1e70006f07 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -95,7 +95,7 @@ WCF.ImageViewer = Class.extend({ var $maxWidth = $image.closest('div.messageText').width(); if ($maxWidth < $imageObject.width) { if (!$image.parents('a').length) { - $image.wrap(''); + $image.wrap(''); $image.parent().click($.proxy(this._click, this)); } } diff --git a/wcfsetup/install/files/style/attachment.less b/wcfsetup/install/files/style/attachment.less index e56ce3758d..802e58bf58 100644 --- a/wcfsetup/install/files/style/attachment.less +++ b/wcfsetup/install/files/style/attachment.less @@ -153,3 +153,35 @@ max-height: 64px; max-width: 64px; } + +/* add search icon overlay on embedded attachments/images */ +.embeddedAttachmentLink, +.embeddedImageLink { + display: inline-block; + position: relative; + + &::after { + background-color: rgba(0, 0, 0, .8); + border-radius: 2px; + bottom: @wcfGapSmall; + color: white; + content: @fa-var-search; + display: block; + font-family: FontAwesome; + font-size: 21px; + opacity: .5; + padding: 2px 8px; + position: absolute; + right: @wcfGapSmall; + text-decoration: none; + + .boxShadow(0, 0, rgba(0, 0, 0, .15), 0, 3px); + .transition(opacity, .1s); + } + + &:hover { + &::after { + opacity: .8; + } + } +} -- 2.20.1