mirror of https://github.com/apache/cloudstack.git
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:
parent
347ac311a0
commit
977123be36
|
|
@ -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>')
|
||||
|
|
|
|||
Loading…
Reference in New Issue