Correct major logic issues when selecting multiple rows.
The rows were being incorrectly selected (because the class name had a missing '.'). jQuery items can't be directly compared to each other so we need to get the HTML element to test if they are the same.
This commit is contained in:
parent
8ab42473d9
commit
c8be011a93
|
@ -69,18 +69,17 @@
|
|||
if (lastSelected !== null)
|
||||
{
|
||||
var toggling = false;
|
||||
var rows = $(selectorName);
|
||||
for (i = 0; i < rows.length; i++)
|
||||
{
|
||||
if (toggling || rows[i] == tr)
|
||||
{
|
||||
methods.addSelection(rows[i]);
|
||||
var rows = $('.' + selectorName);
|
||||
rows.each(function() {
|
||||
var self = $(this);
|
||||
if(toggling || (self.get(0) == tr.get(0))) {
|
||||
methods.addSelection(self);
|
||||
}
|
||||
if (rows[i] == tr || rows[i] == lastSelected)
|
||||
{
|
||||
if(((self.get(0) == tr.get(0)) || (self.get(0) == lastSelected.get(0)))
|
||||
&& (tr.get(0) !== lastSelected.get(0))) {
|
||||
toggling = !toggling;
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
methods.addSelection(tr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue