fix: immediately load ONLYOFFICE templates when page is already active after reload
This commit is contained in:
Binary file not shown.
@@ -6,6 +6,6 @@
|
|||||||
"originalName": "master_cv_template.docx",
|
"originalName": "master_cv_template.docx",
|
||||||
"path": "/root/workspace/cv-app/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx",
|
"path": "/root/workspace/cv-app/renderer/carbone-templates/433a0593-d3cf-414e-8763-ab5f87cbc75c.docx",
|
||||||
"uploadedAt": "2026-07-16T09:03:29.601Z",
|
"uploadedAt": "2026-07-16T09:03:29.601Z",
|
||||||
"updatedAt": "2026-07-16T12:03:58.509Z"
|
"updatedAt": "2026-07-16T12:06:39.375Z"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -376,6 +376,12 @@ async function openOnlyofficeEditor(templateId, templateName) {
|
|||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const templatesPage = document.getElementById('page-templates');
|
const templatesPage = document.getElementById('page-templates');
|
||||||
if (templatesPage) {
|
if (templatesPage) {
|
||||||
|
// Check on initial load (page may already be active from sessionStorage restore)
|
||||||
|
if (templatesPage.classList.contains('active')) {
|
||||||
|
checkOnlyofficeStatus();
|
||||||
|
loadOnlyofficeTemplates();
|
||||||
|
}
|
||||||
|
// Also watch for future tab switches
|
||||||
const observer = new MutationObserver(() => {
|
const observer = new MutationObserver(() => {
|
||||||
if (templatesPage.classList.contains('active')) {
|
if (templatesPage.classList.contains('active')) {
|
||||||
checkOnlyofficeStatus();
|
checkOnlyofficeStatus();
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<!-- Modals -->
|
<!-- Modals -->
|
||||||
<div class="modal-overlay" id="modal-overlay"></div>
|
<div class="modal-overlay" id="modal-overlay"></div>
|
||||||
|
|
||||||
<script src="/static/app.js?v=7"></script>
|
<script src="/static/app.js?v=8"></script>
|
||||||
<script src="/static/carbone.js?v=7"></script>
|
<script src="/static/carbone.js?v=8"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user