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,48 +146,47 @@
|
|||||||
<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">
|
||||||
<form class="sg-form-sections-card" action="#" method="post" aria-label="Neue Liste anlegen Formular">
|
<form class="sg-form-sections-card" action="#" method="post" aria-label="Neue Liste anlegen Formular">
|
||||||
<div class="sg-form-sections-card__body" data-pattern-part="form-body">
|
<div class="sg-form-sections-card__body" data-pattern-part="form-body">
|
||||||
<section class="sg-form-sections-card__chapter" aria-label="Neue Liste">
|
<section class="sg-form-sections-card__chapter" aria-label="Neue Liste">
|
||||||
<div class="sg-form-sections-card__field-group">
|
<div class="sg-form-sections-card__field-group">
|
||||||
<label class="sg-labeled-input-row">
|
<label class="sg-labeled-input-row">
|
||||||
<span class="sg-label">Name</span>
|
<span class="sg-label">Name</span>
|
||||||
<input
|
<input
|
||||||
class="sg-interaction-element sg-input-single-line sg-input-single-line--inactive-selectable sg-form-inactive-selectable"
|
class="sg-interaction-element sg-input-single-line sg-input-single-line--inactive-selectable sg-form-inactive-selectable"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Name eingeben"
|
placeholder="Name eingeben"
|
||||||
aria-label="Name"
|
aria-label="Name"
|
||||||
maxlength="80"
|
maxlength="80"
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="sg-labeled-input-row">
|
<label class="sg-labeled-input-row">
|
||||||
<span class="sg-label">Beschreibung</span>
|
<span class="sg-label">Beschreibung</span>
|
||||||
<textarea
|
<textarea
|
||||||
class="sg-input-multi-line sg-form-inactive-selectable"
|
class="sg-input-multi-line sg-form-inactive-selectable"
|
||||||
rows="4"
|
rows="4"
|
||||||
placeholder="Beschreibung eingeben"
|
placeholder="Beschreibung eingeben"
|
||||||
aria-label="Beschreibung"
|
aria-label="Beschreibung"
|
||||||
maxlength="350"
|
maxlength="350"
|
||||||
></textarea>
|
></textarea>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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">
|
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</section>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
|
||||||
|
<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">
|
||||||
|
<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>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
@@ -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