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=b5b5db0677d00291954648c66adefff632fa05f6;hpb=45f6472d1e8ecad428da314a6d762143f033865d;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 b5b5db0..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 @@ -1,6 +1,6 @@ /** * @license -* Copyright (C) 2017 "IoT.bzh" +* Copyright (C) 2017-2018 "IoT.bzh" * Author Sebastien Douheret * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -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; } }