MINOR: SSF-106 Add classes for gridfield buttons

This commit is contained in:
Andrew O'Neil 2012-02-29 14:59:11 +13:00
parent 98f047ebfa
commit 2dffac7398
2 changed files with 6 additions and 2 deletions

View File

@ -170,6 +170,7 @@ class GridFieldAction_Delete implements GridField_ColumnProvider, GridField_Acti
"deleterecord", "deleterecord",
array('RecordID' => $record->ID) array('RecordID' => $record->ID)
); );
$field->addExtraClass('gridfield-button-delete');
$output = $field->Field(); $output = $field->Field();
return $output; return $output;
} }

View File

@ -80,10 +80,13 @@ class GridFieldFilter implements GridField_HTMLProvider, GridField_DataManipulat
if($currentColumn == count($columns)) { if($currentColumn == count($columns)) {
$field = new FieldGroup( $field = new FieldGroup(
$field, $field,
new GridField_Action($gridField, 'filter', _t('GridField.Filter', "Filter"), 'filter', null), $filterbutton = new GridField_Action($gridField, 'filter', _t('GridField.Filter', "Filter"), 'filter', null),
new GridField_Action($gridField, 'reset', _t('GridField.ResetFilter', "Reset"), 'reset', 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)); $field->iteratorProperties($currentColumn-1, count($columns));
$forTemplate->Fields->push($field); $forTemplate->Fields->push($field);