mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
Clean code
This commit is contained in:
@@ -2413,8 +2413,7 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
// Only picto
|
// Only picto
|
||||||
if ($withpictoimg > 0) {
|
if ($withpictoimg > 0) {
|
||||||
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'">'.
|
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1).'</span>';
|
||||||
img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams.' class="'.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1).'</span>';
|
|
||||||
} else {
|
} else {
|
||||||
// Picto must be a photo
|
// Picto must be a photo
|
||||||
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>';
|
$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>';
|
||||||
|
|||||||
@@ -774,7 +774,7 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) {
|
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) {
|
if ($withpicto != 2) {
|
||||||
$result .= ($maxlen ?dol_trunc($this->label, $maxlen) : $this->label);
|
$result .= ($maxlen ?dol_trunc($this->label, $maxlen) : $this->label);
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ if (empty($conf->dol_no_mouse_hover)) {
|
|||||||
|
|
||||||
var opendelay = 80;
|
var opendelay = 80;
|
||||||
var elemtostoretooltiptimer = jQuery("#dialogforpopup");
|
var elemtostoretooltiptimer = jQuery("#dialogforpopup");
|
||||||
|
var currenttoken = jQuery("meta[name=anti-csrf-currenttoken]").attr("content");
|
||||||
|
|
||||||
target = jQuery(".classforajaxtooltip");
|
target = jQuery(".classforajaxtooltip");
|
||||||
target.tooltip({
|
target.tooltip({
|
||||||
@@ -92,11 +93,11 @@ if (empty($conf->dol_no_mouse_hover)) {
|
|||||||
|
|
||||||
target.off("mouseover mouseout");
|
target.off("mouseover mouseout");
|
||||||
target.on("mouseover", function(event) {
|
target.on("mouseover", function(event) {
|
||||||
|
console.log(this);
|
||||||
console.log("we will create timer for ajax call");
|
console.log("we will create timer for ajax call");
|
||||||
var params = JSON.parse($(this).attr("data-params"));
|
var params = JSON.parse($(this).attr("data-params"));
|
||||||
var elemfortooltip = $(this);
|
|
||||||
var currenttoken = jQuery("meta[name=anti-csrf-currenttoken]").attr("content");
|
|
||||||
params.token = currenttoken;
|
params.token = currenttoken;
|
||||||
|
var elemfortooltip = $(this);
|
||||||
|
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
clearTimeout(elemtostoretooltiptimer.data("openTimeoutId"));
|
clearTimeout(elemtostoretooltiptimer.data("openTimeoutId"));
|
||||||
|
|||||||
@@ -2917,7 +2917,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) {
|
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) {
|
if ($withpicto != 2) {
|
||||||
$result .= dol_escape_htmltag($maxlen ? dol_trunc($name, $maxlen) : $name);
|
$result .= dol_escape_htmltag($maxlen ? dol_trunc($name, $maxlen) : $name);
|
||||||
|
|||||||
Reference in New Issue
Block a user