177 |
177 |
select = tr.find('td.operator select');
|
178 |
178 |
for (i = 0; i < operators.length; i++) {
|
179 |
179 |
var option = $('<option>').val(operators[i]).text(operatorLabels[operators[i]]);
|
180 |
|
if (operators[i] == operator) { option.attr('selected', true); }
|
|
180 |
if (operators[i] == operator) { option.prop('selected', true); }
|
181 |
181 |
select.append(option);
|
182 |
182 |
}
|
183 |
183 |
select.change(function(){ toggleOperator(field); });
|
... | ... | |
198 |
198 |
var option = $('<option>');
|
199 |
199 |
if ($.isArray(filterValue)) {
|
200 |
200 |
option.val(filterValue[1]).text(filterValue[0]);
|
201 |
|
if ($.inArray(filterValue[1], values) > -1) {option.attr('selected', true);}
|
|
201 |
if ($.inArray(filterValue[1], values) > -1) {option.prop('selected', true);}
|
202 |
202 |
if (filterValue.length == 3) {
|
203 |
203 |
var optgroup = select.find('optgroup').filter(function(){return $(this).attr('label') == filterValue[2]});
|
204 |
204 |
if (!optgroup.length) {optgroup = $('<optgroup>').attr('label', filterValue[2]);}
|
... | ... | |
206 |
206 |
}
|
207 |
207 |
} else {
|
208 |
208 |
option.val(filterValue).text(filterValue);
|
209 |
|
if ($.inArray(filterValue, values) > -1) {option.attr('selected', true);}
|
|
209 |
if ($.inArray(filterValue, values) > -1) {option.prop('selected', true);}
|
210 |
210 |
}
|
211 |
211 |
select.append(option);
|
212 |
212 |
}
|
... | ... | |
240 |
240 |
var filterValue = filterValues[i];
|
241 |
241 |
var option = $('<option>');
|
242 |
242 |
option.val(filterValue[1]).text(filterValue[0]);
|
243 |
|
if (values[0] == filterValue[1]) { option.attr('selected', true); }
|
|
243 |
if (values[0] == filterValue[1]) { option.prop('selected', true); }
|
244 |
244 |
select.append(option);
|
245 |
245 |
}
|
246 |
246 |
break;
|