Revision 55963
Added by Argiro Kokogiannaki almost 5 years ago
alert.ts | ||
---|---|---|
1 |
import {Component, ViewEncapsulation, ElementRef, EventEmitter, Output} from '@angular/core'; |
|
1 |
import {Component, ViewEncapsulation, ElementRef, EventEmitter, Output, Input} from '@angular/core';
|
|
2 | 2 |
|
3 | 3 |
@Component({ |
4 | 4 |
selector: 'modal-alert', |
... | ... | |
26 | 26 |
<div *ngIf="!okButtonLeft" class="uk-text-right" [hidden]=!alertFooter> |
27 | 27 |
<span [hidden]=!cancelButton> |
28 | 28 |
<button class="uk-button uk-button-default" (click)="cancel()">{{cancelButtonText}}</button> |
29 |
</span>
|
|
29 |
</span> |
|
30 | 30 |
<span [hidden]=!okButton > |
31 |
<button class="uk-button portal-button" (click)="ok()">{{okButtonText}}</button> |
|
31 |
<button *ngIf="okDisabled" class="uk-button uk-button-default" disabled>{{okButtonText}}</button> |
|
32 |
<button *ngIf="!okDisabled" class="uk-button portal-button" (click)="ok()">{{okButtonText}}</button> |
|
32 | 33 |
</span> |
33 | 34 |
</div> |
34 | 35 |
|
... | ... | |
90 | 91 |
*/ |
91 | 92 |
public isOpen:boolean=false; |
92 | 93 |
|
94 |
/** |
|
95 |
* if the value is true ok button align on the left, else on the right |
|
96 |
*/ |
|
93 | 97 |
public okButtonLeft: boolean = true; |
98 |
|
|
94 | 99 |
/** |
100 |
* if the value is true ok button is disabled |
|
101 |
*/ |
|
102 |
@Input() |
|
103 |
public okDisabled: boolean = false; |
|
104 |
/** |
|
95 | 105 |
* Emitted when a ok button was clicked |
96 | 106 |
* or when Ok method is called. |
97 | 107 |
*/ |
Also available in: Unified diff
[angular7|library]
Merging Trunk into branch 55904:55959