mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
upload version refresh (#3021)
This commit is contained in:
@@ -52,7 +52,7 @@ export class VersionListComponent implements OnChanges {
|
|||||||
.then(this.loadVersionHistory.bind(this));
|
.then(this.loadVersionHistory.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
private loadVersionHistory() {
|
loadVersionHistory() {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.versionsApi.listVersionHistory(this.id).then((data) => {
|
this.versionsApi.listVersionHistory(this.id).then((data) => {
|
||||||
this.versions = data.list.entries;
|
this.versions = data.list.entries;
|
||||||
|
@@ -2,5 +2,5 @@
|
|||||||
<adf-version-upload [node]="node" (success)="onUploadSuccess($event)" (error)="onUploadError($event)"></adf-version-upload>
|
<adf-version-upload [node]="node" (success)="onUploadSuccess($event)" (error)="onUploadError($event)"></adf-version-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="adf-version-list-container">
|
<div class="adf-version-list-container">
|
||||||
<adf-version-list [id]="node.id"></adf-version-list>
|
<adf-version-list #versionList [id]="node.id"></adf-version-list>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -15,8 +15,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, ViewEncapsulation, ViewChild, Output, EventEmitter } from '@angular/core';
|
||||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||||
|
import { VersionListComponent } from './version-list.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-version-manager',
|
selector: 'adf-version-manager',
|
||||||
@@ -35,7 +36,11 @@ export class VersionManagerComponent {
|
|||||||
@Output()
|
@Output()
|
||||||
uploadError: EventEmitter<any> = new EventEmitter();
|
uploadError: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
|
@ViewChild('versionList')
|
||||||
|
versionListComponent: VersionListComponent;
|
||||||
|
|
||||||
onUploadSuccess(event): void {
|
onUploadSuccess(event): void {
|
||||||
|
this.versionListComponent.loadVersionHistory();
|
||||||
this.uploadSuccess.emit(event);
|
this.uploadSuccess.emit(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user