Merge pull request #6938 from lasniscinote/gl_SCI_10008

(fix) Modal opened behind the item card [SCI-10008]
This commit is contained in:
Martin Artnik 2024-01-15 12:52:00 +01:00 committed by GitHub
commit bd1e2696c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -499,6 +499,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;
@ -531,6 +533,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>