add possible future configurability display mode document list and datatable (#2998)

This commit is contained in:
Eugenio Romano
2018-02-26 03:04:19 +00:00
committed by GitHub
parent 76cf4f178e
commit 97a10bde78
10 changed files with 54 additions and 35 deletions

View File

@@ -9,7 +9,7 @@
[rowStyle]="rowStyle"
[rowStyleClass]="rowStyleClass"
[loading]="loading"
[cardview]="cardview"
[display]="display"
[noPermission]="noPermission"
[showHeader]="!isEmpty() && showHeader"
(showRowContextMenu)="onShowRowContextMenu($event)"

View File

@@ -220,7 +220,7 @@ describe('DocumentList', () => {
});
it('should use the cardview style if cardview is true', (done) => {
documentList.cardview = true;
documentList.display = 'gallery';
fixture.detectChanges();
@@ -232,7 +232,7 @@ describe('DocumentList', () => {
});
it('should use the base document list style if cardview is false', (done) => {
documentList.cardview = false;
documentList.display = 'list';
fixture.detectChanges();

View File

@@ -21,6 +21,7 @@ import {
DataRowActionEvent,
DataSorting,
DataTableComponent,
DisplayMode,
ObjectDataColumn,
PaginatedComponent,
PaginationQueryParams
@@ -71,9 +72,9 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
/* Enable the cardview mode */
/* change the display mode of the table list or gallery */
@Input()
cardview: boolean = false;
display: string = DisplayMode.List;
/** Define a set of CSS styles styles to apply depending on the permission
* of the user on that node. See the Permission Style model