mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-47353 gradereport_grader: Fix header offset logic for floating headers
This is necessary for themes with non-fixed navbars to work with the grader report, otherwise headers will be hidden. 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
6821f7310c
commit
3d8ef7c65d
@ -485,6 +485,13 @@ FloatingHeaders.prototype = {
|
||||
if (header) {
|
||||
if (header.getComputedStyle('position') === 'fixed') {
|
||||
this.pageHeaderHeight = header.get(OFFSETHEIGHT);
|
||||
} else {
|
||||
var navbar = Y.one('.navbar');
|
||||
|
||||
if (navbar) {
|
||||
// If the navbar exists and isn't fixed, we need to offset the page header to accommodate for it.
|
||||
this.pageHeaderHeight = navbar.get(OFFSETHEIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
@ -485,6 +485,13 @@ FloatingHeaders.prototype = {
|
||||
if (header) {
|
||||
if (header.getComputedStyle('position') === 'fixed') {
|
||||
this.pageHeaderHeight = header.get(OFFSETHEIGHT);
|
||||
} else {
|
||||
var navbar = Y.one('.navbar');
|
||||
|
||||
if (navbar) {
|
||||
// If the navbar exists and isn't fixed, we need to offset the page header to accommodate for it.
|
||||
this.pageHeaderHeight = navbar.get(OFFSETHEIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -342,6 +342,13 @@ FloatingHeaders.prototype = {
|
||||
if (header) {
|
||||
if (header.getComputedStyle('position') === 'fixed') {
|
||||
this.pageHeaderHeight = header.get(OFFSETHEIGHT);
|
||||
} else {
|
||||
var navbar = Y.one('.navbar');
|
||||
|
||||
if (navbar) {
|
||||
// If the navbar exists and isn't fixed, we need to offset the page header to accommodate for it.
|
||||
this.pageHeaderHeight = navbar.get(OFFSETHEIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -11,7 +11,7 @@ information provided here is intended especially for theme designer.
|
||||
* On calendar view screen the course selector and new event button have been swapped, custom CSS for .path-calendar might be affected.
|
||||
* The functions search_listing() and search_pagination() in the core_course_management_renderer class take the searched string
|
||||
as an extra parameter - see MDL-46902.
|
||||
|
||||
* Themes with non-fixed headers must have the .navbar class in their navbar in order for floating headers in the grader report to work - see MDL-46658.
|
||||
|
||||
=== 2.7 ===
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user