Merge branch 'MDL-56768-master' of git://github.com/damyon/moodle

This commit is contained in:
Dan Poltawski 2016-11-10 13:51:11 +00:00
commit a4b0cfa3f7
5 changed files with 100 additions and 19 deletions

View File

@ -387,6 +387,15 @@ FloatingHeaders.prototype = {
*/
_eventHandles: [],
/**
* The last value of the bodyMargin style. We need to recompute positions if it is changed.
*
* @property lastBodyMargin
* @type Number
* @protected
*/
lastBodyMargin: 0,
/**
* Setup the grader report table.
*
@ -919,7 +928,19 @@ FloatingHeaders.prototype = {
leftTitleFloats = false,
floatingHeaderStyles = {},
floatingFooterTitleStyles = {},
floatingFooterTitleRow = false;
floatingFooterTitleRow = false,
bodyMargin = 0;
if (window.right_to_left()) {
bodyMargin = parseInt(Y.one(Y.config.doc.body).getComputedStyle('marginRight'), 10);
} else {
bodyMargin = parseInt(Y.one(Y.config.doc.body).getComputedStyle('marginLeft'), 10);
}
if (bodyMargin != this.lastBodyMargin) {
// Recalculate the position of the edge cells for scroll positioning.
this._calculateCellPositions();
}
// Header position.
gradeItemHeadingContainerStyles.left = this._getRelativeXFromX(this.headerRow.getX());
@ -942,15 +963,16 @@ FloatingHeaders.prototype = {
}
// User column position.
if (window.right_to_left()) {
floatingUserTriggerPoint = Y.config.win.innerWidth + Y.config.win.pageXOffset - this.dockWidth;
floatingUserRelativePoint = floatingUserTriggerPoint - this.firstUserCellWidth;
userFloats = floatingUserTriggerPoint < (this.firstUserCellLeft + this.firstUserCellWidth);
floatingUserRelativePoint = floatingUserTriggerPoint - this.firstUserCellWidth - bodyMargin;
userFloats = floatingUserTriggerPoint < (this.firstUserCellLeft + this.firstUserCellWidth + bodyMargin);
leftTitleFloats = (floatingUserTriggerPoint - this.firstNonUserCellWidth) <
(this.firstNonUserCellLeft + this.firstUserCellWidth);
} else {
floatingUserRelativePoint = Y.config.win.pageXOffset;
floatingUserTriggerPoint = floatingUserRelativePoint + this.dockWidth;
floatingUserRelativePoint = Y.config.win.pageXOffset + bodyMargin;
floatingUserTriggerPoint = floatingUserRelativePoint + this.dockWidth + bodyMargin;
userFloats = floatingUserTriggerPoint > this.firstUserCellLeft;
leftTitleFloats = floatingUserTriggerPoint > (this.firstNonUserCellLeft - this.firstUserCellWidth);
}

View File

@ -387,6 +387,15 @@ FloatingHeaders.prototype = {
*/
_eventHandles: [],
/**
* The last value of the bodyMargin style. We need to recompute positions if it is changed.
*
* @property lastBodyMargin
* @type Number
* @protected
*/
lastBodyMargin: 0,
/**
* Setup the grader report table.
*
@ -918,7 +927,19 @@ FloatingHeaders.prototype = {
leftTitleFloats = false,
floatingHeaderStyles = {},
floatingFooterTitleStyles = {},
floatingFooterTitleRow = false;
floatingFooterTitleRow = false,
bodyMargin = 0;
if (window.right_to_left()) {
bodyMargin = parseInt(Y.one(Y.config.doc.body).getComputedStyle('marginRight'), 10);
} else {
bodyMargin = parseInt(Y.one(Y.config.doc.body).getComputedStyle('marginLeft'), 10);
}
if (bodyMargin != this.lastBodyMargin) {
// Recalculate the position of the edge cells for scroll positioning.
this._calculateCellPositions();
}
// Header position.
gradeItemHeadingContainerStyles.left = this._getRelativeXFromX(this.headerRow.getX());
@ -941,15 +962,16 @@ FloatingHeaders.prototype = {
}
// User column position.
if (window.right_to_left()) {
floatingUserTriggerPoint = Y.config.win.innerWidth + Y.config.win.pageXOffset - this.dockWidth;
floatingUserRelativePoint = floatingUserTriggerPoint - this.firstUserCellWidth;
userFloats = floatingUserTriggerPoint < (this.firstUserCellLeft + this.firstUserCellWidth);
floatingUserRelativePoint = floatingUserTriggerPoint - this.firstUserCellWidth - bodyMargin;
userFloats = floatingUserTriggerPoint < (this.firstUserCellLeft + this.firstUserCellWidth + bodyMargin);
leftTitleFloats = (floatingUserTriggerPoint - this.firstNonUserCellWidth) <
(this.firstNonUserCellLeft + this.firstUserCellWidth);
} else {
floatingUserRelativePoint = Y.config.win.pageXOffset;
floatingUserTriggerPoint = floatingUserRelativePoint + this.dockWidth;
floatingUserRelativePoint = Y.config.win.pageXOffset + bodyMargin;
floatingUserTriggerPoint = floatingUserRelativePoint + this.dockWidth + bodyMargin;
userFloats = floatingUserTriggerPoint > this.firstUserCellLeft;
leftTitleFloats = floatingUserTriggerPoint > (this.firstNonUserCellLeft - this.firstUserCellWidth);
}

View File

@ -243,6 +243,15 @@ FloatingHeaders.prototype = {
*/
_eventHandles: [],
/**
* The last value of the bodyMargin style. We need to recompute positions if it is changed.
*
* @property lastBodyMargin
* @type Number
* @protected
*/
lastBodyMargin: 0,
/**
* Setup the grader report table.
*
@ -775,7 +784,19 @@ FloatingHeaders.prototype = {
leftTitleFloats = false,
floatingHeaderStyles = {},
floatingFooterTitleStyles = {},
floatingFooterTitleRow = false;
floatingFooterTitleRow = false,
bodyMargin = 0;
if (window.right_to_left()) {
bodyMargin = parseInt(Y.one(Y.config.doc.body).getComputedStyle('marginRight'), 10);
} else {
bodyMargin = parseInt(Y.one(Y.config.doc.body).getComputedStyle('marginLeft'), 10);
}
if (bodyMargin != this.lastBodyMargin) {
// Recalculate the position of the edge cells for scroll positioning.
this._calculateCellPositions();
}
// Header position.
gradeItemHeadingContainerStyles.left = this._getRelativeXFromX(this.headerRow.getX());
@ -798,15 +819,16 @@ FloatingHeaders.prototype = {
}
// User column position.
if (window.right_to_left()) {
floatingUserTriggerPoint = Y.config.win.innerWidth + Y.config.win.pageXOffset - this.dockWidth;
floatingUserRelativePoint = floatingUserTriggerPoint - this.firstUserCellWidth;
userFloats = floatingUserTriggerPoint < (this.firstUserCellLeft + this.firstUserCellWidth);
floatingUserRelativePoint = floatingUserTriggerPoint - this.firstUserCellWidth - bodyMargin;
userFloats = floatingUserTriggerPoint < (this.firstUserCellLeft + this.firstUserCellWidth + bodyMargin);
leftTitleFloats = (floatingUserTriggerPoint - this.firstNonUserCellWidth) <
(this.firstNonUserCellLeft + this.firstUserCellWidth);
} else {
floatingUserRelativePoint = Y.config.win.pageXOffset;
floatingUserTriggerPoint = floatingUserRelativePoint + this.dockWidth;
floatingUserRelativePoint = Y.config.win.pageXOffset + bodyMargin;
floatingUserTriggerPoint = floatingUserRelativePoint + this.dockWidth + bodyMargin;
userFloats = floatingUserTriggerPoint > this.firstUserCellLeft;
leftTitleFloats = floatingUserTriggerPoint > (this.firstNonUserCellLeft - this.firstUserCellWidth);
}

View File

@ -27,7 +27,22 @@
}
.path-grade-report #maincontent + .urlselect {
float: right;
position: absolute;
left: 40vw;
}
.path-grade-report-grader {
#region-main {
width: auto;
& > .card {
width: auto;
overflow-x: initial;
}
}
[data-region="blocks-column"] {
width: 100%;
clear: both;
}
}
// Rubrics