From 5bc2753af045636af3d6b91d4d95239c65c138e3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 19 Nov 2014 16:03:43 +0100 Subject: [PATCH] Overhauled attachments and image editing - Images (using the [img]-BBCode can now be resized) - Attachments - Embed both thumbnail and original file - Original file can be resized - Improved visuals and UX for attachments management --- com.woltlab.wcf/bbcode.xml | 10 +- .../templates/messageFormAttachments.tpl | 2 + com.woltlab.wcf/templates/wysiwyg.tpl | 4 +- .../js/3rdParty/redactor/plugins/wbbcode.js | 132 ++++++++++++++---- .../3rdParty/redactor/plugins/wmonkeypatch.js | 17 +++ wcfsetup/install/files/js/WCF.Attachment.js | 42 ++++-- .../attachment/AttachmentAction.class.php | 4 +- .../system/bbcode/AttachmentBBCode.class.php | 51 +++++-- .../lib/system/bbcode/ImageBBCode.class.php | 14 +- wcfsetup/install/files/style/attachment.less | 21 ++- wcfsetup/install/files/style/button.less | 2 +- wcfsetup/install/files/style/redactor.less | 13 ++ wcfsetup/install/lang/de.xml | 2 + wcfsetup/install/lang/en.xml | 2 + 14 files changed, 254 insertions(+), 62 deletions(-) diff --git a/com.woltlab.wcf/bbcode.xml b/com.woltlab.wcf/bbcode.xml index dcbc355259..c25059c9cd 100644 --- a/com.woltlab.wcf/bbcode.xml +++ b/com.woltlab.wcf/bbcode.xml @@ -118,7 +118,10 @@ ^.+$ - ^(left|right)$ + ^(left|right|none)$ + + + ^\d+$ @@ -175,7 +178,10 @@ 1 - ^(left|right)$ + ^(left|right|none)$ + + + ^\d+$ diff --git a/com.woltlab.wcf/templates/messageFormAttachments.tpl b/com.woltlab.wcf/templates/messageFormAttachments.tpl index e528b71ec2..0eaec9ae78 100644 --- a/com.woltlab.wcf/templates/messageFormAttachments.tpl +++ b/com.woltlab.wcf/templates/messageFormAttachments.tpl @@ -45,6 +45,8 @@ 'wcf.attachment.upload.error.uploadFailed': '{lang}wcf.attachment.upload.error.uploadFailed{/lang}', 'wcf.attachment.insert': '{lang}wcf.attachment.insert{/lang}', 'wcf.attachment.insertAll': '{lang}wcf.attachment.insertAll{/lang}', + 'wcf.attachment.insertFull': '{lang}wcf.attachment.insertFull{/lang}', + 'wcf.attachment.insertThumbnail': '{lang}wcf.attachment.insertThumbnail{/lang}', 'wcf.attachment.delete.sure': '{lang}wcf.attachment.delete.sure{/lang}' }); diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index f06ab28839..668343223d 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -44,7 +44,6 @@ $(function() { convertUrlLinks: false, convertVideoLinks: false, direction: '{lang}wcf.global.pageDirection{/lang}', - imageResizable: false, lang: '{@$__wcf->getLanguage()->getFixedLanguageCode()}', maxHeight: 500, minHeight: 200, @@ -65,7 +64,8 @@ $(function() { {if MODULE_ATTACHMENT && !$attachmentHandler|empty && $attachmentHandler->canUpload()} $config.plugins.push('wupload'); - $config.woltlab.attachmentUrl = '{link controller='Attachment' id=987654321}thumbnail=1{/link}'; + $config.woltlab.attachmentUrl = '{link controller='Attachment' id=987654321}{/link}'; + $config.woltlab.attachmentThumbnailUrl = '{link controller='Attachment' id=987654321}thumbnail=1{/link}'; {/if} {event name='javascriptInit'} diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index acbd193cb7..17d3feff15 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -332,16 +332,59 @@ RedactorPlugins.wbbcode = function() { html = html.replace(/]*?class="smiley" alt="([^"]+?)".*?> ?/gi, '$1 '); // chrome, ie // attachments - html = html.replace(/]*?class="redactorEmbeddedAttachment" data-attachment-id="(\d+)"( style="([^"]+)")?>/gi, function(match, attachmentID, styleTag, style) { - if (style && style.match(/float: (left|right)/i)) { - return '[attach=' + attachmentID + ',' + RegExp.$1 + '][/attach]'; + html = html.replace(/]*?class="redactorEmbeddedAttachment[^"]*" data-attachment-id="(\d+)"( style="([^"]+)")?>/gi, function(match, attachmentID, styleTag, style) { + var $float = 'none'; + var $width = null; + + if (style) { + style = style.split(';'); + + for (var $i = 0; $i < style.length; $i++) { + var $style = $.trim(style[$i]); + if ($style.match(/^float: (left|right)$/)) { + $float = RegExp.$1; + } + else if ($style.match(/^width: (\d+)px$/)) { + $width = RegExp.$1; + } + } + + if ($width !== null) { + return '[attach=' + attachmentID + ',' + $float + ',' + $width + '][/attach]'; + } + else if ($float !== 'none') { + return '[attach=' + attachmentID + ',' + $float + '][/attach]'; + } } return '[attach=' + attachmentID + '][/attach]'; }); // [img] - html = html.replace(/]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi, "[img='$2',$3][/img]"); + html = html.replace(/]*?src=(["'])([^"']+?)\1 style="([^"]+)".*?>/gi, function(match, quotationMarks, source, style) { + var $float = 'none'; + var $width = 0; + + var $styles = style.split(';'); + for (var $i = 0; $i < $styles.length; $i++) { + var $style = $styles[$i]; + if ($style.match(/float: (left|right|none)/)) { + $float = RegExp.$1; + } + else if ($style.match(/width: (\d+)px/)) { + $width = parseInt(RegExp.$1); + } + } + + if ($width) { + return "[img='" + source + "'," + $float + "," + $width + "][/img]"; + } + else if ($float !== 'none') { + return "[img='" + source + "'," + $float + "][/img]"; + } + + return "[img]" + source + "[/img]"; + }); html = html.replace(/]*?src=(["'])([^"']+?)\1.*?>/gi, '[img]$2[/img]'); // handle [color], [size], [font] and [tt] @@ -619,6 +662,7 @@ RedactorPlugins.wbbcode = function() { // [img] data = data.replace(/\[img\]([^"]+?)\[\/img\]/gi,''); data = data.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,''); + data = data.replace(/\[img='?([^"]*?)'?,'?(left|right|none)'?,'?(\d+)'?\]\[\/img\]/gi, ''); data = data.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,''); // [size] @@ -682,20 +726,48 @@ RedactorPlugins.wbbcode = function() { // attachments var $attachmentUrl = this.wutil.getOption('woltlab.attachmentUrl'); + var $attachmentThumbnailUrl = this.wutil.getOption('woltlab.attachmentThumbnailUrl'); if ($attachmentUrl) { - var $imageAttachmentIDs = this.wbbcode._getImageAttachmentIDs(); + var $imageAttachments = this.wbbcode._getImageAttachments(); + + data = data.replace(/\[attach=(\d+)\]\[\/attach\]/g, function(match, attachmentID, alignment) { + attachmentID = parseInt(attachmentID); + + if ($imageAttachments[attachmentID] !== undefined) { + return ''; + } + + return match; + }); - data = data.replace(/\[attach=(\d+)(,[^\]]*)?\]\[\/attach\]/g, function(match, attachmentID, alignment) { + data = data.replace(/\[attach=(\d+),(left|right|none)\]\[\/attach\]/g, function(match, attachmentID, alignment) { attachmentID = parseInt(attachmentID); - if (WCF.inArray(attachmentID, $imageAttachmentIDs)) { + if ($imageAttachments[attachmentID] !== undefined) { var $style = ''; - if (alignment) { - if (alignment.match(/^,'?(left|right)'?/)) { - $style = ' style="float: ' + RegExp.$1 + '"'; - } + if (alignment === 'left' || alignment === 'right') { + $style = 'float: ' + alignment + ';'; + } + + $style = ' style="' + $style + '"'; + + return ''; + } + + return match; + }); + + data = data.replace(/\[attach=(\d+),(left|right|none),(\d+)\]\[\/attach\]/g, function(match, attachmentID, alignment, width) { + attachmentID = parseInt(attachmentID); + + if ($imageAttachments[attachmentID] !== undefined) { + var $style = 'width: ' + width + 'px; max-height: ' + $imageAttachments[attachmentID].height + 'px; max-width: ' + $imageAttachments[attachmentID].width + 'px;'; + if (alignment === 'left' || alignment === 'right') { + $style += 'float: ' + alignment + ';'; } + $style = ' style="' + $style + '"'; + return ''; } @@ -986,45 +1058,49 @@ RedactorPlugins.wbbcode = function() { * Inserts an attachment with live preview. * * @param integer attachmentID + * @param boolean insertFull */ - insertAttachment: function(attachmentID) { + insertAttachment: function(attachmentID, insertFull) { attachmentID = parseInt(attachmentID); - var $attachmentUrl = this.wutil.getOption('woltlab.attachmentUrl'); - var $bbcode = '[attach=' + attachmentID + '][/attach]'; - - var $imageAttachmentIDs = this.wbbcode._getImageAttachmentIDs(); + var $attachmentUrl = this.wutil.getOption('woltlab.attachment' + (!insertFull ? 'Thumbnail' : '') + 'Url'); + var $imageAttachments = this.wbbcode._getImageAttachments(); - if ($attachmentUrl && WCF.inArray(attachmentID, $imageAttachmentIDs)) { + if ($attachmentUrl && $imageAttachments[attachmentID] !== undefined) { + var $style = ''; + if (insertFull) { + $style = ' style="width: ' + $imageAttachments[attachmentID].width + 'px; max-height: ' + $imageAttachments[attachmentID].height + 'px; max-width: ' + $imageAttachments[attachmentID].width + 'px;"'; + } + this.wutil.insertDynamic( - '', - $bbcode + '', + '[attach=' + attachmentID + (insertFull ? ',none,' + $imageAttachments[attachmentID].width : '') + '][/attach]' ); } else { - this.wutil.insertDynamic($bbcode); + this.wutil.insertDynamic('[attach=' + attachmentID + '][/attach]'); } }, /** * Returns a list of attachments representing an image. * - * @return array + * @return object */ - _getImageAttachmentIDs: function() { + _getImageAttachments: function() { // WCF.Attachment.Upload may have no been initialized yet, fallback to static data - var $imageAttachmentIDs = this.wutil.getOption('woltlab.attachmentImageIDs') || [ ]; - if ($imageAttachmentIDs.length) { - delete this.opts.wAttachmentImageIDs; + var $imageAttachments = this.wutil.getOption('woltlab.attachmentImages') || [ ]; + if ($imageAttachments.length) { + delete this.opts.attachmentImages; - return $imageAttachmentIDs; + return $imageAttachments; } var $data = { - imageAttachmentIDs: [ ] + imageAttachments: { } }; WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'getImageAttachments_' + this.$textarea.wcfIdentify(), $data); - return $data.imageAttachmentIDs; + return $data.imageAttachments; }, /** diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index 9067fe5de1..98cb37b058 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -292,6 +292,18 @@ RedactorPlugins.wmonkeypatch = function() { } }).bind(this); + // image.loadEditableControls + var $mpLoadEditableControls = this.image.loadEditableControls; + this.image.loadEditableControls = (function($image) { + var $returnValue = $mpLoadEditableControls.call(this, $image); + + if ($image.hasClass('redactorDisableResize') && $returnValue !== false) { + $returnValue.hide(); + } + + return $returnValue; + }).bind(this); + // image.show this.image.show = (function() { this.modal.load('image', this.lang.get('image'), 0); @@ -515,8 +527,13 @@ RedactorPlugins.wmonkeypatch = function() { // modal.close this.modal.close = (function() { + if (this.modal.dialog === null) { + return; + } + this.modal.dialog.wcfDialog('close'); this.modal.dialog.remove(); + this.modal.dialog = null; }).bind(this); // modal.createCancelButton diff --git a/wcfsetup/install/files/js/WCF.Attachment.js b/wcfsetup/install/files/js/WCF.Attachment.js index 13ac4a6048..6c1e48d261 100644 --- a/wcfsetup/install/files/js/WCF.Attachment.js +++ b/wcfsetup/install/files/js/WCF.Attachment.js @@ -111,7 +111,7 @@ WCF.Attachment.Upload = WCF.Upload.extend({ }, /** - * Sets the attachment ids representing an image. + * Sets the attachments representing an image. * * @param object data */ @@ -119,7 +119,10 @@ WCF.Attachment.Upload = WCF.Upload.extend({ this._fileListSelector.children('li').each(function(index, attachment) { var $attachment = $(attachment); if ($attachment.children('img.attachmentTinyThumbnail').length) { - data.imageAttachmentIDs.push(parseInt($attachment.data('objectID'))); + data.imageAttachments[parseInt($attachment.data('objectID'))] = { + height: parseInt($attachment.data('height')), + width: parseInt($attachment.data('width')) + }; } }); }, @@ -186,6 +189,12 @@ WCF.Attachment.Upload = WCF.Upload.extend({ if (!this._fileListSelector.children('li:not(.uploadFailed)').length) { this._insertAllButton.hide(); + + setTimeout((function() { + if (!this._fileListSelector.children('li:not(.uploadFailed)').length) { + this._fileListSelector.wcfBlindOut(); + } + }).bind(this), 250); } }, @@ -235,7 +244,7 @@ WCF.Attachment.Upload = WCF.Upload.extend({ * @see WCF.Upload._initFile() */ _initFile: function(file) { - var $li = $('
  • '+file.name+'

    • ').data('filename', file.name); + var $li = $('
    • '+file.name+'

      • ').data('filename', file.name); this._fileListSelector.append($li); this._fileListSelector.show(); @@ -271,8 +280,11 @@ WCF.Attachment.Upload = WCF.Upload.extend({ var $internalFileID = $li.data('internalFileID'); if (data.returnValues && data.returnValues.attachments[$internalFileID]) { // show thumbnail - if (data.returnValues.attachments[$internalFileID]['tinyURL']) { + if (data.returnValues.attachments[$internalFileID].tinyURL) { $li.children('.icon-spinner').replaceWith($('')); + + $li.data('height', data.returnValues.attachments[$internalFileID].height); + $li.data('width', data.returnValues.attachments[$internalFileID].width); } // show file icon else { @@ -292,15 +304,24 @@ WCF.Attachment.Upload = WCF.Upload.extend({ $li.find('small').append(data.returnValues.attachments[$internalFileID]['formattedFilesize']); // init buttons - var $deleteButton = $('
      • '); - $li.find('ul').append($deleteButton); + var $buttonList = $li.find('ul'); + var $deleteButton = $('
      • ' + WCF.Language.get('wcf.global.button.delete') + '
      • '); + $buttonList.append($deleteButton); $li.data('objectID', data.returnValues.attachments[$internalFileID].attachmentID); if (this._wysiwygContainerID) { - var $insertButton = $('
      • '); - $insertButton.children('.jsButtonInsertAttachment').click($.proxy(this._insert, this)); - $li.find('ul').append($insertButton); + if (data.returnValues.attachments[$internalFileID].tinyURL) { + var $insertThumbnail = $('
      • ' + WCF.Language.get('wcf.attachment.insertThumbnail') + '
      • '); + var $insertOriginal = $('
      • ' + WCF.Language.get('wcf.attachment.insertFull') + '
      • '); + + $insertThumbnail.children('span.button').click($.proxy(this._insert, this)).appendTo($buttonList); + $insertOriginal.children('span.button').click($.proxy(this._insert, this)).appendTo($buttonList); + } + else { + var $insertPlain = $('
      • ' + WCF.Language.get('wcf.attachment.insert') + '
      • '); + $insertPlain.children('span.button').click($.proxy(this._insert, this)).appendTo($buttonList); + } } } else { @@ -356,9 +377,10 @@ WCF.Attachment.Upload = WCF.Upload.extend({ */ _insert: function(event, attachmentID) { var $attachmentID = (event === null) ? attachmentID : $(event.currentTarget).data('objectID'); + var $insertFull = (event !== null) ? $(event.currentTarget).hasClass('jsButtonAttachmentInsertFull') : false; if ($.browser.redactor) { - $('#' + this._wysiwygContainerID).redactor('wbbcode.insertAttachment', $attachmentID); + $('#' + this._wysiwygContainerID).redactor('wbbcode.insertAttachment', $attachmentID, $insertFull); } }, diff --git a/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php b/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php index 0b9c3b0f49..4bafcad01f 100644 --- a/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php +++ b/wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php @@ -270,7 +270,9 @@ class AttachmentAction extends AbstractDatabaseObjectAction { 'attachmentID' => $attachment->attachmentID, 'tinyURL' => ($attachment->tinyThumbnailType ? LinkHandler::getInstance()->getLink('Attachment', array('object' => $attachment), 'tiny=1') : ''), 'thumbnailURL' => ($attachment->thumbnailType ? LinkHandler::getInstance()->getLink('Attachment', array('object' => $attachment), 'thumbnail=1') : ''), - 'url' => LinkHandler::getInstance()->getLink('Attachment', array('object' => $attachment)) + 'url' => LinkHandler::getInstance()->getLink('Attachment', array('object' => $attachment)), + 'height' => $attachment->height, + 'width' => $attachment->width ); } } diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index 3da1dd4fb6..82ac2c3505 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -4,6 +4,7 @@ use wcf\data\attachment\GroupedAttachmentList; use wcf\system\message\embedded\object\MessageEmbeddedObjectManager; use wcf\system\request\LinkHandler; use wcf\util\StringUtil; +use wcf\data\attachment\Attachment; /** * Parses the [attach] bbcode tag. @@ -57,19 +58,49 @@ class AttachmentBBCode extends AbstractBBCode { if ($attachment !== null) { if ($attachment->showAsImage() && $attachment->canViewPreview() && $parser->getOutputType() == 'text/html') { // image - $linkParameters = array( - 'object' => $attachment - ); - if ($attachment->hasThumbnail()) { - $linkParameters['thumbnail'] = 1; + $alignment = (isset($openingTag['attributes'][1]) ? $openingTag['attributes'][1] : ''); + $width = (isset($openingTag['attributes'][2]) ? $openingTag['attributes'][2] : 0); + + // check if width is valid and the original is accessible by viewer + if ($width > 0) { + if ($attachment->canDownload()) { + // check if width exceeds image width + if ($width > $attachment->width) { + $width = $attachment->width; + } + } + else { + $width = 0; + } } - // get alignment - $alignment = (isset($openingTag['attributes'][1]) ? $openingTag['attributes'][1] : ''); - $result = 'hasThumbnail() ? ' class="embeddedAttachmentLink jsResizeImage"' : '').' style="width: '.($attachment->hasThumbnail() ? $attachment->thumbnailWidth : $attachment->width).'px; height: '.($attachment->hasThumbnail() ? $attachment->thumbnailHeight: $attachment->height).'px;'.(!empty($alignment) ? ' float:' . ($alignment == 'left' ? 'left' : 'right') . '; margin: ' . ($alignment == 'left' ? '0 15px 7px 0' : '0 0 7px 15px' ) : '').'" alt="" />'; - if ($attachment->hasThumbnail() && $attachment->canDownload()) { - $result = ''.$result.''; + $result = ''; + if ($width > 0) { + $style = 'width: '.$width.'px;'; + if ($alignment == 'left') { + $style .= ' float: left; margin: 0 15px 7px 0;'; + } + else if ($alignment == 'right') { + $style .= ' float: right; margin: 0 0 7px 15px;'; + } + + $source = StringUtil::encodeHTML(LinkHandler::getInstance()->getLink('Attachment', array('object' => $attachment))); + $title = StringUtil::encodeHTML($attachment->filename); + + $result = ''; + } + else { + $linkParameters = array( + 'object' => $attachment + ); + if ($attachment->hasThumbnail()) $linkParameters['thumbnail'] = 1; + + $result = 'hasThumbnail() ? ' class="embeddedAttachmentLink jsResizeImage"' : '').' style="width: '.($attachment->hasThumbnail() ? $attachment->thumbnailWidth : $attachment->width).'px; height: '.($attachment->hasThumbnail() ? $attachment->thumbnailHeight: $attachment->height).'px;'.(!empty($alignment) ? ' float:' . ($alignment == 'left' ? 'left' : 'right') . '; margin: ' . ($alignment == 'left' ? '0 15px 7px 0' : '0 0 7px 15px' ) : '').'" alt="" />'; + if ($attachment->hasThumbnail() && $attachment->canDownload()) { + $result = ''.$result.''; + } } + return $result; } else { diff --git a/wcfsetup/install/files/lib/system/bbcode/ImageBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/ImageBBCode.class.php index 2cb9b2b46e..c106dd901a 100644 --- a/wcfsetup/install/files/lib/system/bbcode/ImageBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/ImageBBCode.class.php @@ -28,7 +28,19 @@ class ImageBBCode extends AbstractBBCode { $float = $openingTag['attributes'][1]; } - return ''; + $style = ''; + if ($float == 'left' || $float == 'right') { + $style = 'float: ' . $float . '; margin: ' . ($float == 'left' ? '0 15px 7px 0' : '0 0 7px 15px') . ';'; + } + + $width = 0; + if (isset($openingTag['attributes'][2])) { + $width = $openingTag['attributes'][2]; + + $style .= 'width: ' . $width . 'px;'; + } + + return ''; } else if ($parser->getOutputType() == 'text/simplified-html') { $src = StringUtil::decodeHTML($src); diff --git a/wcfsetup/install/files/style/attachment.less b/wcfsetup/install/files/style/attachment.less index 1b4a2e0ac0..a083a448da 100644 --- a/wcfsetup/install/files/style/attachment.less +++ b/wcfsetup/install/files/style/attachment.less @@ -84,10 +84,11 @@ /* attachment form */ .formAttachmentList { border-bottom: 1px solid @wcfContainerBorderColor; - padding-bottom: @wcfGapSmall; - + margin-bottom: @wcfGapSmall; + padding-bottom: @wcfGapMedium; + > li { - min-height: 60px; + min-height: 64px; > div { > div { @@ -108,8 +109,14 @@ } > ul { + margin-top: @wcfGapSmall; + > li { display: inline-block; + + > span.jsDeleteButton { + margin-right: @wcfGapMedium; + } } } } @@ -141,12 +148,12 @@ .formAttachmentList { > li { float: left; - width: 33%; + width: 50%; } } } -.box48 .attachmentTinyThumbnail { - max-height: 48px; - max-width: 48px; +.box64 .attachmentTinyThumbnail { + max-height: 64px; + max-width: 64px; } diff --git a/wcfsetup/install/files/style/button.less b/wcfsetup/install/files/style/button.less index 08c49dedae..6fecec6d48 100644 --- a/wcfsetup/install/files/style/button.less +++ b/wcfsetup/install/files/style/button.less @@ -121,7 +121,7 @@ button.small, border-radius: @wcfSmallButtonBorderRadius; font-size: @wcfSmallFontSize; min-height: 13px; - padding: 5px 11px; + padding: 4px 9px; margin: 0 2px; } diff --git a/wcfsetup/install/files/style/redactor.less b/wcfsetup/install/files/style/redactor.less index 51073f2ba4..7289f5f4af 100644 --- a/wcfsetup/install/files/style/redactor.less +++ b/wcfsetup/install/files/style/redactor.less @@ -244,6 +244,19 @@ z-index: 5; } +#redactor-image-resizer { + background-color: rgba(0, 0, 0, 1); + border: 1px solid rgba(255, 255, 255, 1); + bottom: -4px; + cursor: nw-resize; + height: 8px; + line-height: 1; + position: absolute; + right: -5px; + width: 8px; + z-index: 10; +} + .redactorAttachmentContainer { background-color: rgba(255, 255, 255, 1); border: 1px solid rgba(238, 238, 238, 1); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index d151636b12..aad7ea6c8e 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1734,6 +1734,8 @@ Maximale Dateigröße: {@$attachmentHandler->getMaxSize()|filesize}
        Erlaubte Dateiendungen: {', '|implode:$attachmentHandler->getFormattedAllowedExtensions()}]]> + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 7c9c72edb9..997d977f21 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1734,6 +1734,8 @@ Maximum file size: {@$attachmentHandler->getMaxSize()|filesize}
        Allowed extensions: {', '|implode:$attachmentHandler->getFormattedAllowedExtensions()}]]> + + -- 2.20.1