feat: notes de bord et sauvegarde position calendrier

- bouton crayon sur la fenêtre calendrier (MJ) → dialogue de note
- date impériale + date réelle préremplies
- append au journal configuré (créé auto si inexistant)
- appendJournalNote : labels passés depuis l'ouverture (pas de re-lecture)
- échappement XSS via jQuery .text().html()
- onSave async + await + try/catch
- sauvegarde position calendrier (client scope, debounced 300ms)
- restore position au constructeur
- close() async avec await settings.set
- boutons note et config groupés dans .mgt2-cal-actions (flex row)
This commit is contained in:
2026-07-25 17:08:54 +02:00
parent 8882cf8ee2
commit 47442be3ef
7 changed files with 282 additions and 6 deletions
+84
View File
@@ -1193,6 +1193,14 @@ a.mgt2-world-link:hover {
flex: 1;
}
.mgt2-cal-actions {
display: flex;
flex-direction: row;
align-items: center;
gap: 2px;
flex: 0 0 auto;
}
.mgt2-cal-date {
color: #d8c79a;
font-size: 0.95em;
@@ -1352,3 +1360,79 @@ a.mgt2-world-link:hover {
.mgt2-cal-conv-label {
color: #8a7a5a;
}
/* Note button on calendar app */
.mgt2-cal-note-btn {
flex: 0 0 auto;
width: 22px;
height: 22px;
padding: 0;
border: none;
background: transparent;
color: #8a7a5a;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.85em;
border-radius: 3px;
transition: color 0.15s, background 0.15s;
}
.mgt2-cal-note-btn:hover {
color: #d9b24c;
background: rgba(201, 162, 39, 0.15);
}
/* Note dialog */
.mgt2-note-form {
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px;
background: #1a1a2e;
color: #d8c79a;
}
.mgt2-note-row {
display: flex;
flex-direction: column;
gap: 2px;
}
.mgt2-note-row label {
font-size: 0.8em;
color: #8a7a5a;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.mgt2-note-value {
font-size: 0.9em;
color: #d8c79a;
}
.mgt2-note-row textarea {
width: 100%;
padding: 6px;
border: 1px solid #3a3a4e;
border-radius: 3px;
background: #252540;
color: #d8c79a;
font-size: 0.85em;
font-family: inherit;
resize: vertical;
}
.mgt2-note-row textarea:focus {
outline: none;
border-color: #c9a227;
}
.mgt2-note-actions {
display: flex;
justify-content: flex-end;
margin-top: 4px;
}