forked from Wavyzz/dolibarr
NEW Use an ajax call for the clicktodial feature instead of href link.
This commit is contained in:
@@ -3054,11 +3054,18 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
|
||||
'__PASS__'=>$clicktodial_password);
|
||||
$url = make_substitutions($url, $substitarray);
|
||||
$newphonesav = $newphone;
|
||||
$newphone = '<a href="'.$url.'"';
|
||||
if (!empty($conf->global->CLICKTODIAL_FORCENEWTARGET)) {
|
||||
$newphone .= ' target="_blank"';
|
||||
if (empty($conf->global->CLICKTODIAL_DO_NOT_USE_AJAX_CALL)) {
|
||||
// Default and recommended: New method using ajax without submiting a page making a javascript history.go(-1) back
|
||||
$newphone = '<a href="'.$url.'" class="cssforclicktodial"'; // Call of ajax is handled by the lib_foot.js.php on class 'cssforclicktodial'
|
||||
$newphone .= '>'.$newphonesav.'</a>';
|
||||
} else {
|
||||
// Old method
|
||||
$newphone = '<a href="'.$url.'"';
|
||||
if (!empty($conf->global->CLICKTODIAL_FORCENEWTARGET)) {
|
||||
$newphone .= ' target="_blank"';
|
||||
}
|
||||
$newphone .= '>'.$newphonesav.'</a>';
|
||||
}
|
||||
$newphone .= '>'.$newphonesav.'</a>';
|
||||
}
|
||||
|
||||
//if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
|
||||
Reference in New Issue
Block a user