adasd
This commit is contained in:
@@ -72,6 +72,17 @@
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const openModal = () => {
|
||||||
|
if (!consoleModal) return;
|
||||||
|
consoleModal.classList.add('is-open');
|
||||||
|
consoleModal.setAttribute('aria-hidden', 'false');
|
||||||
|
};
|
||||||
|
const closeModal = () => {
|
||||||
|
if (!consoleModal) return;
|
||||||
|
consoleModal.classList.remove('is-open');
|
||||||
|
consoleModal.setAttribute('aria-hidden', 'true');
|
||||||
|
};
|
||||||
|
|
||||||
const openTab = (label, url, persist = true) => {
|
const openTab = (label, url, persist = true) => {
|
||||||
const id = `tab-${++tabCount}`;
|
const id = `tab-${++tabCount}`;
|
||||||
const btn = document.createElement('button');
|
const btn = document.createElement('button');
|
||||||
@@ -105,6 +116,7 @@
|
|||||||
tabPanels.appendChild(panel);
|
tabPanels.appendChild(panel);
|
||||||
activateTab(id);
|
activateTab(id);
|
||||||
if (persist) saveTabs();
|
if (persist) saveTabs();
|
||||||
|
openModal();
|
||||||
|
|
||||||
const iframe = panel.querySelector('iframe');
|
const iframe = panel.querySelector('iframe');
|
||||||
const markActive = () => {
|
const markActive = () => {
|
||||||
@@ -208,17 +220,6 @@
|
|||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
const openModal = () => {
|
|
||||||
if (!consoleModal) return;
|
|
||||||
consoleModal.classList.add('is-open');
|
|
||||||
consoleModal.setAttribute('aria-hidden', 'false');
|
|
||||||
};
|
|
||||||
const closeModal = () => {
|
|
||||||
if (!consoleModal) return;
|
|
||||||
consoleModal.classList.remove('is-open');
|
|
||||||
consoleModal.setAttribute('aria-hidden', 'true');
|
|
||||||
};
|
|
||||||
|
|
||||||
if (consoleFab) {
|
if (consoleFab) {
|
||||||
consoleFab.addEventListener('click', openModal);
|
consoleFab.addEventListener('click', openModal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,34 +106,12 @@ $sidebarItems = $moduleSidebar['items'] ?? [];
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="layout-body <?= $sidebarEnabled ? 'has-sidebar' : 'no-sidebar' ?> <?= $sidebarDefault === 'open' ? 'sidebar-open' : 'sidebar-collapsed' ?>"
|
<div class="layout-body no-sidebar sidebar-collapsed"
|
||||||
data-sidebar-enabled="<?= $sidebarEnabled ? '1' : '0' ?>"
|
data-sidebar-enabled="0"
|
||||||
data-sidebar-collapsible="<?= $sidebarCollapsible ? '1' : '0' ?>"
|
data-sidebar-collapsible="0"
|
||||||
data-sidebar-default="<?= e($sidebarDefault) ?>">
|
data-sidebar-default="collapsed">
|
||||||
|
|
||||||
<?php if ($sidebarEnabled): ?>
|
|
||||||
<aside class="sidebar card">
|
|
||||||
<?php if ($sidebarCollapsible): ?>
|
|
||||||
<button class="sidebar-toggle" data-sidebar-toggle aria-label="Menü ein-/ausklappen">»»</button>
|
|
||||||
<?php endif; ?>
|
|
||||||
<div class="sidebar-items">
|
|
||||||
<?php foreach ($sidebarItems as $item): ?>
|
|
||||||
<?php
|
|
||||||
$itemHref = (string)($item['href'] ?? '');
|
|
||||||
if ($itemHref !== '' && str_starts_with($itemHref, '/modules/setup/')) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<a class="nav-link" href="<?= e($itemHref ?: '#') ?>"><?= e($item['label'] ?? 'Item') ?></a>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<main class="main-content">
|
<main class="main-content">
|
||||||
<?php if ($sidebarEnabled && $sidebarCollapsible): ?>
|
|
||||||
<button class="sidebar-fab" data-sidebar-toggle aria-label="Menü einblenden">»»</button>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<button class="console-fab" type="button" data-console-fab title="Konsole öffnen">
|
<button class="console-fab" type="button" data-console-fab title="Konsole öffnen">
|
||||||
<span>›</span>
|
<span>›</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user