Browse files

ENHANCEMENT: SSF-124 make GridFieldSortableHeader to show the extra c…

…lasses for each of the header field.
  • Loading branch information...
1 parent 9356302 commit 26cec90ba73cebc2b54c967029b595efec03437a @normann normann committed Apr 10, 2012
View
1 forms/gridfield/GridFieldSortableHeader.php
@@ -85,6 +85,7 @@ public function getHTMLFragments($gridField) {
}
} else {
$field = new LiteralField($columnField, '<span class="non-sortable">' . $title . '</span>');
+ $field->addExtraClass("col-".preg_replace('/[^\w]/', '-', $columnField));
}
$forTemplate->Fields->push($field);
}
View
2 templates/Includes/GridFieldSortableHeader_Row.ss
@@ -1,5 +1,5 @@
<tr class="sortable-header">
<% control Fields %>
- <th class="main"><span>$Field</span></th>
+ <th class="main $extraClass"><span>$Field</span></th>
<% end_control %>
</tr>

0 comments on commit 26cec90

Please sign in to comment.