From df98563e2104b82b119c00a3cd83cd0dc1242d25 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jun 2017 14:32:15 +0200 Subject: Use typescript standard and lint all files --- client/src/app/core/confirm/confirm.component.ts | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'client/src/app/core/confirm/confirm.component.ts') diff --git a/client/src/app/core/confirm/confirm.component.ts b/client/src/app/core/confirm/confirm.component.ts index ae42ff68a..066e3fc5f 100644 --- a/client/src/app/core/confirm/confirm.component.ts +++ b/client/src/app/core/confirm/confirm.component.ts @@ -1,12 +1,12 @@ -import { Component, HostListener, OnInit, ViewChild } from '@angular/core'; +import { Component, HostListener, OnInit, ViewChild } from '@angular/core' -import { ModalDirective } from 'ngx-bootstrap/modal'; +import { ModalDirective } from 'ngx-bootstrap/modal' -import { ConfirmService } from './confirm.service'; +import { ConfirmService } from './confirm.service' export interface ConfigChangedEvent { - columns: { [id: string]: { isDisplayed: boolean }; }; - config: { resultsPerPage: number }; + columns: { [id: string]: { isDisplayed: boolean } } + config: { resultsPerPage: number } } @Component({ @@ -14,48 +14,48 @@ export interface ConfigChangedEvent { templateUrl: './confirm.component.html' }) export class ConfirmComponent implements OnInit { - @ViewChild('confirmModal') confirmModal: ModalDirective; + @ViewChild('confirmModal') confirmModal: ModalDirective - title = ''; - message = ''; + title = '' + message = '' constructor (private confirmService: ConfirmService) { // Empty } - ngOnInit() { + ngOnInit () { this.confirmModal.config = { backdrop: 'static', keyboard: false - }; + } this.confirmService.showConfirm.subscribe( ({ title, message }) => { - this.title = title; - this.message = message; + this.title = title + this.message = message - this.showModal(); + this.showModal() } - ); + ) } @HostListener('keydown.enter') - confirm() { - this.confirmService.confirmResponse.next(true); - this.hideModal(); + confirm () { + this.confirmService.confirmResponse.next(true) + this.hideModal() } @HostListener('keydown.esc') - abort() { - this.confirmService.confirmResponse.next(false); - this.hideModal(); + abort () { + this.confirmService.confirmResponse.next(false) + this.hideModal() } - showModal() { - this.confirmModal.show(); + showModal () { + this.confirmModal.show() } - hideModal() { - this.confirmModal.hide(); + hideModal () { + this.confirmModal.hide() } } -- cgit v1.2.3