import { Component, ElementRef, OnInit, Input, ViewChildren, TemplateRef, ViewContainerRef } from '@angular/core'; import { MdDialog, MdDialogConfig, MdDialogRef } from '@angular/material'; import { CfCoreComponent } from '../core/core.component'; /** *

Component to show templates in popup dialog way.

*/ @Component({ selector: 'cf-dialog', template: "
info {{ properties.title }} help close
info {{ properties.title }} help close
info {{ properties.title }} help close
{{ properties.title }} close
{{ properties.title }} close

{{ properties.eventTitle }}

Start Date: {{ properties.startDate ? properties.startDate.format('dddd, MMMM Do YYYY, h:mm:ss a') : '' }}

End Date: {{ properties.endDate ? properties.endDate.format('dddd, MMMM Do YYYY, h:mm:ss a') : '' }}

", styles: ["[hidden] { display: none !important; } .cf-dialog-header { background: #03A9F4; color: #fff; position: absolute; left: 0; right: 0; top: 0; min-height: 50px; font-weight: normal; } .cf-dialog-info .cf-dialog-header { background: #03A9F4; } .cf-dialog-warning .cf-dialog-header { background: #f4b303; } .cf-dialog-error .cf-dialog-header { background: #f43603; } .cf-dialog-header .cf-dialog-header-spacer { flex: 1 1 auto; } .cf-dialog-header-title { margin: 0 10px; } .cf-dialog-content { left: 0; right: 25px; top: 65px; bottom: 40px; position: absolute; overflow: auto; } .cf-calendar-dialog-content { left: 25px; } /deep/ .cf-dialog-text-content { color: #1b7ea7; font-size: 14pt; text-align: center; padding: 25px 0; } .cf-dialog-footer { background: #f5f5f5; position: absolute; left: 0; right: 0; bottom: 0; min-height: 35px; font-weight: normal; } .cf-dialog-footer-content { position: absolute; right: 10px; } .cf-dialog-header-info { font-size: 24pt; margin-top: -10px; margin-right: 5px; cursor: pointer; } .cf-dialog-header-help { color: black; border-radius: 50%; font-size: 22pt; margin-right: 5px; margin-left: 5px; margin-top: -5px; cursor: pointer; } .cf-dialog-header-close { background: black; border-radius: 50%; margin-right: 5px; margin-left: 5px; cursor: pointer; } .cf-calendar-full-width { width: 100%; } "] }) export class CfDialogComponent extends CfCoreComponent implements OnInit { @ViewChildren('cfDialogViewContainer', { read: ViewContainerRef }) cfDialogViewContainer: ViewContainerRef; properties: any = {}; constructor(public elementRef: ElementRef, public dialogRef: MdDialogRef) { super(elementRef); } ngOnInit(): void { } }