Adding the ability to set the sort column title by setting $field_labels of a DataObject.

This commit is contained in:
Michael 2016-07-18 08:49:37 +09:30
parent 1d4f24de36
commit d463ba25c1
2 changed files with 5 additions and 0 deletions

View File

@ -204,6 +204,10 @@ class GridFieldOrderableRows extends RequestHandler implements
}
public function getColumnMetadata($grid, $col) {
if ($fieldLabels = singleton($grid->list->dataClass)->fieldLabels()) {
return array('title' => isset($fieldLabels['Reorder']) ? $fieldLabels['Reorder'] : '');
}
return array('title' => '');
}

View File

@ -129,6 +129,7 @@
.ss-gridfield-orderable thead tr th.col-Reorder span {
padding: 0 !important;
margin-left: 8px;
}
.ss-gridfield-orderable .col-reorder {