mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 20:10:50 +01:00
Miglioria visualizzazione colonne datatables
This commit is contained in:
parent
7a0d1c4801
commit
70b6408c77
@ -78,6 +78,7 @@ if (!empty($query)) {
|
|||||||
|
|
||||||
// Allineamento delle righe
|
// Allineamento delle righe
|
||||||
$align = [];
|
$align = [];
|
||||||
|
$i = 0;
|
||||||
$row = isset($rows[0]) ? $rows[0] : [];
|
$row = isset($rows[0]) ? $rows[0] : [];
|
||||||
foreach ($row as $field => $value) {
|
foreach ($row as $field => $value) {
|
||||||
if (!empty($value)){
|
if (!empty($value)){
|
||||||
@ -85,7 +86,7 @@ if (!empty($query)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Allineamento a destra se il valore della prima riga risulta numerica
|
// Allineamento a destra se il valore della prima riga risulta numerica
|
||||||
if (is_numeric($value) && formatter()->isStandardNumber($value)) {
|
if ((is_numeric($value) && formatter()->isStandardNumber($value)) || $total['format'][$i]) {
|
||||||
$align[$field] = 'text-right';
|
$align[$field] = 'text-right';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,6 +94,7 @@ if (!empty($query)) {
|
|||||||
elseif (formatter()->isStandardDate($value) || preg_match('/^icon_(.+?)$/', $field)) {
|
elseif (formatter()->isStandardDate($value) || preg_match('/^icon_(.+?)$/', $field)) {
|
||||||
$align[$field] = 'text-center';
|
$align[$field] = 'text-center';
|
||||||
}
|
}
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creazione della tabella
|
// Creazione della tabella
|
||||||
|
Loading…
x
Reference in New Issue
Block a user