X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fpages%2Fconfirm%2Fconfirm-modal%2Fconfirm-modal.component.ts;h=3de903525724dbe07439a97616ce314861cb986c;hb=3009a190cb8984201693a1cf8ecff72f32c7a3b8;hp=67a7d87bb5035ab3d27897a07206467b13cd72db;hpb=a2cc38902ff7528870822110c4f04329a3918564;p=src%2Fxds%2Fxds-agent.git diff --git a/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts b/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts index 67a7d87..3de9035 100644 --- a/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts +++ b/webapp/src/app/pages/confirm/confirm-modal/confirm-modal.component.ts @@ -17,7 +17,6 @@ */ import { Component, OnInit, Input } from '@angular/core'; -import { DomSanitizer } from '@angular/platform-browser'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; export enum EType { @@ -40,12 +39,19 @@ export enum EType {
- - - + + +
@@ -65,30 +71,30 @@ export class ConfirmModalComponent implements OnInit { @Input() question; bodyQuestion = ''; - textBtn: Array = ['', '', '']; + textBtn: Array = ['', '']; constructor( private modalRef: NgbActiveModal, - private sanitizer: DomSanitizer, ) { } + ngOnInit() { switch (this.type) { case EType.OK: - this.textBtn = [ 'OK', '', '' ]; + this.textBtn = [ 'OK', '' ]; break; case EType.Cancel: - this.textBtn = [ '', 'Cancel', '' ]; + this.textBtn = [ '', 'Cancel' ]; break; case EType.OKCancel: - this.textBtn = [ 'OK', 'Cancel', '' ]; + this.textBtn = [ 'OK', 'Cancel' ]; break; default: case EType.YesNo: - this.textBtn = [ 'Yes', 'No', '' ]; + this.textBtn = [ 'Yes', 'No' ]; break; } }