Index: index.php =================================================================== RCS file: /cvsroot/moodle/moodle/grade/report/grader/index.php,v retrieving revision 1.65.2.15 diff -u -r1.65.2.15 index.php --- index.php 5 May 2009 11:52:03 -0000 1.65.2.15 +++ index.php 25 Jun 2009 10:10:31 -0000 @@ -223,6 +223,7 @@ YAHOO.graderreport.panelEl.render(table); document.body.className += ' yui-skin-sam'; + YAHOO.graderreport.currentCell = ''; } @@ -290,6 +291,17 @@ YAHOO.graderreport.panelEl.setBody(tooltipNode.innerHTML); YAHOO.graderreport.panelEl.render(elTarget); YAHOO.graderreport.panelEl.show() + + // Highlight the current cell + elTarget.className += ' current_cell'; + + // remove the highlight from the old cell + if ((typeof(YAHOO.graderreport.currentCell) == 'object')) { + YAHOO.graderreport.currentCell.className = YAHOO.graderreport.currentCell.className.replace(' current_cell', ''); + } + // store this cell reference so that this class can be removed on mouseout + YAHOO.graderreport.currentCell = elTarget; + } } @@ -306,6 +318,7 @@ classVar = newTarget.className; } catch (err) { YAHOO.graderreport.panelEl.hide() + YAHOO.graderreport.currentCell.className = YAHOO.graderreport.currentCell.className.replace('current_cell', ''); return false; } @@ -318,6 +331,9 @@ } catch (err) { // we've gone over the scrollbar again YAHOO.graderreport.panelEl.hide() + if ((typeof(YAHOO.graderreport.currentCell) == 'object') ) { + YAHOO.graderreport.currentCell.className = YAHOO.graderreport.currentCell.className.replace('current_cell', ''); + } return false; } searchString = /yui-panel|grade cell/; @@ -329,6 +345,9 @@ if (newTarget.nodeName.toUpperCase() == "HTML") { // we missed the user-grades table altogether by moving down off screen to read a long one YAHOO.graderreport.panelEl.hide() + if ((typeof(YAHOO.graderreport.currentCell) == 'object') ) { + YAHOO.graderreport.currentCell.className = YAHOO.graderreport.currentCell.className.replace('current_cell', ''); + } break; } @@ -337,7 +356,12 @@ // no panel so far and we went up to the YAHOO.graderreport.panelEl.hide() - + if ((typeof(YAHOO.graderreport.currentCell) == 'object') ) { + YAHOO.graderreport.currentCell.className = YAHOO.graderreport.currentCell.className.replace('current_cell', ''); + // remove the reference now that we have hidden everything. This stops problems when coming back in to the table + // from the edge + YAHOO.graderreport.currentCell = ''; + } } Index: styles.php =================================================================== RCS file: /cvsroot/moodle/moodle/grade/report/grader/styles.php,v retrieving revision 1.1.2.17 diff -u -r1.1.2.17 styles.php --- styles.php 5 Jun 2009 09:34:31 -0000 1.1.2.17 +++ styles.php 25 Jun 2009 10:12:24 -0000 @@ -571,5 +571,7 @@ #hiddentooltiproot, .tooltipDiv { display: none; } - +.grade-report-grader table#user-grades td.grade.cell.current_cell { + background-color: #D9D9F3 !important; +}