Patch #32523 » javascript-perf2.diff
public/javascripts/application.js | ||
---|---|---|
175 | 175 |
filterTable.append(tr); |
176 | 176 | |
177 | 177 |
select = tr.find('td.operator select'); |
178 |
for (i = 0; i < operators.length; i++) { |
|
178 |
operatorsLength = operators.length; |
|
179 |
for (i = 0; i < operatorsLength; i++) { |
|
179 | 180 |
var option = $('<option>').val(operators[i]).text(operatorLabels[operators[i]]); |
180 | 181 |
if (operators[i] == operator) { option.prop('selected', true); } |
181 | 182 |
select.append(option); |
... | ... | |
193 | 194 |
); |
194 | 195 |
select = tr.find('td.values select'); |
195 | 196 |
if (values.length > 1) { select.attr('multiple', true); } |
196 |
for (i = 0; i < filterValues.length; i++) { |
|
197 |
filterValuesLength = filterValues.length; |
|
198 |
for (i = 0; i < filterValuesLength; i++) { |
|
197 | 199 |
var filterValue = filterValues[i]; |
198 | 200 |
var option = $('<option>'); |
199 | 201 |
if ($.isArray(filterValue)) { |
... | ... | |
236 | 238 |
); |
237 | 239 |
$('#values_'+fieldId).val(values[0]); |
238 | 240 |
select = tr.find('td.values select'); |
239 |
for (i = 0; i < filterValues.length; i++) { |
|
241 |
filterValuesLength = filterValues.length; |
|
242 |
for (i = 0; i < filterValuesLength; i++) { |
|
240 | 243 |
var filterValue = filterValues[i]; |
241 | 244 |
var option = $('<option>'); |
242 | 245 |
option.val(filterValue[1]).text(filterValue[0]); |