Virtual Data Room for Legal Documents
Organize, manage, and export your sensitive legal documents.
Upload New Document
Manage Categories
Export Data Room Report
Generate a professional PDF summary of all documents currently in the data room. The report will be organized by category for easy reference.
No documents in this category.
'; } }); pdfContentArea.innerHTML = pdfHtml; html2canvas(pdfContentArea, { scale: 2 }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const imgProps= pdf.getImageProperties(imgData); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save('Virtual_Data_Room_Report.pdf'); pdfContentArea.innerHTML = ''; // Clean up }); }; // --- EVENT LISTENERS --- prevBtn.addEventListener('click', () => navigateTabs(-1)); nextBtn.addEventListener('click', () => navigateTabs(1)); uploadBtn.addEventListener('click', addDocument); addCategoryBtn.addEventListener('click', addCategory); downloadPdfBtn.addEventListener('click', downloadPDF); tabButtons.forEach(button => { button.addEventListener('click', () => showTab(parseInt(button.dataset.tab))); }); // Event delegation for dynamic remove buttons dataRoomView.addEventListener('click', (e) => { const removeBtn = e.target.closest('.remove-doc-btn'); if (removeBtn) { removeDocument(parseInt(removeBtn.dataset.docId)); } }); categoryManagerList.addEventListener('click', (e) => { const removeBtn = e.target.closest('.remove-cat-btn'); if (removeBtn) { removeCategory(removeBtn.dataset.categoryName); } }); // --- INITIALIZATION --- renderAll(); showTab(0); });