mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
upload button enhancements (#1835)
- add support for [disabled] attribute - move to angular/material icons - improve demo shell layout (files.component)
This commit is contained in:
committed by
Mario Romano
parent
39ffd515d9
commit
95711616ca
@@ -56,6 +56,9 @@ export class UploadButtonComponent implements OnInit, OnChanges {
|
||||
|
||||
private static DEFAULT_ROOT_ID: string = '-root-';
|
||||
|
||||
@Input()
|
||||
disabled: boolean = false;
|
||||
|
||||
@Input()
|
||||
showNotificationBar: boolean = true;
|
||||
|
||||
@@ -96,7 +99,6 @@ export class UploadButtonComponent implements OnInit, OnChanges {
|
||||
permissionEvent: EventEmitter<PermissionModel> = new EventEmitter<PermissionModel>();
|
||||
|
||||
private disableButton: boolean = false;
|
||||
|
||||
private permissionValue: Subject<boolean> = new Subject<boolean>();
|
||||
|
||||
constructor(private el: ElementRef,
|
||||
@@ -109,6 +111,10 @@ export class UploadButtonComponent implements OnInit, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
isDisabled(): boolean {
|
||||
return this.disabled || this.disableButton;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.permissionValue.subscribe((hasPermission: boolean) => {
|
||||
if (!hasPermission && this.disableWithNoPermission) {
|
||||
|
Reference in New Issue
Block a user