mirror of https://github.com/apache/nifi.git
NIFI-4497:
- Fixing issue preventing separators in sub context menus. This closes #2216 Signed-off-by: Scott Aslan <scottyaslan@gmail.com>
This commit is contained in:
parent
1a1e01c568
commit
b8a3862078
|
@ -704,7 +704,9 @@
|
||||||
|
|
||||||
// whether or not a group item should be included
|
// whether or not a group item should be included
|
||||||
var includeGroupItem = function (groupItem) {
|
var includeGroupItem = function (groupItem) {
|
||||||
if (groupItem.menuItem) {
|
if (groupItem.separator) {
|
||||||
|
return true;
|
||||||
|
} else if (groupItem.menuItem) {
|
||||||
return groupItem.condition(selection);
|
return groupItem.condition(selection);
|
||||||
} else {
|
} else {
|
||||||
var descendantItems = [];
|
var descendantItems = [];
|
||||||
|
@ -754,7 +756,12 @@
|
||||||
applicableGroupItems.push(groupItem);
|
applicableGroupItems.push(groupItem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
included = applicableGroupItems.length > 0;
|
|
||||||
|
// ensure the included menu items includes more than just separators
|
||||||
|
var includedMenuItems = $.grep(applicableGroupItems, function (gi) {
|
||||||
|
return nfCommon.isUndefinedOrNull(gi.separator);
|
||||||
|
});
|
||||||
|
included = includedMenuItems.length > 0;
|
||||||
if (included) {
|
if (included) {
|
||||||
addGroupItem(menu, i.id, i.groupMenuItem, applicableGroupItems);
|
addGroupItem(menu, i.id, i.groupMenuItem, applicableGroupItems);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue