Merged r10487 from trunk (#11885)

fix broken issue list filter.

Array indexOf() is not defined on IE8.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10489 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-09-27 07:29:22 +00:00
parent 006a1b4fd7
commit 03bff3308f
1 changed files with 3 additions and 3 deletions

View File

@ -152,10 +152,10 @@ function buildFilterRow(field, operator, values) {
var option = $('<option>');
if ($.isArray(filterValue)) {
option.val(filterValue[1]).text(filterValue[0]);
if (values.indexOf(filterValue[1]) > -1) {option.attr('selected', true);}
if ($.inArray(filterValue[1], values) > -1) {option.attr('selected', true);}
} else {
option.val(filterValue).text(filterValue);
if (values.indexOf(filterValue) > -1) {option.attr('selected', true);}
if ($.inArray(filterValue, values) > -1) {option.attr('selected', true);}
}
select.append(option);
}
@ -204,7 +204,7 @@ function toggleFilter(field) {
function enableValues(field, indexes) {
var fieldId = field.replace('.', '_');
$('#tr_'+fieldId+' td.values .value').each(function(index) {
if (indexes.indexOf(index) >= 0) {
if ($.inArray(index, indexes) >= 0) {
$(this).removeAttr('disabled');
$(this).parents('span').first().show();
} else {