diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 45cbfdef383..43a40705660 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -1168,7 +1168,7 @@ class BOM 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'), (($withpicto != 2) ? 'class="paddingright"' : ''), 0, 0, $notooltip ? 0 : 1);
}
if ($withpicto != 2) {
$result .= $this->ref;
diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php
index e5041378ef6..fb6f4597c0a 100644
--- a/htdocs/core/js/lib_foot.js.php
+++ b/htdocs/core/js/lib_foot.js.php
@@ -93,7 +93,6 @@ 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"));
params.token = currenttoken;
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index a839daf86d5..c0c22a94ec1 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -11338,6 +11338,12 @@ function getElementProperties($element_type)
$classpath = 'adherents/class';
$module = 'adherent';
$subelement = 'adherent';
+ } elseif ($element_type == 'mo') {
+ $classpath = 'mrp/class';
+ $classfile = 'mo';
+ $classname = 'Mo';
+ $module = 'mrp';
+ $subelement = '';
} elseif ($element_type == 'cabinetmed_cons') {
$classpath = 'cabinetmed/class';
$module = 'cabinetmed';
@@ -11430,6 +11436,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '')
$ret = 0;
$element_prop = getElementProperties($element_type);
+ //var_dump($element_prop);
if (is_array($element_prop) && isModEnabled($element_prop['module'])) {
dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php');
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index 4a310d51cfb..d57a1fca39f 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -851,7 +851,7 @@ class MyObject extends CommonObject
if (empty($this->showphoto_on_popup)) {
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'), (($withpicto != 2) ? 'class="paddingright"' : ''), 0, 0, $notooltip ? 0 : 1);
}
} else {
if ($withpicto) {
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index c5b1b061e54..100043ef055 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -1220,7 +1220,7 @@ class Mo 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'), (($withpicto != 2) ? 'class="paddingright"' : ''), 0, 0, $notooltip ? 0 : 1);
}
if ($withpicto != 2) {
$result .= $this->ref;
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index f0e3f8f0b00..67002e48efb 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -5207,10 +5207,10 @@ class Product extends CommonObject
$result .= $linkstart;
if ($withpicto) {
if ($this->type == Product::TYPE_PRODUCT) {
- $result .= (img_object(($notooltip ? '' : $label), 'product', ($notooltip ? 'class="paddingright"' : $dataparams.' class="paddingright '.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1));
+ $result .= (img_object(($notooltip ? '' : $label), 'product', 'class="paddingright"', 0, 0, $notooltip ? 0 : 1));
}
if ($this->type == Product::TYPE_SERVICE) {
- $result .= (img_object(($notooltip ? '' : $label), 'service', ($notooltip ? 'class="paddingright"' : $dataparams.' class="paddingright '.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1));
+ $result .= (img_object(($notooltip ? '' : $label), 'service', 'class="paddingright"', 0, 0, $notooltip ? 0 : 1));
}
}
$result .= dol_escape_htmltag($newref);
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 9f00d4ce3c0..0b8f48c90e3 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -1383,7 +1383,7 @@ class Project extends CommonObject
$result .= $linkstart;
if ($withpicto) {
- $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="pictofixedwidth"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'pictofixedwidth ' : '').$classfortooltip.' pictofixedwidth em088"'), 0, 0, $notooltip ? 0 : 1);
+ $result .= img_object(($notooltip ? '' : $label), $picto, 'class="pictofixedwidth em088"', 0, 0, $notooltip ? 0 : 1);
}
if ($withpicto != 2) {
$result .= $this->ref;
diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php
index 3f4293c1c0e..cf356d070b7 100644
--- a/htdocs/projet/class/task.class.php
+++ b/htdocs/projet/class/task.class.php
@@ -796,7 +796,7 @@ class Task extends CommonObjectLine
$result .= $linkstart;
if ($withpicto) {
- $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
+ $result .= img_object(($notooltip ? '' : $label), $picto, 'class="paddingright"', 0, 0, $notooltip ? 0 : 1);
}
if ($withpicto != 2) {
$result .= $this->ref;
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 70118961c19..3bc86df0225 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -2924,7 +2924,7 @@ class User extends CommonObject
}
// Only picto
if ($withpictoimg > 0) {
- $picto = ''.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams.' class="paddingright '.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1).'';
+ $picto = ''.img_object('', 'user', $paddafterimage.' class="paddingright")', 0, 0, $notooltip ? 0 : 1).'';
} else {
// Picto must be a photo
$picto = ''.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1).'';
diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php
index dcdde005130..3a9e4622af8 100644
--- a/htdocs/workstation/class/workstation.class.php
+++ b/htdocs/workstation/class/workstation.class.php
@@ -649,7 +649,7 @@ class Workstation extends CommonObject
if (empty($this->showphoto_on_popup)) {
if ($withpicto) {
- $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'mrp'), ($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 : 'mrp'), (($withpicto != 2) ? 'class="paddingright"' : ''), 0, 0, $notooltip ? 0 : 1);
}
} else {
if ($withpicto) {