mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
[API] Miscellaneous platform updates
Adds miscellaneous platform updates to include templates via the RequireJS text plugin; to support modification of asset paths; and to support priority order for gestures. Supports integration of new API, #1124.
This commit is contained in:
parent
7439d949c4
commit
a93f41f1c3
@ -41,6 +41,7 @@ define([
|
||||
"text!./res/templates/items/items.html",
|
||||
"text!./res/templates/browse/object-properties.html",
|
||||
"text!./res/templates/browse/inspector-region.html",
|
||||
"text!./res/templates/view-object.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
BrowseController,
|
||||
@ -63,6 +64,7 @@ define([
|
||||
itemsTemplate,
|
||||
objectPropertiesTemplate,
|
||||
inspectorRegionTemplate,
|
||||
viewObjectTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
|
||||
@ -142,7 +144,7 @@ define([
|
||||
"representations": [
|
||||
{
|
||||
"key": "view-object",
|
||||
"templateUrl": "templates/view-object.html"
|
||||
"template": viewObjectTemplate
|
||||
},
|
||||
{
|
||||
"key": "browse-object",
|
||||
|
@ -48,6 +48,7 @@ define([
|
||||
"./src/directives/MCTSplitPane",
|
||||
"./src/directives/MCTSplitter",
|
||||
"./src/directives/MCTTree",
|
||||
"./src/filters/ReverseFilter.js",
|
||||
"text!./res/templates/bottombar.html",
|
||||
"text!./res/templates/controls/action-button.html",
|
||||
"text!./res/templates/controls/input-filter.html",
|
||||
@ -96,6 +97,7 @@ define([
|
||||
MCTSplitPane,
|
||||
MCTSplitter,
|
||||
MCTTree,
|
||||
ReverseFilter,
|
||||
bottombarTemplate,
|
||||
actionButtonTemplate,
|
||||
inputFilterTemplate,
|
||||
@ -146,7 +148,8 @@ define([
|
||||
"depends": [
|
||||
"stylesheets[]",
|
||||
"$document",
|
||||
"THEME"
|
||||
"THEME",
|
||||
"ASSETS_PATH"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -158,7 +161,7 @@ define([
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"implementation": "filters/ReverseFilter.js",
|
||||
"implementation": ReverseFilter,
|
||||
"key": "reverse"
|
||||
}
|
||||
],
|
||||
@ -405,6 +408,11 @@ define([
|
||||
"key": "THEME",
|
||||
"value": "unspecified",
|
||||
"priority": "fallback"
|
||||
},
|
||||
{
|
||||
"key": "ASSETS_PATH",
|
||||
"value": ".",
|
||||
"priority": "fallback"
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
|
@ -38,7 +38,7 @@ define(
|
||||
* @param $document Angular's jqLite-wrapped document element
|
||||
* @param {string} activeTheme the theme in use
|
||||
*/
|
||||
function StyleSheetLoader(stylesheets, $document, activeTheme) {
|
||||
function StyleSheetLoader(stylesheets, $document, activeTheme, assetPath) {
|
||||
var head = $document.find('head'),
|
||||
document = $document[0];
|
||||
|
||||
@ -47,6 +47,7 @@ define(
|
||||
// Create a link element, and construct full path
|
||||
var link = document.createElement('link'),
|
||||
path = [
|
||||
assetPath,
|
||||
stylesheet.bundle.path,
|
||||
stylesheet.bundle.resources,
|
||||
stylesheet.stylesheetUrl
|
||||
|
@ -42,11 +42,19 @@ define(
|
||||
function addWorker(worker) {
|
||||
var key = worker.key;
|
||||
if (!workerUrls[key]) {
|
||||
workerUrls[key] = [
|
||||
worker.bundle.path,
|
||||
worker.bundle.sources,
|
||||
worker.scriptUrl
|
||||
].join("/");
|
||||
if (worker.scriptUrl) {
|
||||
workerUrls[key] = [
|
||||
worker.bundle.path,
|
||||
worker.bundle.sources,
|
||||
worker.scriptUrl
|
||||
].join("/");
|
||||
} else if (worker.scriptText) {
|
||||
var blob = new Blob(
|
||||
[worker.scriptText],
|
||||
{type: 'application/javascript'}
|
||||
);
|
||||
workerUrls[key] = URL.createObjectURL(blob);
|
||||
}
|
||||
sharedWorkers[key] = worker.shared;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,9 @@ define([
|
||||
"./src/controllers/TableOptionsController",
|
||||
'../../commonUI/regions/src/Region',
|
||||
'../../commonUI/browse/src/InspectorRegion',
|
||||
"text!./res/templates/table-options-edit.html",
|
||||
"text!./res/templates/rt-table.html",
|
||||
"text!./res/templates/historical-table.html",
|
||||
"legacyRegistry"
|
||||
], function (
|
||||
MCTTable,
|
||||
@ -35,6 +38,9 @@ define([
|
||||
TableOptionsController,
|
||||
Region,
|
||||
InspectorRegion,
|
||||
tableOptionsEditTemplate,
|
||||
rtTableTemplate,
|
||||
historicalTableTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
/**
|
||||
@ -127,8 +133,8 @@ define([
|
||||
{
|
||||
"name": "Historical Table",
|
||||
"key": "table",
|
||||
"template": historicalTableTemplate,
|
||||
"cssclass": "icon-tabular",
|
||||
"templateUrl": "templates/historical-table.html",
|
||||
"needs": [
|
||||
"telemetry"
|
||||
],
|
||||
@ -139,7 +145,7 @@ define([
|
||||
"name": "Real-time Table",
|
||||
"key": "rt-table",
|
||||
"cssclass": "icon-tabular-realtime",
|
||||
"templateUrl": "templates/rt-table.html",
|
||||
"templateUrl": rtTableTemplate,
|
||||
"needs": [
|
||||
"telemetry"
|
||||
],
|
||||
@ -157,7 +163,7 @@ define([
|
||||
"representations": [
|
||||
{
|
||||
"key": "table-options-edit",
|
||||
"templateUrl": "templates/table-options-edit.html"
|
||||
"template": tableOptionsEditTemplate
|
||||
}
|
||||
],
|
||||
"stylesheets": [
|
||||
|
@ -72,7 +72,7 @@ define(
|
||||
|
||||
// Assemble all gestures into a map, for easy look up
|
||||
gestures.forEach(function (gesture) {
|
||||
gestureMap[gesture.key] = gesture;
|
||||
gestureMap[gesture.key] = gestureMap[gesture.key] || gesture;
|
||||
});
|
||||
|
||||
this.gestureMap = gestureMap;
|
||||
|
@ -28,6 +28,7 @@ define([
|
||||
"text!./res/templates/search-item.html",
|
||||
"text!./res/templates/search.html",
|
||||
"text!./res/templates/search-menu.html",
|
||||
"text!./src/services/GenericSearchWorker.js",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
SearchController,
|
||||
@ -37,6 +38,7 @@ define([
|
||||
searchItemTemplate,
|
||||
searchTemplate,
|
||||
searchMenuTemplate,
|
||||
searchWorkerText,
|
||||
legacyRegistry
|
||||
) {
|
||||
|
||||
@ -114,7 +116,7 @@ define([
|
||||
"workers": [
|
||||
{
|
||||
"key": "genericSearchWorker",
|
||||
"scriptUrl": "services/GenericSearchWorker.js"
|
||||
"scriptText": searchWorkerText
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user