diff options
author | 2018-07-24 17:34:04 +0300 | |
---|---|---|
committer | 2018-07-25 11:39:10 +0300 | |
commit | a52d50e788792a63e97a9176ab319d53db7a2853 (patch) | |
tree | b1c2222cacf4b8192aea16d1e0315b1f005c5347 /sdc-workflow-designer-ui/src/app/paletx/core/overlaypanel/overlaypanel.ts | |
parent | 3c2665debb400aef7f0ed9e235698d2ff9f859db (diff) |
Replaced old implementation at root
Old project files and directories has been moved
under 'deprecated-workflow-designer'. The old project
is not built by the CI anymore, but can be still built manually.
New modules/directories have been moved up and integrated with
the CI system.
Change-Id: I1528c792bcbcce9e50bfc294a1328a20e72c91cf
Issue-ID: SDC-1559
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/paletx/core/overlaypanel/overlaypanel.ts')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/paletx/core/overlaypanel/overlaypanel.ts | 163 |
1 files changed, 0 insertions, 163 deletions
diff --git a/sdc-workflow-designer-ui/src/app/paletx/core/overlaypanel/overlaypanel.ts b/sdc-workflow-designer-ui/src/app/paletx/core/overlaypanel/overlaypanel.ts deleted file mode 100644 index ee529c5f..00000000 --- a/sdc-workflow-designer-ui/src/app/paletx/core/overlaypanel/overlaypanel.ts +++ /dev/null @@ -1,163 +0,0 @@ -import {CommonModule} from '@angular/common'; -import {AfterViewInit, Component, ElementRef, EventEmitter, Input, NgModule, OnDestroy, OnInit, Output, Renderer} from '@angular/core'; - -import {DomHandler} from '../domhandler'; - -@Component({ - selector: 'plx-overlay-panel', - template: ` - <div [ngClass]="'ui-overlaypanel ui-widget ui-widget-content ui-corner-all ui-shadow'" [ngStyle]="style" [class]="styleClass" - [style.display]="visible ? 'block' : 'none'" (click)="onPanelClick()"> - <div class="ui-overlaypanel-content"> - <ng-content></ng-content> - </div> - <a href="#" *ngIf="showCloseIcon" class="ui-overlaypanel-close ui-state-default" (click)="onCloseClick($event)"> - <span class="fa fa-fw fa-close"></span> - </a> - </div> - `, - providers: [DomHandler] -}) -export class PlxOverlayPanelComponent implements OnInit, AfterViewInit, - OnDestroy { - @Input() dismissable: boolean = true; - - @Input() showCloseIcon: boolean; - - @Input() style: any; - - @Input() styleClass: string; - - @Input() appendTo: any; - - @Output() onBeforeShow: EventEmitter<any> = new EventEmitter(); - - @Output() onAfterShow: EventEmitter<any> = new EventEmitter(); - - @Output() onBeforeHide: EventEmitter<any> = new EventEmitter(); - - @Output() onAfterHide: EventEmitter<any> = new EventEmitter(); - - container: any; - - visible: boolean = false; - - documentClickListener: any; - - selfClick: boolean; - - targetEvent: boolean; - - target: any; - - constructor( - public el: ElementRef, public domHandler: DomHandler, - public renderer: Renderer) {} - - ngOnInit() { - if (this.dismissable) { - this.documentClickListener = - this.renderer.listenGlobal('body', 'click', () => { - if (!this.selfClick && !this.targetEvent) { - this.hide(); - } - this.selfClick = false; - this.targetEvent = false; - }); - } - } - - ngAfterViewInit() { - this.container = this.el.nativeElement.children[0]; - if (this.appendTo) { - if (this.appendTo === 'body') { - document.body.appendChild(this.container); - } else { - this.domHandler.appendChild(this.container, this.appendTo); - } - } - } - - toggle(event: any, target?: any) { - let currentTarget = (target || event.currentTarget || event.target); - - if (!this.target || this.target === currentTarget) { - if (this.visible) { - this.hide(); - } else { - this.show(event, target); - } - } else { - this.show(event, target); - } - - if (this.dismissable) { - this.targetEvent = true; - } - - this.target = currentTarget; - } - - show(event: any, target?: any) { - if (this.dismissable) { - this.targetEvent = true; - } - - this.onBeforeShow.emit(null); - let elementTarget = target || event.currentTarget || event.target; - this.container.style.zIndex = ++DomHandler.zindex; - - if (this.visible) { - this.domHandler.absolutePosition(this.container, elementTarget); - } else { - this.visible = true; - this.domHandler.absolutePosition(this.container, elementTarget); - this.domHandler.fadeIn(this.container, 250); - } - this.onAfterShow.emit(null); - } - - hide() { - if (this.visible) { - this.onBeforeHide.emit(null); - this.visible = false; - this.onAfterHide.emit(null); - } - } - - onPanelClick() { - if (this.dismissable) { - this.selfClick = true; - } - } - - onCloseClick(event: any) { - this.hide(); - - if (this.dismissable) { - this.selfClick = true; - } - - event.preventDefault(); - } - - ngOnDestroy() { - if (this.documentClickListener) { - this.documentClickListener(); - } - - if (this.appendTo) { - this.el.nativeElement.appendChild(this.container); - } - - this.target = null; - } -} - -@NgModule({ - imports: [CommonModule], - exports: [PlxOverlayPanelComponent], - declarations: [PlxOverlayPanelComponent] -}) -export class PlxOverlayPanelModule { -}
\ No newline at end of file |