Project

General

Profile

« Previous | Next » 

Revision 60636

[Library | Trunk]: Fs modal add a boolean for each button

View differences:

modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/modal/full-screen-modal/full-screen-modal.component.ts
13 13
        <div class="header">
14 14
          <h6 *ngIf="title">{{title}}</h6>
15 15
        </div>
16
        <div class="content" [class.hasFooter]="buttons">
16
        <div class="content" [class.hasFooter]="cancelButton || okButton">
17 17
          <ng-content></ng-content>
18 18
        </div>
19
        <div *ngIf="buttons" class="footer uk-flex uk-flex-right">
20
          <button class="uk-button uk-button-secondary outlined" [disabled]="cancelButtonDisabled" (click)="close()">{{cancelButtonText}}</button>
21
          <button class="uk-button uk-button-secondary uk-margin-small-left" [disabled]="okButtonDisabled" (click)="ok()">{{okButtonText}}</button>
19
        <div *ngIf="cancelButton || okButton" class="footer uk-flex uk-flex-right">
20
          <button *ngIf="cancelButton" class="uk-button uk-button-secondary outlined" [disabled]="cancelButtonDisabled" (click)="close()">{{cancelButtonText}}</button>
21
          <button *ngIf="okButton" class="uk-button uk-button-secondary uk-margin-small-left" [disabled]="okButtonDisabled" (click)="ok()">{{okButtonText}}</button>
22 22
        </div>
23 23
      </div>
24 24
    </div>
......
27 27
export class FullScreenModalComponent implements OnInit {
28 28
  okButtonText = 'OK';
29 29
  cancelButtonText = 'Cancel';
30
  buttons: boolean = false;
30
  cancelButton: boolean = false;
31
  okButton: boolean = false;
31 32
  title: string = null;
32 33
  @Input()
33 34
  okButtonDisabled = false;

Also available in: Unified diff