Skip to content
Snippets Groups Projects
Commit 64031f92 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Problem with W3C and wrapping of some title lines.

parent 8496b178
Branches
Tags
No related merge requests found
......@@ -2395,8 +2395,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" '. $moreattrib.'>';
else $out.= '<'.$tag.' class="liste_titre" '. $moreattrib.'>';
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 (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
{
......
......@@ -271,6 +271,13 @@ else
// Filter on categories
$moreforfilter='';
$colspan=6;
if (! empty($conf->barcode->enabled)) $colspan++;
if (! empty($conf->service->enabled) && $type != 0) $colspan++;
if (empty($conf->global->PRODUIT_MULTIPRICES)) $colspan++;
if ($user->rights->fournisseur->lire) $colspan++;
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) $colspan+=2;
if (! empty($conf->categorie->enabled))
{
$moreforfilter.=$langs->trans('Categories'). ': ';
......@@ -280,22 +287,20 @@ else
if ($moreforfilter)
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="9">';
print '<td class="liste_titre" colspan="'.$colspan.'">';
print $moreforfilter;
print '</td></tr>';
}
// Lignes des titres
print "<tr class=\"liste_titre\">";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder);
if (! empty($conf->barcode->enabled)) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "p.barcode",$param,'','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
if (! empty($conf->service->enabled) && $type != 0) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"), $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
if ($user->rights->produit->creer) {
print '<td class="liste_titre" align="right">'.$langs->trans("BuyingPriceMinShort").'</td>';
}
if ($user->rights->fournisseur->lire) print '<td class="liste_titre" align="right">'.$langs->trans("BuyingPriceMinShort").'</td>';
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("DesiredStock").'</td>';
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("PhysicalStock").'</td>';
print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="center"',$sortfield,$sortorder);
......@@ -338,7 +343,7 @@ else
}
// Minimum buying Price
if ($user->rights->produit->creer) {
if ($user->rights->fournisseur->lire) {
print '<td class="liste_titre">';
print '&nbsp;';
print '</td>';
......
......@@ -1750,7 +1750,6 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list
color: #<?php echo $colortexttitle; ?>;
font-family: <?php print $fontlist ?>;
border-bottom: 1px solid #FDFFFF;
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
text-align: <?php echo $left; ?>;
}
tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div, div.liste_titre
......@@ -1758,7 +1757,6 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
font-family: <?php print $fontlist ?>;
font-weight: bold;
border-bottom: 1px solid #FDFFFF;
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
vertical-align: middle;
}
......@@ -1774,7 +1772,6 @@ tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre
font-family: <?php print $fontlist ?>;
font-weight: normal;
border-bottom: 1px solid #FDFFFF;
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
text-decoration: underline;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment