[Rt-commit] r16660 - in rt/3.8/trunk: . share/html/NoAuth/css/web2

elacour at bestpractical.com elacour at bestpractical.com
Tue Nov 4 10:58:26 EST 2008


Author: elacour
Date: Tue Nov  4 10:58:25 2008
New Revision: 16660

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/share/html/NoAuth/css/web2/ticket.css
   rt/3.8/trunk/share/html/Ticket/Elements/ShowTransaction
   rt/3.8/trunk/share/html/Ticket/Elements/ShowTransactionAttachments

Log:
 r10991 at datura:  manu | 2008-11-04 16:58:13 +0100
 Fix text overflow in transactions display by using div/span instead of
 tables/tr/td with proper css.
 (tested against: Linux/Firefox3, Windows/Firefox2, Windows/IE7, Windows/Safari,
 Windows/IE6)
 


Modified: rt/3.8/trunk/share/html/NoAuth/css/web2/ticket.css
==============================================================================
--- rt/3.8/trunk/share/html/NoAuth/css/web2/ticket.css	(original)
+++ rt/3.8/trunk/share/html/NoAuth/css/web2/ticket.css	Tue Nov  4 10:58:25 2008
@@ -65,8 +65,9 @@
 
 }
 
-.ticket-transaction tr.metadata td { padding-top: 0.75em;} 
-.ticket-transaction tr.metadata td.actions {
+.ticket-transaction div.metadata span.actions {
+ position: absolute;
+ right: 2.3em;
  padding: 0em;
  background: #ccc;
  text-align: right;
@@ -75,16 +76,16 @@
  color: #ccc;
  -moz-border-radius-bottomleft: 0.5em;
  -webkit-border-bottom-left-radius: 0.5em;
- width: 1em;
  white-space: nowrap;
 }
 
-.ticket-transaction tr.metadata  td.type {
+.ticket-transaction div.metadata  span.type {
  text-align: center;
  position: absolute;
  margin: 0.25em;
  width: 1em;
  height: 1.25em;
+ padding-top: 0.75em;
  padding: none;
  border-right: 1px solid #999;
  border-bottom: 1px solid #999;
@@ -92,25 +93,29 @@
  -webkit-border-bottom-right-radius: 0.25em;
 }
 
-div#ticket-history td.type a {
+div#ticket-history span.type a {
  color: #fff;
 }
 
 
-div#ticket-history td.date {
- padding-left: 2em;
+div#ticket-history span.date {
+ margin-left: 2em;
  width: 10em;
 }
 
 
-div#ticket-history td.description {
- padding-left: 1em;
+div#ticket-history span.description {
+ margin-left: 1em;
  font-weight: bold;
 }
 
-div#ticket-history td.content {
- position: relative;
+div#ticket-history span.time-taken {
+ margin-left: 1em;
+}
+
+div#ticket-history div.content {
  padding-right: 1em;
+ padding-bottom: 0.7em;
  font-size: 1.1em;
 }
 
@@ -122,7 +127,7 @@
  border-top: 1px solid #ccc;
  margin-left: 2em;
  overflow: auto;
-
+ min-height: 2.5em;
 }
 
 div#ticket-history div.downloadattachment {
@@ -132,11 +137,12 @@
 text-align: right;
 background: #ddd;
 padding: 0.5em;
+margin-left: 1em;
 
 border: 1px solid #ccc;
 border-right: 2px solid #aaa;
 border-bottom: 2px solid #aaa;
-margin-top: 1em;
+margin-top: 0.5em;
 -moz-border-radius: 0.5em;
 -webkit-border-radius: 0.5em;
 

Modified: rt/3.8/trunk/share/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Elements/ShowTransaction	(original)
+++ rt/3.8/trunk/share/html/Ticket/Elements/ShowTransaction	Tue Nov  4 10:58:25 2008
@@ -48,25 +48,24 @@
 <div class="ticket-transaction <% $type_class %> <% $RowNum % 2 ? 'odd' : 'even' %>">
 % $m->callback( titlebar_cmd => \$titlebar_commands, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' );
 
-<table width="100%" cellspacing="0" cellpadding="2" border="0" class="ticket-transaction">
+<div class="ticket-transaction">
 % $m->callback( titlebar_cmd => \$titlebar_commands, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyCommand' );
-  <tr class="metadata">
-    <td rowspan="2" valign="top" class="type">
+  <div class="metadata">
+    <span class="type">
       <a name="txn-<% $Transaction->Id %>" href="<% $DisplayPath %>#txn-<% $Transaction->Id %>">#</a>
-      <% $LastTransaction ? '<a id="lasttrans" name="lasttrans"/>' : ''|n %>
-    </td>
-    <td class="date"><% $transdate|n %></td>
+      <% $LastTransaction ? '<a id="lasttrans" name="lasttrans"></a>' : ''|n %>
+    </span>
+    <span class="date"><% $transdate|n %></span>
 % my $desc = $Transaction->BriefDescription;
 % $m->callback( text => \$desc, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' );
-    <td class="description">
+    <span class="description">
       <% $Transaction->CreatorObj->Name %> - <% $TicketString %> <% $desc %>
-    </td>
-    <td class="time-taken"><% $TimeTaken %></td>
-    <td class="actions<% $titlebar_commands ? '': ' hidden'%>"><% $titlebar_commands |n %></td>
-  </tr>
+    </span>
+    <span class="time-taken"><% $TimeTaken %></span>
+    <span class="actions<% $titlebar_commands ? '': ' hidden'%>"><% $titlebar_commands |n %></span>
+  </div>
 
-  <tr>
-    <td colspan="5" class="content">
+    <div class="content">
 % if ( $Attachments->[0] && $Attachments->[0]->id ) {
 %   if (RT->Config->Get('GnuPG')->{'Enable'}) {
         <& ShowGnuPGStatus, Attachment => $Attachments->[0], WarnUnsigned => $WarnUnsigned &>
@@ -76,10 +75,9 @@
       <& /Elements/ShowCustomFields, Object => $Transaction &>
 % }
 % $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody);
-    </td>
-  </tr>
+    </div>
 
-</table>
+</div>
 </div>
 
 <%ARGS>

Modified: rt/3.8/trunk/share/html/Ticket/Elements/ShowTransactionAttachments
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Elements/ShowTransactionAttachments	(original)
+++ rt/3.8/trunk/share/html/Ticket/Elements/ShowTransactionAttachments	Tue Nov  4 10:58:25 2008
@@ -62,12 +62,17 @@
 % if ( $DownloadableHeaders && !$message->Filename && $message->ContentType =~ /text/  ) {
  / <a href="<% $AttachPath %>/WithHeaders/<% $message->Id %>"><% loc('with headers') %></a>
 % }
-<br/>
+<br /> 
 <span class="downloadcontenttype"><% $message->ContentType %> <% $size_to_str->( $size ) %></span>
 </div>
 %   }
 
+% # If there is sub-messages, open a dedicated div
+% if ( scalar ( grep $_->__Value('Parent') == $message->id, @$Attachments ) ) {
+<div class="messageattachments">
+% } else {
 <div class="messagebody">
+%}
 <%PERL>
 # {{{ if it has a content-disposition: attachment, don't show inline
 unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
@@ -139,8 +144,9 @@
               . '/" />' );
     }
     elsif ( $message->ContentLength > 0 ) {
-        $m->out(
-            loc( 'Message body not shown because it is too large or is not plain text.' )
+        $m->out( '<p>' .
+            loc( 'Message body not shown because it is too large or is not plain text.' ) .
+            '</p>'
         );
     }
 }


More information about the Rt-commit mailing list