Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…lasses for each of the header field.
  • Loading branch information...
commit 26cec90ba73cebc2b54c967029b595efec03437a 1 parent 9356302
@normann normann authored
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>
Please sign in to comment.
Something went wrong with that request. Please try again.