Update commonobject.class.php
This commit is contained in:
parent
8cb877c118
commit
a93cb8b572
@ -735,11 +735,14 @@ abstract class CommonObject
|
|||||||
$MAX_EXTRAFIELDS_TO_SHOW_IN_TOOLTIP = getDolGlobalInt('MAX_EXTRAFIELDS_TO_SHOW_IN_TOOLTIP', 5);
|
$MAX_EXTRAFIELDS_TO_SHOW_IN_TOOLTIP = getDolGlobalInt('MAX_EXTRAFIELDS_TO_SHOW_IN_TOOLTIP', 5);
|
||||||
|
|
||||||
$datas = $this->getTooltipContentArray($params);
|
$datas = $this->getTooltipContentArray($params);
|
||||||
|
$count = 0;
|
||||||
// Add extrafields
|
// Add extrafields
|
||||||
if (!empty($extrafields->attributes[$this->table_element]['label'])) {
|
if (!empty($extrafields->attributes[$this->table_element]['label'])) {
|
||||||
if ($extrafields->attributes[$this->table_element]['count'] < $MAX_EXTRAFIELDS_TO_SHOW_IN_TOOLTIP) {
|
|
||||||
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
||||||
|
if ($count >= $MAX_EXTRAFIELDS_TO_SHOW_IN_TOOLTIP) {
|
||||||
|
$datas['more_extrafields'] = '<br>.../...';
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (!empty($extrafields->attributes[$this->table_element]['langfile'][$key])) {
|
if (!empty($extrafields->attributes[$this->table_element]['langfile'][$key])) {
|
||||||
$langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]);
|
$langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]);
|
||||||
}
|
}
|
||||||
@ -749,7 +752,7 @@ abstract class CommonObject
|
|||||||
} else {
|
} else {
|
||||||
$value = (empty($this->array_options['options_' . $key]) ? '' : $this->array_options['options_' . $key]);
|
$value = (empty($this->array_options['options_' . $key]) ? '' : $this->array_options['options_' . $key]);
|
||||||
$datas[$key]= '<br><b>'. $labelextra . ':</b> ' . $extrafields->showOutputField($key, $value, '', $this->table_element);
|
$datas[$key]= '<br><b>'. $labelextra . ':</b> ' . $extrafields->showOutputField($key, $value, '', $this->table_element);
|
||||||
}
|
$count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user