mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2672] version manager fixes (#3169)
* fix app config, add extra flags for version manager * add docs and tests * update i18n strings * rename "id" to "nodeId" * automatically detect permissions * restore 'id' and mark as deprecated
This commit is contained in:
committed by
Eugenio Romano
parent
8b4af90b46
commit
aba9f41af1
@@ -17,14 +17,13 @@
|
||||
|
||||
import { Component, Input, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { ContentService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-version-upload',
|
||||
templateUrl: './version-upload.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: {
|
||||
'class': 'adf-version-upload'
|
||||
}
|
||||
host: { 'class': 'adf-version-upload' }
|
||||
})
|
||||
export class VersionUploadComponent {
|
||||
|
||||
@@ -32,17 +31,16 @@ export class VersionUploadComponent {
|
||||
node: MinimalNodeEntryEntity;
|
||||
|
||||
@Output()
|
||||
success: EventEmitter<any> = new EventEmitter();
|
||||
success = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter();
|
||||
error = new EventEmitter();
|
||||
|
||||
onUploadSuccess(event): void {
|
||||
this.success.emit(event);
|
||||
constructor(private contentService: ContentService) {
|
||||
}
|
||||
|
||||
onUploadError(event): void {
|
||||
this.error.emit(event);
|
||||
canUpload(): boolean {
|
||||
return this.contentService.hasPermission(this.node, 'update');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user