2019.2

Table Of Contents
/* 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) {
var $child = $(element),
id = $child.attr("id");
if (id !== undefined &&
!$child.prop("disabled"))
if (id === "duplex")
rule[id] = $child.prop
("checked");
else if (id !== "finishing-
type" && id !== "remove-rule")
rule[id] = $child.val();
});
} else if (type === "group") {
rule = {
"operator": $body
.children("div")
.children("#operator")
Page 165