[ADF-2120] added page size retrieving from user preference on demo shell (#2837)

This commit is contained in:
Vito
2018-01-16 17:39:36 +01:00
committed by Eugenio Romano
parent 5d6af1af55
commit f4684f68be
2 changed files with 3 additions and 0 deletions

View File

@@ -275,6 +275,7 @@
*ngIf="!infiniteScrolling" *ngIf="!infiniteScrolling"
class="adf-documentlist-pagination" class="adf-documentlist-pagination"
[target]="documentList" [target]="documentList"
[supportedPageSizes]="supportedPages"
(changePageSize)="onChangePageSize($event)" (changePageSize)="onChangePageSize($event)"
(changePageNumber)="onChangePageNumber($event)" (changePageNumber)="onChangePageNumber($event)"
(nextPage)="onNextPage($event)" (nextPage)="onNextPage($event)"

View File

@@ -128,6 +128,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
permissionsStyle: PermissionStyleModel[] = []; permissionsStyle: PermissionStyleModel[] = [];
infiniteScrolling: boolean; infiniteScrolling: boolean;
supportedPages: number[];
private onCreateFolder: Subscription; private onCreateFolder: Subscription;
private onEditFolder: Subscription; private onEditFolder: Subscription;
@@ -185,6 +186,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value)); this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value));
this.onCreateFolder = this.contentService.folderCreate.subscribe(value => this.onFolderAction(value)); this.onCreateFolder = this.contentService.folderCreate.subscribe(value => this.onFolderAction(value));
this.onEditFolder = this.contentService.folderEdit.subscribe(value => this.onFolderAction(value)); this.onEditFolder = this.contentService.folderEdit.subscribe(value => this.onFolderAction(value));
this.supportedPages = this.preference.getDifferentPageSizes();
// this.permissionsStyle.push(new PermissionStyleModel('document-list__create', PermissionsEnum.CREATE)); // this.permissionsStyle.push(new PermissionStyleModel('document-list__create', PermissionsEnum.CREATE));
// this.permissionsStyle.push(new PermissionStyleModel('document-list__disable', PermissionsEnum.NOT_CREATE, false, true)); // this.permissionsStyle.push(new PermissionStyleModel('document-list__disable', PermissionsEnum.NOT_CREATE, false, true));