[Vtigercrm-commits] [vtiger-commits] r4714 - in /vtigercrm/trunk/modules: Accounts/Account.js Contacts/Contact.js HelpDesk/HelpDesk.js Leads/Lead.js SalesOrder/SalesOrder.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 29 10:36:46 EST 2006
Author: saraj
Date: Wed Mar 29 08:36:37 2006
New Revision: 4714
Log:
mass mail fns moved to Mail.js and massmerge fns moved to Merge.js
Modified:
vtigercrm/trunk/modules/Accounts/Account.js
vtigercrm/trunk/modules/Contacts/Contact.js
vtigercrm/trunk/modules/HelpDesk/HelpDesk.js
vtigercrm/trunk/modules/Leads/Lead.js
vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
Modified: vtigercrm/trunk/modules/Accounts/Account.js
==============================================================================
--- vtigercrm/trunk/modules/Accounts/Account.js (original)
+++ vtigercrm/trunk/modules/Accounts/Account.js Wed Mar 29 08:36:37 2006
@@ -10,163 +10,9 @@
document.write("<script type='text/javascript' src='include/js/Inventory.js'></"+"script>");
-//added by raju for emails
-
-function eMail()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- document.massdelete.action="index.php?module=Emails&action=SelectEmails&return_module=Accounts&return_action=index";
-}
-
-
-
-
-
-
-
-function massMail()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- document.massdelete.action="index.php?module=CustomView&action=SendMailAction&return_module=Accounts&return_action=index&viewname="+viewid;
-}
-
-
-//to merge a list of acounts with a template
-function massMerge()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
-
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
-
- alert("Please select atleast one entity");
- return false;
- }
- }
-
- if(getObj('selectall').checked == true)
- {
- getObj('idlist').value = getObj('allids').value;
- }
-
- document.massdelete.action="index.php?module=Accounts&action=Merge&return_module=Accounts&return_action=index";
-}
-//end of mass merge
-
-
-//added by rdhital/Raju for better emails
-function set_return_emails(entity_id,email_id,parentname,emailadd){
- window.opener.document.EditView.parent_id.value = window.opener.document.EditView.parent_id.value+entity_id+'@'+email_id+'|';
- window.opener.document.EditView.parent_name.value = window.opener.document.EditView.parent_name.value+parentname+'<'+emailadd+'>; ';
-}
-
-//Raju
+document.write("<script type='text/javascript' src='include/js/Mail.js'></"+"script>");
+document.write("<script type='text/javascript' src='include/js/Merge.js'></"+"script>");
+
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
@@ -328,48 +174,6 @@
return curtop;
}
-function openPopUp(winInst,currObj,baseURL,winName,width,height,features) {
- var left=parseInt(findPosX(currObj))
- var top=parseInt(findPosY(currObj))
-
- if (window.navigator.appName!="Opera") top+=parseInt(currObj.offsetHeight)
- else top+=(parseInt(currObj.offsetHeight)*2)+10
- if (browser_ie) {
- top+=window.screenTop-document.body.scrollTop
- left-=document.body.scrollLeft
- if (top+height+30>window.screen.height)
- top=findPosY(currObj)+window.screenTop-height-30
- if (left+width>window.screen.width)
- left=findPosX(currObj)+window.screenLeft-width
- } else if (browser_nn4 || browser_nn6) {
- top+=(scrY-pgeY)
- left+=(scrX-pgeX)
- if (top+height+30>window.screen.height)
- top=findPosY(currObj)+(scrY-pgeY)-height-30
- if (left+width>window.screen.width)
- left=findPosX(currObj)+(scrX-pgeX)-width
- }
-
- features="width="+width+",height="+height+",top="+top+",left="+left+";"+features
- eval(winInst+'=window.open("'+baseURL+'","'+winName+'","'+features+'")')
-}
-
-var scrX=0,scrY=0,pgeX=0,pgeY=0;
-
-if (browser_nn4 || browser_nn6) {
- document.addEventListener("click",popUpListener,true)
-}
-
-function popUpListener(ev) {
- if (browser_nn4 || browser_nn6) {
- scrX=ev.screenX
- scrY=ev.screenY
- pgeX=ev.pageX
- pgeY=ev.pageY
- }
-}
-
-
ScrollEffect = function(){ };
ScrollEffect.lengthcount=202;
ScrollEffect.closelimit=0;
Modified: vtigercrm/trunk/modules/Contacts/Contact.js
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.js (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.js Wed Mar 29 08:36:37 2006
@@ -8,6 +8,9 @@
* All Rights Reserved.
********************************************************************************/
+document.write("<script type='text/javascript' src='include/js/Mail.js'></"+"script>");
+document.write("<script type='text/javascript' src='include/js/Merge.js'></"+"script>");
+
function copyAddressRight(form) {
form.otherstreet.value = form.mailingstreet.value;
@@ -56,51 +59,6 @@
this.document.getElementById(id+"link").style.display='none';
}
}
-
-//code added by raju for better emiling
-function eMail()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- document.massdelete.action="index.php?module=Emails&action=SelectEmails&return_module=Contacts&return_action=index";
-}
-//end of code by raju
//Function added for Mass select in Popup - Philip
function SelectAll()
@@ -158,107 +116,6 @@
}
-function massMail()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- document.massdelete.action="index.php?module=CustomView&action=SendMailAction&return_module=Contacts&return_action=index&viewname="+viewid;
-}
-
-//to merge a list of contacts with the templates
-function massMerge()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(getObj('selectall').checked == true)
- {
- getObj('idlist').value = getObj('allids').value;
- }
- document.massdelete.action="index.php?module=Contacts&action=Merge&return_module=Contacts&return_action=ListView&viewname="+viewid;
-}
-//end mass merge
-
-function addBusinessCard()
-{
-document.massdelete.action="index.php?module=Contacts&action=AddBusinessCard&return_module=Contacts&return_action=ListView"
-
-
-}
-
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
@@ -269,15 +126,7 @@
var fldId = getOpenerObj("contact_id");
fldName.value = product_name;
fldId.value = product_id;
- //window.opener.document.EditView.contact_name.value = product_name;
- //window.opener.document.EditView.contact_id.value = product_id;
}
-//added by rdhital for better emails
-function set_return_emails(entity_id,email_id,parentname,emailadd){
- window.opener.document.EditView.parent_id.value = window.opener.document.EditView.parent_id.value+entity_id+'@'+email_id+'|';
- window.opener.document.EditView.parent_name.value = window.opener.document.EditView.parent_name.value+parentname+'<'+emailadd+'>; ';
-}
-//added by raju for emails
function submitform(id){
document.massdelete.entityid.value=id;
document.massdelete.submit();
Modified: vtigercrm/trunk/modules/HelpDesk/HelpDesk.js
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/HelpDesk.js (original)
+++ vtigercrm/trunk/modules/HelpDesk/HelpDesk.js Wed Mar 29 08:36:37 2006
@@ -8,6 +8,7 @@
*
********************************************************************************/
+document.write("<script type='text/javascript' src='include/js/Merge.js'></"+"script>");
function verify_data(form) {
if(! form.createpotential.checked == true)
{
@@ -57,56 +58,3 @@
getObj("assign_team").style.display="block"
}
}
-
-
-
-
-//merge list of tickets with templates
-function massMerge()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(getObj('selectall').checked == true)
- {
- getObj('idlist').value = getObj('allids').value;
- }
- document.massdelete.action="index.php?module=HelpDesk&action=Merge&return_module=HelpDesk&return_action=index&viewname="+viewid;
-}
-//end of mass merge
-
Modified: vtigercrm/trunk/modules/Leads/Lead.js
==============================================================================
--- vtigercrm/trunk/modules/Leads/Lead.js (original)
+++ vtigercrm/trunk/modules/Leads/Lead.js Wed Mar 29 08:36:37 2006
@@ -9,6 +9,8 @@
********************************************************************************/
+document.write("<script type='text/javascript' src='include/js/Mail.js'></"+"script>");
+document.write("<script type='text/javascript' src='include/js/Merge.js'></"+"script>");
function verify_data(form) {
if(! form.createpotential.checked == true)
{
@@ -63,98 +65,6 @@
}
-//code added by raju for better emailing
-function eMail()
-{
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- document.massdelete.action="index.php?module=Emails&action=SelectEmails&return_module=Leads&return_action=index";
-}
-
-
-//end of code added by raju
-
-
-function massMail()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- document.massdelete.action="index.php?module=CustomView&action=SendMailAction&return_module=Leads&return_action=index&viewname="+viewid;
-}
-
function changeStatus(obj,divid)
{
x = document.massdelete.selected_id.length;
@@ -198,61 +108,6 @@
fnvshobj(obj,divid);
}
-//to merge to a list of leads
-function massMerge()
-{
-
- x = document.massdelete.selected_id.length;
- var viewid = document.massdelete.viewname.value;
- idstring = "";
-
- if ( x == undefined)
- {
-
- if (document.massdelete.selected_id.checked)
- {
- document.massdelete.idlist.value=document.massdelete.selected_id.value;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- else
- {
- xx = 0;
- for(i = 0; i < x ; i++)
- {
- if(document.massdelete.selected_id[i].checked)
- {
- idstring = document.massdelete.selected_id[i].value +";"+idstring
- xx++
- }
- }
- if (xx != 0)
- {
- document.massdelete.idlist.value=idstring;
- }
- else
- {
- alert("Please select atleast one entity");
- return false;
- }
- }
- if(getObj('selectall').checked == true)
- {
- getObj('idlist').value = getObj('allids').value;
- }
- document.massdelete.action="index.php?module=Leads&action=Merge&return_module=Leads&return_action=index&parenttab=Sales&viewname="+viewid;
-}
-
-//added for massemail by raju
-function set_return_emails(entity_id,email_id,parentname,emailadd){
- window.opener.document.EditView.parent_id.value = window.opener.document.EditView.parent_id.value+entity_id+'@'+email_id+'|';
- window.opener.document.EditView.parent_name.value = window.opener.document.EditView.parent_name.value+parentname+'<'+emailadd+'>; ';
-}
-
function set_return(product_id, product_name) {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
Modified: vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrder.js (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrder.js Wed Mar 29 08:36:37 2006
@@ -8,6 +8,7 @@
*
********************************************************************************/
+document.write("<script type='text/javascript' src='include/js/Inventory.js'></"+"script>");
function settotalnoofrows() {
document.EditView.totalProductCount.value = rowCnt;
}
@@ -157,37 +158,6 @@
return val;
}
-function copyAddressRight(form) {
-
- form.ship_street.value = form.bill_street.value;
-
- form.ship_city.value = form.bill_city.value;
-
- form.ship_state.value = form.bill_state.value;
-
- form.ship_code.value = form.bill_code.value;
-
- form.ship_country.value = form.bill_country.value;
-
- return true;
-
-}
-
-function copyAddressLeft(form) {
-
- form.bill_street.value = form.ship_street.value;
-
- form.bill_city.value = form.ship_city.value;
-
- form.bill_state.value = form.ship_state.value;
-
- form.bill_code.value = form.ship_code.value;
-
- form.bill_country.value = form.ship_country.value;
-
- return true;
-
-}
function validate() {
if(!formValidate())
return false
More information about the vtigercrm-commits
mailing list