2
0
forked from Wavyzz/dolibarr

clean code

This commit is contained in:
Frédéric FRANCE
2023-02-05 23:40:02 +01:00
parent e5190ef6a5
commit 06904246f8
2 changed files with 23 additions and 33 deletions

View File

@@ -794,13 +794,19 @@ class MyObject extends CommonObject
}
$result = '';
$label = img_picto('', $this->picto).' <u>'.$langs->trans("MyObject").'</u>';
if (isset($this->status)) {
$label .= ' '.$this->getLibStatut(5);
$params = [
'id' => $this->id,
'objecttype' => $this->element,
'option' => $option,
];
$classfortooltip = 'classfortooltip';
$dataparams = '';
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
$classfortooltip = 'classforajaxtooltip';
$dataparams = ' data-params='.json_encode($params);
// $label = $langs->trans('Loading');
}
$label .= '<br>';
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
$label = implode($this->getTooltipContentArray($params));
$url = dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.$this->id;
@@ -816,18 +822,6 @@ class MyObject extends CommonObject
}
$linkclose = '';
$classfortooltip = 'classfortooltip';
$dataparams = '';
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
$params = [
'id' => $this->id,
'objecttype' => $this->element,
'option' => $option,
];
$classfortooltip = 'classforajaxtooltip';
$dataparams = ' data-params='.json_encode($params);
// $label = $langs->trans('Loading');
}
if (empty($notooltip)) {
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
$label = $langs->trans("ShowMyObject");