Fix overlay pattern dimming and align VSF pages to shared overlay dialog contract
This commit is contained in:
+10
-10
@@ -161,8 +161,8 @@
|
||||
</span>
|
||||
</button>
|
||||
<div class="sg-sandwich-menu-panel" aria-label="Ausgeklapptes Menü" data-component-part="sandwich-panel">
|
||||
<a class="sg-sandwich-menu-link" href="#!" data-vsf-open-dialog="edit">Editieren</a>
|
||||
<a class="sg-sandwich-menu-link" href="#!" data-vsf-open-dialog="delete">Liste loeschen</a>
|
||||
<a class="sg-sandwich-menu-link" href="#!" data-overlay-open-dialog="edit">Editieren</a>
|
||||
<a class="sg-sandwich-menu-link" href="#!" data-overlay-open-dialog="delete">Liste loeschen</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -227,7 +227,7 @@
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
<article class="sg-card sg-delete-confirmation-pattern__floating-card" aria-label="Liste editieren" role="dialog" aria-modal="true" aria-labelledby="vsf-list-card-inline-edit-title" data-vsf-dialog="edit" hidden>
|
||||
<article class="sg-card sg-delete-confirmation-pattern__floating-card" aria-label="Liste editieren" role="dialog" aria-modal="true" aria-labelledby="vsf-list-card-inline-edit-title" data-overlay-dialog="edit" hidden>
|
||||
<div class="sg-card-segment sg-card-segment--body sg-delete-confirmation-pattern__body">
|
||||
<p class="sg-body sg-delete-confirmation-pattern__text" id="vsf-list-card-inline-edit-title"><strong>Liste editieren</strong></p>
|
||||
<div class="sg-form-sections-card__field-group">
|
||||
@@ -241,7 +241,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="sg-delete-confirmation-pattern__actions">
|
||||
<button class="sg-interaction-element sg-button sg-button--active" type="button" data-vsf-dialog-close>Abbrechen</button>
|
||||
<button class="sg-interaction-element sg-button sg-button--active" type="button" data-overlay-dialog-close>Abbrechen</button>
|
||||
<button class="sg-interaction-element sg-button sg-button--process sg-button--process-inactive" type="button" disabled aria-disabled="true" data-vsf-edit-save>
|
||||
Speichern
|
||||
</button>
|
||||
@@ -249,7 +249,7 @@
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="sg-card sg-delete-confirmation-pattern__floating-card" aria-label="Löschbestätigung" role="dialog" aria-modal="true" aria-labelledby="vsf-list-card-inline-delete-title" data-vsf-dialog="delete" hidden>
|
||||
<article class="sg-card sg-delete-confirmation-pattern__floating-card" aria-label="Löschbestätigung" role="dialog" aria-modal="true" aria-labelledby="vsf-list-card-inline-delete-title" data-overlay-dialog="delete" hidden>
|
||||
<div class="sg-card-segment sg-card-segment--body sg-delete-confirmation-pattern__body">
|
||||
<p class="sg-body sg-delete-confirmation-pattern__text" id="vsf-list-card-inline-delete-title"><strong>Möchtest du NAME DER LISTE wirklich löschen?</strong></p>
|
||||
<p class="sg-body sg-delete-confirmation-pattern__text">Du kannst das nicht rückgängig machen. Bestätige durch Eingabe von <span class="sg-delete-confirmation-pattern__code">DELETE</span>.</p>
|
||||
@@ -258,7 +258,7 @@
|
||||
<input class="sg-interaction-element sg-input-single-line sg-input-single-line--inactive-selectable sg-form-inactive-selectable" type="text" placeholder="DELETE" aria-label="Löschbestätigung durch DELETE" data-vsf-delete-confirmation-input>
|
||||
</label>
|
||||
<div class="sg-delete-confirmation-pattern__actions">
|
||||
<button class="sg-interaction-element sg-button sg-button--active" type="button" data-vsf-dialog-close>Abbrechen</button>
|
||||
<button class="sg-interaction-element sg-button sg-button--active" type="button" data-overlay-dialog-close>Abbrechen</button>
|
||||
<button class="sg-interaction-element sg-button sg-button--process sg-button--process-inactive" type="button" disabled aria-disabled="true" data-vsf-delete-confirmation-submit>
|
||||
Löschen
|
||||
</button>
|
||||
@@ -402,7 +402,7 @@
|
||||
closeStageDialogs(stage);
|
||||
});
|
||||
|
||||
document.querySelectorAll('[data-vsf-open-dialog]').forEach((link) => {
|
||||
document.querySelectorAll('[data-overlay-open-dialog]').forEach((link) => {
|
||||
link.addEventListener('click', (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
@@ -412,8 +412,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const target = link.getAttribute('data-vsf-open-dialog');
|
||||
const dialog = stage.querySelector(`.sg-delete-confirmation-pattern__floating-card[data-vsf-dialog="${target}"]`);
|
||||
const target = link.getAttribute('data-overlay-open-dialog');
|
||||
const dialog = stage.querySelector(`.sg-delete-confirmation-pattern__floating-card[data-overlay-dialog="${target}"]`);
|
||||
|
||||
if (!dialog) {
|
||||
return;
|
||||
@@ -434,7 +434,7 @@
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('[data-vsf-dialog-close], [data-vsf-delete-confirmation-submit], [data-vsf-edit-save]').forEach((button) => {
|
||||
document.querySelectorAll('[data-overlay-dialog-close], [data-vsf-delete-confirmation-submit], [data-vsf-edit-save]').forEach((button) => {
|
||||
button.addEventListener('click', (event) => {
|
||||
event.preventDefault();
|
||||
const stage = button.closest('.sg-delete-confirmation-pattern__stage');
|
||||
|
||||
Reference in New Issue
Block a user