[ACA-1490] Enable CardView (#491)

* integrate carview

* experimental cardview

* fix tests

* fix spellcheck error
This commit is contained in:
Suzana Dirla
2018-07-05 14:29:30 +03:00
committed by Denys Vuika
parent 9b10cea98e
commit e5bc3bb755
17 changed files with 82 additions and 8 deletions

View File

@@ -24,7 +24,7 @@
*/
import { DocumentListComponent, ShareDataRow } from '@alfresco/adf-content-services';
import { FileUploadErrorEvent } from '@alfresco/adf-core';
import { DisplayMode, FileUploadErrorEvent } from '@alfresco/adf-core';
import { OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Store } from '@ngrx/store';
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
@@ -46,6 +46,7 @@ export abstract class PageComponent implements OnInit, OnDestroy {
infoDrawerOpened = false;
node: MinimalNodeEntryEntity;
selection: SelectionState;
displayMode = DisplayMode.List;
protected subscriptions: Subscription[] = [];
@@ -134,4 +135,9 @@ export abstract class PageComponent implements OnInit, OnDestroy {
this.store.dispatch(action);
}
toggleGalleryView(): void {
this.displayMode = this.displayMode === DisplayMode.List ? DisplayMode.Gallery : DisplayMode.List;
this.documentList.display = this.displayMode;
}
}