contentpanel - Aushangworkflow um docx Vorlage erweitern
This commit is contained in:
@@ -1,321 +1,275 @@
|
||||
/* Schwarzes Brett / Contentpanel */
|
||||
.sb-page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: calc(var(--header-height) + var(--header-title-height));
|
||||
width: 100%;
|
||||
min-height: calc(100vh - var(--header-height) - var(--header-title-height) - var(--footer-height));
|
||||
padding: var(--space-lg) var(--space-md) var(--space-3xl);
|
||||
background: linear-gradient(135deg, var(--gray-50) 0%, hsl(330, 60%, 95%) 100%);
|
||||
}
|
||||
|
||||
.sb-page > .content-tab-bar {
|
||||
margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-md)) 0;
|
||||
width: calc(100% + 2 * var(--space-md));
|
||||
}
|
||||
|
||||
.sb-tab-content {
|
||||
display: none;
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
margin: var(--space-lg) auto 0;
|
||||
animation: sbFadeIn 300ms ease;
|
||||
}
|
||||
|
||||
.sb-tab-content.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@keyframes sbFadeIn {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.sb-card {
|
||||
margin-bottom: var(--space-lg);
|
||||
padding: 24px 28px;
|
||||
background: #ffffff;
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
.sb-card-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 0 0 var(--space-md);
|
||||
color: var(--gray-800);
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sb-card-title svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex-shrink: 0;
|
||||
fill: var(--nak-raspberry);
|
||||
}
|
||||
|
||||
.sb-entry-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 360px;
|
||||
margin-bottom: var(--space-lg);
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--gray-200);
|
||||
}
|
||||
|
||||
.sb-entry {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--gray-100);
|
||||
}
|
||||
|
||||
.sb-entry:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sb-entry-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sb-entry-date {
|
||||
color: var(--nak-raspberry);
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sb-entry-title {
|
||||
margin-top: 2px;
|
||||
color: var(--gray-800);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sb-entry-subtitle,
|
||||
.sb-entry-meta {
|
||||
margin-top: 2px;
|
||||
color: var(--gray-500);
|
||||
font-size: var(--font-size-xs);
|
||||
}
|
||||
|
||||
.sb-entry-subtitle {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.sb-empty {
|
||||
padding: 16px;
|
||||
color: var(--gray-500);
|
||||
font-size: var(--font-size-sm);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sb-form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.sb-form-grid-single {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.sb-form-full {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.sb-field-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.sb-field-group-action {
|
||||
margin-top: var(--space-sm);
|
||||
}
|
||||
|
||||
.sb-label {
|
||||
color: var(--gray-700);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sb-required {
|
||||
color: var(--nak-red);
|
||||
}
|
||||
|
||||
.sb-optional {
|
||||
color: var(--gray-500);
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.sb-field {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid var(--gray-300);
|
||||
outline: none;
|
||||
background: var(--gray-50);
|
||||
font-family: var(--font-primary);
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: 300;
|
||||
transition: border-color 150ms ease, box-shadow 150ms ease;
|
||||
}
|
||||
|
||||
.sb-field:focus {
|
||||
border-color: var(--nak-raspberry);
|
||||
background: #ffffff;
|
||||
box-shadow: 0 0 0 3px rgba(215, 50, 130, 0.15);
|
||||
}
|
||||
|
||||
.sb-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
min-height: 40px;
|
||||
padding: 10px 20px;
|
||||
border: 1px solid var(--gray-300);
|
||||
background: #ffffff;
|
||||
color: var(--gray-700);
|
||||
cursor: pointer;
|
||||
font-family: var(--font-primary);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
|
||||
}
|
||||
|
||||
.sb-btn:hover {
|
||||
background: var(--gray-100);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.sb-btn-primary {
|
||||
border-color: var(--nak-raspberry);
|
||||
background: linear-gradient(135deg, var(--nak-raspberry), #b8296e);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.sb-btn-primary:hover {
|
||||
border-color: #b8296e;
|
||||
background: linear-gradient(135deg, #b8296e, #9c2260);
|
||||
}
|
||||
|
||||
.sb-btn-danger {
|
||||
min-height: 30px;
|
||||
padding: 6px 12px;
|
||||
border: 1px solid var(--gray-300);
|
||||
background: none;
|
||||
color: var(--nak-red);
|
||||
font-size: var(--font-size-xs);
|
||||
}
|
||||
|
||||
.sb-btn-danger:hover {
|
||||
border-color: var(--nak-red);
|
||||
background: hsl(0, 78%, 96%);
|
||||
}
|
||||
|
||||
.sb-alert {
|
||||
margin: var(--space-md) 0;
|
||||
padding: 10px 16px;
|
||||
border: 1px solid hsl(145, 50%, 85%);
|
||||
background: hsl(145, 50%, 93%);
|
||||
color: hsl(145, 50%, 28%);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sb-alert-error {
|
||||
border-color: hsl(0, 70%, 86%);
|
||||
background: hsl(0, 78%, 96%);
|
||||
color: hsl(0, 65%, 38%);
|
||||
}
|
||||
|
||||
.sb-aushang-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: var(--space-md);
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.sb-aushang-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--gray-200);
|
||||
background: var(--gray-50);
|
||||
transition: box-shadow 200ms ease, transform 200ms ease;
|
||||
}
|
||||
|
||||
.sb-aushang-card:hover {
|
||||
box-shadow: var(--shadow-md);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.sb-aushang-card img {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
object-fit: cover;
|
||||
border: 1px solid var(--gray-200);
|
||||
}
|
||||
|
||||
.sb-aushang-title {
|
||||
color: var(--gray-800);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sb-aushang-meta {
|
||||
color: var(--gray-500);
|
||||
font-size: var(--font-size-xs);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sb-aushang-delete-form {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sb-spinner {
|
||||
display: none;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin: 0 auto;
|
||||
border: 3px solid var(--gray-200);
|
||||
border-top-color: var(--nak-raspberry);
|
||||
border-radius: 50%;
|
||||
animation: sbSpin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
.sb-uploading .sb-upload-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sb-uploading .sb-spinner {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@keyframes sbSpin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sb-page { padding: var(--space-md) var(--space-sm); }
|
||||
.sb-card { padding: 16px; }
|
||||
.sb-form-grid { grid-template-columns: 1fr; }
|
||||
.sb-aushang-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
|
||||
}
|
||||
/* Schwarzes Brett / Contentpanel */
|
||||
.sb-page, .sb-entry-list, .sb-field-group, .sb-aushang-card { display: flex; flex-direction: column; }
|
||||
|
||||
.sb-page, .sb-aushang-card { align-items: center; }
|
||||
|
||||
.sb-card-title, .sb-entry { display: flex; align-items: center; }
|
||||
|
||||
.sb-card-title, .sb-entry-title, .sb-aushang-title { color: var(--gray-800); font-weight: 600; }
|
||||
|
||||
.sb-entry-title, .sb-aushang-title, .sb-empty, .sb-label, .sb-btn, .sb-alert { font-size: var(--font-size-sm); }
|
||||
|
||||
.sb-entry-subtitle, .sb-entry-meta, .sb-aushang-meta { color: var(--gray-500); font-size: var(--font-size-xs); }
|
||||
|
||||
.sb-field, .sb-btn { font-family: var(--font-primary); }
|
||||
|
||||
.sb-aushang-title, .sb-aushang-meta, .sb-aushang-delete-form { text-align: center; }
|
||||
|
||||
.sb-page {
|
||||
position: relative;
|
||||
margin-top: calc(var(--header-height) + var(--header-title-height));
|
||||
width: 100%;
|
||||
min-height: calc(100vh - var(--header-height) - var(--header-title-height) - var(--footer-height));
|
||||
padding: var(--space-lg) var(--space-md) var(--space-3xl);
|
||||
background: linear-gradient(135deg, var(--gray-50) 0%, hsl(330, 60%, 95%) 100%);
|
||||
}
|
||||
|
||||
.sb-page > .content-tab-bar { margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-md)) 0; width: calc(100% + 2 * var(--space-md)); }
|
||||
|
||||
.sb-tab-content {
|
||||
display: none;
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
margin: var(--space-lg) auto 0;
|
||||
animation: sbFadeIn 300ms ease;
|
||||
}
|
||||
|
||||
.sb-tab-content.active { display: block; }
|
||||
|
||||
@keyframes sbFadeIn {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.sb-card {
|
||||
margin-bottom: var(--space-lg);
|
||||
padding: 24px 28px;
|
||||
background: #ffffff;
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
.sb-card-title {
|
||||
gap: 8px;
|
||||
margin: 0 0 var(--space-md);
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sb-card-title svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex-shrink: 0;
|
||||
fill: var(--nak-raspberry);
|
||||
}
|
||||
|
||||
.sb-entry-list {
|
||||
max-height: 360px;
|
||||
margin-bottom: var(--space-lg);
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--gray-200);
|
||||
}
|
||||
|
||||
.sb-entry {
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--gray-100);
|
||||
}
|
||||
|
||||
.sb-entry:last-child { border-bottom: none; }
|
||||
|
||||
.sb-entry-info { flex: 1; min-width: 0; }
|
||||
|
||||
.sb-entry-date {
|
||||
color: var(--nak-raspberry);
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sb-entry-title { margin-top: 2px; }
|
||||
|
||||
.sb-entry-subtitle, .sb-entry-meta { margin-top: 2px; }
|
||||
|
||||
.sb-entry-subtitle { font-style: italic; }
|
||||
|
||||
.sb-empty {
|
||||
padding: 16px;
|
||||
color: var(--gray-500);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sb-form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.sb-form-grid-single { grid-template-columns: 1fr; }
|
||||
|
||||
.sb-form-full { grid-column: 1 / -1; }
|
||||
|
||||
.sb-field-group { gap: 4px; }
|
||||
|
||||
.sb-field-group-action { margin-top: var(--space-sm); }
|
||||
|
||||
.sb-label { color: var(--gray-700); font-weight: 500; }
|
||||
|
||||
.sb-required { color: var(--nak-red); }
|
||||
|
||||
.sb-optional { color: var(--gray-500); font-weight: 300; }
|
||||
|
||||
.sb-field {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid var(--gray-300);
|
||||
outline: none;
|
||||
background: var(--gray-50);
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: 300;
|
||||
transition: border-color 150ms ease, box-shadow 150ms ease;
|
||||
}
|
||||
|
||||
.sb-field:focus {
|
||||
border-color: var(--nak-raspberry);
|
||||
background: #ffffff;
|
||||
box-shadow: 0 0 0 3px rgba(215, 50, 130, 0.15);
|
||||
}
|
||||
|
||||
.sb-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
min-height: 40px;
|
||||
padding: 10px 20px;
|
||||
border: 1px solid var(--gray-300);
|
||||
background: #ffffff;
|
||||
color: var(--gray-700);
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
|
||||
}
|
||||
|
||||
.sb-btn:hover {
|
||||
background: var(--gray-100);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.sb-btn-primary {
|
||||
border-color: var(--nak-raspberry);
|
||||
background: linear-gradient(135deg, var(--nak-raspberry), #b8296e);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.sb-btn-primary:hover { border-color: #b8296e; background: linear-gradient(135deg, #b8296e, #9c2260); }
|
||||
|
||||
.sb-btn-danger {
|
||||
min-height: 30px;
|
||||
padding: 6px 12px;
|
||||
border: 1px solid var(--gray-300);
|
||||
background: none;
|
||||
color: var(--nak-red);
|
||||
font-size: var(--font-size-xs);
|
||||
}
|
||||
|
||||
.sb-btn-danger:hover { border-color: var(--nak-red); background: hsl(0, 78%, 96%); }
|
||||
|
||||
.sb-alert {
|
||||
margin: var(--space-md) 0;
|
||||
padding: 10px 16px;
|
||||
border: 1px solid hsl(145, 50%, 85%);
|
||||
background: hsl(145, 50%, 93%);
|
||||
color: hsl(145, 50%, 28%);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sb-alert-error {
|
||||
border-color: hsl(0, 70%, 86%);
|
||||
background: hsl(0, 78%, 96%);
|
||||
color: hsl(0, 65%, 38%);
|
||||
}
|
||||
|
||||
.sb-aushang-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: var(--space-md);
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.sb-aushang-card {
|
||||
gap: 8px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--gray-200);
|
||||
background: var(--gray-50);
|
||||
transition: box-shadow 200ms ease, transform 200ms ease;
|
||||
}
|
||||
|
||||
.sb-aushang-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
|
||||
|
||||
.sb-aushang-card img {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
object-fit: contain;
|
||||
background: white;
|
||||
border: 1px solid var(--gray-200);
|
||||
}
|
||||
|
||||
.sb-aushang-delete-form { width: 100%; }
|
||||
|
||||
.sb-spinner {
|
||||
display: none;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin: 0 auto;
|
||||
border: 3px solid var(--gray-200);
|
||||
border-top-color: var(--nak-raspberry);
|
||||
border-radius: 50%;
|
||||
animation: sbSpin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
.sb-uploading .sb-upload-button { display: none; }
|
||||
|
||||
.sb-uploading .sb-spinner { display: block; }
|
||||
|
||||
|
||||
@keyframes sbSpin { to { transform: rotate(360deg); } }
|
||||
|
||||
.sb-format-options {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.sb-format-option {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--gray-200);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sb-format-option:has(input:checked) { border-color: var(--nak-raspberry); box-shadow: inset 0 0 0 1px var(--nak-raspberry); }
|
||||
|
||||
.sb-format-option input { margin-top: 3px; }
|
||||
|
||||
.sb-format-option span { display: grid; gap: 3px; }
|
||||
|
||||
.sb-format-option small { color: var(--gray-500); line-height: 1.35; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sb-page { padding: var(--space-md) var(--space-sm); }
|
||||
.sb-page > .content-tab-bar {
|
||||
margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-sm)) 0;
|
||||
width: calc(100% + 2 * var(--space-sm));
|
||||
}
|
||||
.sb-card { padding: 16px; }
|
||||
.sb-form-grid, .sb-format-options { grid-template-columns: 1fr; }
|
||||
.sb-aushang-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
|
||||
}
|
||||
|
||||
@@ -1,47 +1,23 @@
|
||||
(function () {
|
||||
function switchTab(tabName, updateHash) {
|
||||
const tab = document.querySelector('.content-tab-bar__item[data-tab="' + tabName + '"]');
|
||||
const content = document.getElementById('tab-' + tabName);
|
||||
if (!tab || !content) return;
|
||||
|
||||
document.querySelectorAll('.content-tab-bar__item').forEach(function (item) {
|
||||
item.classList.toggle('active', item === tab);
|
||||
});
|
||||
document.querySelectorAll('.sb-tab-content').forEach(function (item) {
|
||||
item.classList.toggle('active', item === content);
|
||||
});
|
||||
|
||||
if (updateHash) {
|
||||
history.replaceState(null, '', '#' + tabName);
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.querySelectorAll('.content-tab-bar__item[data-tab]').forEach(function (tab) {
|
||||
tab.addEventListener('click', function () {
|
||||
switchTab(tab.dataset.tab, true);
|
||||
});
|
||||
});
|
||||
|
||||
const hash = window.location.hash.slice(1);
|
||||
if (hash) {
|
||||
switchTab(hash, false);
|
||||
}
|
||||
|
||||
document.querySelectorAll('[data-confirm]').forEach(function (button) {
|
||||
button.addEventListener('click', function (event) {
|
||||
if (!window.confirm(button.dataset.confirm || 'Wirklich fortfahren?')) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('[data-upload-form]').forEach(function (form) {
|
||||
form.addEventListener('submit', function () {
|
||||
form.classList.add('sb-uploading');
|
||||
const button = form.querySelector('.sb-upload-button');
|
||||
if (button) button.disabled = true;
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const tabs = [...document.querySelectorAll('.content-tab-bar__item[data-tab]')];
|
||||
const panels = [...document.querySelectorAll('.sb-tab-content')];
|
||||
function showTab(name) {
|
||||
if (!tabs.some(tab => tab.dataset.tab === name)) return;
|
||||
tabs.forEach(tab => tab.classList.toggle('active', tab.dataset.tab === name));
|
||||
panels.forEach(panel => panel.classList.toggle('active', panel.id === 'tab-' + name));
|
||||
history.replaceState(null, '', '#' + name);
|
||||
}
|
||||
tabs.forEach(tab => tab.addEventListener('click', () => showTab(tab.dataset.tab)));
|
||||
showTab(location.hash.slice(1));
|
||||
document.querySelectorAll('[data-confirm]').forEach(button => {
|
||||
button.addEventListener('click', event => {
|
||||
if (!confirm(button.dataset.confirm)) event.preventDefault();
|
||||
});
|
||||
});
|
||||
document.querySelectorAll('[data-upload-form]').forEach(form => {
|
||||
form.addEventListener('submit', () => {
|
||||
form.classList.add('sb-uploading');
|
||||
form.querySelector('[type="submit"]').disabled = true;
|
||||
});
|
||||
});
|
||||
})();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user