Skip to content
Extraits de code Groupes Projets
Valider af548d12 rédigé par cerdic's avatar cerdic
Parcourir les fichiers

Report de r16682

parent 4cfafa9f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -685,6 +685,9 @@ function traiter_tableau($bloc) { ...@@ -685,6 +685,9 @@ function traiter_tableau($bloc) {
$rowspans = $numeric = array(); $rowspans = $numeric = array();
$n = count($lignes[0]); $n = count($lignes[0]);
$k = count($lignes); $k = count($lignes);
// distinguer les colonnes numeriques a point ou a virgule,
// pour les alignements eventuels sur "," ou "."
$numeric_class = array('.'=>'point',','=>'virgule');
for($i=0;$i<$n;$i++) { for($i=0;$i<$n;$i++) {
$align = true; $align = true;
for ($j=0;$j<$k;$j++) $rowspans[$j][$i] = 1; for ($j=0;$j<$k;$j++) $rowspans[$j][$i] = 1;
...@@ -696,13 +699,7 @@ function traiter_tableau($bloc) { ...@@ -696,13 +699,7 @@ function traiter_tableau($bloc) {
else if ($r[1]) $align = $r[1]; else if ($r[1]) $align = $r[1];
} }
} }
$numeric[$i] = !$align ? '' : $numeric[$i] = !$align ? '' : (" class='numeric ".$numeric_class[$align]."'");
(" style='text-align: " .
// http://www.w3.org/TR/REC-CSS2/tables.html#column-alignment
// specifie text-align: "," pour cadrer le long de la virgule
// mais les navigateurs ne l'implementent pas ou mal
(/* $align !== true ?"\"$align\"" : */ 'right') .
"'");
} }
// et on parcourt le tableau a l'envers pour ramasser les // et on parcourt le tableau a l'envers pour ramasser les
......
...@@ -32,6 +32,7 @@ table.spip tr.row_even { background: #e0e0e0; } ...@@ -32,6 +32,7 @@ table.spip tr.row_even { background: #e0e0e0; }
table.spip th, table.spip td { padding: 0.20em 0.40em; text-align: left; border: 1px solid #ccc; } table.spip th, table.spip td { padding: 0.20em 0.40em; text-align: left; border: 1px solid #ccc; }
table.spip th { vertical-align: bottom; font-weight: bold; } table.spip th { vertical-align: bottom; font-weight: bold; }
table.spip td { vertical-align: top; } table.spip td { vertical-align: top; }
table.spip td.numeric {text-align:right;}
/* Logos, documents et images */ /* Logos, documents et images */
img, .spip_logos { margin: 0; padding: 0; border: 0; } img, .spip_logos { margin: 0; padding: 0; border: 0; }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter