noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 283/323: Todo List : fix bug in sort after zo


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 283/323: Todo List : fix bug in sort after zooming
Date: Wed, 14 Mar 2018 17:39:05 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit f91305a5f0ed0f1a56d534094230a8f564f935cc
Author: Dany De Bontridder <address@hidden>
Date:   Wed Feb 28 19:08:34 2018 +0100

    Todo List : fix bug in sort after zooming
---
 html/js/sorttable.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/html/js/sorttable.js b/html/js/sorttable.js
index 0a937d6..8f4f83f 100644
--- a/html/js/sorttable.js
+++ b/html/js/sorttable.js
@@ -113,19 +113,22 @@ var sorttable = {
                 } else {
                     headrow[i].sorttable_sortfunction = 
sorttable.guessType(table, i);
                 }
-                //--------- if already sorted , add a icon ----------------
-                if 
(headrow[i].className.search(/\bsorttable_sorted_reverse\b/) != -1) {
-                    // if we're already sorted by this column, 
+                //--------- if already sorted , add a icon but only if the 
icon is not yet there ----------------
+                if 
(headrow[i].className.search(/\bsorttable_sorted_reverse\b/) != -1 && 
headrow[i].innerHTML.search(/\bsorttable_sortrevind\b/)==-1) {
+                    
                     sortrevind = document.createElement('span');
                     sortrevind.id = "sorttable_sortrevind";
                     sortrevind.innerHTML = '<img src="image/down.gif">';
                     headrow[i].appendChild(sortrevind);
+            
                 }
-                if (headrow[i].className.search(/\bsorttable_sorted\b/) != -1) 
{
+                if (headrow[i].className.search(/\bsorttable_sorted\b/) != -1  
&& headrow[i].innerHTML.search(/\bsorttable_sortfwdind\b/)==-1) {
+            
                     sortfwdind = document.createElement('span');
                     sortfwdind.id = "sorttable_sortfwdind";
                     sortfwdind.innerHTML = '<img src="image/up.gif">';
                     headrow[i].appendChild(sortfwdind);
+        
                 }
                 // make it clickable to sort
                 headrow[i].sorttable_columnindex = i;



reply via email to

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