[ADF-2766] download button for custom sources (#3258)

* download button for custom sources

* fix enum usage
This commit is contained in:
Denys Vuika
2018-05-03 10:29:27 +01:00
committed by Eugenio Romano
parent 76005cd215
commit 9b78fcb445
3 changed files with 16 additions and 4 deletions

View File

@@ -8,6 +8,13 @@
</mat-select>
</mat-form-field>
</adf-toolbar-title>
<adf-toolbar-divider fxFlex="0 0 auto"></adf-toolbar-divider>
<button mat-icon-button
[disabled]="!hasSelection(customSourcesDocumentList.selection)"
title="{{ 'DOCUMENT_LIST.TOOLBAR.DOWNLOAD' | translate }}"
[adfNodeDownload]="customSourcesDocumentList.selection">
<mat-icon>get_app</mat-icon>
</button>
</adf-toolbar>
<adf-document-list
#customSourcesDocumentList

View File

@@ -41,4 +41,8 @@ export class CustomSourcesComponent {
{ title: 'My', value: '-my-' },
{ title: 'Shared', value: '-shared-' }
];
hasSelection(selection: any[]): boolean {
return selection && selection.length > 0;
}
}