[Vtigercrm-commits] [vtiger-commits] r11072 - /vtigercrm/branches/5.0.3/include/js/general.js

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun May 27 14:50:43 EDT 2007


Author: richie
Date: Sun May 27 12:50:40 2007
New Revision: 11072

Log:
fixed - In Account related list added a new contact.The particular contact when we upload a contact image(.zip file) doesn't show any messages. -Sri

Modified:
    vtigercrm/branches/5.0.3/include/js/general.js

Modified: vtigercrm/branches/5.0.3/include/js/general.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/general.js (original)
+++ vtigercrm/branches/5.0.3/include/js/general.js Sun May 27 12:50:40 2007
@@ -241,7 +241,7 @@
 	var currObj=getObj(fldName)
 	if (type.toUpperCase()=="YAHOO") //Email ID validation
 	{
-		//yahoo Id validation	
+		//yahoo Id validation
 		var re=new RegExp(/^[a-z0-9]([a-z0-9_\-\.]*)@([y][a][h][o][o])(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/)
 	}
 	if (type.toUpperCase()=="EMAIL") //Email ID validation
@@ -772,7 +772,7 @@
 }
 
 function formValidate() {
-;
+
 //Validation for Portal User
 if(gVTModule == 'Contacts' && gValidationCall != 'tabchange')
 {
@@ -781,6 +781,24 @@
 		return false;
 	}
 }
+if(gVTModule == 'Contacts')
+{
+	if(getObj('imagename').value != '' )
+	{
+		var image_arr = new Array();
+		image_arr = (getObj('imagename').value).split(".");
+		if((image_arr[1] ==  "jpeg") || (image_arr[1] ==  "png") || (image_arr[1] ==  "jpg") || (image_arr[1] ==  "pjpeg") || (image_arr[1] ==  "x-png") || (image_arr[1] ==  "gif") )
+		{
+			return true;
+		}
+		else
+		{
+			alert(alert_arr.LBL_WRONG_IMAGE_TYPE);
+			return false;
+		}
+	}
+}
+
 
 	for (var i=0; i<fieldname.length; i++) {
 		if(getObj(fieldname[i]) != null)
@@ -887,11 +905,11 @@
 						{
 							var etype = "EMAIL"
 							if(fieldname[i] == "yahooid" || fieldname[i] == "yahoo_id")
-								{
- 								etype = "YAHOO"
-								}	
+							{
+								etype = "YAHOO";
+							}
 							if (!patternValidate(fieldname[i],fieldlabel[i],etype))
-								return false
+								return false;
 						}
 					}
 				break;





More information about the vtigercrm-commits mailing list