Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

subtracks get automatically selected in subselection table when using…

… filters (useful for subtracks with metadata)
  • Loading branch information...
commit 8c37ba4986463ca54d1cca4176bc7d37c5be3797 1 parent aa70051
@pruzanov pruzanov authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 htdocs/js/subtracktable.js
View
12 htdocs/js/subtracktable.js
@@ -716,6 +716,11 @@ var Table = (function(){
for (var j=0,L2=tb.rows.length; j<L2; j++) {
row = tb.rows[j];
hideRow = false;
+ //Interactive selection: unselect all rows here and select those which are in filter later
+ if (row.hasClassName('selected')) {
+ row.addClassName('unselected');
+ row.removeClassName('selected');
+ }
// Test if filters will hide the row
if (tdata.filters && row.cells) {
@@ -744,6 +749,12 @@ var Table = (function(){
// Keep track of the total rows scanned and the total runs _not_ filtered out
totalrows++;
if (!hideRow) {
+ //Interactive select - select row if hideRow is negative
+ if (row.hasClassName('unselected')) {
+ row.addClassName('selected');
+ row.removeClassName('unselected');
+ row.cells[0].childNodes[0].childNodes[0].checked = 'true';
+ }
unfilteredrowcount++;
if (def(page)) {
// Temporarily keep an array of unfiltered rows in case the page we're on goes past
@@ -754,7 +765,6 @@ var Table = (function(){
}
}
}
-
row.style.display = hideRow?"none":"";
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.