mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2859] fixes for the conditional visibility and disabled states (#3465)
* fixes for the conditional visibility and disabled states * update docs * cleanup code * remove unused code
This commit is contained in:
committed by
Eugenio Romano
parent
1d69f5c407
commit
6f2cbdf697
@@ -279,13 +279,13 @@
|
||||
</data-columns>
|
||||
|
||||
<content-actions>
|
||||
<!-- Conditional actions demo -->
|
||||
<content-action
|
||||
target="all"
|
||||
title="Action for 'custom' node"
|
||||
[disabled]="isCustomActionDisabled"
|
||||
(execute)="runCustomAction($event)">
|
||||
</content-action>
|
||||
<!-- Conditional actions demo -->
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="Download this file now!"
|
||||
@@ -298,12 +298,6 @@
|
||||
handler="download"
|
||||
[visible]="false">
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="This can be toggled"
|
||||
handler="download"
|
||||
[visible]="showCustomDownloadAction">
|
||||
</content-action>
|
||||
<!-- common actions -->
|
||||
<content-action
|
||||
icon="get_app"
|
||||
@@ -448,12 +442,6 @@
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle color="primary" [(ngModel)]="showCustomDownloadAction">
|
||||
Toggle custom download action
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle [color]="'primary'" [(ngModel)]="multiselect">{{'DOCUMENT_LIST.MULTISELECT_CHECKBOXES' |
|
||||
translate}}
|
||||
|
@@ -170,9 +170,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@ViewChild(InfinitePaginationComponent)
|
||||
infinitePaginationComponent: InfinitePaginationComponent;
|
||||
|
||||
@Input()
|
||||
showCustomDownloadAction = false;
|
||||
|
||||
permissionsStyle: PermissionStyleModel[] = [];
|
||||
infiniteScrolling: boolean;
|
||||
supportedPages: number[];
|
||||
@@ -514,7 +511,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
canDownloadNode = (node: MinimalNodeEntity): boolean => {
|
||||
if (node && node.entry && node.entry.name === 'For Sale.docx') {
|
||||
if (node && node.entry && node.entry.name === 'custom') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user