Bug 720058 - Follow up for review comments. r=bnicholson

This commit is contained in:
Wes Johnston 2012-01-25 02:34:09 +01:00
parent 54f0eed49e
commit 38dd91e9be

View File

@ -2838,16 +2838,17 @@ var FormAssistant = {
}
this.forOptions(aElement, function(aNode, aIndex) {
result.listitems[aIndex] = {
let item = {
label: aNode.text || aNode.label,
isGroup: this._isOptionGroupElement(aNode),
inGroup: this._isOptionGroupElement(aNode.parentNode),
disabled: aNode.disabled,
id: aIndex
}
if (result.listitems[aIndex].inGroup)
result.listitems[aIndex].disabled = result.listitems[aIndex].disabled || aNode.parentNode.disabled;
if (item.inGroup)
item.disabled = item.disabled || aNode.parentNode.disabled;
result.listitems[aIndex] = item;
result.selected[aIndex] = aNode.selected;
});
return result;