Skip to content

Commit

Permalink
3651 In GradebookNG prevent erroneous row added (sakaiproject#3652)
Browse files Browse the repository at this point in the history
Within the GradebookNG tool if one where to turn "Group by Category" on
(when categories where enabled) and then to turn off Categories, if the
user where to scroll right then the fixed header would have an
extraneous row on it. This change causes the row to only be added when
group by category is enabled.
  • Loading branch information
master-bob authored and payten committed Dec 1, 2016
1 parent 992d5e9 commit 0c32d72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gradebookng/tool/src/webapp/scripts/gradebook-grades.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ GradebookSpreadsheet.prototype.setupFixedColumns = function() {

var $headers = self.$table.find("> thead > tr.gb-headers > th").slice(0,3);
var $thead = $("<thead>");
// append a dummy header row for when categorised
$thead.append($("<tr>").addClass("gb-categories-row").append($("<th>").attr("colspan", $headers.length)));
if(self.isGroupedByCategory()) {
// append a dummy header row for when categorised
$thead.append($("<tr>").addClass("gb-categories-row").append($("<th>").attr("colspan", $headers.length)));
}

// add the row for all cloned cells
$thead.append($("<tr>").addClass("gb-clone-row").addClass("gb-headers"));
Expand Down

0 comments on commit 0c32d72

Please sign in to comment.