Browse files

MINOR: SSF-106 Dont hide filter buttons when search isnt selected

  • Loading branch information...
1 parent 68914ef commit a50fc5180ac3e7889c0be1169e80f3aa24e1d79a Andrew O'Neil committed Mar 1, 2012
Showing with 5 additions and 6 deletions.
  1. +3 −4 forms/gridfield/GridFieldFilter.php
  2. +2 −2 javascript/GridField.js
View
7 forms/gridfield/GridFieldFilter.php
@@ -76,18 +76,17 @@ public function getHTMLFragments($gridField) {
$field = new LiteralField('', '');
}
- // Last column, inject action buttons
- if($currentColumn == count($columns)) {
+ 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');
-
+ $resetbutton->addExtraClass('ss-gridfield-button-reset');
}
+
$field->iteratorProperties($currentColumn-1, count($columns));
$forTemplate->Fields->push($field);
}
View
4 javascript/GridField.js
@@ -79,7 +79,7 @@
* ToDo ensure filter-button state is maintained after filtering (see resetState param)
* ToDo get working in IE 6-7
*/
- $('.ss-gridfield input.ss-gridfield-sort').entwine({
+ /*$('.ss-gridfield input.ss-gridfield-sort').entwine({
onfocusin: function(e) {
// Dodgy results in IE <=7 & ignore if only one filter-field
countfields = $('.ss-gridfield input.ss-gridfield-sort').length;
@@ -112,7 +112,7 @@
).css({'position':'relative','margin':'0 auto','width':'65%'}).appendTo(eleInput.closest('th'));
}
}
- });
+ });*/
$('fieldset.ss-gridfield .new-link').entwine({
onclick: function(e) {

0 comments on commit a50fc51

Please sign in to comment.