[ADF-2053] improved search result adding refresh on delete (#2836)

* [ADF-2053] refreshed results when folder is deleted

* [ADF-2053] improved search result adding refresh on delete

* [ADF-2053] added missing whitespace
This commit is contained in:
Vito 2018-01-16 15:51:16 +01:00 committed by Maurizio Vitale
parent 66262c4822
commit 5d6af1af55
4 changed files with 11 additions and 1 deletions

View File

@ -222,6 +222,7 @@
[disableWithNoPermission]="true" [disableWithNoPermission]="true"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}" title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
(permissionEvent)="handlePermissionError($event)" (permissionEvent)="handlePermissionError($event)"
(success)="onDeleteActionSuccess($event)"
handler="delete"> handler="delete">
</content-action> </content-action>
<!-- document actions --> <!-- document actions -->

View File

@ -117,6 +117,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
@Output() @Output()
loadNext: EventEmitter<Pagination> = new EventEmitter(); loadNext: EventEmitter<Pagination> = new EventEmitter();
@Output()
deleteElementSuccess: EventEmitter<any> = new EventEmitter();
@ViewChild(DocumentListComponent) @ViewChild(DocumentListComponent)
documentList: DocumentListComponent; documentList: DocumentListComponent;
@ -308,6 +311,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
onDeleteActionSuccess(message) { onDeleteActionSuccess(message) {
this.uploadService.fileDeleted.next(message); this.uploadService.fileDeleted.next(message);
this.deleteElementSuccess.emit();
} }
onManageVersions(event) { onManageVersions(event) {

View File

@ -14,5 +14,6 @@
(changedPageNumber)="onRefreshPagination($event)" (changedPageNumber)="onRefreshPagination($event)"
(turnedNextPage)="onRefreshPagination($event)" (turnedNextPage)="onRefreshPagination($event)"
(loadNext)="onRefreshPagination($event)" (loadNext)="onRefreshPagination($event)"
(turnedPreviousPage)="onRefreshPagination($event)"> (turnedPreviousPage)="onRefreshPagination($event)"
(deleteElementSuccess)="onDeleteElementSuccess($event)">
</app-files-component> </app-files-component>

View File

@ -62,4 +62,8 @@ export class SearchResultComponent implements OnInit {
this.maxItems = pagination.maxItems; this.maxItems = pagination.maxItems;
this.skipCount = pagination.skipCount; this.skipCount = pagination.skipCount;
} }
onDeleteElementSuccess(element: any) {
this.search.reload();
}
} }