2
0
forked from Wavyzz/dolibarr

Debug v18

This commit is contained in:
Laurent Destailleur
2023-04-10 01:39:47 +02:00
parent 91c8ca1e38
commit aea1f60c67
10 changed files with 16 additions and 10 deletions

View File

@@ -1168,7 +1168,7 @@ class BOM 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'), (($withpicto != 2) ? 'class="paddingright"' : ''), 0, 0, $notooltip ? 0 : 1);
} }
if ($withpicto != 2) { if ($withpicto != 2) {
$result .= $this->ref; $result .= $this->ref;

View File

@@ -93,7 +93,6 @@ 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"));
params.token = currenttoken; params.token = currenttoken;

View File

@@ -11338,6 +11338,12 @@ function getElementProperties($element_type)
$classpath = 'adherents/class'; $classpath = 'adherents/class';
$module = 'adherent'; $module = 'adherent';
$subelement = 'adherent'; $subelement = 'adherent';
} elseif ($element_type == 'mo') {
$classpath = 'mrp/class';
$classfile = 'mo';
$classname = 'Mo';
$module = 'mrp';
$subelement = '';
} elseif ($element_type == 'cabinetmed_cons') { } elseif ($element_type == 'cabinetmed_cons') {
$classpath = 'cabinetmed/class'; $classpath = 'cabinetmed/class';
$module = 'cabinetmed'; $module = 'cabinetmed';
@@ -11430,6 +11436,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '')
$ret = 0; $ret = 0;
$element_prop = getElementProperties($element_type); $element_prop = getElementProperties($element_type);
//var_dump($element_prop);
if (is_array($element_prop) && isModEnabled($element_prop['module'])) { if (is_array($element_prop) && isModEnabled($element_prop['module'])) {
dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php'); dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php');

View File

@@ -851,7 +851,7 @@ class MyObject extends CommonObject
if (empty($this->showphoto_on_popup)) { if (empty($this->showphoto_on_popup)) {
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'), (($withpicto != 2) ? 'class="paddingright"' : ''), 0, 0, $notooltip ? 0 : 1);
} }
} else { } else {
if ($withpicto) { if ($withpicto) {

View File

@@ -1220,7 +1220,7 @@ class Mo 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'), (($withpicto != 2) ? 'class="paddingright"' : ''), 0, 0, $notooltip ? 0 : 1);
} }
if ($withpicto != 2) { if ($withpicto != 2) {
$result .= $this->ref; $result .= $this->ref;

View File

@@ -5207,10 +5207,10 @@ class Product extends CommonObject
$result .= $linkstart; $result .= $linkstart;
if ($withpicto) { if ($withpicto) {
if ($this->type == Product::TYPE_PRODUCT) { 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) { 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); $result .= dol_escape_htmltag($newref);

View File

@@ -1383,7 +1383,7 @@ class Project extends CommonObject
$result .= $linkstart; $result .= $linkstart;
if ($withpicto) { 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) { if ($withpicto != 2) {
$result .= $this->ref; $result .= $this->ref;

View File

@@ -796,7 +796,7 @@ class Task extends CommonObjectLine
$result .= $linkstart; $result .= $linkstart;
if ($withpicto) { 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) { if ($withpicto != 2) {
$result .= $this->ref; $result .= $this->ref;

View File

@@ -2924,7 +2924,7 @@ class User extends CommonObject
} }
// Only picto // Only picto
if ($withpictoimg > 0) { if ($withpictoimg > 0) {
$picto = '<!-- picto user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams.' class="paddingright '.$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1).'</span>'; $picto = '<!-- picto user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'">'.img_object('', 'user', $paddafterimage.' class="paddingright")', 0, 0, $notooltip ? 0 : 1).'</span>';
} else { } else {
// Picto must be a photo // Picto must be a photo
$picto = '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1).'</span>'; $picto = '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1).'</span>';

View File

@@ -649,7 +649,7 @@ class Workstation extends CommonObject
if (empty($this->showphoto_on_popup)) { if (empty($this->showphoto_on_popup)) {
if ($withpicto) { 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 { } else {
if ($withpicto) { if ($withpicto) {