rem: if (xformsArrayContains(classes, "xforms-input")) {  for (var i = 0; i < element.childNodes.length; i++) elementsToUpdate.push(element.childNodes[i]); }  for (var i = 0; i < elementsToUpdate.length; i++) { if (required) { xformsAddClass(elementsToUpdate[i], "xforms-required"); if (element.value == "") { xformsAddClass(elementsToUpdate[i], "xforms-required-empty"); xformsRemoveClass(elementsToUpdate[i], "xforms-required-filled"); } else { xformsAddClass(elementsToUpdate[i], "xforms-required-filled"); xformsRemoveClass(elementsToUpdate[i], "xforms-required-empty"); } 
add: if (required) { xformsAddClass(element, "xforms-required"); if (element.value == "") { xformsAddClass(element, "xforms-required-empty"); xformsRemoveClass(element, "xforms-required-filled"); 
context:     function updateRelevantReadonly(element, relevant, readonly, required) {        if (xformsIsDefined(relevant)) {            if (relevant) xformsRemoveClass(element, "xforms-disabled")            else xformsAddClass(element, "xforms-disabled");        }        if (xformsIsDefined(readonly)) {            var classes = element.className.split(" ");            if (xformsArrayContains(classes, "xforms-input")) {                // XForms input                var displayValue = element.childNodes[0];                if (readonly) xformsAddClass(displayValue, "xforms-readonly");                else xformsRemoveClass(displayValue, "xforms-readonly");                var textField = element.childNodes[1];                if (readonly) textField.setAttribute("disabled", "disabled");                else textField.removeAttribute("disabled");                var showCalendar = element.childNodes[2];                if (readonly) xformsAddClass(showCalendar, "xforms-showcalendar-readonly");                else xformsRemoveClass(showCalendar, "xforms-showcalendar-readonly");            } else if (xformsArrayContains(classes, "xforms-output") || xformsArrayContains(classes, "xforms-group")) {                // XForms output and group                if (readonly) xformsAddClass(element, "xforms-readonly");                else xformsRemoveClass(element, "xforms-readonly");            } else {                // Other controls                if (readonly) element.setAttribute("disabled", "disabled");                else element.removeAttribute("disabled");            }        }        if (xformsIsDefined(required)) {            var elementsToUpdate = new Array(element);            var classes = element.className.split(" ");            if (xformsArrayContains(classes, "xforms-input")) {                // For inputs, update class on child elements as well                for (var i = 0; i < element.childNodes.length; i++)                    elementsToUpdate.push(element.childNodes[i]);            }            // Update class on elements            for (var i = 0; i < elementsToUpdate.length; i++) {                if (required) {                    xformsAddClass(elementsToUpdate[i], "xforms-required");                    if (element.value == "") {                        xformsAddClass(elementsToUpdate[i], "xforms-required-empty");                        xformsRemoveClass(elementsToUpdate[i], "xforms-required-filled");                    } else {                        xformsAddClass(elementsToUpdate[i], "xforms-required-filled");                        xformsRemoveClass(elementsToUpdate[i], "xforms-required-empty");                    }                } else {                    xformsRemoveClass(elementsToUpdate[i], "xforms-required");                    xformsRemoveClass(elementsToUpdate[i], "xforms-required-filled");                    xformsRemoveClass(elementsToUpdate[i], "xforms-required-empty");                }            }        }    }
meta: 9823	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9823/ccbe999ee3913f47130c19d7cee8a6bfc4ea251a/xforms-style.js/clean/src/examples/web/config/theme/javascript/xforms-style.js