Skip to content

Commit 977123b

Browse files
committed
UI sections: Support per-section pre-filter
In addition to the main sectionPreFilter in the cloudStack UI, allow a per-section 'preFilter' which is called if the navigation section is not returned in sectionPreFilter. This is used primarily to support plugin sections which will not be displayed by default.
1 parent 347ac31 commit 977123b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ui/scripts/ui/core.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040

4141
$.each(args.sections, function(sectionID, args) {
4242
if (preFilter && $.inArray(sectionID, preFilter) == -1) {
43-
return true;
43+
if (!(args.preFilter && args.preFilter())) {
44+
return true;
45+
}
4446
}
4547

4648
var $li = $('<li>')

0 commit comments

Comments
 (0)