Skip to content

Commit

Permalink
3631 Improve link passthrough in GradebookNG (sakaiproject#3632)
Browse files Browse the repository at this point in the history
Within the GradebookNG tool, there is a fixed column which appears only
once scrolled to the right. Clicks on elements within that column (i.e.
student name / the row itself) would not be passed through to the actual
element where the event is processed. This fixes that so that the
clicks are passed through correctly, for example: allowing one to
access the student overview panel when scrolled to the right.

This change also removes the scroll left aspect of the clickthrough.
  • Loading branch information
master-bob authored and payten committed Dec 8, 2016
1 parent 9bb794b commit b03549c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gradebookng/tool/src/webapp/scripts/gradebook-grades.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,8 @@ GradebookSpreadsheet.prototype.setupFixedColumns = function() {
});

// Clicks on the fixed column return you to the real column cell
self.$fixedColumns.find("td").on("mousedown", function(event) {
self.$fixedColumns.find("td,th").on("mousedown", function(event) {
event.preventDefault();
self.$spreadsheet.scrollLeft(0);
var cellIndex = $(this).index();
var rowIndex = $(this).closest("tr").index();
$targetCell = $($(self.$table.find("> tbody > tr").get(rowIndex)).find("> *").get(cellIndex));
Expand Down Expand Up @@ -2583,4 +2582,4 @@ $(function() {
sakai.gradebookng = {
spreadsheet: new GradebookSpreadsheet($("#gradebookGrades"))
};
});
});

0 comments on commit b03549c

Please sign in to comment.