We have a reasonable layout for the table-editor in the specialist. To be further refined.

This commit is contained in:
Josako
2025-05-30 05:05:13 +02:00
parent 25e169dbea
commit 73647e4795
7 changed files with 395 additions and 51 deletions

View File

@@ -13,11 +13,15 @@
<script>
document.addEventListener('DOMContentLoaded', function() {
// Initialize tooltips
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
});
// Initialize tooltips if bootstrap is available
if (typeof bootstrap !== 'undefined') {
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
});
} else {
console.warn('Bootstrap is not defined. Tooltips will not be initialized.');
}
// De JSON editor initialisatie is hierboven al samengevoegd.
// Deze dubbele DOMContentLoaded listener en .json-editor initialisatie kan verwijderd worden.
@@ -47,9 +51,12 @@ document.addEventListener('DOMContentLoaded', function() {
// Find and click the corresponding tab button
const tabButton = document.querySelector(`[data-bs-toggle="tab"][data-bs-target="#${tabId}"]`);
if (tabButton) {
if (tabButton && typeof bootstrap !== 'undefined') {
const tab = new bootstrap.Tab(tabButton);
tab.show();
} else if (tabButton) {
// Fallback if bootstrap is not available
tabButton.click();
}
// Scroll the invalid field into view and focus it