diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 7f9adb32266..5a6853a5f9b 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -2413,8 +2413,7 @@ class Adherent extends CommonObject
}
// Only picto
if ($withpictoimg > 0) {
- $picto = ''.
- img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams.' class="'.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1).'';
+ $picto = ''.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1).'';
} else {
// Picto must be a photo
$picto = '';
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 9ee0de6c055..ea7c68bbff8 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -774,7 +774,7 @@ class AdherentType extends CommonObject
$result .= $linkstart;
if ($withpicto) {
- $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
+ $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), (' class="'.(($withpicto != 2) ? 'paddingright' : '').'"'), 0, 0, $notooltip ? 0 : 1);
}
if ($withpicto != 2) {
$result .= ($maxlen ?dol_trunc($this->label, $maxlen) : $this->label);
diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php
index d8f1450d025..e5041378ef6 100644
--- a/htdocs/core/js/lib_foot.js.php
+++ b/htdocs/core/js/lib_foot.js.php
@@ -82,6 +82,7 @@ if (empty($conf->dol_no_mouse_hover)) {
var opendelay = 80;
var elemtostoretooltiptimer = jQuery("#dialogforpopup");
+ var currenttoken = jQuery("meta[name=anti-csrf-currenttoken]").attr("content");
target = jQuery(".classforajaxtooltip");
target.tooltip({
@@ -92,11 +93,11 @@ if (empty($conf->dol_no_mouse_hover)) {
target.off("mouseover mouseout");
target.on("mouseover", function(event) {
+console.log(this);
console.log("we will create timer for ajax call");
var params = JSON.parse($(this).attr("data-params"));
- var elemfortooltip = $(this);
- var currenttoken = jQuery("meta[name=anti-csrf-currenttoken]").attr("content");
params.token = currenttoken;
+ var elemfortooltip = $(this);
event.stopImmediatePropagation();
clearTimeout(elemtostoretooltiptimer.data("openTimeoutId"));
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 402d649b9bb..9415901152e 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2917,7 +2917,7 @@ class Societe extends CommonObject
$result .= $linkstart;
if ($withpicto) {
- $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright' : '').'"'), 0, 0, $notooltip ? 0 : 1);
+ $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), (' class="'.(($withpicto != 2) ? 'paddingright' : '').'"'), 0, 0, $notooltip ? 0 : 1);
}
if ($withpicto != 2) {
$result .= dol_escape_htmltag($maxlen ? dol_trunc($name, $maxlen) : $name);