[APM-7] Feature enhancement for the create and edit folder directive (#3179)

* Add observable menu open state to the sidenav-layout component

* add documentation, fix inversed value

* Add success events to folder create/edit directives

* Overridable dialog titles for the directives

* Update the documentation
This commit is contained in:
Popovics András
2018-04-17 20:27:42 +01:00
committed by Eugenio Romano
parent 21ad4c2894
commit ee9393caf0
12 changed files with 569 additions and 242 deletions

View File

@@ -39,6 +39,12 @@ export class FolderEditDirective {
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
@Input()
title: string = null;
@Output()
success: EventEmitter<MinimalNodeEntryEntity> = new EventEmitter<MinimalNodeEntryEntity>();
@HostListener('click', [ '$event' ])
onClick(event) {
event.preventDefault();
@@ -58,7 +64,10 @@ export class FolderEditDirective {
const { folder } = this;
return {
data: { folder },
data: {
folder,
editTitle: this.title
},
width: `${width}px`
};
}
@@ -71,6 +80,10 @@ export class FolderEditDirective {
this.error.emit(error);
});
dialogInstance.componentInstance.success.subscribe((node: MinimalNodeEntryEntity) => {
this.success.emit(node);
});
dialogInstance.afterClosed().subscribe((node: MinimalNodeEntryEntity) => {
if (node) {
content.folderEdit.next(node);