]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Fix sorting with no impact on rows background colors
authorMarcin Haba <marcin.haba@bacula.pl>
Sun, 24 May 2015 15:23:43 +0000 (17:23 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sun, 24 May 2015 15:23:43 +0000 (17:23 +0200)
gui/baculum/protected/JavaScript/slide-window.js

index 36303a3d34dc1aaa91aeef2226c42c1231a636df..e8b1325c716497ace5c21a313e35579d12653d13 100644 (file)
@@ -274,7 +274,15 @@ var SlideWindowClass = Class.create({
                        }
                        return reverse * (val);
                });
-               for(i = 0; i < tr.length; ++i) tb.appendChild(tr[i]);
+               for(i = 0; i < tr.length; i++) {
+                       var even = ((i % 2) == 0);
+                       if (even) {
+                               tr[i].className = this.elements.contentItems;
+                       } else {
+                               tr[i].className = this.elements.contentAlternatingItems;
+                       }
+                       tb.appendChild(tr[i]);
+               }
        },
 
        makeSortable: function () {