Skip to content

Commit

Permalink
MDL-18228 Added a bit of JS to resize the left header of the fixed st…
Browse files Browse the repository at this point in the history
…udent column. This should help to keep the rows below aligned. Merged from MOODLE_19_STABLE
  • Loading branch information
nicolasconnault committed Jul 3, 2009
1 parent ddedf97 commit 0f171ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions grade/report/grader/index.php
Expand Up @@ -221,6 +221,12 @@
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);
Expand Down
2 changes: 1 addition & 1 deletion grade/report/grader/lib.php
Expand Up @@ -991,7 +991,7 @@ function get_studentnameshtml() {
';
}

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

Expand Down

0 comments on commit 0f171ca

Please sign in to comment.