Skip to content

Commit

Permalink
Bug 33381: Fix sidemenu active and hover styling
Browse files Browse the repository at this point in the history
Change router link active class match rule. This makes it so that the route erm/agreements/1 will also match the router-link /erm/agreements instead of the previous exact match rule, thus adding the 'current' class
Update styling router-links to not apply 'current' styling when
.disabled

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 92e3793)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
  • Loading branch information
ammopt authored and Jacobomara901 committed Apr 16, 2023
1 parent cff59f1 commit cb7496a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ export default {
</script>

<style>
#navmenulist a.router-link-active {
font-weight: 700;
}
#menu ul ul,
#navmenulist ul ul {
padding-left: 2em;
Expand All @@ -241,13 +238,14 @@ textarea {
.flatpickr-input {
width: 30%;
}
#navmenulist ul li a.current.disabled {
background-color: inherit;
border-left: 5px solid #e6e6e6;
color: #000;
}
#navmenulist ul li a.disabled {
color: #666;
pointer-events: none;
font-weight: 700;
}
#navmenulist ul li a.disabled.router-link-active {
color: #000;
}
</style>
2 changes: 1 addition & 1 deletion koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { routes } from "../routes/erm";

const router = createRouter({
history: createWebHistory(),
linkExactActiveClass: "current",
linkActiveClass: "current",
routes,
});

Expand Down

0 comments on commit cb7496a

Please sign in to comment.