mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix demo shell gallery view switch (#3413)
This commit is contained in:
@@ -309,7 +309,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFolderChange($event) {
|
onFolderChange($event) {
|
||||||
this.router.navigate(['/files', $event.value.id]);
|
this.router.navigate(['/files', $event.value.id, 'display', this.displayMode]);
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePermissionError(event: any) {
|
handlePermissionError(event: any) {
|
||||||
@@ -492,18 +492,13 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toogleGalleryView(): void {
|
toogleGalleryView(): void {
|
||||||
|
this.displayMode = this.displayMode === DisplayMode.List ? DisplayMode.Gallery : DisplayMode.List;
|
||||||
const url = this
|
const url = this
|
||||||
.router
|
.router
|
||||||
.createUrlTree(['/files', this.currentFolderId, 'display', this.displayMode])
|
.createUrlTree(['/files', this.currentFolderId, 'display', this.displayMode])
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
if (this.displayMode === DisplayMode.List) {
|
this.location.go(url);
|
||||||
this.displayMode = DisplayMode.Gallery;
|
|
||||||
this.location.go(url);
|
|
||||||
} else {
|
|
||||||
this.displayMode = DisplayMode.List;
|
|
||||||
this.location.go(url);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onInfiniteScrolling(): void {
|
onInfiniteScrolling(): void {
|
||||||
|
Reference in New Issue
Block a user