src/core/unsaved-changes-prompt-dialog/unsaved-changes-prompt-dialog.component.ts
DialogContentBase
| changeDetection | ChangeDetectionStrategy.Eager |
| selector | scl-unsaved-changes-prompt-dialog |
| styleUrls | ./unsaved-changes-prompt-dialog.component.css |
| templateUrl | ./unsaved-changes-prompt-dialog.component.html |
Properties |
Methods |
constructor(dialog: DialogRef, serviceAdapter: SmartServiceAdapter, domSanitizer: DomSanitizer)
|
||||||||||||
|
Parameters :
|
| cancel |
cancel()
|
|
Returns :
void
|
| yes |
yes()
|
|
Returns :
void
|
| questionMarkUrl |
Type : SafeResourceUrl
|
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**************************************************************************
--------------------------------------------------------------------------
File : unsaved-changes-prompt-dialog.component.html
Purpose : Template for unsaved changes prompt dialog.
Author(s) : Oana Sucigan
Created : Sep 10, 2021
--------------------------------------------------------------------------
-->
<div class="container-fluid p-0 h-auto">
<div class="row g-0 align-items-start">
<div class="col-2 d-flex justify-content-center">
<img [src]="questionMarkUrl" alt="Question" class="img-fluid">
</div>
<div class="col-10">
<div class="d-flex flex-column gap-1">
<span class="fw-medium">Current changes have not been saved.</span>
<span class="text-muted">Do you wish to leave this form?</span>
</div>
</div>
</div>
</div>
<kendo-dialog-actions class="d-flex justify-content-end gap-2">
<button kendoButton class="px-4" (click)="yes()">Yes</button>
<button kendoButton class="px-4" (click)="cancel()" themeColor="primary">Cancel</button>
</kendo-dialog-actions>
./unsaved-changes-prompt-dialog.component.css
/**********************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**********************************************************************/
/*------------------------------------------------------------------------
File : unsaved-changes-prompt-dialog.component.css
Purpose : Styles for unsaved changes prompt dialog.
Author(s) : Oana Sucigan
Created : Sep 10, 2021
----------------------------------------------------------------------*/
::ng-deep .k-dialog-close {
display: none !important;
}
/* Remove conflicting padding from specific containers */
.container-fluid {
padding: 0 !important;
margin: 0 !important;
height: auto !important;
overflow: visible !important;
}
.row {
margin: 0 !important;
min-height: auto !important;
}
.row > .col-2 {
padding-left: var(--kendo-spacing-3, 0.75rem);
padding-top: var(--kendo-spacing-2, 0.5rem);
display: flex;
align-items: flex-start;
justify-content: center;
}
.col-10 {
padding-right: var(--kendo-spacing-3, 0.75rem);
padding-top: var(--kendo-spacing-2, 0.5rem);
}
.col-10 .row {
padding: 0;
margin-bottom: var(--kendo-spacing-1, 0.25rem);
}
.col-10 .row:last-child {
margin-bottom: 0;
}
/* Override dialog content padding to prevent double padding */
::ng-deep .k-window-content.k-dialog-content {
padding: var(--kendo-spacing-4, 1rem) !important;
overflow: visible !important;
height: auto !important;
}
/* Icon styling */
.col-2 img {
max-width: var(--kendo-spacing-8, 2rem);
height: auto;
}
/* Text styling */
.col-10 span {
line-height: var(--kendo-line-height-md, 1.5);
color: var(--kendo-color-on-app-surface, #3d3d3d);
display: block;
}
.dialog-content {
padding-inline-start: 20px;
}