Skip to content

Commit

Permalink
Fixing problems with row re-selection in CCA and timeseries. Closes #153
Browse files Browse the repository at this point in the history
.
  • Loading branch information
alexsielicki committed Aug 29, 2014
1 parent bc7cbae commit 78d9264
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions web-server/js/cca-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ $.widget("cca.table",
self.grid.invalidate();
self.trigger_row_selection = false;
self.grid.setSelectedRows(sorted_rows);
self.grid.resetActiveCell();
if(sorted_rows.length)
self.grid.scrollRowToTop(Math.min.apply(Math, sorted_rows));
self.element.trigger("variable-sort-changed", [column, order]);
Expand Down Expand Up @@ -172,6 +173,7 @@ $.widget("cca.table",
{
self.trigger_row_selection = false;
self.grid.setSelectedRows(sorted_rows);
self.grid.resetActiveCell();
if(sorted_rows.length)
self.grid.scrollRowToTop(Math.min.apply(Math, sorted_rows));
});
Expand All @@ -198,6 +200,7 @@ $.widget("cca.table",
{
self.trigger_row_selection = false;
self.grid.setSelectedRows(sorted_rows);
self.grid.resetActiveCell();
if(sorted_rows.length)
self.grid.scrollRowToTop(Math.min.apply(Math, sorted_rows));
});
Expand Down
5 changes: 4 additions & 1 deletion web-server/js/timeseries-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ $.widget("timeseries.table",
var selectedRows = self.data.getSimulationRowIndexes(self.options["row-selection"]);
self.trigger_row_selection = false;
self.grid.setSelectedRows(selectedRows);
self.grid.resetActiveCell();
if(selectedRows.length)
self.grid.scrollRowToTop(Math.min.apply(Math, selectedRows));
}
Expand All @@ -112,7 +113,7 @@ $.widget("timeseries.table",
var selectedRows = self.data.getSimulationRowIndexes(self.options["row-selection"]);
self.trigger_row_selection = false;
self.grid.setSelectedRows(selectedRows);

self.grid.resetActiveCell();
if(selectedRows.length)
self.grid.scrollRowToTop(Math.min.apply(Math, selectedRows));
}
Expand Down Expand Up @@ -174,6 +175,7 @@ $.widget("timeseries.table",
var selectedRows = self.data.getSimulationRowIndexes(self.options["row-selection"]);
self.trigger_row_selection = false;
self.grid.setSelectedRows(selectedRows);
self.grid.resetActiveCell();
if(selectedRows.length)
self.grid.scrollRowToTop(Math.min.apply(Math, selectedRows));
}
Expand Down Expand Up @@ -253,6 +255,7 @@ $.widget("timeseries.table",
var selectedRows = self.data.getSimulationRowIndexes(self.options["row-selection"]);
self.trigger_row_selection = false;
self.grid.setSelectedRows(selectedRows);
self.grid.resetActiveCell();
if(selectedRows.length)
self.grid.scrollRowToTop(Math.min.apply(Math, selectedRows));
}
Expand Down

0 comments on commit 78d9264

Please sign in to comment.