mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1078] next/prev navigation for the Viewer (#187)
* basic navigation through the folder * carousel mode for libraries * code polishing * save and restore sorting settings * get user sorting preferences into account * sorting fixes * full test coverage
This commit is contained in:
committed by
Cilibiu Bogdan
parent
34e322e9f6
commit
3cff48cac5
@@ -74,10 +74,11 @@
|
||||
currentFolderId="-recent-"
|
||||
selectionMode="multiple"
|
||||
[navigate]="false"
|
||||
[sorting]="[ 'modifiedAt', 'desc' ]"
|
||||
[sorting]="sorting"
|
||||
[contextMenuActions]="true"
|
||||
[contentActions]="false"
|
||||
[imageResolver]="imageResolver"
|
||||
(sorting-changed)="onSortingChanged($event)"
|
||||
(node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"
|
||||
(node-select)="onNodeSelect($event, documentList)">
|
||||
|
||||
|
@@ -43,12 +43,19 @@ export class RecentFilesComponent extends PageComponent implements OnInit, OnDes
|
||||
|
||||
private subscriptions: Subscription[] = [];
|
||||
|
||||
sorting = [ 'modifiedAt', 'desc' ];
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private content: ContentManagementService,
|
||||
preferences: UserPreferencesService) {
|
||||
super(preferences);
|
||||
|
||||
const sortingKey = preferences.get('recent-files.sorting.key') || 'modifiedAt';
|
||||
const sortingDirection = preferences.get('recent-files.sorting.direction') || 'desc';
|
||||
|
||||
this.sorting = [sortingKey, sortingDirection];
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -81,4 +88,9 @@ export class RecentFilesComponent extends PageComponent implements OnInit, OnDes
|
||||
this.documentList.reload();
|
||||
}
|
||||
}
|
||||
|
||||
onSortingChanged(event: CustomEvent) {
|
||||
this.preferences.set('recent-files.sorting.key', event.detail.key || 'modifiedAt');
|
||||
this.preferences.set('recent-files.sorting.direction', event.detail.direction || 'desc');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user