Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR: SFF-106 Gridfield changes to make styling easier

  • Loading branch information...
commit fce5487e59bc7f5bd612dc642ce88c144010dd74 1 parent 0ab43cd
@ajoneil ajoneil authored
View
10 forms/gridfield/GridFieldFilter.php
@@ -72,19 +72,17 @@ public function getHTMLFragments($gridField) {
}
$field = new TextField('filter['.$columnField.']', '', $value);
$field->addExtraClass('ss-gridfield-sort');
- } else {
- $field = new LiteralField('', '');
- }
-
- if($columnField != 'Actions') {
+
$field = new FieldGroup(
$field,
$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('ss-gridfield-button-filter');
$resetbutton->addExtraClass('ss-gridfield-button-reset');
+ } else {
+ $field = new LiteralField('', '');
}
$field->iteratorProperties($currentColumn-1, count($columns));
View
2  forms/gridfield/GridFieldSortableHeader.php
@@ -40,7 +40,7 @@ public function getHTMLFragments($gridField) {
$field->addExtraClass('ss-gridfield-sorted-desc');
}
} else {
- $field = new LiteralField($columnField, $title);
+ $field = new LiteralField($columnField, '<span class="non-sortable">' . $title . '</span>');
}
$forTemplate->Fields->push($field);
}
Please sign in to comment.
Something went wrong with that request. Please try again.