2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
Laurent Destailleur
2023-04-10 00:48:17 +02:00
parent d5bc5a5d4f
commit 91c8ca1e38
4 changed files with 6 additions and 6 deletions

View File

@@ -2413,8 +2413,7 @@ class Adherent extends CommonObject
}
// Only picto
if ($withpictoimg > 0) {
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'">'.
img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams.' class="'.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1).'</span>';
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1).'</span>';
} else {
// Picto must be a photo
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>';

View File

@@ -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);

View File

@@ -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"));

View File

@@ -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);