MDL-18228 Added a bit of JS to resize the left header of the fixed student column. This should help to keep the rows below aligned. Merged from MOODLE_19_STABLE

This commit is contained in:
nicolasconnault 2009-07-03 06:33:12 +00:00
parent ddedf979b4
commit 0f171ca620
2 changed files with 7 additions and 1 deletions

View 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);

View 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>';