From b0a78658cf9b058dfc1367566e1e310a44b74dd9 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Wed, 25 Sep 2024 13:35:41 +0200 Subject: [PATCH] also makes the menu points active which redirect to an url hash --- public/js/components/Cis/Menu/Entry.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/components/Cis/Menu/Entry.js b/public/js/components/Cis/Menu/Entry.js index 43049995f..6579dbd06 100755 --- a/public/js/components/Cis/Menu/Entry.js +++ b/public/js/components/Cis/Menu/Entry.js @@ -140,8 +140,11 @@ export default { this.collapse = new bootstrap.Collapse(this.$refs.children, { toggle: false }); } - this.url = window.location.href; - if (window.location.href == this.link) { + this.url = new URL(window.location.href); + if (this.url.hash && this.url.hash.slice(1) == this.entry.titel){ + this.$emit("activeEntry", this.entry.content_id); + } + else if (this.url.href == this.link) { this.$emit("activeEntry", this.entry.content_id); } },