Create Folder directive enhancement: custom nodeType (#3214)

This commit is contained in:
Popovics András
2018-04-19 13:03:38 +01:00
committed by Eugenio Romano
parent 0ff0573401
commit deb09e4d5f
7 changed files with 138 additions and 72 deletions

View File

@@ -38,6 +38,9 @@ export class FolderCreateDirective {
@Input()
title: string = null;
@Input()
nodeType = 'cm:folder';
/** Emitted when the create folder give error for example a folder with same name already exist */
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
@@ -58,13 +61,10 @@ export class FolderCreateDirective {
private get dialogConfig(): MatDialogConfig {
const { DIALOG_WIDTH: width } = FolderCreateDirective;
const { parentNodeId } = this;
const { parentNodeId, title: createTitle, nodeType } = this;
return {
data: {
parentNodeId,
createTitle: this.title
},
data: { parentNodeId, createTitle, nodeType },
width: `${width}px`
};
}