mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Allow enter key to expand or contract menu based on current active status
This commit is contained in:
@@ -1,18 +1,20 @@
|
|||||||
<div class="nav-item dropdown expandable-navbar-section"
|
<ng-container *ngVar="(active | async) as isActive">
|
||||||
(keyup.enter)="activateSection($event)"
|
<div class="nav-item dropdown expandable-navbar-section"
|
||||||
(mouseenter)="activateSection($event)"
|
(keyup.enter)="isActive ? deactivateSection($event) : activateSection($event)"
|
||||||
(mouseleave)="deactivateSection($event)">
|
(mouseenter)="activateSection($event)"
|
||||||
<a href="#" class="nav-link dropdown-toggle" routerLinkActive="active"
|
(mouseleave)="deactivateSection($event)">
|
||||||
id="browseDropdown" (click)="toggleSection($event)"
|
<a href="#" class="nav-link dropdown-toggle" routerLinkActive="active"
|
||||||
data-toggle="dropdown">
|
id="browseDropdown" (click)="toggleSection($event)"
|
||||||
<ng-container
|
data-toggle="dropdown">
|
||||||
*ngComponentOutlet="(sectionMap$ | async).get(section.id).component; injector: (sectionMap$ | async).get(section.id).injector;"></ng-container>
|
|
||||||
</a>
|
|
||||||
<ul @slide *ngIf="(active | async)" (click)="deactivateSection($event)"
|
|
||||||
class="m-0 shadow-none border-top-0 dropdown-menu show">
|
|
||||||
<ng-container *ngFor="let subSection of (subSections$ | async)">
|
|
||||||
<ng-container
|
<ng-container
|
||||||
*ngComponentOutlet="(sectionMap$ | async).get(subSection.id).component; injector: (sectionMap$ | async).get(subSection.id).injector;"></ng-container>
|
*ngComponentOutlet="(sectionMap$ | async).get(section.id).component; injector: (sectionMap$ | async).get(section.id).injector;"></ng-container>
|
||||||
</ng-container>
|
</a>
|
||||||
</ul>
|
<ul @slide *ngIf="(active | async)" (click)="deactivateSection($event)"
|
||||||
</div>
|
class="m-0 shadow-none border-top-0 dropdown-menu show">
|
||||||
|
<ng-container *ngFor="let subSection of (subSections$ | async)">
|
||||||
|
<ng-container
|
||||||
|
*ngComponentOutlet="(sectionMap$ | async).get(subSection.id).component; injector: (sectionMap$ | async).get(subSection.id).injector;"></ng-container>
|
||||||
|
</ng-container>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
Reference in New Issue
Block a user