Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #744 from cschiewek/master

Fixed #678
  • Loading branch information...
commit 6810a1e11856bf0a61308979b5c31a132421fb68 2 parents f7eea53 + 1623d3a
@sferik authored
Showing with 12 additions and 11 deletions.
  1. +12 −11 app/assets/javascripts/rails_admin/ra.filter-box.js
View
23 app/assets/javascripts/rails_admin/ra.filter-box.js
@@ -75,17 +75,18 @@
$("#filter_select").live('change', function() {
var option = $(this).find('option:selected')
- $(this).val(''); // reset select
- //this.selectedIndex = 0;
- $.filters.append(
- option.data('field-label'),
- option.data('field-name'),
- option.data('field-type'),
- option.data('field-value'),
- option.data('field-operator'),
- option.data('field-options'),
- Date.now()
- );
+ if ($(this).val() != '') {
+ $(this).val(''); // reset select
+ $.filters.append(
+ option.data('field-label'),
+ option.data('field-name'),
+ option.data('field-type'),
+ option.data('field-value'),
+ option.data('field-operator'),
+ option.data('field-options'),
+ $.now()
+ );
+ }
});
$('#filters_box .delete').live('click', function() {
Please sign in to comment.
Something went wrong with that request. Please try again.