Fix test for disabled elements.
This commit is contained in:
parent
6247674d71
commit
5a1232532d
|
@ -701,7 +701,6 @@
|
||||||
return _results;
|
return _results;
|
||||||
};
|
};
|
||||||
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
||||||
var _ref;
|
|
||||||
if (option.nodeName === "OPTION") {
|
if (option.nodeName === "OPTION") {
|
||||||
if (option.text !== "") {
|
if (option.text !== "") {
|
||||||
if (group_position != null) {
|
if (group_position != null) {
|
||||||
|
@ -713,9 +712,7 @@
|
||||||
value: option.value,
|
value: option.value,
|
||||||
text: option.text,
|
text: option.text,
|
||||||
selected: option.selected,
|
selected: option.selected,
|
||||||
disabled: (_ref = group_disabled === true) != null ? _ref : {
|
disabled: group_disabled === true ? group_disabled : option.disabled,
|
||||||
group_disabled: option.disabled
|
|
||||||
},
|
|
||||||
group_array_index: group_position
|
group_array_index: group_position
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -720,7 +720,6 @@
|
||||||
return _results;
|
return _results;
|
||||||
};
|
};
|
||||||
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
|
||||||
var _ref;
|
|
||||||
if (option.nodeName === "OPTION") {
|
if (option.nodeName === "OPTION") {
|
||||||
if (option.text !== "") {
|
if (option.text !== "") {
|
||||||
if (group_position != null) {
|
if (group_position != null) {
|
||||||
|
@ -732,9 +731,7 @@
|
||||||
value: option.value,
|
value: option.value,
|
||||||
text: option.text,
|
text: option.text,
|
||||||
selected: option.selected,
|
selected: option.selected,
|
||||||
disabled: (_ref = group_disabled === true) != null ? _ref : {
|
disabled: group_disabled === true ? group_disabled : option.disabled,
|
||||||
group_disabled: option.disabled
|
|
||||||
},
|
|
||||||
group_array_index: group_position
|
group_array_index: group_position
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -610,7 +610,7 @@ class SelectParser
|
||||||
value: option.value
|
value: option.value
|
||||||
text: option.text
|
text: option.text
|
||||||
selected: option.selected
|
selected: option.selected
|
||||||
disabled: ((group_disabled is true) ? group_disabled : option.disabled)
|
disabled: if group_disabled is true then group_disabled else option.disabled
|
||||||
group_array_index: group_position
|
group_array_index: group_position
|
||||||
else
|
else
|
||||||
@parsed.push
|
@parsed.push
|
||||||
|
|
|
@ -608,7 +608,7 @@ class SelectParser
|
||||||
value: option.value
|
value: option.value
|
||||||
text: option.text
|
text: option.text
|
||||||
selected: option.selected
|
selected: option.selected
|
||||||
disabled: ((group_disabled is true) ? group_disabled : option.disabled)
|
disabled: if group_disabled is true then group_disabled else option.disabled
|
||||||
group_array_index: group_position
|
group_array_index: group_position
|
||||||
else
|
else
|
||||||
@parsed.push
|
@parsed.push
|
||||||
|
|
Loading…
Reference in a new issue