fix: immediately load ONLYOFFICE templates when page is already active after reload
This commit is contained in:
@@ -376,6 +376,12 @@ async function openOnlyofficeEditor(templateId, templateName) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const templatesPage = document.getElementById('page-templates');
|
||||
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(() => {
|
||||
if (templatesPage.classList.contains('active')) {
|
||||
checkOnlyofficeStatus();
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<!-- Modals -->
|
||||
<div class="modal-overlay" id="modal-overlay"></div>
|
||||
|
||||
<script src="/static/app.js?v=7"></script>
|
||||
<script src="/static/carbone.js?v=7"></script>
|
||||
<script src="/static/app.js?v=8"></script>
|
||||
<script src="/static/carbone.js?v=8"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user