From 2d6a82a030d767702fb800bc700dc445e08c0cd3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Oct 2023 12:49:57 +0200 Subject: [PATCH] Clean code --- htdocs/core/js/lib_foot.js.php | 6 ++++-- htdocs/product/class/product.class.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index 5ed7dfb2eb1..a53835e1137 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -70,20 +70,22 @@ jQuery(document).ready(function () {\n"; if (empty($conf->dol_no_mouse_hover)) { print ' + /* for standard tooltip */ jQuery(".classfortooltip").tooltip({ + tooltipClass: "mytooltip", show: { collision: "flipfit", effect:"toggle", delay:50, duration: 20 }, hide: { delay: 250, duration: 20 }, - tooltipClass: "mytooltip", content: function () { console.log("Return title for popup"); return $(this).prop("title"); /* To force to get title as is */ } }); - var opendelay = 80; + var opendelay = 100; var elemtostoretooltiptimer = jQuery("#dialogforpopup"); var currenttoken = jQuery("meta[name=anti-csrf-currenttoken]").attr("content"); + /* for ajax tooltip */ target = jQuery(".classforajaxtooltip"); target.tooltip({ tooltipClass: "mytooltip", diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 889f6ad25a9..e94ed9e62c1 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5240,7 +5240,7 @@ class Product extends CommonObject $result .= (img_object(($notooltip ? '' : $label), 'service', 'class="paddingright"', 0, 0, $notooltip ? 0 : 1)); } } - $result .= dol_escape_htmltag($newref); + $result .= ''.dol_escape_htmltag($newref).''; $result .= $linkend; if ($withpicto != 2) { $result .= (($add_label && $this->label) ? $sep.dol_trunc($this->label, ($add_label > 1 ? $add_label : 0)) : '');