- Specialist Editor Change (all components in same overview), modal editors to allow for more complex configuration of Agents, Tasks and Tools
- Strengthening dynamic forms
This commit is contained in:
@@ -122,21 +122,41 @@ function validateTableSelection(formId) {
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Maak tabelrijen klikbaar (voor tabellen met radio-buttons)
|
||||
$(document).on('click', 'table tbody tr', function(e) {
|
||||
// Voorkom dat dit gedrag optreedt als er direct op de radio-button of een link wordt geklikt
|
||||
if (!$(e.target).is('input[type="radio"], a')) {
|
||||
// Vind de radio-button in deze rij
|
||||
const radio = $(this).find('input[type="radio"]');
|
||||
// Selecteer de radio-button
|
||||
radio.prop('checked', true);
|
||||
// Voeg visuele feedback toe voor de gebruiker
|
||||
$('table tbody tr').removeClass('table-active');
|
||||
$(this).addClass('table-active');
|
||||
}
|
||||
});
|
||||
});
|
||||
(function(){
|
||||
function initClickableRowsWithjQuery(){
|
||||
// Maak tabelrijen klikbaar (voor tabellen met radio-buttons)
|
||||
$(document).on('click', 'table tbody tr', function(e) {
|
||||
// Voorkom dat dit gedrag optreedt als er direct op de radio-button of een link wordt geklikt
|
||||
if (!$(e.target).is('input[type="radio"], a')) {
|
||||
// Vind de radio-button in deze rij
|
||||
const radio = $(this).find('input[type="radio"]');
|
||||
// Selecteer de radio-button
|
||||
radio.prop('checked', true);
|
||||
// Voeg visuele feedback toe voor de gebruiker
|
||||
$('table tbody tr').removeClass('table-active');
|
||||
$(this).addClass('table-active');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (window.$) {
|
||||
$(document).ready(initClickableRowsWithjQuery);
|
||||
} else {
|
||||
// Fallback zonder jQuery: beperkte ondersteuning
|
||||
document.addEventListener('click', function(e){
|
||||
const row = e.target.closest('table tbody tr');
|
||||
if (!row) return;
|
||||
// klik op radio/link niet overrulen
|
||||
if (e.target.closest('input[type="radio"], a')) return;
|
||||
const radio = row.querySelector('input[type="radio"]');
|
||||
if (radio) {
|
||||
radio.checked = true;
|
||||
// visuele feedback
|
||||
row.closest('tbody')?.querySelectorAll('tr').forEach(tr => tr.classList.remove('table-active'));
|
||||
row.classList.add('table-active');
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user