[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-227-g8c3a1dc
Thomas Sibley
trs at bestpractical.com
Mon Aug 9 15:26:12 EDT 2010
The branch, 3.9-trunk has been updated
via 8c3a1dc68a2b831eab17a96c017353f5046a29bb (commit)
via e43874c48292140fbe3b77cd522cd50cf630cd24 (commit)
from d47d7c1f3a43d58a7565494488aaa2c283c1c162 (commit)
Summary of changes:
UPGRADING | 8 +++++++
etc/RT_Config.pm.in | 22 ++++++++++++++++---
lib/RT/Config.pm | 30 +++++++++++++++++++++++----
share/html/Elements/MessageBox | 12 ++++++++--
share/html/NoAuth/css/base/ticket-form.css | 22 ++++++++++++--------
share/html/Widgets/Form/Select | 2 +
6 files changed, 75 insertions(+), 21 deletions(-)
- Log -----------------------------------------------------------------
commit e43874c48292140fbe3b77cd522cd50cf630cd24
Author: Thomas Sibley <trs at bestpractical.com>
Date: Mon Aug 9 15:17:10 2010 -0400
Support Hints when using Select widgets
diff --git a/share/html/Widgets/Form/Select b/share/html/Widgets/Form/Select
index ade76de..bcb9671 100644
--- a/share/html/Widgets/Form/Select
+++ b/share/html/Widgets/Form/Select
@@ -53,10 +53,12 @@ see docs/using_forms_widgets.pod
<span class="label"><% $Description %></span>
% }
<span class="value"><& SELF:InputOnly, %ARGS &></span>
+<span class="hints"><% $Hints %></span>
</div>
<%ARGS>
$Name
$Description => undef,
+$Hints => ''
</%ARGS>
<%METHOD InputOnly>
commit 8c3a1dc68a2b831eab17a96c017353f5046a29bb
Author: Thomas Sibley <trs at bestpractical.com>
Date: Mon Aug 9 15:26:27 2010 -0400
Accommodate message box preferences with the new side by side layout
This adds a $UseSideBySide layout config option and changes the defaults
of $MessageBoxWrap and $MessageBoxWidth to SOFT and undef respectively.
diff --git a/UPGRADING b/UPGRADING
index 8f18073..ef70c2a 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -26,6 +26,14 @@ record run the following script:
perl -I /opt/rt3/local/lib -I /opt/rt3/lib etc/upgrade/shrink_transactions_table.pl
+The default for $MessageBoxWrap is now SOFT and $MessageBoxWidth is now unset
+by default. This means the message box will expand to fill all the available
+width. $MessageBoxWrap is also overridable by the user now. These changes
+accommodate the new default two column layout for ticket create and update
+pages. You may turn this layout off by setting $UseSideBySideLayout to 0. To
+retain the original behavior, set $MessageBoxWrap to HARD and $MessageBoxWidth
+to 72.
+
UPGRADING FROM 3.8.7 and earlier - Changes:
RT's ChartFont option has been changed from a string to a hash which
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index d6205e8..ba9c76f 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -995,25 +995,39 @@ ticked displays
Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x );
+=item C<$UseSideBySideLayout>
+
+Should the ticket create and update forms use a more space efficient two column
+layout
+
+Default: yes
+
+=cut
+
+Set($UseSideBySideLayout, 1);
+
=item C<$MessageBoxWidth>, C<$MessageBoxHeight>
For message boxes, set the entry box width, height and what type of
wrapping to use. These options can be overridden by users in their
preferences.
-Default width: 72, height: 15
+Default width: undef, height: 15
+
+When the width is set to undef, no column count is specified and the message
+box will take up 100% of the available width.
These settings only apply to the non-RichText message box.
See below for Rich Text settings.
=cut
-Set($MessageBoxWidth, 72);
+Set($MessageBoxWidth, undef);
Set($MessageBoxHeight, 15);
=item C<$MessageBoxWrap>
-Default wrapping: "HARD" (choices "SOFT", "HARD")
+Default wrapping: "SOFT" (choices "SOFT", "HARD")
Wrapping is disabled when using MessageBoxRichText because
of a bad interaction between IE and wrapping with the Rich
@@ -1021,7 +1035,7 @@ Text Editor.
=cut
-Set($MessageBoxWrap, "HARD");
+Set($MessageBoxWrap, "SOFT");
=item C<$MessageBoxRichText>
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 23ed59d..5f1f603 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -185,17 +185,26 @@ our %META = (
Values => [qw(3.5-default 3.4-compat web2)],
},
},
- MessageBoxRichText => {
- Section => 'General',
+ UseSideBySideLayout => {
+ Section => 'Ticket composition',
Overridable => 1,
SortOrder => 5,
Widget => '/Widgets/Form/Boolean',
WidgetArguments => {
+ Description => 'Use a two column layout for create and update forms?' # loc
+ }
+ },
+ MessageBoxRichText => {
+ Section => 'Ticket composition',
+ Overridable => 1,
+ SortOrder => 5.1,
+ Widget => '/Widgets/Form/Boolean',
+ WidgetArguments => {
Description => 'WYSIWYG message composer' # loc
}
},
MessageBoxRichTextHeight => {
- Section => 'General',
+ Section => 'Ticket composition',
Overridable => 1,
SortOrder => 6,
Widget => '/Widgets/Form/Integer',
@@ -204,7 +213,7 @@ our %META = (
}
},
MessageBoxWidth => {
- Section => 'General',
+ Section => 'Ticket composition',
Overridable => 1,
SortOrder => 7,
Widget => '/Widgets/Form/Integer',
@@ -213,7 +222,7 @@ our %META = (
},
},
MessageBoxHeight => {
- Section => 'General',
+ Section => 'Ticket composition',
Overridable => 1,
SortOrder => 8,
Widget => '/Widgets/Form/Integer',
@@ -221,6 +230,17 @@ our %META = (
Description => 'Message box height', #loc
},
},
+ MessageBoxWrap => {
+ Section => 'Ticket composition', #loc
+ Overridable => 1,
+ SortOrder => 8.1,
+ Widget => '/Widgets/Form/Select',
+ WidgetArguments => {
+ Description => 'Message box wrapping', #loc
+ Values => [qw(SOFT HARD)],
+ Hints => "When the WYSIWYG editor is not enabled, this setting determines whether automatic line wraps in the ticket message box are sent to RT or not.", # loc
+ },
+ },
SearchResultsRefreshInterval => {
Section => 'General', #loc
Overridable => 1,
diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index d96761e..d2b05fd 100755
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<textarea class="messagebox" cols="<% $Width %>" rows="<% $Height %>" <% $wrap_type |n %> name="<% $Name %>" id="<% $Name %>">\
+<textarea class="messagebox" <% $cols |n %> rows="<% $Height %>" <% $wrap_type |n %> name="<% $Name %>" id="<% $Name %>">\
% $m->callback( %ARGS, SignatureRef => \$signature );
<% $Default || '' %><% $message %><% $signature %></textarea>
% $m->callback( %ARGS, CallbackName => 'AfterTextArea' );
@@ -70,13 +70,19 @@ if ( not RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'}) ) {
$wrap_type = qq(wrap="$Wrap");
}
+# If there's no cols specified, we want to set the width to 100%
+my $cols = 'style="width: 100%"';
+if ( defined $Width and length $Width ) {
+ $cols = qq(cols="$Width");
+}
+
</%INIT>
<%ARGS>
$QuoteTransaction => undef
$Name => 'Content'
$Default => ''
-$Width => RT->Config->Get('MessageBoxWidth', $session{'CurrentUser'} ) || 72
+$Width => RT->Config->Get('MessageBoxWidth', $session{'CurrentUser'} )
$Height => RT->Config->Get('MessageBoxHeight', $session{'CurrentUser'} ) || 15
-$Wrap => RT->Config->Get('MessageBoxWrap') || 'HARD'
+$Wrap => RT->Config->Get('MessageBoxWrap', $session{'CurrentUser'} ) || 'SOFT'
$IncludeSignature => RT->Config->Get('MessageBoxIncludeSignature');
</%ARGS>
diff --git a/share/html/NoAuth/css/base/ticket-form.css b/share/html/NoAuth/css/base/ticket-form.css
index e4ee624..f743489 100644
--- a/share/html/NoAuth/css/base/ticket-form.css
+++ b/share/html/NoAuth/css/base/ticket-form.css
@@ -1,12 +1,3 @@
-#comp-Ticket-Update #body {
- padding-top: 3em;
-}
-
-#ticket-create-message .button[name="AddMoreAttach"],
-#ticket-update-message .button[name="AddMoreAttach"] {
- float: right;
-}
-
#ticket-create-metadata .cflabel .name,
#ticket-update-metadata .cflabel .name {
font-weight: normal;
@@ -27,6 +18,7 @@
padding-bottom: 2em;
}
+% if ( RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'}) ) {
#ticket-create-metadata,
#ticket-update-metadata {
float: right;
@@ -40,3 +32,15 @@
width: 58%;
clear: left;
}
+
+/* These are only needed when using the two column layout */
+#comp-Ticket-Update #body {
+ padding-top: 3em;
+}
+
+#ticket-create-message .button[name="AddMoreAttach"],
+#ticket-update-message .button[name="AddMoreAttach"] {
+ float: right;
+}
+
+% }
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list