From 2666881c18b8a5acb3d0efde877b7c7a32ca0f60 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sat, 29 Nov 2014 21:49:39 +0100 Subject: [PATCH] baculum: Fix for data grids sorting --- gui/baculum/protected/JavaScript/slide-window.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/baculum/protected/JavaScript/slide-window.js b/gui/baculum/protected/JavaScript/slide-window.js index 8ee9938172..1381a4796c 100644 --- a/gui/baculum/protected/JavaScript/slide-window.js +++ b/gui/baculum/protected/JavaScript/slide-window.js @@ -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)); -- 2.39.5