noalyss-commit
[Top][All Lists]
Advanced

[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>";
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]