Hey,
now it works! I changed this one https://community.openhab.org/t/custom-popups/24889/2?u=hden
much space for improvements, but it works for me
<style>
.custom-modal-container {
background: rgba(0, 0, 0, 0.75);
opacity: 0;
color: white;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
visibility: hidden;
-webkit-transition: opacity 0.5s, visibility 0s linear 0.5s;
transition: opacity 0.5s, visibility 0s linear 0.5s;
z-index: 99999;
}
.custom-modal-container.active {
opacity: 1;
visibility: visible;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
.custom-modal {
position: absolute;
top: 50%;
left: 50%;
padding: 2em;
border-radius: 0.5em;
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
.custom-modal.close-modal-area {
width: 100%;
height: 100%;
}
.custom-modal.custom-modal-box {
background: indianred;
text-align: center;
}
.custom-modal-content .custom-modal {
width: 100%;
max-width: 40em;
}
.toggle-modal-button {
background-color: transparent;
color: white;
display: inline-block;
padding: 1em;
cursor: pointer;
border-radius: 0.5em;
box-shadow: inset 0 0 1px white;
}
.toggle-modal-button:hover, .toggle-modal-button:focus,
.toggle-modal-button:active {
background-color: rgba(0, 0, 0, 0.25);
box-shadow: none;
}
.custom-modal-content .toggle-modal-button {
color: rgba(255, 255, 255, 0.75);
margin-bottom: 1em;
}
.custom-modal-content {
color: peru;
width: 90%;
max-width: 600px;
padding-top: 2em;
margin: 0 auto;
}
</style>
<ng-template ng-If=" itemValue('Modalcheck')=='1'"><div>
<section class="custom-modal-container" ng-class="{ active: show_modal }">
<div for="toggler" class="custom-modal close-modal-area" ng-click="show_modal=false; sendCmd('Modalcheck','0')"></div>
<div class="custom-modal custom-modal-box">
<div>Are you sure?</div>
<br />
<div class="toggle-modal-button" ng-click="show_modal=false; sendCmd('Modalcheck','0')">Yes</div>
</div>
</section>
{{show_modal=true}}
</div></ng-template>