noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 210/323: sorttable.js : alternate properly th


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 210/323: sorttable.js : alternate properly the color of the table rows
Date: Wed, 14 Mar 2018 17:38:51 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 7a5b92a99587f86a78739038652f234c04918193
Author: Dany De Bontridder <address@hidden>
Date:   Fri Feb 16 07:34:50 2018 +0100

    sorttable.js : alternate properly the color of the table rows
---
 html/js/sorttable.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/html/js/sorttable.js b/html/js/sorttable.js
index 2873e98..8a65474 100644
--- a/html/js/sorttable.js
+++ b/html/js/sorttable.js
@@ -192,13 +192,16 @@ var sorttable = {
                     }
                     delete row_array;
                     // Highlight odd and even rows properly
-                    sorttable.highlight_body(this);
+                    sorttable.highlight_body(table);
                 });
             }
         }
     },
-    highlight_body:function(p_heading) {
-         var p_table=p_heading.parentNode.parentNode.parentNode;
+    /**
+     * alternate properly the rows of the table, 
+     * @param {DOMNode} p_table sorted table 
+     */ 
+    highlight_body:function(p_table) {
          var nb_row=p_table.rows;
          var e=0;
          for (e=1;e<nb_row.length;e++) {



reply via email to

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