[Rt-commit] rt branch, 4.2/optional-quote-folding, created. rt-4.1.8-306-g192da6f
Thomas Sibley
trs at bestpractical.com
Wed Aug 14 13:56:07 EDT 2013
The branch, 4.2/optional-quote-folding has been created
at 192da6fbf06081c03c7024e399248efae9800093 (commit)
- Log -----------------------------------------------------------------
commit 192da6fbf06081c03c7024e399248efae9800093
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu May 16 15:15:06 2013 -0700
Add option to toggle status of quote folding site-wide
Some folks really don't like quote folding; let them turn it off
site-wide instead of resorting to custom CSS.
I see no compelling reason to add it as a preference, and merely doing
so just because it exists leads to preference bloat.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index a56891f..fe2f4d6 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1784,6 +1784,19 @@ your own styles of link detection.
Set(@Active_MakeClicky, qw(httpurl_overwrite));
+=item C<$FoldQuotedContent>
+
+If C<$FoldQuotedContent> is set to 0, transaction content (replies/comments) in
+ticket history will not automatically fold (hide) any quoted content (lines
+beginning with C<< E<gt> >> or HTML blockquotes) that is detected.
+
+Quote folding is enabled by default to decrease the amount of repetitive text
+on long ticket conversations.
+
+=cut
+
+Set($FoldQuotedContent, 1);
+
=back
diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index 01041da..beb1fd2 100644
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -96,7 +96,7 @@
% $m->callback( %ARGS, CallbackName => 'Head' );
</head>
- <body class="<% lc $style %><% RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'}) ? ' sidebyside' : '' %>" <% $id && qq[id="comp-$id"] |n %>>
+ <body class="<% join " ", @classes %>" <% $id && qq[id="comp-$id"] |n %>>
% if ($ShowBar) {
<& /Elements/Logo, %ARGS &>
@@ -122,6 +122,12 @@ my $style = $session{'CurrentUser'}
? $session{'CurrentUser'}->Stylesheet
: RT->Config->Get('WebDefaultStylesheet');
+my @classes = (lc $style);
+push @classes, "sidebyside" if RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'});
+for my $pref (qw(FoldQuotedContent)) {
+ push @classes, $pref if RT->Config->Get($pref, $session{CurrentUser});
+}
+
my @css_files;
if ( RT->Config->Get('DevelMode') ) {
@css_files = map { "/static/css/$_" } "$style/main.css", RT->Config->Get('CSSFiles');
diff --git a/share/static/css/base/history-folding.css b/share/static/css/base/history-folding.css
index b14a7aa..d1c9413 100644
--- a/share/static/css/base/history-folding.css
+++ b/share/static/css/base/history-folding.css
@@ -1,19 +1,28 @@
-.message-stanza-folder {
+.message-stanza-folder, .message-stanza-folder + br {
+ display: none;
+}
+
+.FoldQuotedContent .message-stanza-folder {
+ display: inline;
color: #500050;
font-size: 0.9em;
padding: 0.2em;
cursor: pointer;
}
-.message-stanza-folder.open {
+.FoldQuotedContent .message-stanza-folder + br {
+ display: inline;
+}
+
+.FoldQuotedContent .message-stanza-folder.open {
color: #ccc;
}
-.message-stanza-folder:before, .message-stanza-folder:after {
+.FoldQuotedContent .message-stanza-folder:before, .FoldQuotedContent .message-stanza-folder:after {
content: " - ";
}
-.message-stanza.closed {
+.FoldQuotedContent .message-stanza.closed {
display: none;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list