[ADF-2734] added the listner for user preference supported page to th… (#3201)

* [ADF-2734] added the listner for user preference supported page to the trashcan

* [ADF-2734] revert changes on app.config

* [ADF-2734] added missing whitespace
This commit is contained in:
Vito
2018-04-16 21:05:24 +01:00
committed by Eugenio Romano
parent a6b8e16391
commit fc22c2a4c8
2 changed files with 11 additions and 0 deletions

View File

@@ -92,6 +92,7 @@
</adf-document-list> </adf-document-list>
<adf-pagination [ngClass]="{ 'no-border' : documentList.isEmpty()}" <adf-pagination [ngClass]="{ 'no-border' : documentList.isEmpty()}"
[supportedPageSizes]="supportedPages"
[target]="documentList"> [target]="documentList">
</adf-pagination> </adf-pagination>
</div> </div>

View File

@@ -25,6 +25,7 @@
import { Component, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { DocumentListComponent } from '@alfresco/adf-content-services'; import { DocumentListComponent } from '@alfresco/adf-content-services';
import { UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core';
@Component({ @Component({
templateUrl: './trashcan.component.html', templateUrl: './trashcan.component.html',
@@ -35,6 +36,15 @@ export class TrashcanComponent {
@ViewChild('documentList') @ViewChild('documentList')
documentList: DocumentListComponent; documentList: DocumentListComponent;
supportedPages = [];
constructor(private preference: UserPreferencesService) {
this.preference.select(UserPreferenceValues.SupportedPageSizes)
.subscribe((pages) => {
this.supportedPages = pages;
});
}
refresh() { refresh() {
this.documentList.reload(); this.documentList.reload();
this.documentList.resetSelection(); this.documentList.resetSelection();