Permalink
Browse files

MINOR: SSF-106 Add classes for gridfield buttons

  • Loading branch information...
1 parent 98f047e commit 2dffac7398c100370572429174bad0b28695ff8f Andrew O'Neil committed Feb 29, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −0 forms/gridfield/GridFieldAction.php
  2. +5 −2 forms/gridfield/GridFieldFilter.php
View
1 forms/gridfield/GridFieldAction.php
@@ -170,6 +170,7 @@ public function getColumnContent($gridField, $record, $columnName) {
"deleterecord",
array('RecordID' => $record->ID)
);
+ $field->addExtraClass('gridfield-button-delete');
$output = $field->Field();
return $output;
}
View
7 forms/gridfield/GridFieldFilter.php
@@ -80,9 +80,12 @@ public function getHTMLFragments($gridField) {
if($currentColumn == count($columns)) {
$field = new FieldGroup(
$field,
- new GridField_Action($gridField, 'filter', _t('GridField.Filter', "Filter"), 'filter', null),
- new GridField_Action($gridField, 'reset', _t('GridField.ResetFilter', "Reset"), 'reset', null)
+ $filterbutton = new GridField_Action($gridField, 'filter', _t('GridField.Filter', "Filter"), 'filter', null),
+ $resetbutton = new GridField_Action($gridField, 'reset', _t('GridField.ResetFilter', "Reset"), 'reset', null)
);
+
+ $filterbutton->addExtraClass('gridfield-button-filter');
+ $resetbutton->addExtraClass('gridfield-button-reset');
}
$field->iteratorProperties($currentColumn-1, count($columns));

0 comments on commit 2dffac7

Please sign in to comment.