bug 158435 r=ksosez sr=bz a=jesup

Page Info's label-control association is broken (should be by id).
This commit is contained in:
cbiesinger%web.de 2002-07-22 19:51:16 +00:00
Родитель 96ba730631
Коммит 3b7c66bb1a
1 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -386,16 +386,20 @@ function onFormSelect()
}
var labels = form.getElementsByTagName("label");
var llength = labels.length
var llength = labels.length;
for (i = 0; i < llength; i++)
{
var whatfor = labels[i].getAttribute("for") || findFirstControl(labels[i]);
var labeltext = getValueText(labels[i]);
var whatfor = labels[i].hasAttribute("for") ?
theDocument.getElementById(labels[i].getAttribute("for")) :
findFirstControl(labels[i]);
for(var j = 0; j < length; j++)
if (formfields[j] == whatfor || formfields[j].name == whatfor)
fieldView.setCellText(j, "field-label", labeltext);
if (whatfor && (whatfor.form == form)) {
var labeltext = getValueText(labels[i]);
for (var j = 0; j < length; j++)
if (formfields[j] == whatfor)
fieldView.setCellText(j, "field-label", labeltext);
}
}
fieldView.rowCountChanged(0, length);