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