MINOR: Add asc and desc classes to sorted header

This commit is contained in:
Andrew O'Neil 2012-02-29 14:34:06 +13:00
parent be114b418e
commit 98f047ebfa

View File

@ -33,6 +33,11 @@ class GridFieldSortableHeader implements GridField_HTMLProvider, GridField_DataM
$field->addExtraClass('ss-gridfield-sort');
if($state->SortColumn == $columnField){
$field->addExtraClass('ss-gridfield-sorted');
if($state->SortDirection == 'asc')
$field->addExtraClass('ss-gridfield-sorted-asc');
else
$field->addExtraClass('ss-gridfield-sorted-desc');
}
} else {
$field = new LiteralField($columnField, $title);