Fix test for disabled elements.

This commit is contained in:
Patrick Filler 2011-07-19 17:01:41 -04:00
parent 6247674d71
commit 5a1232532d
4 changed files with 4 additions and 10 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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

View file

@ -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