91 lines
3.1 KiB
Twig
91 lines
3.1 KiB
Twig
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Test Édition Inline</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
.editable-cell {
|
|
cursor: pointer;
|
|
background-color: #f8f9fa;
|
|
padding: 8px;
|
|
border: 1px solid #dee2e6;
|
|
}
|
|
.editable-cell:hover {
|
|
background-color: #e9ecef;
|
|
}
|
|
.editable-cell.editing {
|
|
background-color: #e3f2fd;
|
|
border: 2px solid #2196f3;
|
|
}
|
|
.inline-edit-input {
|
|
border: none;
|
|
background: transparent;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container mt-4">
|
|
<h1>Test d'Édition Inline</h1>
|
|
|
|
<div class="alert alert-info">
|
|
<strong>Instructions :</strong> Cliquez sur les cellules pour les modifier.
|
|
</div>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Nom</th>
|
|
<th>Prénom</th>
|
|
<th>Email</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="editable-cell" data-entity-type="Membre" data-entity-id="1" data-field="nom">
|
|
Jean
|
|
</td>
|
|
<td class="editable-cell" data-entity-type="Membre" data-entity-id="1" data-field="prenom">
|
|
Dupont
|
|
</td>
|
|
<td class="editable-cell" data-entity-type="Membre" data-entity-id="1" data-field="email">
|
|
jean.dupont@example.com
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="debug-info" class="mt-4">
|
|
<h3>Informations de Débogage</h3>
|
|
<div id="debug-content"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/js/test-inline.js"></script>
|
|
<script>
|
|
// Test de débogage
|
|
console.log('Page de test chargée');
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
console.log('DOM chargé');
|
|
|
|
if (window.inlineEditing) {
|
|
console.log('✅ InlineEditing initialisé');
|
|
document.getElementById('debug-content').innerHTML = '<div class="alert alert-success">✅ JavaScript chargé et initialisé</div>';
|
|
} else {
|
|
console.error('❌ InlineEditing non initialisé');
|
|
document.getElementById('debug-content').innerHTML = '<div class="alert alert-danger">❌ JavaScript non chargé</div>';
|
|
}
|
|
});
|
|
|
|
// Test des clics
|
|
document.addEventListener('click', function(e) {
|
|
if (e.target.classList.contains('editable-cell')) {
|
|
console.log('Clic sur cellule éditables:', e.target);
|
|
document.getElementById('debug-content').innerHTML += '<div class="alert alert-info">Clic détecté sur: ' + e.target.textContent + '</div>';
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|