[ADF-2421] Unable to copy / move a file from Recent or Favorites when user has only granular permissions on the file (#3041)

* [ADF-2421] Unable to copy / move a file from Recent or Favorites when user has only granular permissions on the file

* [ADF-2421] refactor code

* [ADF-2421] refactor to simplify code
This commit is contained in:
suzanadirla
2018-03-08 12:58:35 +02:00
committed by Eugenio Romano
parent 499c3cd66e
commit f8f79b3f31
2 changed files with 35 additions and 0 deletions

View File

@@ -337,6 +337,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
} else if (this.data) {
if (changes.node && changes.node.currentValue) {
this.resetSelection();
this.data.loadPage(changes.node.currentValue);
this.pagination.next(changes.node.currentValue.list.pagination);
} else if (changes.rowFilter) {
@@ -557,6 +558,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
loadFolderNodesByFolderNodeId(id: string, maxItems: number, skipCount: number, merge: boolean = false): Promise<any> {
return new Promise((resolve, reject) => {
this.resetSelection();
this.documentListService
.getFolder(null, {
maxItems: maxItems,
@@ -581,6 +583,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
resetSelection() {
this.dataTable.resetSelection();
this.selection = [];
this.noPermission = false;
}
private isSkipCountChanged(changePage: SimpleChanges) {