- Dialog/Optionen: mailFormat-Radio (.eml/PDF) + eigener Anhänge-Haken statt scope/optPdf; nie mehr eml UND pdf gleichzeitig. Migration storeEml/storePdf. - Feld-Zuordnung in den Einstellungen editierbar (MAIL_TOKENS/DEFAULT_FIELD_MAP in store.js); PREFILL -> TOKEN_FN + effectiveFieldMap/prefillFor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
117 lines
5.9 KiB
HTML
117 lines
5.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="de">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>DocuWare Ablage – Einstellungen</title>
|
||
<style>
|
||
body { font: 14px/1.5 system-ui, sans-serif; max-width: 560px; margin: 24px auto; padding: 0 16px; color: #1a1a1a; }
|
||
h1 { font-size: 20px; }
|
||
fieldset { border: 1px solid #ddd; border-radius: 8px; margin: 16px 0; padding: 12px 16px; }
|
||
legend { font-weight: 600; padding: 0 6px; }
|
||
label { display: block; margin: 10px 0 4px; font-weight: 500; }
|
||
input[type="text"], input[type="password"], input[type="url"] { width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }
|
||
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 0; }
|
||
.row { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
|
||
button { padding: 8px 16px; border: 0; border-radius: 6px; background: #2563eb; color: #fff; font-weight: 600; cursor: pointer; }
|
||
button.secondary { background: #e5e7eb; color: #111; }
|
||
#status { font-size: 13px; min-height: 18px; }
|
||
.ok { color: #15803d; } .err { color: #b91c1c; }
|
||
.hint { font-size: 12px; color: #666; margin-top: 2px; }
|
||
table.map { width: 100%; border-collapse: collapse; margin-top: 8px; }
|
||
table.map th { text-align: left; font-size: 12px; color: #666; font-weight: 600; padding: 2px 4px; }
|
||
table.map td { padding: 3px 4px; vertical-align: middle; }
|
||
table.map input, table.map select { width: 100%; padding: 5px 7px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; }
|
||
table.map td.del { width: 36px; }
|
||
table.map button { padding: 5px 9px; }
|
||
button.secondary { background: #e5e7eb; color: #111; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<h1>DocuWare Ablage – Einstellungen</h1>
|
||
|
||
<fieldset>
|
||
<legend>Verbindung</legend>
|
||
<label for="serverUrl">Server-URL</label>
|
||
<input type="url" id="serverUrl" placeholder="https://docuware.example.com" />
|
||
<div class="hint">Basis-URL ohne <code>/DocuWare/Platform</code>.</div>
|
||
|
||
<label for="organization">Organisation</label>
|
||
<input type="text" id="organization" />
|
||
|
||
<label for="username">Benutzername</label>
|
||
<input type="text" id="username" autocomplete="username" />
|
||
|
||
<label for="password">Passwort</label>
|
||
<input type="password" id="password" autocomplete="off" />
|
||
<div class="hint">Wird <strong>nicht gespeichert</strong> – nur zum Anmelden/Testen für
|
||
diese Sitzung. Im Ablage-Fenster wird es 1× pro Sitzung abgefragt.</div>
|
||
</fieldset>
|
||
|
||
<fieldset>
|
||
<legend>Standardwerte</legend>
|
||
<label for="defaultCabinet">Standard-Ziel (Archiv oder Briefkorb)</label>
|
||
<select id="defaultCabinet" style="width:100%;padding:7px;border:1px solid #ccc;border-radius:6px;">
|
||
<option value="">— keiner —</option>
|
||
</select>
|
||
<div class="hint">Liste wird nach erfolgreichem Verbindungstest gefüllt.</div>
|
||
|
||
<label>Standard-Format der E-Mail</label>
|
||
<div class="check"><input type="radio" name="mailFormat" id="fmtEml" value="eml" /> <label for="fmtEml" style="margin:0">Original (.eml)</label></div>
|
||
<div class="check"><input type="radio" name="mailFormat" id="fmtPdf" value="pdf" /> <label for="fmtPdf" style="margin:0">PDF</label></div>
|
||
<div class="hint">Die E-Mail wird immer in genau einem Format abgelegt (nicht beides). Im Ablage-Fenster umstellbar.</div>
|
||
|
||
<div class="check" style="margin-top:10px"><input type="checkbox" id="storeAttachments" /> <label for="storeAttachments" style="margin:0">Anhänge mit ablegen</label></div>
|
||
<div class="check"><input type="checkbox" id="tagOnSuccess" /> <label for="tagOnSuccess" style="margin:0">Mail nach Ablage als „DocuWare" markieren</label></div>
|
||
</fieldset>
|
||
|
||
<div class="row">
|
||
<button id="save">Speichern</button>
|
||
<button id="test" class="secondary">Verbindung testen</button>
|
||
<span id="status"></span>
|
||
</div>
|
||
|
||
<fieldset>
|
||
<legend>Feld-Zuordnung (Vorbefüllung)</legend>
|
||
<div class="hint">Legt fest, welches DocuWare-Indexfeld aus welchem Mail-Attribut vorbefüllt
|
||
wird. <strong>Feldname</strong> = DocuWare-Datenbankname (z. B. <code>EML_SUBJECT</code>).
|
||
Gilt für alle Aktenschränke. Leere/entfernte Zeilen befüllen nichts vor.</div>
|
||
<table class="map">
|
||
<thead><tr><th>DocuWare-Feldname</th><th>Mail-Attribut</th><th></th></tr></thead>
|
||
<tbody id="mapBody"></tbody>
|
||
</table>
|
||
<div class="row">
|
||
<button id="mapAdd" class="secondary" type="button">+ Zeile</button>
|
||
<button id="mapReset" class="secondary" type="button">Auf Standard zurücksetzen</button>
|
||
</div>
|
||
</fieldset>
|
||
|
||
<fieldset>
|
||
<legend>Einstellungen sichern</legend>
|
||
<div class="hint">Exportiert/importiert die Einstellungen (Server, Organisation,
|
||
Benutzer, Standardwerte) als Datei. <strong>Das Passwort ist nicht enthalten</strong>
|
||
und muss nach einer Neuinstallation einmal neu eingegeben werden.</div>
|
||
<div class="row">
|
||
<button id="exportBtn" class="secondary">Exportieren</button>
|
||
<button id="importBtn" class="secondary">Importieren</button>
|
||
<input type="file" id="importFile" accept="application/json,.json" style="display:none" />
|
||
</div>
|
||
</fieldset>
|
||
|
||
<fieldset>
|
||
<legend>Diagnose (für Entwicklung)</legend>
|
||
<div class="hint">Analysiert den Store-Dialog des oben gewählten Standard-Ziels und
|
||
zeigt die Rohstruktur (Felder, Auswahllisten, Defaults). Inhalt bitte kopieren und
|
||
an den Entwickler geben.</div>
|
||
<div class="row">
|
||
<button id="diagBtn" class="secondary">Store-Dialog analysieren</button>
|
||
</div>
|
||
<textarea id="diag" readonly style="width:100%;height:240px;margin-top:10px;font:12px/1.4 monospace;border:1px solid #ccc;border-radius:6px;padding:8px;display:none;"></textarea>
|
||
</fieldset>
|
||
|
||
<script src="../lib/store.js"></script>
|
||
<script src="../lib/auth.js"></script>
|
||
<script src="../lib/docuware.js"></script>
|
||
<script src="options.js"></script>
|
||
</body>
|
||
</html>
|