mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-46951 gradereport_grader: Handling of user cells when resizing
For some reason, the max-width/min-width/width of the table cell containing the name of the users did not work, leading to very large columns but a very narrow floating one. Handling the size of those columsn upon resize was also necessary after with this fix. This issue is a part of the MDL-46658 Task. This issue is a part of the MDL-25544 Epic.
This commit is contained in:
parent
b6ad809581
commit
1da29869aa
@ -79,7 +79,6 @@
|
||||
.gradeparent th.user {
|
||||
padding: 4px;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
width: 200px;
|
||||
border-color: #666666;
|
||||
border-right-width: 1px;
|
||||
|
@ -887,6 +887,17 @@ FloatingHeaders.prototype = {
|
||||
// Simulate a scroll.
|
||||
this._handleScrollEvent();
|
||||
|
||||
// Resize user cells.
|
||||
var userWidth = this.firstUserCell.getComputedStyle(WIDTH);
|
||||
var userCells = Y.all(SELECTORS.USERCELL);
|
||||
this.userColumnHeader.setStyle('width', userWidth);
|
||||
this.userColumn.all('.gradebook-user-cell').each(function(cell, idx) {
|
||||
cell.setStyles({
|
||||
width: userWidth,
|
||||
height: userCells.item(idx).getComputedStyle(HEIGHT)
|
||||
});
|
||||
}, this);
|
||||
|
||||
// Resize headers & footers.
|
||||
// This is an expensive operation, not expected to happen often.
|
||||
var headers = this.gradeItemHeadingContainer.all(SELECTORS.HEADERCELL);
|
||||
|
File diff suppressed because one or more lines are too long
@ -886,6 +886,17 @@ FloatingHeaders.prototype = {
|
||||
// Simulate a scroll.
|
||||
this._handleScrollEvent();
|
||||
|
||||
// Resize user cells.
|
||||
var userWidth = this.firstUserCell.getComputedStyle(WIDTH);
|
||||
var userCells = Y.all(SELECTORS.USERCELL);
|
||||
this.userColumnHeader.setStyle('width', userWidth);
|
||||
this.userColumn.all('.gradebook-user-cell').each(function(cell, idx) {
|
||||
cell.setStyles({
|
||||
width: userWidth,
|
||||
height: userCells.item(idx).getComputedStyle(HEIGHT)
|
||||
});
|
||||
}, this);
|
||||
|
||||
// Resize headers & footers.
|
||||
// This is an expensive operation, not expected to happen often.
|
||||
var headers = this.gradeItemHeadingContainer.all(SELECTORS.HEADERCELL);
|
||||
|
@ -639,6 +639,17 @@ FloatingHeaders.prototype = {
|
||||
// Simulate a scroll.
|
||||
this._handleScrollEvent();
|
||||
|
||||
// Resize user cells.
|
||||
var userWidth = this.firstUserCell.getComputedStyle(WIDTH);
|
||||
var userCells = Y.all(SELECTORS.USERCELL);
|
||||
this.userColumnHeader.setStyle('width', userWidth);
|
||||
this.userColumn.all('.gradebook-user-cell').each(function(cell, idx) {
|
||||
cell.setStyles({
|
||||
width: userWidth,
|
||||
height: userCells.item(idx).getComputedStyle(HEIGHT)
|
||||
});
|
||||
}, this);
|
||||
|
||||
// Resize headers & footers.
|
||||
// This is an expensive operation, not expected to happen often.
|
||||
var headers = this.gradeItemHeadingContainer.all(SELECTORS.HEADERCELL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user