From 2a7f4401cb87e479765df527a887fdbeb905c572 Mon Sep 17 00:00:00 2001
From: Thomas Hackl <hackl@data-quest.de>
Date: Mon, 29 Apr 2024 11:23:44 +0000
Subject: [PATCH] =?UTF-8?q?Resolve=20"Veranstaltungshierarchie:=20Aktionen?=
 =?UTF-8?q?=20in=20der=20Contentbar=20funktionieren=20nach=20Schlie=C3=9Fe?=
 =?UTF-8?q?n=20des=20Dialogs=20nicht=20mehr"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #3490

Merge request studip/studip!2928
---
 .../javascripts/bootstrap/responsive-navigation.js   |  2 +-
 resources/assets/javascripts/bootstrap/treeview.js   |  3 ++-
 .../components/responsive/ResponsiveNavigation.vue   | 12 ------------
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/resources/assets/javascripts/bootstrap/responsive-navigation.js b/resources/assets/javascripts/bootstrap/responsive-navigation.js
index aa811078ea7..ad39d2be092 100644
--- a/resources/assets/javascripts/bootstrap/responsive-navigation.js
+++ b/resources/assets/javascripts/bootstrap/responsive-navigation.js
@@ -1,6 +1,6 @@
 import ResponsiveNavigation from '../../../vue/components/responsive/ResponsiveNavigation.vue';
 
-STUDIP.ready(() => {
+STUDIP.domReady(() => {
     STUDIP.Vue.load().then(({ createApp }) => {
         createApp({
             el: '#responsive-menu',
diff --git a/resources/assets/javascripts/bootstrap/treeview.js b/resources/assets/javascripts/bootstrap/treeview.js
index 998a70e72ff..d132775a335 100644
--- a/resources/assets/javascripts/bootstrap/treeview.js
+++ b/resources/assets/javascripts/bootstrap/treeview.js
@@ -1,7 +1,8 @@
 import StudipTree from '../../../vue/components/tree/StudipTree.vue'
 
 STUDIP.ready(() => {
-    document.querySelectorAll('[data-studip-tree]').forEach(element => {
+    document.querySelectorAll('[data-studip-tree]:not(.vueified)').forEach(element => {
+        element.classList.add('vueified');
         STUDIP.Vue.load().then(({ createApp }) => {
             createApp({
                 el: element,
diff --git a/resources/vue/components/responsive/ResponsiveNavigation.vue b/resources/vue/components/responsive/ResponsiveNavigation.vue
index 87084a5ae2a..d9c391d7d24 100644
--- a/resources/vue/components/responsive/ResponsiveNavigation.vue
+++ b/resources/vue/components/responsive/ResponsiveNavigation.vue
@@ -563,18 +563,6 @@ export default {
             attributeFilter: ['class']
         });
 
-        // Check for closed dialog, re-mounting the Vue component.
-        this.dialogObserver = new MutationObserver(mutations => {
-            if (mutations[0].removedNodes.length > 0 &&
-                    mutations[0].removedNodes[0].classList.contains('ui-widget-overlay')) {
-                document.getElementById('responsive-menu').replaceChildren(this.$el);
-            }
-        });
-
-        this.dialogObserver.observe(document.body, {
-            childList: true
-        });
-
         this.globalOn('has-contentbar', value => {
             this.hasContentbar = value;
             if (value && this.isFullscreen) {
-- 
GitLab