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.
This commit is contained in:
Brian Federle 2012-12-20 13:26:28 -08:00
parent 347ac311a0
commit 977123be36
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@
$.each(args.sections, function(sectionID, args) {
if (preFilter && $.inArray(sectionID, preFilter) == -1) {
return true;
if (!(args.preFilter && args.preFilter())) {
return true;
}
}
var $li = $('<li>')