- Change TRAICIE_VACANCY_DEFINTION_SPECIALIST to TRAICIE_ROLE_DEFINITION_SPECIALIST
- Introduce new vanilla-jsoneditor iso older jsoneditor (for viewing a.o. ChatSessions) - Introduce use of npm to install required javascript libraries - update Material-kit-pro - Introduce new top bar to show session defaults, remove old navbar buttons - Correct Task & Tools editor
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{% extends "interaction/component.html" %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "interaction/component.html" %}
|
||||
@@ -93,42 +93,4 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// JSONEditor initialiseren wanneer een accordion item wordt geopend
|
||||
const accordionButtons = document.querySelectorAll('.accordion-button');
|
||||
|
||||
accordionButtons.forEach(function(button, index) {
|
||||
button.addEventListener('click', function() {
|
||||
// Voeg een kleine vertraging toe om te zorgen dat de accordion volledig is geopend
|
||||
setTimeout(function() {
|
||||
const isExpanded = button.getAttribute('aria-expanded') === 'true';
|
||||
|
||||
if (isExpanded) {
|
||||
// Als de json-viewer class niet wordt gebruikt, handmatige initialisatie
|
||||
const loopIndex = index + 1;
|
||||
|
||||
// Controleer of er elementen zijn die niet automatisch zijn geïnitialiseerd
|
||||
// Dit is een backup voor het geval de automatische initialisatie niet werkt
|
||||
const containers = document.querySelectorAll(`#collapse${loopIndex} .json-editor-container`);
|
||||
containers.forEach(function(container) {
|
||||
if (!container.classList.contains('jsoneditor-initialized')) {
|
||||
const dataElement = document.getElementById(`${container.id}-data`);
|
||||
if (dataElement) {
|
||||
try {
|
||||
const jsonData = JSON.parse(dataElement.value || dataElement.textContent);
|
||||
window.EveAI.JsonEditors.initializeReadOnly(container.id, jsonData);
|
||||
} catch (e) {
|
||||
console.error(`Error parsing JSON for ${container.id}:`, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user