[Vtigercrm-commits] [vtiger-commits] r10416 - in /vtigercrm/branches/5.0.3/modules: Accounts/ Calendar/ CustomView/ Emails/ HelpDesk/ Leads/ Portal/ PriceBooks/ Products/ Reports/ Rss/ Vendors/ Webmails/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 12 11:38:13 EDT 2007


Author: saraj
Date: Mon Mar 12 09:37:53 2007
New Revision: 10416

Log:
changes made for language support in js alerts. --Minnie

Modified:
    vtigercrm/branches/5.0.3/modules/Accounts/Account.js
    vtigercrm/branches/5.0.3/modules/Calendar/Activity.js
    vtigercrm/branches/5.0.3/modules/Calendar/script.js
    vtigercrm/branches/5.0.3/modules/CustomView/CustomView.js
    vtigercrm/branches/5.0.3/modules/Emails/Email.js
    vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.js
    vtigercrm/branches/5.0.3/modules/Leads/Lead.js
    vtigercrm/branches/5.0.3/modules/Portal/Portal.js
    vtigercrm/branches/5.0.3/modules/PriceBooks/PriceBook.js
    vtigercrm/branches/5.0.3/modules/Products/Product.js
    vtigercrm/branches/5.0.3/modules/Reports/Report.js
    vtigercrm/branches/5.0.3/modules/Rss/Rss.js
    vtigercrm/branches/5.0.3/modules/Vendors/Vendor.js
    vtigercrm/branches/5.0.3/modules/Webmails/webmails.js

Modified: vtigercrm/branches/5.0.3/modules/Accounts/Account.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/Account.js (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/Account.js Mon Mar 12 09:37:53 2007
@@ -45,7 +45,7 @@
         window.opener.document.EditView.account_id.value = account_id;
 
 	//Ask the user to overwite the address or not - Modified on 06-01-2007
-	if(confirm("Overwrite the existing address with this selected account("+account_name+") address details?"))
+	if(confirm(alert_arr.OVERWRITE_EXISTING_ACCOUNT1+account_name+alert_arr.OVERWRITE_EXISTING_ACCOUNT2))
 	{
 		window.opener.document.EditView.bill_street.value = bill_street;
 		window.opener.document.EditView.ship_street.value = ship_street;
@@ -270,7 +270,7 @@
                                         onComplete: function(response) {
 						if(response.responseText  == 'address_change')
                                         	{
-                                            		if(confirm("Do you want to change the addresses of the Contacts related to this Account?") == true)
+                                            		if(confirm(alert_arr.WANT_TO_CHANGE_CONTACT_ADDR) == true)
 								{
 									form.address_change.value='yes';
 									form.submit();	

Modified: vtigercrm/branches/5.0.3/modules/Calendar/Activity.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/Activity.js (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/Activity.js Mon Mar 12 09:37:53 2007
@@ -37,7 +37,7 @@
 
 		form.duetime.readOnly=false;
 
-		if (form.duetime.readonly) alert ("it's readonly");
+		if (form.duetime.readonly) alert (alert_arr.READONLY);
 
 		document.images.jscal_trigger.width = 16;
 

Modified: vtigercrm/branches/5.0.3/modules/Calendar/script.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/script.js (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/script.js Mon Mar 12 09:37:53 2007
@@ -23,7 +23,7 @@
                 }
                 else
                 {
-                        alert("Please select at least one user");
+                        alert(alert_arr.SELECT_ATLEAST_ONE_USER);
                         return false;
                 }
         }
@@ -43,11 +43,11 @@
                 }
                 else
                 {
-                        alert("Please select at least one user");
+                        alert(alert_arr.SELECT_ATLEAST_ONE_USER);
                         return false;
                 }
         }
-        if(confirm("Are you sure you want to disable sharing for selected "+xx+" user(s) ?"))
+        if(confirm(alert_arr.DISABLE_SHARING_CONFIRMATION+xx+alert_arr.USERS))
         {
                 document.SharedList.action="index.php?module=Calendar&action=disable_sharing&return_module=Calendar&return_action=calendar_share";
         }
@@ -275,7 +275,7 @@
 		{
 			if((endhour*60+endmin) <= (starthour*60+startmin))
 			{
-				alert("End Time should be greater than Start Time ");
+				alert(alert_arr.ENDTIME_GREATER_THAN_STARTTIME);
 				document.EditView.endhr.focus();
 				return false;
 			}
@@ -333,7 +333,7 @@
                                 {
                                         if((followuphour*60+followupmin) <= (endhour*60+endmin))
                                         {
-                                                alert("Followup Time should be greater than End Time ");
+                                                alert(alert_arr.FOLLOWUPTIME_GREATER_THAN_STARTTIME);
                                                 document.EditView.followup_starthr.focus();
                                                 return false;
                                         }
@@ -368,7 +368,7 @@
 	formSelectColumnString('inviteesid','selectedusers');
         if(trim(document.EditView.subject.value) == "")
         {
-                alert("Missing Event Name");
+                alert(alert_arr.MISSING_EVENT_NAME);
                 document.EditView.subject.focus()
                 return false;
         }
@@ -474,7 +474,7 @@
                 	{
                         	if((endhour*60+endmin) <= (starthour*60+startmin))
           	        	{
-                	                alert("End Time should be greater than Start Time ");
+                	                alert(alert_arr.ENDTIME_GREATER_THAN_STARTTIME);
                                 	document.EditView.endhr.focus();
      		                        return false;
                 	        }
@@ -531,7 +531,7 @@
                                         {
                                                 if((followuphour*60+followupmin) <= (endhour*60+endmin))
                                                 {
-                                                        alert("Followup Time should be greater than End Time ");
+                                                        alert(alert_arr.FOLLOWUPTIME_GREATER_THAN_STARTTIME);
                                                         document.EditView.followup_starthr.focus();
                                                         return false;
                                                 }
@@ -1187,7 +1187,7 @@
         else if(select_meeting)
                 calDuedatetime('meeting');
         else
-                alert('Event Type is not selected');
+                alert(alert_arr.EVENT_TYPE_NOT_SELECTED);
 }
 
 function calDuedatetime(type)

Modified: vtigercrm/branches/5.0.3/modules/CustomView/CustomView.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/CustomView/CustomView.js (original)
+++ vtigercrm/branches/5.0.3/modules/CustomView/CustomView.js Mon Mar 12 09:37:53 2007
@@ -74,7 +74,7 @@
 	}
 	// Here we decide whether to submit the form.
 	if (isError == true) {
-		alert("Missing required fields:" + errorMessage);
+		alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage);
 		return false;
 	}
 	//return true;
@@ -102,7 +102,7 @@
 
         // Here we decide whether to submit the form.
         if (isError == true) {
-                alert("Missing required fields: " + errorMessage);
+                alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage);
                 return false;
         }
  return true;

Modified: vtigercrm/branches/5.0.3/modules/Emails/Email.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Emails/Email.js (original)
+++ vtigercrm/branches/5.0.3/modules/Emails/Email.js Mon Mar 12 09:37:53 2007
@@ -95,7 +95,7 @@
                 }
                 else
                 {
-                        alert("Please select at least one entity");
+                        alert(alert_arr.SELECT);
                         return false;
                 }
         }
@@ -121,11 +121,11 @@
                 }
                 else
                 {
-                        alert("Please select at least one entity");
+                        alert(alert_arr.SELECT);
                         return false;
                 }
         }
-		if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
+		if(confirm(alert_arr.DELETE + xx + alert_arr.RECORDS))
 		{	
 			getObj('search_text').value = '';
 			show("status");
@@ -170,7 +170,7 @@
 
 function DeleteEmail(id)
 {
-	if(confirm("Are you sure you want to delete ?"))
+	if(confirm(alert_arr.SURE_TO_DELETE))
 	{	
 		getObj('search_text').value = '';
 		gselectedrowid = 0;

Modified: vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.js (original)
+++ vtigercrm/branches/5.0.3/modules/HelpDesk/HelpDesk.js Mon Mar 12 09:37:53 2007
@@ -14,12 +14,12 @@
 	{
         	if (form.potential_name.value == "")
 		{
-                	alert("Opportunity Name field cannot be empty");
+                	alert(alert_arr.OPPORTUNITYNAME_CANNOT_BE_EMPTY);
 			return false;	
 		}
 		if (form.closedate.value == "")
 		{
-                	alert("Close Date field cannot be empty");
+                	alert(alert_arr.CLOSEDATE_CANNOT_BE_EMPTY);
 			return false;	
 		}
 		return dateValidate('closedate','Potential Close Date','GECD');

Modified: vtigercrm/branches/5.0.3/modules/Leads/Lead.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Leads/Lead.js (original)
+++ vtigercrm/branches/5.0.3/modules/Leads/Lead.js Mon Mar 12 09:37:53 2007
@@ -16,12 +16,12 @@
 	{
         	if (form.potential_name.value == "")
 		{
-                	alert("Opportunity Name field cannot be empty");
+                	alert(alert_arr.OPPORTUNITYNAME_CANNOT_BE_EMPTY);
 			return false;	
 		}
 		if (form.closedate.value == "")
 		{
-                	alert("Close Date field cannot be empty");
+                	alert(alert_arr.CLOSEDATE_CANNOT_BE_EMPTY);
 			return false;	
 		}
 		x = dateValidate('closedate','Potential Close Date','GECD');

Modified: vtigercrm/branches/5.0.3/modules/Portal/Portal.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Portal/Portal.js (original)
+++ vtigercrm/branches/5.0.3/modules/Portal/Portal.js Mon Mar 12 09:37:53 2007
@@ -42,7 +42,7 @@
 }
 function DeleteSite(id)
 {
-	if(confirm("Are you sure you want to delete ?"))
+	if(confirm(alert_arr.SURE_TO_DELETE))
 	{
 		$("status").style.display="inline";
 		new Ajax.Request(
@@ -61,11 +61,11 @@
 function SaveSite(id)
 {
 	if ($('portalurl').value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0) {
-		alert('Site Url cannot be empty')
+		alert(alert_arr.SITEURL_CANNOT_BE_EMPTY)
 		return false;
 	}
 	if ($('portalname').value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0) {
-		alert('Site Name cannot be empty')
+		alert(alert_arr.SITENAME_CANNOT_BE_EMPTY)
 		return false;
 	}
 	Effect.Puff('orgLay');	

Modified: vtigercrm/branches/5.0.3/modules/PriceBooks/PriceBook.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/PriceBooks/PriceBook.js (original)
+++ vtigercrm/branches/5.0.3/modules/PriceBooks/PriceBook.js Mon Mar 12 09:37:53 2007
@@ -32,12 +32,12 @@
 				{
 					if (elem[i].value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0) 
 					{
-						alert("List Price cannot be empty");
+						alert(alert_arr.LISTPRICE_CANNOT_BE_EMPTY);
 			               		return false;	
 					}
 					else if(isNaN(elem[i].value))
 					{
-						alert("Invalid List Price");
+						alert(alert_arr.INVALID_LIST_PRICE);
 						return false;	
 					}
 	
@@ -47,7 +47,7 @@
 		}
 		else 
 		{
-			alert("Please select at least one entity");
+			alert(alert_arr.SELECT);
 			return false;
 		}
 	}
@@ -80,12 +80,12 @@
 						if (elem[i].value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0) 
 						{
 		
-							alert("List Price cannot be empty");
+							alert(alert_arr.LISTPRICE_CANNOT_BE_EMPTY);
 			                		return false;	
 						}
 						else if(isNaN(elem[i].value))
 						{
-							alert("Invalid List Price");
+							alert(alert_arr.INVALID_LIST_PRICE);
 			                		return false;	
 							
 						}
@@ -96,7 +96,7 @@
 		}
 		else
 		{
-			alert("Please select at least one entity");
+			alert(alert_arr.SELECT);
 			return false;
 		}
 	}
@@ -127,7 +127,7 @@
 	}
 	if (isError == true) 
 	{
-		alert("Missing required fields: " + errorMessage);
+		alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage);
 		return false;
 	}
 	return true;

Modified: vtigercrm/branches/5.0.3/modules/Products/Product.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Products/Product.js (original)
+++ vtigercrm/branches/5.0.3/modules/Products/Product.js Mon Mar 12 09:37:53 2007
@@ -31,7 +31,7 @@
   }
 
   if (isError == true) {
-			 alert("Missing required fields: " + errorMessage);
+			 alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage);
 			 return false;
   }
   return true;

Modified: vtigercrm/branches/5.0.3/modules/Reports/Report.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/Report.js (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/Report.js Mon Mar 12 09:37:53 2007
@@ -151,7 +151,7 @@
 	}
 	// Here we decide whether to submit the form.
 	if (isError == true) {
-		alert("Missing required fields:" + errorMessage);
+		alert(alert_arr.MISSING_FIELDS + errorMessage);
 		return false;
 	}
 	return true;
@@ -225,7 +225,7 @@
 {
 	if (oSel.selectedIndex == -1 || oSel.options[oSel.selectedIndex].disabled == true)
 	{
-		alert("you are not allowed to edit this field");
+		alert(alert_arr.NOT_ALLOWED_TO_EDIT);
 		oSel.options[oSel.selectedIndex].selected = false;	
 	}
 }
@@ -385,7 +385,7 @@
 {
 	if(selectedColumnsObj.options.length == 0)
 	{
-		alert("Selected Columns cannot be empty");
+		alert(alert_arr.COLUMNS_CANNOT_BE_EMPTY);
 		return false;
 	}
 
@@ -407,7 +407,7 @@
 			{
 				if(i == 1 && selectedColumnsObj.options.length == 0)
 				{
-					alert("Selected Columns cannot be empty");
+					alert(alert_arr.COLUMNS_CANNOT_BE_EMPTY);
 					return false;
 				}	
 				if(divarray[i] == 'step4')
@@ -463,7 +463,7 @@
 	{
 		if (trim(document.NewRep.reportname.value) == "")
 		{
-			alert("Missing Report Name");
+			alert(alert_arr.MISSING_REPORT_NAME);
 		}else
 		{
 			new Ajax.Request(
@@ -474,7 +474,7 @@
                                 onComplete: function(response) {
 					if(response.responseText!=0)
 					{
-						alert("Report name already exists, try again...");
+						alert(alert_arr.REPORT_NAME_EXISTS);
 						return false;
 					}
 					else

Modified: vtigercrm/branches/5.0.3/modules/Rss/Rss.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Rss/Rss.js (original)
+++ vtigercrm/branches/5.0.3/modules/Rss/Rss.js Mon Mar 12 09:37:53 2007
@@ -34,7 +34,7 @@
                 return httpRequest.responseText;
             break;
             default:
-                alert("Problem accessing url: "+targetUrl+" Code: "+httpRequest.status);
+                alert(alert_arr.PROBLEM_ACCESSSING_URL+targetUrl+alert_arr.CODE+httpRequest.status);
                 return null;
             break;
         }       
@@ -48,7 +48,7 @@
         }
         // Here we decide whether to submit the form.
         if (isError == true) {
-                alert("Missing required fields:" + errorMessage);
+                alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage);
                 return false;
         }
         return true;

Modified: vtigercrm/branches/5.0.3/modules/Vendors/Vendor.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Vendors/Vendor.js (original)
+++ vtigercrm/branches/5.0.3/modules/Vendors/Vendor.js Mon Mar 12 09:37:53 2007
@@ -20,7 +20,7 @@
 	}
 	if (isError == true) 
 	{
-		alert("Missing required fields: " + errorMessage);
+		alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage);
 		return false;
 	}
 	return true;

Modified: vtigercrm/branches/5.0.3/modules/Webmails/webmails.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/webmails.js (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/webmails.js Mon Mar 12 09:37:53 2007
@@ -99,7 +99,7 @@
 	// TODO: present the user with a simple DHTML div to
 	// choose what type of relationship they would like to create
 	// before creating it.
-	alert('Are you sure you wish to Qualify this Mail as Contact?');
+	alert(alert_arr.WISH_TO_QUALIFY_MAIL_AS_CONTACT);
         add_to_vtiger(mid);
 }
 function add_to_vtiger(mid) {
@@ -357,10 +357,10 @@
            nids=nid;
         else
         {
-            alert("Please select at least one message to delete");
+            alert(alert_arr.SELECT_ATLEAST_ONEMSG_TO_DEL);
             return false;
         }
-        if(confirm("Are you sure you want to delete ?"))
+        if(confirm(alert_arr.SURE_TO_DELETE))
 		runEmailCommand("delete_multi_msg",nids);
 }
 





More information about the vtigercrm-commits mailing list