mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Add asc and desc classes to sorted header
This commit is contained in:
parent
be114b418e
commit
98f047ebfa
@ -33,6 +33,11 @@ class GridFieldSortableHeader implements GridField_HTMLProvider, GridField_DataM
|
|||||||
$field->addExtraClass('ss-gridfield-sort');
|
$field->addExtraClass('ss-gridfield-sort');
|
||||||
if($state->SortColumn == $columnField){
|
if($state->SortColumn == $columnField){
|
||||||
$field->addExtraClass('ss-gridfield-sorted');
|
$field->addExtraClass('ss-gridfield-sorted');
|
||||||
|
|
||||||
|
if($state->SortDirection == 'asc')
|
||||||
|
$field->addExtraClass('ss-gridfield-sorted-asc');
|
||||||
|
else
|
||||||
|
$field->addExtraClass('ss-gridfield-sorted-desc');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$field = new LiteralField($columnField, $title);
|
$field = new LiteralField($columnField, $title);
|
||||||
|
Loading…
Reference in New Issue
Block a user