1.7

Table Of Contents
var $available = $target
.closest("div.rule-body")
.find(":visible input.use-
option"),
checked = 0;
$available.each(function (index, check) {
var $check = $(check);
$check.removeAttr("required");
if ($check.is(":checked")) { checked++; }
});
if (checked < 1) {
$target.attr("required", "required");
}
}
};
/** Process Search Rule Function */
function processSearchRule($rules) {
var rules = [];
$rules
.children("div.rule")
.each(function (index, element) {
var type = element.id,
$body = $(element).children("div.rule-
body"),
rule = { "type": type };
if (type === "IN" || type === "NOT IN") {
var json = c.plainIDListToJson($body
.find
("div>#identifiers")
.val());
rule.identifiers = json.identifiers;
} else if (type === "templatename") {
rule.template = $body
.find("div>#template")
.val();
rule.condition = $body
.find("div>#condition")
.val();
} else if (type === "finishing") {
$body
.find(":visible :input")
.each(function (index, element) {
Page 129