2
0
forked from Wavyzz/dolibarr

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

This commit is contained in:
Laurent Destailleur
2013-11-22 11:45:42 +01:00
parent 8496b1787c
commit 64031f92fa
3 changed files with 13 additions and 11 deletions

View File

@@ -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 // If field is used as sort criteria we use a specific class
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom") // 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.'>'; if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel'.($field?' nowrap':'').'" '. $moreattrib.'>';
else $out.= '<'.$tag.' class="liste_titre" '. $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 if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
{ {

View File

@@ -271,6 +271,13 @@ else
// Filter on categories // Filter on categories
$moreforfilter=''; $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)) if (! empty($conf->categorie->enabled))
{ {
$moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$langs->trans('Categories'). ': ';
@@ -280,22 +287,20 @@ else
if ($moreforfilter) if ($moreforfilter)
{ {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="9">'; print '<td class="liste_titre" colspan="'.$colspan.'">';
print $moreforfilter; print $moreforfilter;
print '</td></tr>'; print '</td></tr>';
} }
// Lignes des titres // 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("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$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); 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); 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->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 (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) { if ($user->rights->fournisseur->lire) print '<td class="liste_titre" align="right">'.$langs->trans("BuyingPriceMinShort").'</td>';
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("DesiredStock").'</td>';
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("PhysicalStock").'</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); 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 // Minimum buying Price
if ($user->rights->produit->creer) { if ($user->rights->fournisseur->lire) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '&nbsp;'; print '&nbsp;';
print '</td>'; print '</td>';

View File

@@ -1750,7 +1750,6 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list
color: #<?php echo $colortexttitle; ?>; color: #<?php echo $colortexttitle; ?>;
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
border-bottom: 1px solid #FDFFFF; border-bottom: 1px solid #FDFFFF;
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
text-align: <?php echo $left; ?>; 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 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-family: <?php print $fontlist ?>;
font-weight: bold; font-weight: bold;
border-bottom: 1px solid #FDFFFF; border-bottom: 1px solid #FDFFFF;
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>; text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
vertical-align: middle; 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-family: <?php print $fontlist ?>;
font-weight: normal; font-weight: normal;
border-bottom: 1px solid #FDFFFF; border-bottom: 1px solid #FDFFFF;
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
text-decoration: underline; text-decoration: underline;
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>; text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
} }