aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2025-07-11 14:14:47 +0200
committerThomas Hackl <hackl@data-quest.de>2025-07-11 14:27:13 +0200
commitd91a364eba769215b1f8825458d3d944cc62ed1b (patch)
treefc43e5888c9274a62feb2dbbc3b315e3965aa89d /resources
parent2648404bec7a72990789b3acdf57818a8cdc7df6 (diff)
Resolve "Blubber: Im responsive Modus fehlen die rechte und auch die linke "Sidebar""
Closes #2347 Merge request studip/studip!4335
Diffstat (limited to 'resources')
-rw-r--r--resources/vue/components/SidebarWidget.vue1
-rw-r--r--resources/vue/components/responsive/ResponsiveNavigation.vue6
2 files changed, 7 insertions, 0 deletions
diff --git a/resources/vue/components/SidebarWidget.vue b/resources/vue/components/SidebarWidget.vue
index 88c2834..0d4bc92 100644
--- a/resources/vue/components/SidebarWidget.vue
+++ b/resources/vue/components/SidebarWidget.vue
@@ -26,6 +26,7 @@ export default {
mounted() {
this.handleDebouncedScroll = _.debounce(this.handleScroll, 100);
this.$refs.scrollable.addEventListener('scroll', this.handleDebouncedScroll);
+ STUDIP.eventBus.emit('sidebar-widget-added', this.title)
},
beforeDestroy() {
this.$refs.scrollable.removeEventListener('scroll', this.handleDebouncedScroll);
diff --git a/resources/vue/components/responsive/ResponsiveNavigation.vue b/resources/vue/components/responsive/ResponsiveNavigation.vue
index d9c391d..af4ccbc 100644
--- a/resources/vue/components/responsive/ResponsiveNavigation.vue
+++ b/resources/vue/components/responsive/ResponsiveNavigation.vue
@@ -538,6 +538,11 @@ export default {
this.setCompactNavigation(value);
});
+ // Listen to sidebar widgets coming in from other components
+ this.globalOn('sidebar-widget-added', () => {
+ this.hasSidebar = true;
+ });
+
/*
* Use an observer for html and body in order to check
* whether we move into consuming mode or leave responsive mode.
@@ -593,6 +598,7 @@ export default {
STUDIP.eventBus.off('toggle-compact-navigation');
STUDIP.eventBus.off('has-contentbar');
STUDIP.eventBus.off('courseware-contentbar-mounted');
+ STUDIP.eventBus.off('sidebar-widget-added');
}
}
</script>