Patch #31894 » 0001-Fix-jQuery.fn.attr-selected-might-use-property-inste.patch
| app/views/users/new.html.erb | ||
|---|---|---|
|
$('input#user_mail').val(ui.item.mail);
|
||
|
$('select#user_auth_source_id option').each(function(){
|
||
|
if ($(this).attr('value') == ui.item.auth_source_id) {
|
||
|
$(this).attr('selected', true);
|
||
|
$(this).prop('selected', true);
|
||
|
$('select#user_auth_source_id').trigger('change');
|
||
|
}
|
||
|
});
|
||
| public/javascripts/application.js | ||
|---|---|---|
|
select = tr.find('td.operator select');
|
||
|
for (i = 0; i < operators.length; i++) {
|
||
|
var option = $('<option>').val(operators[i]).text(operatorLabels[operators[i]]);
|
||
|
if (operators[i] == operator) { option.attr('selected', true); }
|
||
|
if (operators[i] == operator) { option.prop('selected', true); }
|
||
|
select.append(option);
|
||
|
}
|
||
|
select.change(function(){ toggleOperator(field); });
|
||
| ... | ... | |
|
var option = $('<option>');
|
||
|
if ($.isArray(filterValue)) {
|
||
|
option.val(filterValue[1]).text(filterValue[0]);
|
||
|
if ($.inArray(filterValue[1], values) > -1) {option.attr('selected', true);}
|
||
|
if ($.inArray(filterValue[1], values) > -1) {option.prop('selected', true);}
|
||
|
if (filterValue.length == 3) {
|
||
|
var optgroup = select.find('optgroup').filter(function(){return $(this).attr('label') == filterValue[2]});
|
||
|
if (!optgroup.length) {optgroup = $('<optgroup>').attr('label', filterValue[2]);}
|
||
| ... | ... | |
|
}
|
||
|
} else {
|
||
|
option.val(filterValue).text(filterValue);
|
||
|
if ($.inArray(filterValue, values) > -1) {option.attr('selected', true);}
|
||
|
if ($.inArray(filterValue, values) > -1) {option.prop('selected', true);}
|
||
|
}
|
||
|
select.append(option);
|
||
|
}
|
||
| ... | ... | |
|
var filterValue = filterValues[i];
|
||
|
var option = $('<option>');
|
||
|
option.val(filterValue[1]).text(filterValue[0]);
|
||
|
if (values[0] == filterValue[1]) { option.attr('selected', true); }
|
||
|
if (values[0] == filterValue[1]) { option.prop('selected', true); }
|
||
|
select.append(option);
|
||
|
}
|
||
|
break;
|
||