2021.1

Table Of Contents
incompatible = {},
reconfigure = {};
categories.forEach(function (category) {
options[category] = [];
$("fieldset#" + category)
.find("#rule-type")
.children("option")
.each(function (index, option) {
var $option = $(option),
allClazz = $entity.attr("id") + "-
";
if ($option.hasClass(allClazz) ||
$option.hasClass(allClazz +
$entity.val()))
options[category].push($option.val
());
});
});
/**
* Prompt User & Remove any Existing Rules that are
* incompatible with currently Entity type selected
*/
categories.forEach(function (category) {
$("fieldset#" + category)
.children("div#RULESET")
.find("div.rule")
.each(function (index, rule) {
if ($.inArray(rule.id, options
[category]) < 0) {
if (incompatible[category] ===
undefined)
incompatible[category] = [];
incompatible[category].push(index);
} else
$entity
.children("option")
.toArray()
.map(function (option) {
return $(option).val();
}).forEach(function (entity) {
Page 203