Hello developers,

when displaying customer-infos or ticket details, long entries could be 
shortend. You will only see a [...] to ensure a correct layout. But sometimes 
you need just this info. So I've enclosed these tags with a <div title="long 
text"> ... </div>. In bowsers like Konqueror, Mozilla, Opera and IE you will 
see a popup now, when pointing with the mouse cursor on such an entry. The 
popup text is not shortend.

I've attached the necessary diff-files. This is the first time, I'm trying to 
make my changes public. So if something is not right, I would be very 
graceful about some hints in the right direction...

CU Dirk Scheer

-- 
http://www.scheernet.de/
--- Agent.pm.org	2003-12-17 22:24:57.000000000 +0100
+++ Agent.pm	2003-12-17 22:28:19.000000000 +0100
@@ -142,6 +142,7 @@
 sub AgentCustomerViewTable {
     my $Self = shift;
     my %Param = @_;
+    my $val;
     if (ref($Param{Data}) eq 'HASH' && %{$Param{Data}}) {
         # build html table
         $Param{Table} = '<table>';
@@ -151,7 +152,14 @@
                 if ($Field->[6]) {
                     $Param{Table} .= "<a href=\"$Field->[6]\">";
                 }
+                $val = $Self->Ascii2Html(Text => $Param{Data}->{$Field->[0]});
+                if($val && length($val) > $Param{Max}) {
+                  $Param{Table} .= '<div title="' . $val . '">';
+                }
                 $Param{Table} .= $Self->Ascii2Html(Text => $Param{Data}->{$Field->[0]}, Max => $Param{Max});
+                if($val && length($val) > $Param{Max}) {
+                  $Param{Table} .= '</div>';
+                }
                 if ($Field->[6]) {
                     $Param{Table} .= "</a>";
                 }
--- AgentUtilSearchResult.dtl.org	2003-12-18 23:33:48.000000000 +0100
+++ AgentUtilSearchResult.dtl	2003-12-19 00:18:33.000000000 +0100
@@ -59,19 +59,31 @@
     <table border="0">
     <tr>
       <td><b>$Text{"State"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"State"}"}","15"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"State"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"State"}"}","15"}</font>
+          </div>
+      </td>
     </tr>
     <tr>
       <td><b>$Text{"Priority"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"Priority"}"}","15"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"Priority"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"Priority"}"}","15"}</font>
+          </div>
+      </td>
     </tr>
     <tr>
       <td><b>$Text{"Queue"}:</b></td>
-      <td><font color="red">$Quote{"$Data{"Queue"}","15"}</font></td>
+      <td><div title="$Quote{"$Data{"State"}"}">
+          <font color="red">$Quote{"$Data{"Queue"}","15"}</font>
+          </div>
+      </td>
     </tr>
     <tr>
       <td><b>$Text{"CustomerID"}:</b></td>
-      <td>$Quote{"$Data{"CustomerID"}","15"}</td>
+      <td><div title="$Data{"CustomerID"}">
+          $Quote{"$Data{"CustomerID"}","15"}
+          </div>
+      </td>
     </tr>
     </table>
     <p align="left"><hr><b>$Text{"Customer Info"}:</b> $Data{"CustomerTable"}<hr></p>
--- AgentMailboxTicket.dtl.org	2003-12-18 23:38:57.000000000 +0100
+++ AgentMailboxTicket.dtl	2003-12-19 00:17:39.000000000 +0100
@@ -76,15 +76,24 @@
     <table border="0">
     <tr valign="top">
       <td><b>$Text{"State"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"State"}"}","14"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"State"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"State"}"}","14"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"Priority"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"Priority"}"}","14"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"Priority"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"Priority"}"}","14"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"Queue"}:</b></td>
-      <td><font color="red">$Quote{"$Data{"Queue"}","14"}</font></td>
+      <td><div title="$Quote{"$Data{"Queue"}"}">
+          <font color="red">$Quote{"$Data{"Queue"}","14"}</font>
+          </div>
+      </td>
     </tr>
     </table>
   </td>
--- AgentHistoryRow.dtl.org	2003-12-19 00:23:33.000000000 +0100
+++ AgentHistoryRow.dtl	2003-12-19 00:28:40.000000000 +0100
@@ -19,13 +19,15 @@
   $Quote{"$Data{"HistoryType"}"}
   </td>
   <td>
-  $Quote{"$Data{"Name"}","100"}
+  <div title="$Quote{"$Data{"Name"}"}">$Quote{"$Data{"Name"}","100"}</div>
   </td>
   <td align="CENTER">
     $Data{"Link"}
   </td>
   <td>
+  <div title="$Quote{"$Data{"CreateBy"} ($Data{"UserFirstname"} $Data{"UserLastname"})"}">
   $Quote{"$Data{"CreateBy"}"} ($Quote{"$Data{"UserFirstname"} $Data{"UserLastname"}","20"})
+  </div>
   </td>
   <td>
   $TimeLong{"$Data{"CreateTime"}"}
--- AgentUtilSearchResultShortTable.dtl.org	2003-12-18 23:49:54.000000000 +0100
+++ AgentUtilSearchResultShortTable.dtl	2003-12-19 00:16:38.000000000 +0100
@@ -12,10 +12,21 @@
 <tr valign="top">
  <td class="PriorityID-$Data{"PriorityID"}"><a href="$Env{"Baselink"}Action=AgentZoom&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}&QueueID=$Data{"QueueID"}" onmouseover="window.status='$Text{"Zoom"}'; return true;" onmouseout="window.status='';">$Data{"TicketNumber"}</a></td>
  <td class="PriorityID-$Data{"PriorityID"}">$Quote{"$Data{"Age"}"}</td>
- <td class="PriorityID-$Data{"PriorityID"}">$Quote{"$Data{"From"}","30"}<br>$Quote{"$Data{"Subject"}","30"}&nbsp;</td>
- <td class="PriorityID-$Data{"PriorityID"}">$Quote{"$Text{"$Data{"State"}"}","30"}</td>
- <td class="PriorityID-$Data{"PriorityID"}">$Quote{"$Data{"Queue"}","30"}</td>
- <td class="PriorityID-$Data{"PriorityID"}">$Quote{"$Data{"Owner"}","30"} ($Quote{"$Data{"UserFirstname"} $Data{"UserLastname"}","30"})</td>
- <td class="PriorityID-$Data{"PriorityID"}"><a href="$Env{"Baselink"}Action=AgentCustomer&TicketID=$Data{"TicketID"}" onmouseover="window.status='$Text{"Customer history"}'; return true;" onmouseout="window.status='';">$Quote{"$Data{"CustomerID"}","15"}</a>&nbsp;<br>$Quote{"$Data{"CustomerName"}","15"}</td>  
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Data{"From"}"}">$Quote{"$Data{"From"}","30"}</div>
+    <div title="$Quote{"$Data{"Subject"}"}">$Quote{"$Data{"Subject"}","30"}&nbsp;</div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Text{"$Data{"State"}"}"}">$Quote{"$Text{"$Data{"State"}"}","30"}</div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Data{"Queue"}"}">$Quote{"$Data{"Queue"}","30"}</div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Data{"Owner"} ($Data{"UserFirstname"} $Data{"UserLastname"})"}">
+       $Quote{"$Data{"Owner"}","30"} ($Quote{"$Data{"UserFirstname"} $Data{"UserLastname"}","30"})
+    </div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}"><a href="$Env{"Baselink"}Action=AgentCustomer&TicketID=$Data{"TicketID"}" onmouseover="window.status='$Text{"Customer history"}'; return true;" onmouseout="window.status='';">$Quote{"$Data{"CustomerID"}","15"}</a>&nbsp;<br><div title="$Data{"CustomerName"}">$Quote{"$Data{"CustomerName"}","15"}</div></td>  
 </tr>
 <!-- end record -->
--- TicketView.dtl.org	2003-12-18 23:09:49.000000000 +0100
+++ TicketView.dtl	2003-12-19 00:19:37.000000000 +0100
@@ -84,15 +84,24 @@
     <table border="0">
     <tr>
       <td><b>$Text{"State"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"State"}"}","18"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"State"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"State"}"}","18"}</font>
+          </div>
+      </td>
     </tr>
     <tr>
       <td><b>$Text{"Priority"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"Priority"}"}","18"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"Priority"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"Priority"}"}","18"}</font>
+          </div>
+      </td>
     </tr>
     <tr>
       <td><b>$Text{"Queue"}:</b></td>
-      <td><font color="red">$Quote{"$Data{"Queue"}","18"}</font></td>
+      <td><div title="$Quote{"$Data{"Queue"}"}">
+          <font color="red">$Quote{"$Data{"Queue"}","18"}</font>
+          </div>
+      </td>
     </tr>
     <tr>
       <td><b>$Text{"CustomerID"}:</b></td>
--- AgentUtilSearchResultShortTableNotAnswered.dtl.org	2003-12-19 00:02:44.000000000 +0100
+++ AgentUtilSearchResultShortTableNotAnswered.dtl	2003-12-19 00:14:59.000000000 +0100
@@ -12,10 +12,21 @@
 <tr valign="top">
  <td class="PriorityID-$Data{"PriorityID"}"><a href="$Env{"Baselink"}Action=AgentZoom&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}&QueueID=$Data{"QueueID"}" onmouseover="window.status='$Text{"Zoom"}'; return true;" onmouseout="window.status='';">$Data{"TicketNumber"}</a></td>
  <td class="PriorityID-$Data{"PriorityID"}"><font color="red">$Quote{"$Data{"Age"}"}</font></td>
- <td class="PriorityID-$Data{"PriorityID"}"><font color="red">$Quote{"$Data{"From"}","30"}<br>$Quote{"$Data{"Subject"}","30"}</font>&nbsp;</td>
- <td class="PriorityID-$Data{"PriorityID"}"><font color="red">$Quote{"$Text{"$Data{"State"}"}","30"}</font></td>
- <td class="PriorityID-$Data{"PriorityID"}"><font color="red">$Quote{"$Data{"Queue"}","30"}</font></td>
- <td class="PriorityID-$Data{"PriorityID"}"><font color="red">$Quote{"$Data{"Owner"}","30"} ($Quote{"$Data{"UserFirstname"} $Data{"UserLastname"}","30"})</font></td>
- <td class="PriorityID-$Data{"PriorityID"}"><a href="$Env{"Baselink"}Action=AgentCustomer&TicketID=$Data{"TicketID"}" onmouseover="window.status='$Text{"Customer history"}'; return true;" onmouseout="window.status='';">$Quote{"$Data{"CustomerID"}","15"}</a>&nbsp;<br>$Quote{"$Data{"CustomerName"}","30"}</td>  
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Data{"From"}"}">$Quote{"$Data{"From"}","30"}</div>
+    <div title="$Quote{"$Data{"Subject"}"}">$Quote{"$Data{"Subject"}","30"}&nbsp;</div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Text{"$Data{"State"}"}"}">$Quote{"$Text{"$Data{"State"}"}","30"}</div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Data{"Queue"}"}">$Quote{"$Data{"Queue"}","30"}</div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}">
+    <div title="$Quote{"$Data{"Owner"} ($Data{"UserFirstname"} $Data{"UserLastname"})"}">
+       $Quote{"$Data{"Owner"}","30"} ($Quote{"$Data{"UserFirstname"} $Data{"UserLastname"}","30"})
+    </div>
+ </td>
+ <td class="PriorityID-$Data{"PriorityID"}"><a href="$Env{"Baselink"}Action=AgentCustomer&TicketID=$Data{"TicketID"}" onmouseover="window.status='$Text{"Customer history"}'; return true;" onmouseout="window.status='';">$Quote{"$Data{"CustomerID"}","15"}</a>&nbsp;<br><div title="$Data{"CustomerName"}">$Quote{"$Data{"CustomerName"}","30"}</div></td>  
 </tr>
 <!-- end record -->
--- AgentZoomStatus.dtl.org	2003-12-19 00:29:18.000000000 +0100
+++ AgentZoomStatus.dtl	2003-12-19 00:30:24.000000000 +0100
@@ -13,19 +13,31 @@
     <table border="0" cellspacing="1" cellpadding="0" width="95%">
     <tr valign="top">
       <td><b>$Text{"State"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"State"}"}","18"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"State"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"State"}"}","18"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"Priority"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"Priority"}"}","18"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"Priority"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"Priority"}"}","18"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"Queue"}:</b></td>
-      <td><font color="red">$Quote{"$Data{"Queue"}","18"}</font></td>
+      <td><div title="$Quote{"$Data{"Queue"}"}">
+          <font color="red">$Quote{"$Data{"Queue"}","18"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"Lock"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"Lock"}"}","18"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"Lock"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"Lock"}"}","18"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"CustomerID"}:</b></td>
@@ -46,7 +58,7 @@
     $Data{"PendingUntilString"}
     <tr  valign="top">
       <td><b>$Text{"Owner"}:</b></td>
-      <td>$Quote{"$Data{"Owner"}","18"} ($Quote{"$Data{"UserFirstname"} $Data{"UserLastname"}","18"})</td>
+      <td><div title="$Data{"Owner"} ($Data{"UserFirstname"} $Data{"UserLastname"})">$Quote{"$Data{"Owner"}","18"} ($Quote{"$Data{"UserFirstname"} $Data{"UserLastname"}","18"})</div></td>
     </tr>
 # --
 # use this if you want to show TicketFreeKey1-2 and TicketFreeText1-2
--- TicketViewLite.dtl.org	2003-12-18 23:09:54.000000000 +0100
+++ TicketViewLite.dtl	2003-12-19 00:20:17.000000000 +0100
@@ -74,15 +74,24 @@
     <table border="0">
     <tr valign="top">
       <td><b>$Text{"State"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"State"}"}","14"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"State"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"State"}"}","14"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"Priority"}:</b></td>
-      <td><font color="red">$Quote{"$Text{"$Data{"Priority"}"}","14"}</font></td>
+      <td><div title="$Quote{"$Text{"$Data{"Priority"}"}"}">
+          <font color="red">$Quote{"$Text{"$Data{"Priority"}"}","14"}</font>
+          </div>
+      </td>
     </tr>
     <tr valign="top">
       <td><b>$Text{"Queue"}:</b></td>
-      <td><font color="red">$Quote{"$Data{"Queue"}","14"}</font></td>
+      <td><div title="$Quote{"$Data{"Queue"}"}">
+          <font color="red">$Quote{"$Data{"Queue"}","14"}</font>
+          </div>
+      </td>
     </tr>
     </table>
   </td>
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to