Add My Docs picker to deep-research, advocate, barnevernet, korrespond, citations
- PHP: Add docPickerSection (button + chips + hidden input) to all 5 tool pages - JS: Send doc_ids in payload for deep-research, advocate, barnevernet, korrespond - Backend: Inject selected corpus doc content into paste_text/narrative/notes via dbnToolsInjectDocContent - Citations: Add upload zone (file → api/extract.php → textarea) + paste textarea with live Norwegian legal reference extraction (regex) + ref chips → title search; doc picker populates titleInput via MutationObserver Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -139,6 +139,15 @@ require_once __DIR__ . '/includes/layout.php';
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<div id="docPickerSection" class="doc-picker-section">
|
||||
<button type="button" id="docPickerBtn" class="doc-picker-btn" aria-haspopup="dialog">
|
||||
<svg class="doc-picker-btn__icon" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><rect x="2" y="1" width="9" height="12" rx="1.5" stroke="currentColor" stroke-width="1.4"/><path d="M5 5h5M5 8h3" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/><rect x="7" y="9" width="6" height="5" rx="1" fill="white" stroke="currentColor" stroke-width="1.3"/><path d="M9 11h2M9 12.5h1" stroke="currentColor" stroke-width="1" stroke-linecap="round"/></svg>
|
||||
<span><?= htmlspecialchars(dbnToolsT('doc_picker_btn', $uiLang)) ?></span>
|
||||
</button>
|
||||
<div id="docPickerChips" class="doc-picker-chips" aria-label="Selected documents"></div>
|
||||
<input type="hidden" id="docPickerIds" name="doc_ids" value="">
|
||||
</div>
|
||||
|
||||
<!-- File upload (required) -->
|
||||
<div class="upload-zone" id="bvjUploadZone" role="region" aria-label="File upload">
|
||||
<input type="file" id="bvjUploadInput" multiple accept=".pdf,.docx,.txt" aria-label="Choose BVJ document files">
|
||||
|
||||
Reference in New Issue
Block a user