[Library | Trunk]: Fs modal add disable on buttons

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60635 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-03-12 10:00:56 +00:00
parent b37a64809e
commit 3e14245cc0
1 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import {Component, ElementRef, EventEmitter, OnInit, Output} from "@angular/core";
import {Component, ElementRef, EventEmitter, Input, OnInit, Output} from "@angular/core";
import {fromEvent, Subscription} from 'rxjs';
import {delay} from "rxjs/operators";
@ -13,12 +13,12 @@ import {delay} from "rxjs/operators";
<div class="header">
<h6 *ngIf="title">{{title}}</h6>
</div>
<div class="content" [class.hasFooter]="keys">
<div class="content" [class.hasFooter]="buttons">
<ng-content></ng-content>
</div>
<div *ngIf="keys" class="footer uk-flex uk-flex-right">
<button class="uk-button uk-button-secondary outlined" (click)="close()">{{cancelButtonText}}</button>
<button class="uk-button uk-button-secondary space" (click)="ok()">{{okButtonText}}</button>
<div *ngIf="buttons" class="footer uk-flex uk-flex-right">
<button class="uk-button uk-button-secondary outlined" [disabled]="cancelButtonDisabled" (click)="close()">{{cancelButtonText}}</button>
<button class="uk-button uk-button-secondary uk-margin-small-left" [disabled]="okButtonDisabled" (click)="ok()">{{okButtonText}}</button>
</div>
</div>
</div>
@ -27,8 +27,12 @@ import {delay} from "rxjs/operators";
export class FullScreenModalComponent implements OnInit {
okButtonText = 'OK';
cancelButtonText = 'Cancel';
keys: boolean = false;
buttons: boolean = false;
title: string = null;
@Input()
okButtonDisabled = false;
@Input()
cancelButtonDisabled = false;
@Output()
okEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
@Output()