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
|
|
@ -670,6 +670,26 @@ textarea.form-control {
|
||||||
}
|
}
|
||||||
@media (min-width: 768px) { .modal-handle { display: none; } }
|
@media (min-width: 768px) { .modal-handle { display: none; } }
|
||||||
|
|
||||||
|
.modal-overlay--fullscreen {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.modal-overlay--fullscreen .modal {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
border-radius: 0;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.modal-overlay--fullscreen .modal-handle { display: none; }
|
||||||
|
|
||||||
|
.ausweis-frame {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: none;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-header {
|
.modal-header {
|
||||||
padding: var(--space-4) var(--space-6);
|
padding: var(--space-4) var(--space-6);
|
||||||
border-bottom: 1px solid var(--c-border-light);
|
border-bottom: 1px solid var(--c-border-light);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '119'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '120'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
|
|
||||||
const App = (() => {
|
const App = (() => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ window.Page_dog_profile = (() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('dp-ausweis-btn')?.addEventListener('click', () => {
|
document.getElementById('dp-ausweis-btn')?.addEventListener('click', () => {
|
||||||
window.open(`/ausweis/${dog.id}`, '_blank');
|
_showAusweisModal(dog.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('dp-share-btn')?.addEventListener('click', () => {
|
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
|
// TEILEN
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -55,11 +55,11 @@ const UI = (() => {
|
||||||
const modal = (() => {
|
const modal = (() => {
|
||||||
let _current = null;
|
let _current = null;
|
||||||
|
|
||||||
function open({ title, body, footer, onClose } = {}) {
|
function open({ title, body, footer, onClose, size } = {}) {
|
||||||
close(); // vorheriges schließen
|
close(); // vorheriges schließen
|
||||||
|
|
||||||
const overlay = document.createElement('div');
|
const overlay = document.createElement('div');
|
||||||
overlay.className = 'modal-overlay';
|
overlay.className = 'modal-overlay' + (size ? ` modal-overlay--${size}` : '');
|
||||||
overlay.innerHTML = `
|
overlay.innerHTML = `
|
||||||
<div class="modal" role="dialog" aria-modal="true">
|
<div class="modal" role="dialog" aria-modal="true">
|
||||||
<div class="modal-handle"></div>
|
<div class="modal-handle"></div>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v146';
|
const CACHE_VERSION = 'by-v147';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue