Skip to content
This repository
Browse code

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 Lou authored April 10, 2012
1  forms/gridfield/GridFieldSortableHeader.php
@@ -85,6 +85,7 @@ public function getHTMLFragments($gridField) {
85 85
 				}
86 86
 			} else {
87 87
 				$field = new LiteralField($columnField, '<span class="non-sortable">' . $title . '</span>');
  88
+				$field->addExtraClass("col-".preg_replace('/[^\w]/', '-', $columnField));
88 89
 			}
89 90
 			$forTemplate->Fields->push($field);
90 91
 		}
2  templates/Includes/GridFieldSortableHeader_Row.ss
... ...
@@ -1,5 +1,5 @@
1 1
 <tr class="sortable-header">
2 2
 	<% control Fields %>
3  
-		<th class="main"><span>$Field</span></th>
  3
+		<th class="main $extraClass"><span>$Field</span></th>
4 4
 	<% end_control %>
5 5
 </tr>

0 notes on commit 26cec90

Please sign in to comment.
Something went wrong with that request. Please try again.