[ACS-721] Improve End/Cancel Editing UX (part 1) - implement single menu option & dialog (#6327)

* added the possibility to show/hide cancel&submit buttons and also to emit the changes without any buttons

* added new doc

* Added optional on variable models to avoid breaking changes (#6328)

Co-authored-by: Vito Albano <vitoalbano@vitoalbano-mbp-0120.local>

* added the possibility to show/hide cancel&submit buttons and also to emit the changes without any buttons

* added new doc

Co-authored-by: Vito <vito.albano@alfresco.com>
Co-authored-by: Vito Albano <vitoalbano@vitoalbano-mbp-0120.local>
This commit is contained in:
Urse Daniel
2020-11-10 12:18:33 +02:00
committed by GitHub
parent a9f9e18a1a
commit 53dcccd7cb
3 changed files with 70 additions and 3 deletions

View File

@@ -38,6 +38,12 @@ export class VersionUploadComponent {
@Input()
newFileVersion: File;
@Input()
showUploadButton: boolean = true;
@Input()
showCancelButton: boolean = true;
@Output()
success = new EventEmitter();
@@ -47,6 +53,12 @@ export class VersionUploadComponent {
@Output()
cancel = new EventEmitter();
@Output()
versionChanged = new EventEmitter<boolean>();
@Output()
commentChanged = new EventEmitter<string>();
constructor(private contentService: ContentService) {
}
@@ -62,4 +74,12 @@ export class VersionUploadComponent {
this.cancel.emit();
}
onVersionChange() {
this.versionChanged.emit(this.isMajorVersion());
}
onCommentChange() {
this.commentChanged.emit(this.comment);
}
}