[Vtigercrm-commits] [vtiger-commits] r3993 - /vtigercrm/trunk/include/utils/CommonUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Feb 28 05:01:55 EST 2006


Author: saraj
Date: Tue Feb 28 03:01:49 2006
New Revision: 3993

Log:
issue in thumbnail view has been fixed

Modified:
    vtigercrm/trunk/include/utils/CommonUtils.php

Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Tue Feb 28 03:01:49 2006
@@ -987,11 +987,13 @@
     return $update_info;
 }
 
+
 function getContactImages($parenttab)
 {
     global $adb;
 	$imagelists = '<script>var leftrightslide=new Array();';
-   	$i=0;
+	$imagenamelists='<script>var dynimages=new Array();';
+   	$imagecount=0;
     $query='select imagename,firstname,lastname,contactid from contactdetails inner join crmentity on contactdetails.contactid=crmentity.crmid where deleted = 0 ';
     $result = $adb->query($query);
     $noofimages = $adb->num_rows($result);
@@ -1002,10 +1004,16 @@
 		$id = $adb->query_result($result,$j,'contactid');
 		$contactname=$adb->query_result($result,$j,'firstname').' '.$adb->query_result($result,$j,'lastname');
 		if($imagename != '')
-			$imagelists .= 'leftrightslide['.$i++.']= \'<div class=thumbnail><a href='.$imgpath.' target="_blank"><img src="'.$imgpath.'" border=1 height=50 width=80></a><div class="thumbnailcaption"><a href="index.php?action=DetailView&module=Contacts&record='.$id.'&parenttab='.$parenttab.'">'.$contactname.'</a></div></div>\';';
+		{
+			$imagelists .= 'leftrightslide['.$imagecount.']= \'<div class=thumbnail><a href='.$imgpath.' onMouseover=modifyimage("dynloadarea",'.$imagecount.') onMouseOut=document.getElementById("dynloadarea").style.display="none"; target="_blank"><img src="'.$imgpath.'" border=1 height=40 width=80></a><div class="thumbnailcaption"><a href="index.php?action=DetailView&module=Contacts&record='.$id.'&parenttab='.$parenttab.'">'.$contactname.'</a></div></div>\';';
+			$imagenamelists .='dynimages['.$imagecount.']=["'.$imgpath.'","index.php?action=DetailView&module=Contacts&record='.$id.'&parenttab='.$parenttab.'"];';
+			$imagecount++;
+		}	
 	}
 	$imagelists.= '</script>';
-	if($i>0)	
+	$imagenamelists.='</script>';
+	$imagelists = $imagelists.$imagenamelists;	
+	if($imagecount>0)	
 		return $imagelists;
 }
 





More information about the vtigercrm-commits mailing list