Bug template table, id des colonnes mal placés
This commit is contained in:
parent
6041c2a785
commit
511752405b
@ -884,6 +884,10 @@ class template
|
|||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="tableWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="tableWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Début tableau
|
// Début tableau
|
||||||
$html .= '<table id="' . $attributes['id'] . '" class="table ' . $attributes['class'] . '">';
|
$html .= '<table id="' . $attributes['id'] . '" class="table ' . $attributes['class'] . '">';
|
||||||
|
// Pas de tableau d'Id transmis, générer une numérotation
|
||||||
|
if (empty($rowsId)) {
|
||||||
|
$rowsId = range(0, count($body));
|
||||||
|
}
|
||||||
// Entêtes
|
// Entêtes
|
||||||
if ($head) {
|
if ($head) {
|
||||||
// Début des entêtes
|
// Début des entêtes
|
||||||
@ -891,21 +895,17 @@ class template
|
|||||||
$html .= '<tr class="nodrag">';
|
$html .= '<tr class="nodrag">';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($head as $th) {
|
foreach ($head as $th) {
|
||||||
$html .= '<th class="col' . $cols[$i++] . '">' . $th . '</th>';
|
$html .= '<th id="' . $rowsId[$i] . '" class="col' . $cols[$i++] . '">' . $th . '</th>';
|
||||||
}
|
}
|
||||||
// Fin des entêtes
|
// Fin des entêtes
|
||||||
$html .= '</tr>';
|
$html .= '</tr>';
|
||||||
$html .= '</thead>';
|
$html .= '</thead>';
|
||||||
}
|
}
|
||||||
// Pas de tableau d'Id transmis, générer une numérotation
|
|
||||||
if (empty($rowsId)) {
|
|
||||||
$rowsId = range(0, count($body));
|
|
||||||
}
|
|
||||||
// Début contenu
|
// Début contenu
|
||||||
$j = 0;
|
$j = 0;
|
||||||
foreach ($body as $tr) {
|
foreach ($body as $tr) {
|
||||||
// Id de ligne pour les tableaux drag and drop
|
// Id de ligne pour les tableaux drag and drop
|
||||||
$html .= '<tr id="' . $rowsId[$j++] . '">';
|
$html .= '<tr>';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($tr as $td) {
|
foreach ($tr as $td) {
|
||||||
$html .= '<td class="col' . $cols[$i++] . '">' . $td . '</td>';
|
$html .= '<td class="col' . $cols[$i++] . '">' . $td . '</td>';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user