[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/Contacts/ -> Contact.js (source)

   1  /*********************************************************************************
   2  
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9   ********************************************************************************/        
  10          
  11  document.write("<script type='text/javascript' src='include/js/Mail.js'></"+"script>");
  12  document.write("<script type='text/javascript' src='include/js/Merge.js'></"+"script>");
  13  
  14  function copyAddressRight(form) {
  15  
  16      form.otherstreet.value = form.mailingstreet.value;
  17  
  18      form.othercity.value = form.mailingcity.value;
  19  
  20      form.otherstate.value = form.mailingstate.value;
  21  
  22      form.otherzip.value = form.mailingzip.value;
  23  
  24      form.othercountry.value = form.mailingcountry.value;
  25  
  26      form.otherpobox.value = form.mailingpobox.value;
  27      
  28      return true;
  29  
  30  }
  31  
  32  function copyAddressLeft(form) {
  33  
  34      form.mailingstreet.value = form.otherstreet.value;
  35  
  36      form.mailingcity.value = form.othercity.value;
  37  
  38      form.mailingstate.value = form.otherstate.value;
  39  
  40      form.mailingzip.value =    form.otherzip.value;
  41  
  42      form.mailingcountry.value = form.othercountry.value;
  43  
  44      form.mailingpobox.value = form.otherpobox.value;
  45      
  46      return true;
  47  
  48  }
  49  
  50      
  51  function toggleDisplay(id){
  52          
  53  if(this.document.getElementById( id).style.display=='none'){
  54      this.document.getElementById( id).style.display='inline'
  55      this.document.getElementById(id+"link").style.display='none';
  56                      
  57  }else{
  58      this.document.getElementById(  id).style.display='none'
  59      this.document.getElementById(id+"link").style.display='none';
  60      }
  61  }
  62  
  63  function set_return(product_id, product_name) {
  64          window.opener.document.EditView.parent_name.value = product_name;
  65          window.opener.document.EditView.parent_id.value = product_id;
  66  }
  67  
  68  function add_data_to_relatedlist_incal(id,name)
  69  {
  70      var idval = window.opener.document.EditView.contactidlist.value;
  71      var nameval = window.opener.document.EditView.contactlist.value;
  72      if(idval != '')
  73      {
  74          if(idval.indexOf(id) != -1)
  75                  {
  76                          window.opener.document.EditView.contactidlist.value = idval;
  77                          window.opener.document.EditView.contactlist.value = nameval;
  78                  }
  79                  else
  80                  {
  81                          window.opener.document.EditView.contactidlist.value = idval+';'+id;
  82                          window.opener.document.EditView.contactlist.value = nameval+'\n'+name;
  83                  }
  84      }
  85      else
  86      {
  87          window.opener.document.EditView.contactidlist.value = id;
  88          window.opener.document.EditView.contactlist.value = name;
  89      }
  90  }
  91  function set_return_specific(product_id, product_name) {
  92          //Used for DetailView, Removed 'EditView' formname hardcoding
  93          var fldName = getOpenerObj("contact_name");
  94          var fldId = getOpenerObj("contact_id");
  95          fldName.value = product_name;
  96          fldId.value = product_id;
  97  }
  98  function submitform(id){
  99          document.massdelete.entityid.value=id;
 100          document.massdelete.submit();
 101  }    
 102  
 103  function searchMapLocation(addressType)
 104  {
 105          var mapParameter = '';
 106          if (addressType == 'Main')
 107          {
 108          if(fieldname.indexOf('mailingstreet') > -1)
 109              mapParameter = document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstreet')]).innerHTML+' ';
 110          if(fieldname.indexOf('mailingpobox') > -1)
 111              mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingpobox')]).innerHTML+' ';
 112          if(fieldname.indexOf('mailingcity') > -1)
 113              mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcity')]).innerHTML+' ';
 114          if(fieldname.indexOf('mailingstate') > -1)
 115                          mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingstate')]).innerHTML+' ';
 116          if(fieldname.indexOf('mailingcountry') > -1)
 117              mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingcountry')]).innerHTML+' ';
 118          if(fieldname.indexOf('mailingzip') > -1)
 119              mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('mailingzip')]).innerHTML;
 120          }
 121          else if (addressType == 'Other')
 122          {
 123          if(fieldname.indexOf('otherstreet') > -1)
 124              mapParameter = document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstreet')]).innerHTML+' ';
 125          if(fieldname.indexOf('otherpobox') > -1)
 126              mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherpobox')]).innerHTML+' ';
 127          if(fieldname.indexOf('otherstate') > -1)
 128                          mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherstate')]).innerHTML+' ';
 129                  if(fieldname.indexOf('othercountry') > -1)
 130              mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('othercountry')]).innerHTML+' ';
 131                  if(fieldname.indexOf('otherzip') > -1)
 132                          mapParameter = mapParameter + document.getElementById("dtlview_"+fieldlabel[fieldname.indexOf('otherzip')]).innerHTML;
 133          }
 134           window.open('http://maps.google.com/maps?q='+mapParameter,'goolemap','height=450,width=700,resizable=no,titlebar,location,top=200,left=250');
 135  }


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7