diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 906eb08dd81..31e2a1344b4 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2406,8 +2406,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
// If field is used as sort criteria we use a specific class
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
- if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel'.($field?' nowrap':'').'" '. $moreattrib.'>';
- else $out.= '<'.$tag.' class="liste_titre'.($field?' nowrap':'').'" '. $moreattrib.'>';
+ if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>';
+ else $out.= '<'.$tag.' class="liste_titre" '. $moreattrib.'>';
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
{
@@ -2435,7 +2435,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
if (! preg_match('/^&/',$options)) $options='&'.$options;
//print " ";
- $out.= '
';
+ $out.= '
';
if (! $sortorder || $field != $sortfield)
{
@@ -2453,6 +2453,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
$out.= ''.img_up("Z-A",0).'';
}
}
+
+ $out.= '';
}
$out.=''.$tag.'>';