Bouton Rédiger dans la fiche frise — lien direct vers l'éditeur

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Etienne Delvarre
2026-06-03 14:51:16 +02:00
parent 754bc47abd
commit 09c968b2a2
+11
View File
@@ -817,6 +817,7 @@ window.dispatchEvent(new Event('tiptap-loaded'));
<div class="modal-actions"> <div class="modal-actions">
<button class="btn-delete" id="btn-delete" onclick="deleteCard()" style="display:none;">Supprimer</button> <button class="btn-delete" id="btn-delete" onclick="deleteCard()" style="display:none;">Supprimer</button>
<button class="btn-history" id="btn-history-frise" onclick="openVersionPanel('frise', editingId)" style="display:none;">Historique</button> <button class="btn-history" id="btn-history-frise" onclick="openVersionPanel('frise', editingId)" style="display:none;">Historique</button>
<button class="btn-history" id="btn-rediger" onclick="goToRedaction(editingId)" style="display:none;">Rédiger</button>
<button class="btn-save" onclick="saveCard()">Enregistrer</button> <button class="btn-save" onclick="saveCard()">Enregistrer</button>
</div> </div>
</div> </div>
@@ -1315,6 +1316,7 @@ function openNew() {
document.querySelectorAll('#f-perso .ms-tag').forEach(t => t.classList.remove('selected')); document.querySelectorAll('#f-perso .ms-tag').forEach(t => t.classList.remove('selected'));
document.getElementById('btn-delete').style.display = 'none'; document.getElementById('btn-delete').style.display = 'none';
document.getElementById('btn-history-frise').style.display = 'none'; document.getElementById('btn-history-frise').style.display = 'none';
document.getElementById('btn-rediger').style.display = 'none';
document.getElementById('card-comments-section').style.display = 'none'; document.getElementById('card-comments-section').style.display = 'none';
document.getElementById('card-comment-list').innerHTML = ''; document.getElementById('card-comment-list').innerHTML = '';
document.getElementById('card-comment-input').value = ''; document.getElementById('card-comment-input').value = '';
@@ -1343,6 +1345,7 @@ function openEdit(id) {
document.getElementById('btn-delete').style.display = 'block'; document.getElementById('btn-delete').style.display = 'block';
document.getElementById('btn-history-frise').style.display = ''; document.getElementById('btn-history-frise').style.display = '';
document.getElementById('btn-rediger').style.display = '';
// Comments // Comments
const comments = parseComments(r.Commentaires); const comments = parseComments(r.Commentaires);
@@ -1401,6 +1404,14 @@ async function deleteCard() {
await loadData(); await loadData();
} }
function goToRedaction(id) {
const scene = records.find(r => r.Id === id);
if (!scene) return;
closeModal();
switchView('redaction');
setTimeout(() => openScene(scene), 300);
}
async function loadData() { async function loadData() {
const [recRes, colRes] = await Promise.all([ const [recRes, colRes] = await Promise.all([
fetch('/api/records'), fetch('/api/records'),