[Create] Add category for create actions

This commit is contained in:
Victor Woeltjen 2015-10-08 14:12:36 -07:00
parent af5449b78f
commit f8e0dbd5b7
3 changed files with 7 additions and 3 deletions

View File

@ -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
};

View File

@ -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 [];
}

View File

@ -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" }) :
[];
}