[ADF-2567] delete a version (#3151)

* configuration support for version manager

* checkbox for version deletion demo

* i18n support for version manager

* deleting versions

* confirmation dialog for version deletion

* readme update

* update schema

* update code as per code review

* update i18n resources for demo shell

* unit tests
This commit is contained in:
Denys Vuika
2018-04-06 18:40:17 +01:00
committed by GitHub
parent 313d7f30cf
commit 5325fd4cd4
19 changed files with 285 additions and 43 deletions

View File

@@ -18,6 +18,7 @@
import { Component, Input, ViewEncapsulation, ViewChild, Output, EventEmitter } from '@angular/core';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { VersionListComponent } from './version-list.component';
import { AppConfigService } from '@alfresco/adf-core';
@Component({
selector: 'adf-version-manager',
@@ -31,20 +32,29 @@ export class VersionManagerComponent {
node: MinimalNodeEntryEntity;
@Input()
showComments: boolean = true;
allowDelete = true;
@Input()
enableDownload: boolean = true;
showComments = true;
@Input()
allowDownload = true;
@Output()
uploadSuccess: EventEmitter<any> = new EventEmitter();
uploadSuccess = new EventEmitter();
@Output()
uploadError: EventEmitter<any> = new EventEmitter();
uploadError = new EventEmitter();
@ViewChild('versionList')
versionListComponent: VersionListComponent;
constructor(config: AppConfigService) {
this.allowDelete = config.get('adf-version-manager.allowDelete', true);
this.showComments = config.get('adf-version-manager.allowComments', true);
this.allowDownload = config.get('adf-version-manager.allowDownload', true);
}
onUploadSuccess(event): void {
this.versionListComponent.loadVersionHistory();
this.uploadSuccess.emit(event);