Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed #678 #744

Merged
merged 3 commits into from

2 participants

@cschiewek

Turns out it wasn't that bad, just 2 small fixes. Tested successfully in IE6-8.

Curtis Schiewek added some commits
Curtis Schiewek Date.now() is not supported in IE. Using jQuery.now() instead. Refs #678 58df635
Curtis Schiewek IE was creating a second (and undefined) filter box when the select w…
…as reset, so I checked to ensure it was actually set before appending. fixes #678
e8ae8bd
app/assets/javascripts/rails_admin/ra.filter-box.js
@@ -73,19 +73,20 @@
}
}
- $("#filter_select").live('change', function() {
+$("#filter_select").live('change', function() {
@sferik Owner
sferik added a note

It looks to me like the previous indentation level was correct. Why did you make this particular change?

Typo... I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@cschiewek

Indentation is fixed now. Sorry :)

@sferik sferik merged commit 6810a1e into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2011
  1. IE was creating a second (and undefined) filter box when the select w…

    Curtis Schiewek authored
    …as reset, so I checked to ensure it was actually set before appending. fixes #678
  2. @cschiewek
This page is out of date. Refresh to see the latest.
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() {
Something went wrong with that request. Please try again.