[Vtigercrm-commits] [vtiger-commits] r9487 - /vtigercrm/trunk/modules/Contacts/Contact.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Sep 13 07:27:58 EDT 2006
Author: richie
Date: Wed Sep 13 05:27:41 2006
New Revision: 9487
Log:
Google Map issues fixed on change of label --By Minnie
Modified:
vtigercrm/trunk/modules/Contacts/Contact.js
Modified: vtigercrm/trunk/modules/Contacts/Contact.js
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.js (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.js Wed Sep 13 05:27:41 2006
@@ -105,21 +105,31 @@
var mapParameter = '';
if (addressType == 'Main')
{
- mapParameter = document.getElementById("dtlview_Mailing Street").innerHTML+' '
- +document.getElementById("dtlview_Mailing Po Box").innerHTML+' '
- +document.getElementById("dtlview_Mailing City").innerHTML+' '
- +document.getElementById("dtlview_Mailing State").innerHTML+' '
- +document.getElementById("dtlview_Mailing Country").innerHTML+' '
- +document.getElementById("dtlview_Mailing Zip").innerHTML
+ if(fieldname.indexOf('mailingstreet') > -1)
+ mapParameter = document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstreet')]).innerHTML+' ';
+ if(fieldname.indexOf('mailingpobox') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingpobox')]).innerHTML+' ';
+ if(fieldname.indexOf('mailingcity') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcity')]).innerHTML+' ';
+ if(fieldname.indexOf('mailingstate') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstate')]).innerHTML+' ';
+ if(fieldname.indexOf('mailingcountry') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcountry')]).innerHTML+' ';
+ if(fieldname.indexOf('mailingzip') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingzip')]).innerHTML;
}
else if (addressType == 'Other')
{
- mapParameter = document.getElementById("dtlview_Other Street").innerHTML+' '
- +document.getElementById("dtlview_Other Po Box").innerHTML+' '
- +document.getElementById("dtlview_Other City").innerHTML+' '
- +document.getElementById("dtlview_Other State").innerHTML+' '
- +document.getElementById("dtlview_Other Country").innerHTML+' '
- +document.getElementById("dtlview_Other Zip").innerHTML
+ if(fieldname.indexOf('otherstreet') > -1)
+ mapParameter = document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstreet')]).innerHTML+' ';
+ if(fieldname.indexOf('otherpobox') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherpobox')]).innerHTML+' ';
+ if(fieldname.indexOf('otherstate') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstate')]).innerHTML+' ';
+ if(fieldname.indexOf('othercountry') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('othercountry')]).innerHTML+' ';
+ if(fieldname.indexOf('otherzip') > -1)
+ mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherzip')]).innerHTML;
}
window.open('http://maps.google.com/maps?q='+mapParameter,'goolemap','height=450,width=700,resizable=no,titlebar,location,top=200,left=250');
}
More information about the vtigercrm-commits
mailing list