[Rt-commit] rt branch 5.0/fix-user-sig-spacing-issues created. rt-5.0.2-260-g0c55ae2a28

BPS Git Server git at git.bestpractical.com
Tue May 31 15:28:16 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/fix-user-sig-spacing-issues has been created
        at  0c55ae2a283b72bc21f423671108aa072fd4863f (commit)

- Log -----------------------------------------------------------------
commit 0c55ae2a283b72bc21f423671108aa072fd4863f
Author: Brian Conry <bconry at bestpractical.com>
Date:   Wed May 25 08:51:59 2022 -0500

    Allow CKEDITOR (rich text) boxes to vary in height
    
    With more fields now allowing rich text the one-size-fits-all approach
    to setting the CKEDITOR height needed to be revisited.
    
    The textarea form element used for plain text has a "rows" attribute
    which is generally set to an appropriate value for how that input is
    used (and defaults to '2' if unset).
    
    For textareas with the "messagebox" class, i.e. those use for ticket
    correspondence/comment content, the user/system configuration option
    "WYSIWYG composer height"/MessageBoxRichTextHeight is still used, but
    for all other textareas the height of the input portion of a CKEDITOR
    window is now based on the "rows" attribute.

diff --git a/share/static/js/util.js b/share/static/js/util.js
index e5e93311e0..24ddbfea06 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -374,7 +374,14 @@ function ReplaceAllTextareas() {
             // Set the type
             type.val("text/html");
 
-            CKEDITOR.replace(textArea.name,{ width: '100%', height: RT.Config.MessageBoxRichTextHeight });
+            console.debug(textArea);
+
+            if (jQuery(textArea).hasClass("messagebox")) {
+                CKEDITOR.replace(textArea.name,{ width: '100%', height: RT.Config.MessageBoxRichTextHeight });
+            }
+            else {
+                CKEDITOR.replace(textArea.name,{ width: '100%', height: (textArea.rows * 2 + 2) + 'em' });
+            }
 
             jQuery('[name="' + textArea.name + '___Frame"]').addClass("richtext-editor");
         }

commit 5a7b00dee05b5497692cb2e435b76cc6294963ab
Author: Brian Conry <bconry at bestpractical.com>
Date:   Tue May 31 09:46:40 2022 -0500

    Move user custom fields on prefs page
    
    Move the general custom fields on /Prefs/AboutMe.html
    (/Prefs/Elements/EditAboutMe) from the bottom of the page at full page
    width to the bottom of the right column at half page width.
    
    This matches the placement of the custom fields on
    /Admin/Users/Modify.html and is a better use of space.

diff --git a/share/html/Prefs/Elements/EditAboutMe b/share/html/Prefs/Elements/EditAboutMe
index 09b4d5a86b..35f364492c 100644
--- a/share/html/Prefs/Elements/EditAboutMe
+++ b/share/html/Prefs/Elements/EditAboutMe
@@ -258,14 +258,18 @@
       </div>
     </&>
 
+    <div class="form-row">
+      <div class="col-12">
+        <& /Elements/EditCustomFieldCustomGroupings, Object => $UserObj &>
+      </div>
+    </div>
+
 % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' );
 
 %### End right column ###
   </div>
 </div>
 
-<& /Elements/EditCustomFieldCustomGroupings, Object => $UserObj &>
-
 <div class="form-row">
   <div class="col-12">
     <& /Elements/Submit, Label => loc('Save Preferences') &>

commit 0c060f0af642cb894e70e5c9f358765cf4647f84
Author: Brian Conry <bconry at bestpractical.com>
Date:   Wed May 25 08:40:22 2022 -0500

    Adjust spacing around user signature edit boxes
    
    0f5854a8f2 - Admin/Users/Modify
    37a20a4581 - Prefs/Elements/EditAboutMe
    
    In the conversion to bootstrap commits 0f5854a8f2 and 37a20a4581 moved
    the comment and signature boxes from the left column to the full width
    of the page on the /Admin/Users/Modify and /Prefs/Elements/EditAboutMe
    pages (respectively).
    
    This isn't called out as an intentional change, but it creates an odd
    gap on the page when the right column is longer than the left column,
    and neither field needs the full page width for content, so the previous
    layout (left column) has been restored.
    
    temp commit, remove trailing whitespace to be merged with another commit

diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index b322f839c0..7b66ed4541 100644
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -166,6 +166,32 @@
 <& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Access control' &>
 
 </&>
+
+<&| /Widgets/TitleBox, title => loc('Comments about this user'), class => 'user-info-comments' &>
+<div class="form-row">
+  <div class="col-12">
+    <textarea class="comments form-control" name="Comments" cols="80" rows="5" wrap="virtual"><%$UserObj->Comments//$ARGS{Comments}//''%></textarea>
+  </div>
+</div>
+</&>
+
+%if (!$Create && $UserObj->Privileged) {
+%   my $sig = $UserObj->Signature//$ARGS{Signature}//'';
+%   my $richtext = '';
+<&| /Widgets/TitleBox, title => loc('Signature'), class => 'user-info-signature' &>
+<div class="form-row">
+  <div class="col-12">
+%   if (RT->Config->Get('MessageBoxRichText', $UserObj )) {
+%       # allow for a smooth transition from a plain text signature, with or without HTML content, to an HTML signature
+        <input type="text" style="display:none" name="SignatureType" id="SignatureType" value="<%$sig =~ /<.{1,5}>/ ? "text/html" : 'text/plain'%>"/>
+%       $richtext = ' richtext';
+%   }
+    <textarea class="signature form-control<%$richtext%>" rows="5" name="Signature" wrap="hard"><%$sig%></textarea>
+  </div>
+</div>
+</&>
+% }
+
 % $m->callback( %ARGS, CallbackName => 'LeftColumnBottom', UserObj => $UserObj );
 
   </div>  <!-- boxcontainer -->
@@ -291,27 +317,6 @@
   </div> <!-- boxcontainer -->
 </div>   <!-- row -->
 
-<&| /Widgets/TitleBox, title => loc('Comments about this user'), class => 'user-info-comments' &>
-<textarea class="comments form-control" name="Comments" cols="80" rows="5" wrap="virtual"><%$UserObj->Comments//$ARGS{Comments}//''%></textarea>
-</&>
-
-%if (!$Create && $UserObj->Privileged) { 
-%   my $sig = $UserObj->Signature//$ARGS{Signature}//'';
-%   my $richtext = '';
-<&| /Widgets/TitleBox, title => loc('Signature'), class => 'user-info-signature' &>
-<div class="form-row">
-  <div class="col-12">
-%   if (RT->Config->Get('MessageBoxRichText', $UserObj )) {
-%       # allow for a smooth transition from a plain text signature, with or without HTML content, to an HTML signature
-        <input type="text" style="display:none" name="SignatureType" id="SignatureType" value="<%$sig =~ /<.{1,5}>/ ? "text/html" : 'text/plain'%>"/>
-%       $richtext = ' richtext';
-%   }
-    <textarea class="signature form-control<%$richtext%>" rows="5" name="Signature" wrap="hard"><%$sig%></textarea>
-  </div>
-</div>
-</&>
-% }
-
 % if ( $Create ) {
   <div class="form-row">
     <div class="col-12">
diff --git a/share/html/Prefs/Elements/EditAboutMe b/share/html/Prefs/Elements/EditAboutMe
index d13f161a26..09b4d5a86b 100644
--- a/share/html/Prefs/Elements/EditAboutMe
+++ b/share/html/Prefs/Elements/EditAboutMe
@@ -147,6 +147,23 @@
       </div>
     </&>
 
+%if ($UserObj->Privileged) {
+%   my $sig = $UserObj->Signature || '';
+%   my $richtext = '';
+    <&| /Widgets/TitleBox, title => loc('Signature'), id => "user-prefs-signature" &>
+      <div class="form-row">
+        <div class="col-12">
+%   if (RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'})) {
+%       # allow for a smooth transition from a plain text signature, with or without HTML content, to an HTML signature
+        <input type="text" style="display:none" name="SignatureType" id="SignatureType" value="<%$sig =~ /<.{1,5}>/ ? "text/html" : 'text/plain'%>"/>
+%       $richtext = ' richtext';
+%   }
+            <textarea class="form-control signature<%$richtext%>" cols="80" rows="5" name="Signature" wrap="hard"><%$sig%></textarea>
+        </div>
+      </div>
+    </&>
+% }
+
 % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormLeftColumn' );
 
 %### End left column ###
@@ -247,23 +264,6 @@
   </div>
 </div>
 
-%if ($UserObj->Privileged) {
-%   my $sig = $UserObj->Signature || '';
-%   my $richtext = '';
-<div class="form-row">
-  <div class="col-6">
-    <&| /Widgets/TitleBox, title => loc('Signature'), id => "user-prefs-signature" &>
-%   if (RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'})) {
-%       # allow for a smooth transition from a plain text signature, with or without HTML content, to an HTML signature
-        <input type="text" style="display:none" name="SignatureType" id="SignatureType" value="<%$sig =~ /<.{1,5}>/ ? "text/html" : 'text/plain'%>"/>
-%       $richtext = ' richtext';
-%   }
-      <textarea class="form-control signature<%$richtext%>" cols="80" rows="5" name="Signature" wrap="hard"><%$sig%></textarea>
-    </&>
-  </div>
-</div>
-% }
-
 <& /Elements/EditCustomFieldCustomGroupings, Object => $UserObj &>
 
 <div class="form-row">

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list