[Rt-commit] rt branch, 3.8-plain-text-mono, updated. rt-3.8.5-127-gfec9ad4

Kevin Falcone falcone at bestpractical.com
Tue Sep 15 12:45:16 EDT 2009


The branch, 3.8-plain-text-mono has been updated
       via  fec9ad4f1336fc7844933c9ac9b12f8252bf0b73 (commit)
       via  1e3ee3fc4bb64311fff9b74e8de0e76c15888775 (commit)
       via  c0ba2a35099a35194407b191370b86e7547e8c85 (commit)
       via  35db9cf04224570e1659ee8e6a130d5afb4faeb8 (commit)
       via  5a58f47d417d0ade3cef349477352adaf97c86de (commit)
       via  6366dcd68df8c2d7d14a14b4f7dfc2b91d21979e (commit)
       via  764b74751cea0bc31930bd1716738a9b54a4242c (commit)
       via  ff76061c900dd566e3d0ad29a89f28d5ec7ef26d (commit)
       via  4a8095f70de1d3b47dfd2446f7363974aafaf835 (commit)
       via  7845d02e62c139831e20241e9e6dfb88c3732744 (commit)
       via  a5989fe43196dfb5746f1eeaf8045a723d3827ea (commit)
       via  c42465fb0d8443905deef2a9c58718c0331980f2 (commit)
       via  e38bf1b92a7ba15f2aed08f4db40a8f1030708c5 (commit)
       via  c4644285266b7054665c9416b9b81fc5e5d26c4f (commit)
       via  488901edd95e05f4c5ebada4b9763bfbc1fce13d (commit)
       via  159268587285e931df81e64720b56ed64224b363 (commit)
       via  161f4dc0debf2e0f7cf910a615169dfcc0e9eaab (commit)
       via  b956e86e19c465269ab6f471958248e8d8462a58 (commit)
       via  16dc61a4eaef50ab9eb52655e5434a0a65663c19 (commit)
       via  70e6b9e8d2319b51cc43cf462e09a40f790fd249 (commit)
       via  b998ecf5ab26bb3f9ab3b07a545e81cfd873abed (commit)
       via  dd106a1b3507111f27357b93d9aa8c2700db7df7 (commit)
       via  b2631f27d0a9f8a31bcd8c5d0691c4452809a83d (commit)
       via  dc278e475b682c7bde0e87cfa8e12affe57dc337 (commit)
       via  8883ebecb19f06c660623e6a035f949e4eaacde8 (commit)
       via  8453c06e64439f50ad56955691326d3a15b926e0 (commit)
       via  74005de67450688b8d60f3d658b2e68198c12347 (commit)
       via  832817193646651d15acb1af7ac13d9e9925af21 (commit)
       via  58efef36fa6655d44209e05a75d9bd93ff84e7da (commit)
       via  6f1f370a28146902391a5aa0e6aca3e6027d9b9a (commit)
       via  941165eccb3dc4d3cfd8ccd12b13095697de3117 (commit)
       via  81891062ffc6ed25a56f80351f6fc3294c19688e (commit)
       via  06fb91c59e50cdb38af35b7c1f950a0ea46aeef0 (commit)
       via  9e94e652891d020243164e34cb4fb4a4d3953321 (commit)
       via  78307ec2127a29e5f96f40ecccf401ad7fd730ac (commit)
       via  83484ef9537d5abdc1a20462715be41f3b6807d3 (commit)
       via  e98a0c969d0877be0a6d93c34f1100b40bcd591c (commit)
       via  588f6208eefbe93a9f343c181bc9cdc2732b3945 (commit)
       via  c55157cc345ce6a2318d884c1adbd2b737008246 (commit)
       via  7b32504e45cae7c1557d70bf53bd7dad0ac8efd5 (commit)
       via  d980a89e3c42bc3deee9d2a6e40aec99721ef1ab (commit)
       via  ec690175bd9c80da2733c30c4c2933b1291fb43d (commit)
       via  945436b39085d919fd2b17ec9879da8195603df4 (commit)
       via  b93a4855007569d23f64455f672bd4ae647f0891 (commit)
       via  631d7220c7bf15f65ceeb476435f71d2e4e5f179 (commit)
       via  0d2884a7769bf894ea54067c561f6c4fbb8e3fd7 (commit)
       via  006fdd2ff1dba8686d549e1b718e5ea5da4f9408 (commit)
       via  b8e41c6690c5e9e3aec85a3a9c0daccc841bd49f (commit)
       via  979b5423bda919dd00d1d5a0352ac44d90730d6a (commit)
       via  c22c08be36226d6fd4ce26ece1fd9ba290bb07d2 (commit)
      from  3cac06ebddc41e2eb82698ea1252b2c354b7557e (commit)

Summary of changes:
 .gitignore                                         |    1 +
 Makefile.in                                        |    8 ++
 etc/RT_Config.pm.in                                |   36 +--------
 lib/RT/Attachment_Overlay.pm                       |    3 +-
 lib/RT/Condition/UserDefined.pm                    |    1 +
 lib/RT/Config.pm                                   |   14 +---
 lib/RT/CustomField_Overlay.pm                      |   17 +++--
 lib/RT/Interface/Web.pm                            |   21 +++++
 lib/RT/ObjectCustomFieldValue_Overlay.pm           |   34 ++++++---
 lib/RT/Test.pm                                     |   32 ++++++--
 lib/RT/Tickets_Overlay.pm                          |   32 ++++++---
 sbin/rt-email-dashboards.in                        |    3 +-
 sbin/rt-test-dependencies.in                       |    2 +-
 share/html/Dashboards/Elements/ShowPortlet/search  |    5 +-
 share/html/Elements/CollectionAsTable/Header       |   37 ++++------
 share/html/Elements/CollectionAsTable/ParseFormat  |   51 ++++++-------
 share/html/Elements/CollectionAsTable/Row          |   80 +++++++++----------
 share/html/Elements/EditCustomFieldSelect          |    6 ++
 share/html/Elements/Footer                         |    2 +-
 share/html/Elements/RT__Ticket/ColumnMap           |    2 +-
 share/html/Elements/ShowCustomFields               |    2 +-
 share/html/Elements/ShowSearch                     |   21 +++--
 .../html/NoAuth/css/3.5-default/ticket-search.css  |   10 +-
 share/html/NoAuth/css/web2/msie.css                |    6 +-
 share/html/NoAuth/css/web2/ticket-search.css       |   51 ++++++-------
 share/html/NoAuth/css/web2/ticket.css              |    6 +-
 share/html/NoAuth/js/cascaded.js                   |   46 ++++++++++--
 share/html/NoAuth/js/combobox.js                   |    1 -
 share/html/Search/Elements/EditFormat              |    3 +-
 share/html/Ticket/Elements/ShowMessageStanza       |    8 +-
 .../Ticket/Elements/ShowTransactionAttachments     |    2 +-
 share/html/Ticket/Update.html                      |   18 ++++-
 share/html/Widgets/ComboBox                        |    8 ++-
 share/html/autohandler                             |    2 +
 34 files changed, 324 insertions(+), 247 deletions(-)

- Log -----------------------------------------------------------------
commit 35db9cf04224570e1659ee8e6a130d5afb4faeb8
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Sep 14 17:00:01 2009 -0400

    fix missing comma

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index baa1ee4..615f6a2 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -319,7 +319,7 @@ our %META = (
         Widget          => '/Widgets/Form/Select',
         WidgetArguments => {
             Description => 'CSS rule white-space',    #loc
-            Values => [ 'normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', '' ]
+            Values => [ 'normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', '' ],
               Hints => "ie6 doesn't support white-space well, so don't use this if you use ie6"    #loc
         },
     },

commit 1e3ee3fc4bb64311fff9b74e8de0e76c15888775
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Sep 15 12:43:35 2009 -0400

    Smash PlainTextWhiteSpace into PlainTextMono
    
    Most people are going to want either true <pre> blocks
    or pre blocks that wrap (which PlainTextMono does).

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index c226908..9d33ad4 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1132,44 +1132,16 @@ use a monospaced font, no matter what the value of C<$PlainTextMono> is.
 Set($PlainTextPre, 0);
 
 
-=item C<$PlainTextMono>
-
+=item C<$PlainTextMono> 
 To display plaintext attachments,
-Set C<$PlainTextMono> to 1 to use monospaced font,  0 to not to.
+Set C<$PlainTextMono> to 1 to use monospaced font and preserve
+formatting, but unlike PlainTextPre, the text will wrap to fit into the
+UI.
 
 =cut
 
 Set($PlainTextMono, 0);
 
-=item C<$PlainTextWhiteSpace>
-
-Decorate plain text displays by white-space css property.
-Possible values are: 
-
-normal:
-    Sequences of whitespace will collapse into a single whitespace.
-    Text will wrap when necessary.
-nowrap:
-    Sequences of whitespace will collapse into a single whitespace.
-    Text will never wrap to the next line.
-    The text continues on the same line until a <br /> tag is encountered
-pre:
-    Whitespace is preserved by the browser.
-    Text will only wrap on line breaks Acts like the <pre> tag in HTML
-pre-line:
-    Sequences of whitespace will collapse into a single whitespace.
-    Text will wrap when necessary, and on line breaks
-pre-wrap:
-    Whitespace is preserved by the browser.
-    Text will wrap when necessary, and on line breaks 
-
-Set value to '' to not use this.
-
-=cut
-
-Set($PlainTextWhiteSpace, '');
-
-
 =item C<$ShowUnreadMessageNotifications>
 
 By default, RT will prompt users when there are new, unread messages on
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 615f6a2..771ee14 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -309,18 +309,8 @@ our %META = (
         SortOrder       => 5,
         Widget          => '/Widgets/Form/Boolean',
         WidgetArguments => {
-            Description => 'Use monospaced font to display plain text attachments', #loc
-        },
-    },
-    PlainTextWhiteSpace => {
-        Section         => 'Ticket display',
-        Overridable     => 1,
-        SortOrder       => 4,
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
-            Description => 'CSS rule white-space',    #loc
-            Values => [ 'normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', '' ],
-              Hints => "ie6 doesn't support white-space well, so don't use this if you use ie6"    #loc
+            Description => 'display wrapping formatting plain text', #loc
+            Hints => 'Use css rules to display text monospaced and with formatting preserved, but wrap as needed.  This does not work well with IE6 and you should use the previous option', #loc
         },
     },
 
diff --git a/share/html/NoAuth/css/web2/ticket.css b/share/html/NoAuth/css/web2/ticket.css
index 3ea6be6..f60576e 100644
--- a/share/html/NoAuth/css/web2/ticket.css
+++ b/share/html/NoAuth/css/web2/ticket.css
@@ -118,12 +118,8 @@ div#ticket-history div.content {
  margin-left: 1.5em;
 }
 
-div.mono {
- font-family: monospace;
-}
-
 .plain-text-white-space {
- white-space: <%RT->Config->Get('PlainTextWhiteSpace', $RT::CurrentUser)%>;
+ white-space: pre-wrap;
 }
 
 .ticket-transaction .messagebody {
diff --git a/share/html/Ticket/Elements/ShowMessageStanza b/share/html/Ticket/Elements/ShowMessageStanza
index 6132423..e9b57bb 100755
--- a/share/html/Ticket/Elements/ShowMessageStanza
+++ b/share/html/Ticket/Elements/ShowMessageStanza
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <%perl>
 if ( ref $Message ) {
-    $m->out('<pre>') if $plain_text_pre && !$Depth && !$plain_text_white_space;
+    $m->out('<pre>') if $plain_text_pre && !$Depth && !$plain_text_mono;
     $m->out( qq{<div class="message-stanza-depth-$Depth">} );
 
     my @stack;
@@ -80,14 +80,14 @@ if ( ref $Message ) {
     }
 
     $m->out('</div>');
-    $m->out('</pre>') if $plain_text_pre && !$Depth && !$plain_text_white_space;
+    $m->out('</pre>') if $plain_text_pre && !$Depth && !$plain_text_mono;
 } else {
       $print_content->( \$Message );
 }
 </%perl>
 <%INIT>
 my $plain_text_pre = RT->Config->Get('PlainTextPre', $session{'CurrentUser'});
-my $plain_text_white_space = RT->Config->Get('PlainTextWhiteSpace', $session{'CurrentUser'});
+my $plain_text_mono = RT->Config->Get('PlainTextMono', $session{'CurrentUser'});
 
 my $ticket = $Transaction ? $Transaction->TicketObj : undef;
 
@@ -97,7 +97,7 @@ my $print_content = sub {
 
     $m->callback( content => $ref, %ARGS );
     $m->comp('/Elements/MakeClicky', content => $ref, ticket => $ticket, %ARGS);
-    unless ( $plain_text_pre || $plain_text_white_space ) {
+    unless ( $plain_text_pre || $plain_text_mono ) {
         $$ref =~ s{(?=\r*\n)}{<br />}g if defined $$ref;
     }
     $m->out( $$ref );
diff --git a/share/html/Ticket/Elements/ShowTransactionAttachments b/share/html/Ticket/Elements/ShowTransactionAttachments
index 07b6453..0674342 100644
--- a/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -76,7 +76,7 @@ foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) {
 % if ( scalar ( grep $_->__Value('Parent') == $message->id, @$Attachments ) ) {
 <div class="messageattachments">
 % } else {
-<div class="messagebody<% RT->Config->Get('PlainTextMono', $session{'CurrentUser'}) ? ' mono' : ''%><% RT->Config->Get('PlainTextWhiteSpace', $session{'CurrentUser'}) ? ' plain-text-white-space' : ''%>">
+<div class="messagebody <% RT->Config->Get('PlainTextMono', $session{'CurrentUser'}) ? ' plain-text-white-space' : ''%>">
 % }
 <%PERL>
 

commit fec9ad4f1336fc7844933c9ac9b12f8252bf0b73
Merge: 1e3ee3f c0ba2a3
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Sep 15 12:44:47 2009 -0400

    Merge branch '3.8-trunk' into 3.8-plain-text-mono


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


More information about the Rt-commit mailing list