Änderungen von Dokument View File Macro
Zuletzt geändert von Daniel Herrmann am 2026/02/04 20:25
Von Version
2.1
bearbeitet von Daniel Herrmann
am 2025/06/23 19:49
am 2025/06/23 19:49
Änderungskommentar:
Install extension [com.xwiki.pro:xwiki-pro-macros-ui/1.27.0]
Auf Version
6.1
bearbeitet von Daniel Herrmann
am 2026/02/04 20:25
am 2026/02/04 20:25
Änderungskommentar:
Install extension [com.xwiki.pro:xwiki-pro-macros-ui/1.29.1]
Zusammenfassung
Details
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -17,7 +17,7 @@ 17 17 }); 18 18 19 19 function initUI(collabora) { 20 - const acceptedExtensions = '.ppt,.pptx,.odp,.doc,.docx,.odt,.xls,.xlsx,.ods,.pdf'; 20 + const acceptedExtensions = '.ppt,.pptx,.odp,.doc,.docx,.odt,.xls,.xlsx,.ods,.pdf,.csv,.tsv'; 21 21 const styleObserver = new MutationObserver(function(mutations) { 22 22 for (const mutation of mutations) { 23 23 if (mutation.target.style.display === 'none') { ... ... @@ -53,22 +53,24 @@ 53 53 } 54 54 }; 55 55 56 - const pageObserver = newMutationObserver(function(mutationsList, observer) {56 + const checkModalAttachment = function(mutationsList, observer) { 57 57 const selectElement = $('select[name="page"]'); 58 58 if (selectElement.length) { 59 59 const modal = selectElement.closest(".macro-editor-modal")[0]; 60 - if (modal.style.display !== 'none') { 60 + if (modal && modal.style.display !== 'none') { 61 61 observer.disconnect(); 62 62 styleObserver.observe(modal, { attributes: true, attributeFilter: ['style'] }); 63 63 $(selectElement).change(function() { 64 - initializeAttachments($(this)) 64 + initializeAttachments($(this)); 65 65 }); 66 - initializeAttachments(selectElement) 66 + initializeAttachments(selectElement); 67 67 } 68 68 } 69 - } );69 + }; 70 70 71 + const pageObserver = new MutationObserver(checkModalAttachment); 71 71 pageObserver.observe(document.body, { childList: true, subtree: true }); 73 + checkModalAttachment([], pageObserver); 72 72 73 73 const getFileExtension = function(fileName) { 74 74 return fileName.slice(fileName.lastIndexOf('.') + 1).toLowerCase();
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -50,7 +50,7 @@ 50 50 .viewFileThumbnailCard { 51 51 width: 10rem !important; 52 52 height: fit-content !important; 53 - min-height: 10rem !important;53 + min-height: 10rem; 54 54 } 55 55 56 56 span.viewFileThumbnailCard {