var $maxWidth = $image.closest('div.messageText').width();
if ($maxWidth < $imageObject.width) {
if (!$image.parents('a').length) {
- $image.wrap('<a href="' + $image.attr('src') + '" class="jsImageViewerEnabled" />');
+ $image.wrap('<a href="' + $image.attr('src') + '" class="jsImageViewerEnabled embeddedImageLink" />');
$image.parent().click($.proxy(this._click, this));
}
}
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;
+ }
+ }
+}