From 16b37e5061da0a00f23c742482ae49e899471db5 Mon Sep 17 00:00:00 2001 From: insanity Date: Mon, 10 Sep 2018 17:51:14 +0900 Subject: [PATCH] scan condition apply or cancel --- .../primeng/dropdown-panel.component.html | 2 +- .../primeng/dropdown-panel.component.ts | 4 +++- .../component/primeng/popup-panel.component.ts | 5 ++++- .../scanner-setting-dropdown.component.html | 5 +++-- .../scanner-setting-dropdown.component.ts | 16 ++++++++++------ 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/@overflow/commons/ui/component/primeng/dropdown-panel.component.html b/@overflow/commons/ui/component/primeng/dropdown-panel.component.html index 04036b7..f8237ea 100644 --- a/@overflow/commons/ui/component/primeng/dropdown-panel.component.html +++ b/@overflow/commons/ui/component/primeng/dropdown-panel.component.html @@ -2,7 +2,7 @@ - +
diff --git a/@overflow/commons/ui/component/primeng/dropdown-panel.component.ts b/@overflow/commons/ui/component/primeng/dropdown-panel.component.ts index cd7fcea..647f1af 100644 --- a/@overflow/commons/ui/component/primeng/dropdown-panel.component.ts +++ b/@overflow/commons/ui/component/primeng/dropdown-panel.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, ContentChild, ViewChild } from '@angular/core'; +import { Component, Input, ContentChild, ViewChild, Output, EventEmitter } from '@angular/core'; import { Header, Footer } from 'primeng/primeng'; import { PopupPanelComponent } from './popup-panel.component'; @@ -28,6 +28,8 @@ export class DropdownPanelComponent { @ViewChild('popupPanel') popupPanel: PopupPanelComponent; + @Output() cancel = new EventEmitter(); + constructor() { } hide(): void { diff --git a/@overflow/commons/ui/component/primeng/popup-panel.component.ts b/@overflow/commons/ui/component/primeng/popup-panel.component.ts index dc00d7a..93a70c3 100644 --- a/@overflow/commons/ui/component/primeng/popup-panel.component.ts +++ b/@overflow/commons/ui/component/primeng/popup-panel.component.ts @@ -1,4 +1,4 @@ -import { NgModule, Component, ElementRef, OnDestroy, Input, Renderer2, ViewChild, Inject, forwardRef } from '@angular/core'; +import { NgModule, Component, ElementRef, OnDestroy, Input, Renderer2, ViewChild, Inject, forwardRef, Output, EventEmitter } from '@angular/core'; import { trigger, state, style, transition, animate, AnimationEvent } from '@angular/animations'; import { DomHandler } from 'primeng/primeng'; @@ -36,6 +36,8 @@ export class PopupPanelComponent implements OnDestroy { @Input() baseZIndex = 0; + @Output() cancel = new EventEmitter(); + @ViewChild('container') containerViewChild: ElementRef; readonly popup = true; @@ -129,6 +131,7 @@ export class PopupPanelComponent implements OnDestroy { if (!this.documentClickListener) { this.documentClickListener = this.renderer.listen('document', 'click', () => { if (!this.preventDocumentDefault) { + this.cancel.emit(); this.hide(); } diff --git a/src/commons/component/scanner-setting-dropdown.component.html b/src/commons/component/scanner-setting-dropdown.component.html index 16c04cb..16b3986 100644 --- a/src/commons/component/scanner-setting-dropdown.component.html +++ b/src/commons/component/scanner-setting-dropdown.component.html @@ -1,4 +1,4 @@ - + + +