mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
fix(lvMenu optionen):fixes click event bugs with the lv menu and changes the styling for some lvmenu options
This commit is contained in:
+20
-1
@@ -154,11 +154,30 @@ html {
|
||||
color: var(--fhc-text);
|
||||
}
|
||||
|
||||
#cis-menu .menu-entry .submenu{
|
||||
background-color: var(--fhc-background-highlight);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#cis-menu .menu-entry:hover .submenu{
|
||||
background-color: var(--fhc-primary-highlight);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#cis-menu .menu-entry:hover .submenu:hover{
|
||||
color: var(--fhc-dark);
|
||||
}
|
||||
|
||||
#cis-menu [disabled="true"].menu-entry .submenu{
|
||||
opacity: 0.5;
|
||||
background-color: var(--fhc-secondary)
|
||||
}
|
||||
|
||||
[disabled="true"].menu-entry {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
background-color: var(--fhc-disabled) !important;
|
||||
color: black !important;
|
||||
color: var(--fhc-dark) !important;
|
||||
opacity: 0.75;
|
||||
-webkit-touch-callout: none;
|
||||
/* iOS Safari */
|
||||
|
||||
@@ -31,25 +31,6 @@ export default {
|
||||
c4_target: function (menuItem) {
|
||||
if (menuItem.c4_moodle_links?.length > 0) return null;
|
||||
return menuItem.c4_target ?? null;
|
||||
},
|
||||
selectMenu: function (menuItem, index = null) {
|
||||
|
||||
// early return if link is #
|
||||
if (index != null && menuItem.c4_linkList[index][1] == '#') return;
|
||||
|
||||
switch (menuItem.id) {
|
||||
case "core_menu_mailanstudierende": window.location.href = menuItem.c4_link; break;
|
||||
default:
|
||||
this.selectedMenu = { ...menuItem };
|
||||
this.$emit("update:isMenuSelected", true);
|
||||
}
|
||||
|
||||
if (this.selectedMenu && index != null && menuItem.c4_linkList[index][1] != '#') {
|
||||
this.selectedMenu.c4_link = menuItem.c4_linkList[index][1];
|
||||
this.selectedMenu.name += ' - ' + menuItem.c4_linkList[index][0];
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
c4_link(menuItem) {
|
||||
if (!menuItem) return null;
|
||||
@@ -73,8 +54,8 @@ export default {
|
||||
:disabled="c4_disabled(menuItem)" :data-bs-toggle="menuItem.c4_moodle_links?.length?'dropdown':null"
|
||||
class="menu-entry p-2 w-100 text-wrap border border-1 rounded-3 d-flex flex-column align-items-center justify-content-center text-center text-decoration-none link h-100">
|
||||
<img :src="menuItem.c4_icon" :alt="menuItem.name" />
|
||||
<p @click="selectMenu(menuItem)" class="w-100 mt-2">{{menuItem.name}}</p>
|
||||
<p v-for="([text,link],index) in menuItem.c4_linkList" @click.stop="selectMenu(menuItem,index)" class="mt-1 w-100" :index="index">{{text}}</p>
|
||||
<p class="w-100 mt-2 mb-0">{{menuItem.name}}</p>
|
||||
<a v-for="([text,link],index) in menuItem.c4_linkList" target="_blank" :href="link" class="my-1 w-100 submenu text-decoration-none" :index="index">{{text}}</p>
|
||||
</a>
|
||||
<ul v-if="menuItem.c4_moodle_links?.length" class="dropdown-menu p-0" :aria-labelledby="menuItem.name">
|
||||
<li v-for="item in menuItem.c4_moodle_links"><a class="dropdown-item border-bottom" :href="item.url">{{item.lehrform}}</a></li>
|
||||
|
||||
Reference in New Issue
Block a user