[Rt-commit] rt branch 5.0/fix-user-sig-spacing-issues created. rt-5.0.2-259-g3fdf9df647
BPS Git Server
git at git.bestpractical.com
Wed May 25 14:00:29 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 3fdf9df647f84994212b6a00445908aae896741a (commit)
- Log -----------------------------------------------------------------
commit 3fdf9df647f84994212b6a00445908aae896741a
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).
The height of the input portion of a CKEDITOR window is now based on
this value.
The user/system configuration option "WYSIWYG composer height" is no
longer used.
diff --git a/share/static/js/util.js b/share/static/js/util.js
index e5e93311e0..d87e856f48 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -374,7 +374,7 @@ function ReplaceAllTextareas() {
// Set the type
type.val("text/html");
- CKEDITOR.replace(textArea.name,{ width: '100%', height: RT.Config.MessageBoxRichTextHeight });
+ CKEDITOR.replace(textArea.name,{ width: '100%', height: (textArea.rows * 2 + 2) + 'em' });
jQuery('[name="' + textArea.name + '___Frame"]').addClass("richtext-editor");
}
commit f0804c5f598b51cc612d494628bf1a38755d5828
Author: Brian Conry <bconry at bestpractical.com>
Date: Wed May 25 08:40:22 2022 -0500
Adjust spacing around user signature edit boxes
The user signature edit boxes have been moved from their own row to to
the bottom of the left column on both /Admin/Users/Modify.html and on
/Prefs/AboutMe.html (/Prefs/Elements/EditAboutMe).
The comments box on /Admin/Users/Modify.html has also been moved to the
bottom of the left column, remaining directly under the user signature
edit box.
Spacing between the titlebar and the edit box in both sections was made
consistent with the spacing in other sections on the page.
Note that while these were small changes visually that these sections
have moved relative to several callbacks.
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index b322f839c0..684868bede 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