(fix) Modal opened behind the item card [SCI-10008]

This commit is contained in:
Gregor Lasnibat 2024-01-12 10:22:53 +01:00
parent a38c2457a9
commit 7b1a31eaf3
2 changed files with 12 additions and 1 deletions

View file

@ -497,6 +497,8 @@ export default {
}
},
toggleShowHideSidebar(repositoryRowUrl, myModuleId = null, initialSectionId = null) {
// opening from a bootstrap modal - should close the modal upon itemcard open
this.handleOpeningFromBootstrapModal();
if (initialSectionId) {
this.initialSectionId = initialSectionId;
} else this.initialSectionId = null;
@ -529,6 +531,15 @@ export default {
this.loadRepositoryRow(repositoryRowUrl);
this.currentItemUrl = repositoryRowUrl;
},
handleOpeningFromBootstrapModal() {
const layout = document.querySelector('.sci--layout');
const openModals = layout.querySelectorAll('.modal');
openModals.forEach((modal) => {
if ($(modal).hasClass('in') && !$(modal).hasClass('full-screen')) {
$(modal).modal('hide');
}
});
},
loadRepositoryRow(repositoryRowUrl, scrollTop = 0) {
this.dataLoading = true
$.ajax({

View file

@ -1,7 +1,7 @@
<div
id="repositoryItemSidebar"
data-behaviour="vue"
class="fixed top-0 right-0 h-full z-[2040]"
class="fixed top-0 right-0 h-full z-[2039]"
>
<repository-item-sidebar />
</div>