Fix: Ausweis als Fullscreen-Modal statt neuem Tab, UI.modal size-Parameter
This commit is contained in:
parent
1af9bc0f7e
commit
cb8ac8cffd
5 changed files with 38 additions and 5 deletions
|
|
@ -251,7 +251,7 @@ window.Page_dog_profile = (() => {
|
|||
});
|
||||
|
||||
document.getElementById('dp-ausweis-btn')?.addEventListener('click', () => {
|
||||
window.open(`/ausweis/${dog.id}`, '_blank');
|
||||
_showAusweisModal(dog.id);
|
||||
});
|
||||
|
||||
document.getElementById('dp-share-btn')?.addEventListener('click', () => {
|
||||
|
|
@ -293,6 +293,19 @@ window.Page_dog_profile = (() => {
|
|||
});
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// AUSWEIS
|
||||
// ----------------------------------------------------------
|
||||
function _showAusweisModal(dogId) {
|
||||
UI.modal.open({
|
||||
title: 'Heimtierausweis',
|
||||
body: `<iframe src="/ausweis/${dogId}" class="ausweis-frame" title="Heimtierausweis"></iframe>`,
|
||||
footer: `<button class="btn btn-secondary" onclick="UI.modal.close()">Schließen</button>
|
||||
<a href="/ausweis/${dogId}" target="_blank" class="btn btn-ghost">${UI.icon('printer')} Drucken</a>`,
|
||||
size: 'fullscreen',
|
||||
});
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// TEILEN
|
||||
// ----------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue