All checks were successful
Deploy bericht / deploy (push) Successful in 1s
- Jeder Thumb hat jetzt einen mini canvas, der das Bild oder die erste
PDF-Seite gerendert anzeigt (max 200px)
- Papier-Look: A4 aspect-ratio (1:1.414), weißer Hintergrund per Default
- 🌓-Button im Pages-Header schaltet zwischen paper-light und paper-dark
- Toolbar-Inputs (select/number/checkbox): heller Text auf dunklem
Hintergrund für Dark-Theme
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[deploy]
263 lines
8.1 KiB
CSS
263 lines
8.1 KiB
CSS
/* Bericht-Modul Stylesheet
|
|
* Nutzt Dolibarr CSS-Variablen, damit Light- und Dark-Theme automatisch passen.
|
|
*/
|
|
|
|
.bericht-overview-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
|
|
|
|
.bericht-editor { padding-top: 10px; }
|
|
.bericht-meta { margin-bottom: 12px; }
|
|
|
|
.bericht-layout {
|
|
display: grid;
|
|
/* minmax(0, 1fr) verhindert, dass die mittlere Spalte über die verfügbare
|
|
Breite hinaus wächst, wenn der Canvas-Inhalt zu breit wird */
|
|
grid-template-columns: 260px minmax(0, 1fr) 220px;
|
|
gap: 12px;
|
|
align-items: start;
|
|
}
|
|
|
|
.bericht-attachments,
|
|
.bericht-pages {
|
|
background: var(--colorbacktitle1, #f7f7f9);
|
|
color: var(--colortext, inherit);
|
|
border: 1px solid var(--colorboxbordertitle1, #e3e3e7);
|
|
border-radius: 6px;
|
|
padding: 10px;
|
|
max-height: 80vh;
|
|
overflow-y: auto;
|
|
}
|
|
.bericht-attachments h4,
|
|
.bericht-pages h4 {
|
|
margin: 0 0 8px 0;
|
|
font-size: 13px;
|
|
text-transform: uppercase;
|
|
color: var(--colortextlink, #555);
|
|
}
|
|
|
|
.bericht-att-group { margin-bottom: 10px; }
|
|
.bericht-att-group-title {
|
|
font-weight: 600;
|
|
font-size: 11px;
|
|
opacity: 0.7;
|
|
padding: 4px 0;
|
|
border-bottom: 1px solid var(--colorboxbordertitle1, #ddd);
|
|
}
|
|
.bericht-att-item {
|
|
display: flex; align-items: center; gap: 6px;
|
|
padding: 4px 2px; cursor: pointer; font-size: 12px;
|
|
color: var(--colortext, inherit);
|
|
}
|
|
.bericht-att-item:hover { background: var(--colorbackhmenu1, rgba(255,255,255,0.05)); }
|
|
.att-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.att-size { font-size: 10px; opacity: 0.6; }
|
|
.att-icon { font-size: 14px; }
|
|
|
|
.bericht-upload { margin-top: 10px; }
|
|
|
|
/* Mittlere Spalte: Editor-Canvas — bewusst dunkler Hintergrund (auch im Light-Mode),
|
|
* weil ein Canvas auf grauer Fläche besser sichtbar ist.
|
|
*/
|
|
.bericht-canvas-area {
|
|
background: var(--colorbackbody, #2a2a2e);
|
|
border: 1px solid var(--colorboxbordertitle1, transparent);
|
|
border-radius: 6px;
|
|
padding: 10px;
|
|
display: flex; flex-direction: column;
|
|
}
|
|
.bericht-toolbar {
|
|
display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
|
|
background: var(--colorbacktitle1, #fff);
|
|
color: var(--colortext, inherit);
|
|
padding: 6px;
|
|
border-radius: 4px;
|
|
margin-bottom: 8px;
|
|
border: 1px solid var(--colorboxbordertitle1, transparent);
|
|
}
|
|
.bericht-toolbar button,
|
|
.bericht-toolbar .tool-btn {
|
|
background: var(--butactionbg, transparent);
|
|
color: var(--colortext, inherit);
|
|
border: 1px solid var(--colorboxbordertitle1, #ccc);
|
|
border-radius: 4px;
|
|
padding: 4px 10px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
}
|
|
.bericht-toolbar .tool-btn.active {
|
|
background: var(--colorbackhmenu1, #5cb85c);
|
|
color: var(--colortextbackhmenu, #fff);
|
|
border-color: var(--colortextlink, #4cae4c);
|
|
}
|
|
.bericht-toolbar .sep {
|
|
width: 1px;
|
|
background: var(--colorboxbordertitle1, #ddd);
|
|
height: 24px;
|
|
margin: 0 6px;
|
|
}
|
|
.bericht-toolbar label {
|
|
display: flex; align-items: center; gap: 4px;
|
|
font-size: 12px;
|
|
color: var(--colortext, inherit);
|
|
}
|
|
.bericht-toolbar select,
|
|
.bericht-toolbar input[type="number"],
|
|
.bericht-toolbar input[type="text"] {
|
|
background: var(--colorbackbody, #2a2a30);
|
|
color: var(--colortext, #ddd);
|
|
border: 1px solid var(--colorboxbordertitle1, #555);
|
|
border-radius: 3px;
|
|
padding: 2px 4px;
|
|
font-size: 12px;
|
|
}
|
|
.bericht-toolbar select option {
|
|
background: var(--colorbackbody, #2a2a30);
|
|
color: var(--colortext, #ddd);
|
|
}
|
|
.bericht-toolbar #zoom-label { color: var(--colortext, inherit); }
|
|
.bericht-toolbar input[type="checkbox"] { accent-color: var(--colorbackhmenu1, #337ab7); }
|
|
|
|
.bericht-canvas-wrap {
|
|
position: relative;
|
|
background: var(--colorbackvmenu1, #444);
|
|
padding: 10px; border-radius: 4px;
|
|
display: flex; align-items: flex-start; justify-content: center;
|
|
}
|
|
/* WICHTIG: kein max-width auf #pdf-canvas, sonst weicht display- von buffer-size ab
|
|
und das Fabric-Overlay rutscht weg. Stattdessen rendert JS auf passende Größe. */
|
|
#pdf-canvas { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.4); display: block; }
|
|
#fabric-canvas.fabric-overlay { position: absolute !important; pointer-events: auto; }
|
|
|
|
.bericht-page-note { margin-top: 8px; }
|
|
.bericht-page-note label {
|
|
display: block;
|
|
color: var(--colortextbackhmenu, inherit);
|
|
font-size: 12px;
|
|
margin-bottom: 4px;
|
|
}
|
|
.bericht-page-note textarea {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
background: var(--inputbackgroundcolor, #fff);
|
|
color: var(--inputtextcolor, #000);
|
|
border: 1px solid var(--colorboxbordertitle1, #ccc);
|
|
}
|
|
|
|
.bericht-pages-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
|
|
.bericht-pages-header h4 { margin: 0; }
|
|
#btn-toggle-thumb-bg {
|
|
background: transparent;
|
|
border: 1px solid var(--colorboxbordertitle1, #555);
|
|
color: var(--colortext, inherit);
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
padding: 2px 6px;
|
|
}
|
|
|
|
.page-list { display: flex; flex-direction: column; gap: 8px; }
|
|
|
|
.page-thumb {
|
|
border: 2px solid var(--colorboxbordertitle1, #444);
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
position: relative;
|
|
transition: border-color 0.15s, box-shadow 0.15s;
|
|
overflow: hidden;
|
|
}
|
|
.page-thumb:hover { border-color: var(--colortextlink, #888); }
|
|
.page-thumb.active {
|
|
border-color: var(--colortextlink, #337ab7);
|
|
box-shadow: 0 0 0 2px rgba(51,122,183,0.4);
|
|
}
|
|
|
|
/* "Papier"-Look — heller Default, mit Papier-Schatten */
|
|
.page-list.paper-light .page-thumb-paper { background: #ffffff; }
|
|
.page-list.paper-dark .page-thumb-paper { background: #1e1e22; }
|
|
|
|
.page-thumb-paper {
|
|
width: 100%;
|
|
aspect-ratio: 1 / 1.414; /* DIN A4 Verhältnis (Hochformat) */
|
|
display: flex; align-items: center; justify-content: center;
|
|
box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
|
|
overflow: hidden;
|
|
}
|
|
.page-thumb-paper canvas.thumb-canvas {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
display: block;
|
|
}
|
|
|
|
.page-thumb-label {
|
|
text-align: center;
|
|
font-size: 11px;
|
|
padding: 3px 0;
|
|
background: var(--colorbacktitle1, #2a2a30);
|
|
color: var(--colortext, #ddd);
|
|
border-top: 1px solid var(--colorboxbordertitle1, #444);
|
|
}
|
|
|
|
.page-thumb-actions { position: absolute; top: 4px; right: 4px; }
|
|
.thumb-del {
|
|
background: rgba(0,0,0,0.6);
|
|
color: #fff;
|
|
border: 1px solid rgba(255,255,255,0.3);
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
padding: 2px 6px;
|
|
font-size: 12px;
|
|
}
|
|
.thumb-del:hover { background: rgba(217,83,79,0.9); }
|
|
|
|
.bericht-actions {
|
|
margin-top: 16px;
|
|
display: flex; gap: 8px; justify-content: flex-end;
|
|
}
|
|
.bericht-actions .butAction,
|
|
.bericht-actions .butActionConfirm,
|
|
.bericht-actions .butActionDelete {
|
|
background: var(--colorbacktitle1, #f5f5f5);
|
|
color: var(--colortext, #222);
|
|
border: 1px solid var(--colorboxbordertitle1, #ccc);
|
|
padding: 8px 16px;
|
|
border-radius: 4px;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
}
|
|
.bericht-actions .butActionConfirm {
|
|
background: var(--colorbackhmenu1, #337ab7);
|
|
color: var(--colortextbackhmenu, #fff);
|
|
border-color: var(--colorbackhmenu1, #2e6da4);
|
|
}
|
|
.bericht-actions .butActionDelete {
|
|
background: var(--colorbackerror, #d9534f);
|
|
color: #fff;
|
|
border-color: var(--colorbackerror, #d43f3a);
|
|
}
|
|
.bericht-actions .butAction:hover,
|
|
.bericht-actions .butActionConfirm:hover,
|
|
.bericht-actions .butActionDelete:hover {
|
|
filter: brightness(1.1);
|
|
}
|
|
|
|
.bericht-toast {
|
|
position: fixed; top: 20px; right: 20px;
|
|
background: #5cb85c; color: #fff; padding: 12px 20px;
|
|
border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,0.4);
|
|
z-index: 9999; animation: fadeIn 0.2s;
|
|
}
|
|
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; } }
|
|
|
|
.bericht-setup-section {
|
|
background: var(--colorbacktitle1, #fff);
|
|
color: var(--colortext, inherit);
|
|
border: 1px solid var(--colorboxbordertitle1, #e3e3e7);
|
|
border-radius: 6px;
|
|
padding: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.bericht-setup-section h3 { margin-top: 0; color: var(--colortextlink, inherit); }
|
|
|
|
@media (max-width: 1100px) {
|
|
.bericht-layout { grid-template-columns: 1fr; }
|
|
.bericht-attachments, .bericht-pages { max-height: 300px; }
|
|
}
|