BUGFIX SSF-124 remove $extraClass in the sortable header of GridField, simply add an 'col-$getName' as the distinguishable class for each column header, so as not to lose the css selector

This commit is contained in:
Normann Lou 2012-04-10 17:55:01 +12:00
parent 54905b077b
commit 6671ae7ee9
2 changed files with 1 additions and 2 deletions

View File

@ -85,7 +85,6 @@ class GridFieldSortableHeader implements GridField_HTMLProvider, GridField_DataM
}
} else {
$field = new LiteralField($columnField, '<span class="non-sortable">' . $title . '</span>');
$field->addExtraClass("col-".preg_replace('/[^\w]/', '-', $columnField));
}
$forTemplate->Fields->push($field);
}

View File

@ -1,5 +1,5 @@
<tr class="sortable-header">
<% control Fields %>
<th class="main $extraClass"><span>$Field</span></th>
<th class="main col-$getName"><span>$Field</span></th>
<% end_control %>
</tr>