Fix loading of navigators [SCI-8797] (#5868)

This commit is contained in:
ajugo 2023-08-23 15:49:00 +02:00 committed by GitHub
parent 4f0909e298
commit 253be93368
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View file

@ -8,7 +8,7 @@ Vue.use(PerfectScrollbar);
Vue.prototype.i18n = window.I18n;
window.addEventListener('DOMContentLoaded', () => {
function addNavigationNavigatorContainer() {
let navigator = new Vue({
el: '#sciNavigationNavigatorContainer',
components: {
@ -55,4 +55,12 @@ window.addEventListener('DOMContentLoaded', () => {
});
window.navigatorContainer = navigator
});
}
if (document.readyState !== 'loading') {
addNavigationNavigatorContainer();
} else {
window.addEventListener('DOMContentLoaded', () => {
addNavigationNavigatorContainer();
});
}

View file

@ -8,11 +8,19 @@ Vue.use(PerfectScrollbar);
Vue.prototype.i18n = window.I18n;
window.addEventListener('DOMContentLoaded', () => {
function addNavigationTopMenuContainer() {
new Vue({
el: '#sciNavigationTopMenuContainer',
components: {
'top-menu-container': TopMenuContainer
}
});
});
}
if (document.readyState !== 'loading') {
addNavigationTopMenuContainer();
} else {
window.addEventListener('DOMContentLoaded', () => {
addNavigationTopMenuContainer();
});
}