MDL-47353 gradereport_grader: Only respect fixed headers
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 5 Sep 2014 01:37:34 +0000 (09:37 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 10 Oct 2014 01:02:57 +0000 (09:02 +0800)
Even if the navbar is in a static header, it should only be respected if it
is fixed still.

This issue is a part of the MDL-46658 Task.
This issue is a part of the MDL-25544 Epic.

grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-min.js
grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js
grade/report/grader/yui/src/gradereporttable/js/floatingheaders.js

index 9a3b574..374c742 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-debug.js differ
index de4513f..56aa1a3 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-min.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable-min.js differ
index 0ed03c8..fe61924 100644 (file)
Binary files a/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js and b/grade/report/grader/yui/build/moodle-gradereport_grader-gradereporttable/moodle-gradereport_grader-gradereporttable.js differ
index da76d44..21000d8 100644 (file)
@@ -345,7 +345,7 @@ FloatingHeaders.prototype = {
             } else {
                 var navbar = Y.one('.navbar');
 
-                if (navbar) {
+                if (navbar && navbar.getComputedStyle('position') === 'fixed') {
                     // If the navbar exists and isn't fixed, we need to offset the page header to accommodate for it.
                     this.pageHeaderHeight = navbar.get(OFFSETHEIGHT);
                 }