]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18228 Added a bit of JS to resize the left header of the fixed student column...
authornicolasconnault <nicolasconnault>
Fri, 3 Jul 2009 06:33:12 +0000 (06:33 +0000)
committernicolasconnault <nicolasconnault>
Fri, 3 Jul 2009 06:33:12 +0000 (06:33 +0000)
grade/report/grader/index.php
grade/report/grader/lib.php

index ab9142ffc2ec8752d7d7c63bde7deb423cba2e62..c8378ce6652b400160163d8bce5706dda02e797d 100644 (file)
@@ -221,6 +221,12 @@ if ($report->get_pref('enableajax')) {
 YAHOO.namespace("graderreport");
 
 function init() {
+    // Adjust height of header c0
+    var rows = document.getElementsByClassName('heading_name_row');
+    var header_cell_region = YAHOO.util.Dom.getRegion(rows[rows.length-1].firstChild);
+    var height = header_cell_region.bottom - header_cell_region.top;
+    YAHOO.util.Dom.setStyle('studentheader', 'height', height + 'px');
+    
     // attach event listener to the table for mouseover and mouseout
     var table = document.getElementById('user-grades');
     YAHOO.util.Event.on(table, 'mouseover', YAHOO.graderreport.mouseoverHandler);
index 19b0588dda2dd5c9f711d59a036041d1b28cd997..263ce765a3ded285af812bd21223ab3a5a578c8e 100644 (file)
@@ -991,7 +991,7 @@ class grade_report_grader extends grade_report {
                         ';
             }
 
-            $studentshtml .= '<tr class="heading"><th class="header c0" scope="col"><a href="'.$this->baseurl.'&amp;sortitemid=firstname">'
+            $studentshtml .= '<tr class="heading"><th id="studentheader" class="header c0" scope="col"><a href="'.$this->baseurl.'&amp;sortitemid=firstname">'
                         . $strfirstname . '</a> '
                         . $firstarrow. '/ <a href="'.$this->baseurl.'&amp;sortitemid=lastname">' . $strlastname . '</a>'. $lastarrow .'</th>';