Open add-to-list overlay directly
This commit is contained in:
@@ -83,16 +83,13 @@
|
|||||||
<header class="sg-card-segment sg-card-segment--header sg-card-segment--darkblue sg-object-card__header">
|
<header class="sg-card-segment sg-card-segment--header sg-card-segment--darkblue sg-object-card__header">
|
||||||
<div class="sg-strong">Alcon Inc.</div>
|
<div class="sg-strong">Alcon Inc.</div>
|
||||||
<div class="sg-sandwich-menu-wrap" data-open="false" data-align="right" data-component="sandwich-menu" data-component-size="small">
|
<div class="sg-sandwich-menu-wrap" data-open="false" data-align="right" data-component="sandwich-menu" data-component-size="small">
|
||||||
<button class="sg-interaction-element sg-sandwich-button sg-sandwich-button--small" type="button" aria-expanded="false" aria-label="Menü öffnen" data-component-part="sandwich-trigger">
|
<button class="sg-interaction-element sg-sandwich-button sg-sandwich-button--small" type="button" aria-expanded="false" aria-label="Zur Liste hinzufügen" data-component-part="sandwich-trigger" data-overlay-open-dialog="add-to-list">
|
||||||
<span class="sg-sandwich-button__icon" aria-hidden="true">
|
<span class="sg-sandwich-button__icon" aria-hidden="true">
|
||||||
<span class="sg-sandwich-button__line"></span>
|
<span class="sg-sandwich-button__line"></span>
|
||||||
<span class="sg-sandwich-button__line"></span>
|
<span class="sg-sandwich-button__line"></span>
|
||||||
<span class="sg-sandwich-button__line"></span>
|
<span class="sg-sandwich-button__line"></span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="sg-sandwich-menu-panel" aria-label="Ausgeklapptes Menü" data-component-part="sandwich-panel">
|
|
||||||
<a class="sg-sandwich-menu-link" href="#!" data-overlay-open-dialog="add-to-list">Zur Liste hinzufügen</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="sg-card-segment sg-card-segment--body sg-object-card__content">
|
<div class="sg-card-segment sg-card-segment--body sg-object-card__content">
|
||||||
@@ -106,10 +103,12 @@
|
|||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="sg-card sg-card--overlay-host sg-delete-confirmation-pattern__floating-card" aria-label="Zur Liste hinzufügen" role="dialog" aria-modal="true" aria-labelledby="add-to-list-title" data-overlay-dialog="add-to-list" hidden>
|
<article class="sg-card sg-card--overlay-host sg-object-card sg-object-card--variable-height sg-delete-confirmation-pattern__floating-card" aria-label="Zur Liste hinzufügen" role="dialog" aria-modal="true" aria-labelledby="add-to-list-title" data-overlay-dialog="add-to-list" hidden>
|
||||||
<div class="sg-card-segment sg-card-segment--body sg-delete-confirmation-pattern__body">
|
<header class="sg-card-segment sg-card-segment--header sg-card-segment--darkblue sg-object-card__header">
|
||||||
<p class="sg-body sg-delete-confirmation-pattern__text" id="add-to-list-title"><strong>Füge das Unternehmen einer Liste hinzu</strong></p>
|
<p class="sg-body sg-strong" id="add-to-list-title">Füge das Unternehmen einer Liste hinzu</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="sg-card-segment sg-card-segment--body sg-delete-confirmation-pattern__body">
|
||||||
<ul class="sg-delete-confirmation-pattern__list" aria-label="Listen">
|
<ul class="sg-delete-confirmation-pattern__list" aria-label="Listen">
|
||||||
<li class="sg-delete-confirmation-pattern__list-item">
|
<li class="sg-delete-confirmation-pattern__list-item">
|
||||||
<button class="sg-interaction-element sg-button sg-delete-confirmation-pattern__list-button" type="button" data-overlay-list-toggle data-overlay-list-id="1" aria-pressed="true">
|
<button class="sg-interaction-element sg-button sg-delete-confirmation-pattern__list-button" type="button" data-overlay-list-toggle data-overlay-list-id="1" aria-pressed="true">
|
||||||
@@ -147,8 +146,9 @@
|
|||||||
<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--active" type="button" data-overlay-dialog-close>Abbrechen</button>
|
||||||
<button class="sg-interaction-element sg-button sg-button--active" type="button" data-create-list-form-toggle aria-expanded="false">Neue Liste anlegen</button>
|
<button class="sg-interaction-element sg-button sg-button--active" type="button" data-create-list-form-toggle aria-expanded="false">Neue Liste anlegen</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="sg-card-segment sg-card-segment--body sg-delete-confirmation-pattern__create-list-segment" data-create-list-form hidden>
|
<div class="sg-card-segment sg-card-segment--body sg-delete-confirmation-pattern__body sg-delete-confirmation-pattern__create-list-segment" data-create-list-form hidden>
|
||||||
<p class="sg-body sg-delete-confirmation-pattern__text sg-delete-confirmation-pattern__create-list-title" data-create-list-title>Füge das Unternehmen einer neuen Liste hinzu</p>
|
<p class="sg-body sg-delete-confirmation-pattern__text sg-delete-confirmation-pattern__create-list-title" data-create-list-title>Füge das Unternehmen einer neuen Liste hinzu</p>
|
||||||
|
|
||||||
<div class="sg-form-sections-card-wrapper sg-delete-confirmation-pattern__create-list-form" aria-label="Formular mit Abschnitten">
|
<div class="sg-form-sections-card-wrapper sg-delete-confirmation-pattern__create-list-form" aria-label="Formular mit Abschnitten">
|
||||||
@@ -183,14 +183,12 @@
|
|||||||
|
|
||||||
<footer class="sg-form-sections-card__actions-segment" data-pattern-part="form-actions-segment">
|
<footer class="sg-form-sections-card__actions-segment" data-pattern-part="form-actions-segment">
|
||||||
<div class="sg-form-sections-card__actions" data-pattern-part="form-actions">
|
<div class="sg-form-sections-card__actions" data-pattern-part="form-actions">
|
||||||
<button class="sg-interaction-element sg-button sg-button--active sg-form-sections-card__action" type="button">Zuruecksetzen</button>
|
|
||||||
<button class="sg-interaction-element sg-button sg-button--process sg-button--process-inactive sg-form-sections-card__action" type="submit" disabled aria-disabled="true">Liste anlegen</button>
|
<button class="sg-interaction-element sg-button sg-button--process sg-button--process-inactive sg-form-sections-card__action" type="submit" disabled aria-disabled="true">Liste anlegen</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -355,6 +353,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (button.hasAttribute('data-overlay-open-dialog')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
button.addEventListener('click', (event) => {
|
button.addEventListener('click', (event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const nextState = wrap.dataset.open !== 'true';
|
const nextState = wrap.dataset.open !== 'true';
|
||||||
|
|||||||
Reference in New Issue
Block a user