Enforce the maximum height of images when editing signatures
authorAlexander Ebert <ebert@woltlab.com>
Tue, 23 Jul 2019 09:29:19 +0000 (11:29 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 23 Jul 2019 09:29:19 +0000 (11:29 +0200)
com.woltlab.wcf/templates/signatureEdit.tpl
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/files/style/ui/message.scss

index f9bed23984b592308cd69a8535431b23db03edc3..2049c5bff9da67af4516685ebe19183f0efbf9f7 100644 (file)
@@ -17,7 +17,7 @@
                <section class="section">
                        <h2 class="sectionTitle">{lang}wcf.user.signature.current{/lang}</h2>
                        
-                       <div class="htmlContent">{@$signatureCache}</div>
+                       <div class="htmlContent messageSignatureConstraints">{@$signatureCache}</div>
                </section>
        {/if}
        
@@ -27,7 +27,7 @@
                                
                        <dl class="wide{if $errorField == 'text'} formError{/if}">
                                <dt><label for="text">{lang}wcf.user.signature{/lang}</label></dt>
-                               <dd>
+                               <dd class="messageSignatureConstraints">
                                        <textarea id="text" class="wysiwygTextarea" name="text" rows="20" cols="40"
                                                  data-disable-media="true"
                                        >{$text}</textarea>
index 052d4f961cb838d6dc7e1a7654cab4f746ed854e..975554177a9d91ae82b9eea62a2a51fb210d70bd 100644 (file)
@@ -1824,7 +1824,7 @@ if (COMPILER_TARGET_DEFAULT) {
                        // get preview container
                        var $preview = $('#previewContainer');
                        if (!$preview.length) {
-                               $preview = $('<section class="section" id="previewContainer"><h2 class="sectionTitle">' + WCF.Language.get('wcf.global.preview') + '</h2><div class="htmlContent"></div></section>').insertBefore($('#signatureContainer')).wcfFadeIn();
+                               $preview = $('<section class="section" id="previewContainer"><h2 class="sectionTitle">' + WCF.Language.get('wcf.global.preview') + '</h2><div class="htmlContent messageSignatureConstraints"></div></section>').insertBefore($('#signatureContainer')).wcfFadeIn();
                        }
                        
                        $preview.children('div').first().html(data.returnValues.message);
index 90ee43c24185fb8dca979af04f7af958660694c3..282b8e025f53e6fbcc88ad2c4b52ea116f5eb237 100644 (file)
        }
 }
 
-.messageSignature {
-       > div {
-               @extend .htmlContent;
-       }
-       
-       img {
-               max-height: #{$wcf_option_signature_max_image_height}px;
-       }
+.messageSignature > div {
+       @extend .htmlContent;
+}
+
+.messageSignature img,
+.messageSignatureConstraints img {
+       max-height: #{$wcf_option_signature_max_image_height}px;
 }
 
 @include screen-sm-down {