Revision 9ea7c2f4
Added by Shimon Shtein over 8 years ago
app/assets/javascripts/application.js | ||
---|---|---|
}
|
||
|
||
item = $(item);
|
||
item.data('explicit', explicit);
|
||
item.attr('data-explicit', explicit);
|
||
var isActive = item.hasClass("active");
|
||
var formControl = item.closest('.input-group').find('.form-control');
|
||
if (!isActive) {
|
||
var blankValue = formControl.children("option[value='']");
|
||
if (blankValue.length == 0) {
|
||
$(item).data('no-blank', true);
|
||
$(item).attr('data-no-blank', true);
|
||
$(formControl).append("<option value='' />");
|
||
}
|
||
} else {
|
||
var blankAttr = item.data('no-blank');
|
||
var blankAttr = item.attr('data-no-blank');
|
||
if (blankAttr == 'true') {
|
||
$(formControl).children("[value='']").remove();
|
||
}
|
Also available in: Unified diff
Fixes #12659 - Fixed "inherit" behavior
Non-inherited attributes are now sent in the form data.
(cherry picked from commit 6f65fd179f07d7106d301dbe90108d00f5f91170)