[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 18/18: Manage_Table : add sort
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 18/18: Manage_Table : add sort |
Date: |
Sun, 22 Apr 2018 09:30:31 -0400 (EDT) |
sparkyx pushed a commit to annotated tag rel6919-syn-180310
in repository noalyss.
commit 4ab437a781520388b880bf0a442e492d9052e1de
Author: Dany De Bontridder <address@hidden>
Date: Fri Feb 16 18:19:10 2018 +0100
Manage_Table : add sort
---
include/lib/class_manage_table_sql.php | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/include/lib/class_manage_table_sql.php
b/include/lib/class_manage_table_sql.php
index bc8c453..c601459 100644
--- a/include/lib/class_manage_table_sql.php
+++ b/include/lib/class_manage_table_sql.php
@@ -444,7 +444,7 @@ class Manage_Table_SQL
}
}
echo HtmlInput::filter_table("tb".$this->object_name, $result, 1);
- printf('<table class="result" id="tb%s">', $this->object_name);
+ printf('<table class="result sortable" id="tb%s">',
$this->object_name);
for ($i=0; $i<$nb; $i++)
{
if ($i==0)
@@ -473,20 +473,21 @@ class Manage_Table_SQL
{
$nb=count($this->a_order);
echo "<tr>";
-
for ($i=0; $i<$nb; $i++)
{
-
+ $sorted="";
$key=$this->a_order[$i];
-
+ if ( $key==$this->table->primary_key) {
+ $sorted = 'class="sorttable_sorted"';
+ }
if ($this->get_property_visible($key)==true)
- echo th($this->a_label_displaid[$key]);
+ echo th($this->a_label_displaid[$key],$sorted);
}
if ($this->can_update_row()) {
- echo th(" ",'style="width:40px"');
+ echo th(" ",'style="width:40px" class="sorttable_nosort"');
}
if ($this->can_delete_row()) {
- echo th(" ",'style="width:40px"');
+ echo th(" ",'style="width:40px" class="sorttable_nosort"');
}
echo "</tr>";
}
- [Noalyss-commit] [noalyss] 09/18: Task #0001507: Click sur détail opérations apparaît trop haut Use the function window.pageYOffset instead of window.scrollY, (continued)
- [Noalyss-commit] [noalyss] 09/18: Task #0001507: Click sur détail opérations apparaît trop haut Use the function window.pageYOffset instead of window.scrollY, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 16/18: sorttable.js : alternate properly the color of the table rows, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 11/18: Calc : set 4 decimals, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 13/18: Merge from rel6919.7 Merge branch 'dev-6919.2' of ns3:/srv/git/noalyss into dev-6919.2, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 17/18: sorttable.js : Add an icon if the column is already sorted, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 05/18: Set version 6919.6, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 12/18: Upgrade the branch with the stable release 6919.7 Merge tag 'rel6919.7' into dev-6919.2, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 15/18: Merge tag 'rel6919.8' into dev-6919.2, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 10/18: Improve calc, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 14/18: Merge tag 'rel6919.8' into dev-6919.2, Dany De Bontridder, 2018/04/22
- [Noalyss-commit] [noalyss] 18/18: Manage_Table : add sort,
Dany De Bontridder <=