mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
fix "view" button (toolbar)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
mat-icon-button
|
||||
*ngIf="canPreviewFile(documentList.selection)"
|
||||
title="{{ 'APP.ACTIONS.VIEW' | translate }}"
|
||||
(click)="showPreview(documentList.selection[0]?.entry?.id)">
|
||||
(click)="onNodeDoubleClick(documentList.selection[0]?.entry)">
|
||||
<mat-icon>open_in_browser</mat-icon>
|
||||
</button>
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
mat-icon-button
|
||||
*ngIf="canPreviewFile(documentList.selection)"
|
||||
title="{{ 'APP.ACTIONS.VIEW' | translate }}"
|
||||
(click)="showPreview(documentList.selection[0]?.entry?.id)">
|
||||
(click)="showPreview(documentList.selection[0]?.entry)">
|
||||
<mat-icon>open_in_browser</mat-icon>
|
||||
</button>
|
||||
|
||||
|
@@ -155,6 +155,14 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
showPreview(node: MinimalNodeEntryEntity) {
|
||||
if (node) {
|
||||
if (node.isFile) {
|
||||
this.router.navigate(['/preview', node.id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onBreadcrumbNavigate(route: PathElementEntity) {
|
||||
// todo: review this approach once 5.2.3 is out
|
||||
if (this.nodePath && this.nodePath.length > 2) {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
mat-icon-button
|
||||
*ngIf="canPreviewFile(documentList.selection)"
|
||||
title="{{ 'APP.ACTIONS.VIEW' | translate }}"
|
||||
(click)="showPreview(documentList.selection[0]?.entry?.id)">
|
||||
(click)="onNodeDoubleClick(documentList.selection[0]?.entry)">
|
||||
<mat-icon>open_in_browser</mat-icon>
|
||||
</button>
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
mat-icon-button
|
||||
*ngIf="canPreviewFile(documentList.selection)"
|
||||
title="{{ 'APP.ACTIONS.VIEW' | translate }}"
|
||||
(click)="showPreview(documentList.selection[0]?.entry?.nodeId)">
|
||||
(click)="onNodeDoubleClick(documentList.selection[0]?.entry)">
|
||||
<mat-icon>open_in_browser</mat-icon>
|
||||
</button>
|
||||
|
||||
|
Reference in New Issue
Block a user