mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 05:08:15 +00:00
[About] Support priority from mct-include
Support priority ordering from the mct-include directive (such that the highest-priority template for a given key is what gets included.) Needed to support variations among application logos in the bottom right (depending on deployment.) WTD-667.
This commit is contained in:
@ -37,12 +37,14 @@ define(
|
|||||||
|
|
||||||
// Prepopulate templateMap for easy look up by key
|
// Prepopulate templateMap for easy look up by key
|
||||||
templates.forEach(function (template) {
|
templates.forEach(function (template) {
|
||||||
var path = [
|
var key = template.key,
|
||||||
template.bundle.path,
|
path = [
|
||||||
template.bundle.resources,
|
template.bundle.path,
|
||||||
template.templateUrl
|
template.bundle.resources,
|
||||||
].join("/");
|
template.templateUrl
|
||||||
templateMap[template.key] = path;
|
].join("/");
|
||||||
|
// First found should win (priority ordering)
|
||||||
|
templateMap[key] = templateMap[key] || path;
|
||||||
});
|
});
|
||||||
|
|
||||||
function controller($scope) {
|
function controller($scope) {
|
||||||
|
Reference in New Issue
Block a user