2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Frédéric FRANCE
2023-02-02 22:59:54 +01:00
parent ffa9e1e52f
commit 41dd574b16
14 changed files with 17 additions and 21 deletions

View File

@@ -2377,7 +2377,7 @@ class Adherent extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="' . uniqid('member') . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"'; $linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -752,7 +752,7 @@ class AdherentType extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkstart = '<a href="'.$url.'" data-params='.json_encode($params).' id="' . uniqid($this->element) . '" title="'.$langs->trans('Loading').'" class="classforajaxtooltip">'; $linkstart = '<a href="'.$url.'" data-params='.json_encode($params).' title="'.$langs->trans('Loading').'" class="classforajaxtooltip">';
} else { } else {
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
} }

View File

@@ -1166,7 +1166,7 @@ class BOM extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="' . uniqid('bom') . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"'; $linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -1646,14 +1646,10 @@ class Categorie extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$link2 = $link; $link .= '" data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$link .= '" data-params='.json_encode($params).' id="' . uniqid('category') . '" title="' . $langs->trans('Loading') . '"';
$link .= ' class="classforajaxtooltip '.$forced_color.'">'; $link .= ' class="classforajaxtooltip '.$forced_color.'">';
$link2 .= '" data-params='.json_encode($params).' id="' . uniqid('category') . '" title="' . $langs->trans('Loading') . '"';
$link2 .= ' class="classforajaxtooltip '.$forced_color.'">';
} else { } else {
$link .= '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip '.$forced_color.'">'; $link .= '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip '.$forced_color.'">';
$link2 = $link;
} }
$linkend = '</a>'; $linkend = '</a>';
@@ -1667,7 +1663,7 @@ class Categorie extends CommonObject
$result .= ' '; $result .= ' ';
} }
if ($withpicto != 2) { if ($withpicto != 2) {
$result .= $link2.dol_trunc(($this->ref ? $this->ref : $this->label), $maxlength).$linkend; $result .= $link.dol_trunc(($this->ref ? $this->ref : $this->label), $maxlength).$linkend;
} }
global $action; global $action;
$hookmanager->initHooks(array($this->element . 'dao')); $hookmanager->initHooks(array($this->element . 'dao'));

View File

@@ -3820,7 +3820,7 @@ class Propal extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="propal-' . uniqid() . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip"'; $linkclose .= ' class="classforajaxtooltip"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -3843,7 +3843,7 @@ class Commande extends CommonOrder
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="order-' . uniqid() . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip"'; $linkclose .= ' class="classforajaxtooltip"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -1443,7 +1443,7 @@ class Account extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose = '" data-params='.json_encode($params).' id="' . uniqid('member') . '" title="' . $langs->trans('Loading') . '"'; $linkclose = '" data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip"'; $linkclose .= ' class="classforajaxtooltip"';
} else { } else {
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';

View File

@@ -1525,7 +1525,7 @@ class Contact extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="contact-' . uniqid() . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"'; $linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -2082,7 +2082,7 @@ class Contrat extends CommonObject
'id' => $this->id, 'id' => $this->id,
'objecttype' => $this->element, 'objecttype' => $this->element,
]; ];
$linkclose .= '" data-params='.json_encode($params).' id="' . uniqid('contract') . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= '" data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip"'; $linkclose .= ' class="classforajaxtooltip"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
@@ -3158,7 +3158,7 @@ class ContratLigne extends CommonObjectLine
'id' => $this->fk_contrat, 'id' => $this->fk_contrat,
'objecttype' => $this->element, 'objecttype' => $this->element,
]; ];
$link .= '" data-params='.json_encode($params).' id="' . uniqid('contract') . '" title="' . $langs->trans('Loading') . '"'; $link .= '" data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$link .= ' class="classforajaxtooltip"'; $link .= ' class="classforajaxtooltip"';
} else { } else {
$link = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $link = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';

View File

@@ -84,7 +84,7 @@ if (empty($conf->dol_no_mouse_hover)) {
hide: { delay: 250, duration: 20 }, hide: { delay: 250, duration: 20 },
tooltipClass: "mytooltip", tooltipClass: "mytooltip",
open: function (event, ui) { open: function (event, ui) {
var id = $(this).attr("id"); var elem = $(this);
var params = $(this).attr("data-params"); var params = $(this).attr("data-params");
$.ajax({ $.ajax({
url:"' . dol_buildpath('/core/ajax/ajaxtooltip.php', 1) . '", url:"' . dol_buildpath('/core/ajax/ajaxtooltip.php', 1) . '",
@@ -92,7 +92,7 @@ if (empty($conf->dol_no_mouse_hover)) {
data: JSON.parse(params), data: JSON.parse(params),
success: function(response){ success: function(response){
// Setting content option // Setting content option
$("#"+id).tooltip("option","content",response); elem.tooltip("option","content",response);
} }
}); });
console.log(event); console.log(event);

View File

@@ -827,7 +827,7 @@ class MyObject extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="propal-' . uniqid() . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"'; $linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -5231,7 +5231,7 @@ class Product extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="product-' . uniqid() . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="nowraponall classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"'; $linkclose .= ' class="nowraponall classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1, 1).'"';

View File

@@ -2927,7 +2927,7 @@ class Societe extends CommonObject
'objecttype' => $this->element, 'objecttype' => $this->element,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="' . uniqid('societe-') . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip refurl valignmiddle"'; $linkclose .= ' class="classforajaxtooltip refurl valignmiddle"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -2977,7 +2977,7 @@ class User extends CommonObject
'infologin' => $infologin, 'infologin' => $infologin,
'option' => $option, 'option' => $option,
]; ];
$linkclose .= ' data-params='.json_encode($params).' id="user-' . uniqid() . '" title="' . $langs->trans('Loading') . '"'; $linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
$linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"'; $linkclose .= ' class="classforajaxtooltip'.($morecss ? ' '.$morecss : '').'"';
} else { } else {
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';