[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 43/73: Improve Manage_Table : align column nu
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 43/73: Improve Manage_Table : align column numeric to the right by default |
Date: |
Fri, 28 May 2021 05:26:35 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 03a04c0442650307d3115f3bc9f869ccc771bb4b
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Apr 28 17:05:42 2021 +0200
Improve Manage_Table : align column numeric to the right by default
---
include/lib/manage_table_sql.class.php | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/lib/manage_table_sql.class.php
b/include/lib/manage_table_sql.class.php
index 5b9ea64..ec897c6 100644
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@ -798,8 +798,11 @@ function check()
if ( $key == $this->sort_column) {
$sorted=' class="sorttable_sorted"';
}
- if ($this->get_property_visible($key)==true)
- echo th("",$sorted,$this->a_label_displaid[$key]);
+
+ $style=($this->get_col_type($key)=="text")?"":'
style="text-align:right;" ';
+ if ($this->get_property_visible($key)==true ) {
+ echo th("", $sorted.$style, $this->a_label_displaid[$key]);
+ }
}
if ($this->can_update_row() && $this->icon_mod=="right")
{
@@ -923,7 +926,7 @@ function check()
if ( $this->get_col_type($v) == 'text') {
echo td($p_row[$v],sprintf(' sort_value="X%s"
',$p_row[$v]));
} elseif ( $this->get_col_type($v) == 'numeric') {
- echo td($p_row[$v],sprintf(' sort_value="%s"
',$p_row[$v]));
+ echo td($p_row[$v],sprintf('class="num" sort_value="%s"
',$p_row[$v]));
} else {
echo td($p_row[$v],sprintf(' sort_value="X%s"
',$p_row[$v]));
@@ -965,6 +968,9 @@ function check()
// For custom col
echo td($this->display_row_custom($v,$p_row[$v],$pk_id));
}
+ elseif ( $this->get_col_type($v)=="numeric") {
+ echo td($p_row[$v],' class="num" ');
+ }
else {
echo td($p_row[$v]);
}
- [Noalyss-commit] [noalyss] 12/73: Cosmetic, (continued)
- [Noalyss-commit] [noalyss] 12/73: Cosmetic, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 22/73: Fix bug : not TVA asked, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 20/73: Cosmetic : place of login, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 31/73: Task #0001961: Devise, cosmetic align number, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 33/73: CURRENCY : conversion problem, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 32/73: Fix bug Forecast, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 15/73: Cosmetic and small bugs, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 17/73: Cosmetic :, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 14/73: Cosmetic bg color tabs, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 42/73: Cosmetic : position of "invoice, template , ..." after saving an operation, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 43/73: Improve Manage_Table : align column numeric to the right by default,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 18/73: Direct Access with a Single AC (without the full path), Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 30/73: Historic : search on currency, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 26/73: Cosmetic : select_box for javascript , display the selected option, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 25/73: Cosmetic : icon in dialog box, lightblue when hover, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 46/73: Improve Sort Table ,, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 27/73: Javascript : waiting box display when exporting in PDF or CSV, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 37/73: Cosmetic improve smoke dg box, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 39/73: Bug #0001971: erreur calcul dans champ prix/unité htva, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 06/73: Cosmetic, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 08/73: Warning if PHPVERSION < 7.2, Dany De Bontridder, 2021/05/28