add ajax tooltip on delivery
This commit is contained in:
parent
41dd574b16
commit
22fb5a4e6a
@ -720,6 +720,24 @@ class Delivery extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getTooltipContentArray
|
||||||
|
* @param array $params params to construct tooltip data
|
||||||
|
* @since v18
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getTooltipContentArray($params)
|
||||||
|
{
|
||||||
|
global $conf, $langs;
|
||||||
|
|
||||||
|
$datas = [];
|
||||||
|
|
||||||
|
$datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("ShowReceiving").'</u>:<br>';
|
||||||
|
$datas['picto'] .= '<b>'.$langs->trans("Status").'</b>: '.$this->ref;
|
||||||
|
|
||||||
|
return $datas;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return clicable name (with picto eventually)
|
* Return clicable name (with picto eventually)
|
||||||
*
|
*
|
||||||
@ -750,8 +768,16 @@ class Delivery extends CommonObject
|
|||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||||
|
$params = [
|
||||||
|
'id' => $this->id,
|
||||||
|
'objecttype' => $this->element,
|
||||||
|
];
|
||||||
|
$linkstart = '<a href="'.$url.'" data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
|
||||||
|
$linkstart .= ' class="classforajaxtooltip"';
|
||||||
|
} 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">';
|
||||||
|
}
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
if ($withpicto) {
|
if ($withpicto) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user