]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Fix for data grids sorting
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 29 Nov 2014 20:49:39 +0000 (21:49 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 29 Nov 2014 20:49:39 +0000 (21:49 +0100)
gui/baculum/protected/JavaScript/slide-window.js

index 8ee993817290d62a50d957a5ca7ffeec995501ff..1381a4796c9aad9960a1bc718f456955e3f8dcb4 100644 (file)
@@ -273,7 +273,12 @@ var SlideWindowClass = Class.create({
                } else {
                        return;
                }
-               while (--i >= 1) (function (i) {
+               var downCounter = 0;
+               // skip first column if in column header is input (checkbox for elements mark)
+               if (th[0].childNodes[0].nodeName == "INPUT") {
+                       downCounter = 1;
+               }
+               while (--i >= downCounter) (function (i) {
                        var dir = 1;
                        th[i].addEventListener('click', function () {
                                self.sortTable(i, (dir = 1 - dir));