mirror of
https://github.com/nasa/openmct.git
synced 2025-02-12 05:35:56 +00:00
[Tree] Show top-level node of tree, except root
Show top-level nodes when instantiating tree views, except for the Root object. Supports Add dialogs in WTD-922.
This commit is contained in:
parent
d863c2843c
commit
c7149437fc
@ -150,12 +150,17 @@
|
|||||||
"representations": [
|
"representations": [
|
||||||
{
|
{
|
||||||
"key": "tree",
|
"key": "tree",
|
||||||
"templateUrl": "templates/tree.html",
|
"templateUrl": "templates/subtree.html",
|
||||||
|
"uses": [ "composition" ],
|
||||||
"type": "root",
|
"type": "root",
|
||||||
"priority": "preferred"
|
"priority": "preferred"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "tree",
|
"key": "tree",
|
||||||
|
"templateUrl": "templates/tree.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "subtree",
|
||||||
"templateUrl": "templates/subtree.html",
|
"templateUrl": "templates/subtree.html",
|
||||||
"uses": [ "composition" ]
|
"uses": [ "composition" ]
|
||||||
},
|
},
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
ng-show="toggle.isActive()"
|
ng-show="toggle.isActive()"
|
||||||
ng-if="model.composition !== undefined">
|
ng-if="model.composition !== undefined">
|
||||||
|
|
||||||
<mct-representation key="'tree'"
|
<mct-representation key="'subtree'"
|
||||||
ng-model="ngModel"
|
ng-model="ngModel"
|
||||||
mct-object="treeNode.hasBeenExpanded() && domainObject">
|
mct-object="treeNode.hasBeenExpanded() && domainObject">
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
|
@ -115,6 +115,11 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key": "root",
|
||||||
|
"name": "Root",
|
||||||
|
"glyph": "F"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key": "folder",
|
"key": "folder",
|
||||||
"name": "Folder",
|
"name": "Folder",
|
||||||
|
@ -37,7 +37,7 @@ define(
|
|||||||
|
|
||||||
// Assemble all representations and views
|
// Assemble all representations and views
|
||||||
// The distinction between views and representations is
|
// The distinction between views and representations is
|
||||||
// not important her (view is-a representation)
|
// not important here (view is-a representation)
|
||||||
representations.concat(views).forEach(function (representation) {
|
representations.concat(views).forEach(function (representation) {
|
||||||
var key = representation.key;
|
var key = representation.key;
|
||||||
|
|
||||||
@ -78,8 +78,8 @@ define(
|
|||||||
// Populate scope with any capabilities indicated by the
|
// Populate scope with any capabilities indicated by the
|
||||||
// representation's extension definition
|
// representation's extension definition
|
||||||
function refreshCapabilities() {
|
function refreshCapabilities() {
|
||||||
var representation = representationMap[$scope.key],
|
var domainObject = $scope.domainObject,
|
||||||
domainObject = $scope.domainObject,
|
representation = lookup($scope.key, domainObject),
|
||||||
uses = ((representation || {}).uses || []);
|
uses = ((representation || {}).uses || []);
|
||||||
|
|
||||||
if (domainObject) {
|
if (domainObject) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user