mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
Eugenio Romano
parent
21ad4c2894
commit
ee9393caf0
@@ -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);
|
||||
|
Reference in New Issue
Block a user