add callback for VersionManagerComponent and VersionUploadComponent (#3008)

This commit is contained in:
Chen
2018-03-01 01:22:02 +07:00
committed by Eugenio Romano
parent 224dd17042
commit dc1a17686e
5 changed files with 52 additions and 9 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, Input, ViewEncapsulation } from '@angular/core';
import { Component, Input, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
@Component({
@@ -30,4 +30,20 @@ export class VersionUploadComponent {
@Input()
node: MinimalNodeEntryEntity;
@Output()
success: EventEmitter<any> = new EventEmitter();
@Output()
error: EventEmitter<any> = new EventEmitter();
onUploadSuccess(event): void {
this.success.emit(event);
}
onUploadError(event): void {
this.error.emit(event);
}
}