mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Views] Repair view registry for mainViews (#1308)
* [Views] Rewrite mct-view ...to make it a simple way to include non-Angular views, without integrating unnecessarily with other architectural concerns. Supports restoration of view registration functionality to fix #1307 * [API] Use identifier as property name * [API] Add adapter capability ...to simplify adapter layer (allowing new-style objects to be retrieved via capability.) * [API] Add AdaptedViewController * [API] Add template for adapted views * [API] Add AdaptedViewPolicy * [API] Wire in view adapter * [API] Fix adapter capability implementation * [API] Don't create new scope from mct-view ...to allow use on same element as ng-controller (and because a new scope just is not necessary.)
This commit is contained in:
committed by
Pete Richards
parent
025b69541e
commit
547696d797
@ -23,31 +23,51 @@
|
||||
define([
|
||||
'legacyRegistry',
|
||||
'./actions/ActionDialogDecorator',
|
||||
'./capabilities/AdapterCapability',
|
||||
'./controllers/AdaptedViewController',
|
||||
'./directives/MCTView',
|
||||
'./services/Instantiate',
|
||||
'./services/MissingModelCompatibilityDecorator',
|
||||
'./capabilities/APICapabilityDecorator',
|
||||
'./policies/AdapterCompositionPolicy',
|
||||
'./runs/AlternateCompositionInitializer'
|
||||
'./policies/AdaptedViewPolicy',
|
||||
'./runs/AlternateCompositionInitializer',
|
||||
'text!./templates/adapted-view-template.html'
|
||||
], function (
|
||||
legacyRegistry,
|
||||
ActionDialogDecorator,
|
||||
AdapterCapability,
|
||||
AdaptedViewController,
|
||||
MCTView,
|
||||
Instantiate,
|
||||
MissingModelCompatibilityDecorator,
|
||||
APICapabilityDecorator,
|
||||
AdapterCompositionPolicy,
|
||||
AlternateCompositionInitializer
|
||||
AdaptedViewPolicy,
|
||||
AlternateCompositionInitializer,
|
||||
adaptedViewTemplate
|
||||
) {
|
||||
legacyRegistry.register('src/adapter', {
|
||||
"extensions": {
|
||||
"directives": [
|
||||
{
|
||||
key: "mctView",
|
||||
implementation: MCTView,
|
||||
implementation: MCTView
|
||||
}
|
||||
],
|
||||
capabilities: [
|
||||
{
|
||||
key: "adapter",
|
||||
implementation: AdapterCapability
|
||||
}
|
||||
],
|
||||
controllers: [
|
||||
{
|
||||
key: "AdaptedViewController",
|
||||
implementation: AdaptedViewController,
|
||||
depends: [
|
||||
"newViews[]",
|
||||
"openmct"
|
||||
'$scope',
|
||||
'openmct'
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -90,6 +110,11 @@ define([
|
||||
category: "composition",
|
||||
implementation: AdapterCompositionPolicy,
|
||||
depends: ["openmct"]
|
||||
},
|
||||
{
|
||||
category: "view",
|
||||
implementation: AdaptedViewPolicy,
|
||||
depends: ["openmct"]
|
||||
}
|
||||
],
|
||||
runs: [
|
||||
@ -98,6 +123,12 @@ define([
|
||||
depends: ["openmct"]
|
||||
}
|
||||
],
|
||||
views: [
|
||||
{
|
||||
key: "adapted-view",
|
||||
template: adaptedViewTemplate
|
||||
}
|
||||
],
|
||||
licenses: [
|
||||
{
|
||||
"name": "almond",
|
||||
|
Reference in New Issue
Block a user