mirror of
https://github.com/nasa/openmct.git
synced 2025-04-20 09:01:14 +00:00
[Create] Add category for create actions
This commit is contained in:
parent
af5449b78f
commit
f8e0dbd5b7
@ -53,11 +53,12 @@ define(
|
||||
*/
|
||||
function CreateAction(type, parent, context, dialogService, creationService, policyService) {
|
||||
this.metadata = {
|
||||
key: 'create',
|
||||
key: 'create.' + type.getKey(),
|
||||
glyph: type.getGlyph(),
|
||||
name: type.getName(),
|
||||
type: type.getKey(),
|
||||
description: type.getDescription(),
|
||||
category: [ 'creation' ],
|
||||
context: context
|
||||
};
|
||||
|
||||
|
@ -63,7 +63,10 @@ define(
|
||||
// domain object to serve as the container for the
|
||||
// newly-created object (although the user may later
|
||||
// make a different selection)
|
||||
if (key !== 'create' || !destination) {
|
||||
if (!destination) {
|
||||
return [];
|
||||
}
|
||||
if (context.category && context.category !== "creation") {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ define(
|
||||
// Update the set of Create actions
|
||||
function refreshActions() {
|
||||
$scope.createActions = $scope.action ?
|
||||
$scope.action.getActions('create') :
|
||||
$scope.action.getActions({ category: "creation" }) :
|
||||
[];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user