var $imageObject = new Image();
$imageObject.src = $image.attr('src');
- var $maxWidth = $image.closest('div.messageText').width();
+ var $maxWidth = $image.closest('div.messageText, div.messageTextPreview').width();
if ($maxWidth < $imageObject.width) {
if (!$image.parents('a').length) {
$image.wrap('<a href="' + $image.attr('src') + '" class="jsImageViewerEnabled embeddedImageLink" />');
_handleResponse: function(data) {
var $preview = $('#previewContainer');
if (!$preview.length) {
- $preview = $('<div class="container containerPadding marginTop" id="previewContainer"><fieldset><legend>' + WCF.Language.get('wcf.global.preview') + '</legend><div></div></fieldset>').prependTo($('#messageContainer')).wcfFadeIn();
+ $preview = $('<div class="container containerPadding marginTop" id="previewContainer"><fieldset><legend>' + WCF.Language.get('wcf.global.preview') + '</legend><div class="messageTextPreview"></div></fieldset>').prependTo($('#messageContainer')).wcfFadeIn();
}
$preview.find('div:eq(0)').html(data.returnValues.message);
}
}
+.messageTextPreview {
+ img {
+ max-width: 100%;
+ }
+
+ table img {
+ max-width: none;
+ }
+}
+
@messageFooterNoteGradientColor: fade(@wcfContainerBorderColor, 20%);
@messageFooterNoteGradientColor2: fade(@messageFooterNoteGradientColor, 0%);
.messageFooterNote {