NEW Truncate columns names when too long and show full title as popup

This commit is contained in:
Laurent Destailleur 2020-02-24 21:33:28 +01:00
parent 32d74adf20
commit 68526a14cd
2 changed files with 3 additions and 3 deletions

View File

@ -4094,12 +4094,12 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
if ($field1 && ($sortfield1 == $field1 || $sortfield1 == preg_replace("/^[^\.]+\./", "", $field1))) {
$out .= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '.$moreattrib;
$out .= (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= (($field && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && preg_match('/^[a-zA-Z_0-9\s\.\-:]*$/', $name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}
else {
$out .= '<'.$tag.' class="'.$prefix.'liste_titre" '.$moreattrib;
$out .= (empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= (($field && empty($conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE) && preg_match('/^[a-zA-Z_0-9\s\.\-:]*$/', $name)) ? ' title="'.dol_escape_htmltag($langs->trans($name)).'"' : '');
$out .= '>';
}

View File

@ -124,7 +124,7 @@ select.vmenusearchselectcombo {
background-color: unset;
}
th.wrapcolumntitle.liste_titre.right, td.wrapcolumntitle.liste_titre.right {
th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) {
overflow: hidden;
white-space: nowrap;
max-width: 120px;