2020.1

Table Of Contents
c.setupExample();
var $allRules;
/* Load Search Rules */
(function () {
var $temp = $("<div>");
$temp.load("snippets/rules.html", function (response,
status, xhr) {
var success = (status === "success");
if (success)
$allRules = $temp;
else
alert("Loading of Search Rules
Unsuccessful!\n\nUnable to load the search rules " +
"from the search rules template. Searching
is currently disabled.");
$("input[type='submit']").prop("disabled",
!success);
$("input[type='button']").prop("disabled",
!success);
});
}());
/* Common Load Rule Function */
function loadRule(ruleCategory, ruleName) {
var $rule = $allRules.find("#" + ruleCategory +
"-rules div.rule[id='" + ruleName + "']").clone();
/* Populate any Data Type References */
$rule.find("select[data-type]").each(function (index,
element) {
var $element = $(element),
dataType = $element.attr("data-type");
var options = $allRules
.find("#rule-data-types")
.find("#" + dataType + "-options")
.children();
$element
.empty()
.append(options.clone());
$element.val($element
Page 160