Added display tooltip for comments - See #33
Added display tooltip for comments - See #33

--- a/lib/db/Customer.php
+++ b/lib/db/Customer.php
@@ -171,7 +171,7 @@
 
 $ACL = BTMain::buildACLQuery();
 
-$sql = "SELECT a.CredType, a.id, a.hidden, b.Name as CredName, c.Name FROM #__Cred as a LEFT JOIN #__CredTypes as b on a.CredType = b.id LEFT JOIN #__Cust as c ON a.cust = c.id ".
+$sql = "SELECT a.CredType, a.id, a.comment, a.hidden, b.Name as CredName, c.Name FROM #__Cred as a LEFT JOIN #__CredTypes as b on a.CredType = b.id LEFT JOIN #__Cust as c ON a.cust = c.id ".
 "WHERE a.cust='$id' AND (" . str_replace("`Group`","a.`Group`",$ACL) . ") AND (" . str_replace("`Group`","c.`Group`",$ACL) . ")";
 $this->setQuery($sql);
 return $this->loadResults();

--- a/views/Customer/view.php
+++ b/views/Customer/view.php
@@ -82,10 +82,11 @@
 $x++;
 ob_start();
 $cname = $crypt->decrypt($customer->CredName,'CredType');
+$comment = $crypt->decrypt($customer->comment,'Cre'.$customer->CredType);
 ?>
 
 <tr class="CredDisp" id='CredDisp<?php echo $customer->id;?>'>
-  <td>
+  <td <?php if (!empty($comment)):?>title="<?php echo htmlspecialchars($comment);?>"<?php endif;?>>
     <?php echo $cname;?>
   </td>
 
@@ -164,3 +165,9 @@
 
 <?php endif; ?>
 
+
+<script type="text/javascript">
+$('#CredsTbl *').tooltip({track: true, fade: 250});
+</script>
+
+