MDL-46951 gradereport_grader: Disable floating behaviour when table is empty

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:
Frederic Massart 2014-08-26 14:30:59 +08:00 committed by Andrew Nicols
parent f79776cb7f
commit b6ad809581
4 changed files with 17 additions and 2 deletions

View File

@ -436,6 +436,11 @@ FloatingHeaders.prototype = {
this.firstUserCell = Y.one(SELECTORS.USERCELL);
this.container = Y.one(SELECTORS.GRADEPARENT);
if (!this.firstUserCell) {
// No need for floating elements, there are no users.
return this;
}
// Generate floating elements.
this._setupFloatingUserColumn();
this._setupFloatingUserHeader();

View File

@ -436,6 +436,11 @@ FloatingHeaders.prototype = {
this.firstUserCell = Y.one(SELECTORS.USERCELL);
this.container = Y.one(SELECTORS.GRADEPARENT);
if (!this.firstUserCell) {
// No need for floating elements, there are no users.
return this;
}
// Generate floating elements.
this._setupFloatingUserColumn();
this._setupFloatingUserHeader();

View File

@ -188,6 +188,11 @@ FloatingHeaders.prototype = {
this.firstUserCell = Y.one(SELECTORS.USERCELL);
this.container = Y.one(SELECTORS.GRADEPARENT);
if (!this.firstUserCell) {
// No need for floating elements, there are no users.
return this;
}
// Generate floating elements.
this._setupFloatingUserColumn();
this._setupFloatingUserHeader();