mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
81901: Make expandable section not a link
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
[@bgColor]="{
|
||||
value: ((expanded | async) ? 'endBackground' : 'startBackground'),
|
||||
params: {endColor: (sidebarActiveBg | async)}}">
|
||||
<a class="nav-item nav-link d-flex flex-row flex-nowrap"
|
||||
<div class="nav-item nav-link d-flex flex-row flex-nowrap"
|
||||
role="button" tabindex="0"
|
||||
[attr.aria-labelledby]="'sidebarName-' + section.id"
|
||||
[attr.aria-expanded]="expanded | async"
|
||||
[title]="('menu.section.icon.' + section.id) | translate"
|
||||
(click)="toggleSection($event)"
|
||||
(keyup.space)="$event.stopPropagation(); toggleSection($event)"
|
||||
href="javascript:void(0);"
|
||||
>
|
||||
<div class="shortcut-icon h-100">
|
||||
<i class="fas fa-{{section.icon}} fa-fw"></i>
|
||||
@@ -31,5 +31,5 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -10,6 +10,8 @@ import { Component } from '@angular/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { RouterStub } from '../../../shared/testing/router.stub';
|
||||
|
||||
describe('ExpandableAdminSidebarSectionComponent', () => {
|
||||
let component: ExpandableAdminSidebarSectionComponent;
|
||||
@@ -53,7 +55,7 @@ describe('ExpandableAdminSidebarSectionComponent', () => {
|
||||
describe('when the header text is clicked', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(menuService, 'toggleActiveSection');
|
||||
const sidebarToggler = fixture.debugElement.query(By.css('.sidebar-section > a'));
|
||||
const sidebarToggler = fixture.debugElement.query(By.css('.sidebar-section > div.nav-item'));
|
||||
sidebarToggler.triggerEventHandler('click', {
|
||||
preventDefault: () => {/**/
|
||||
}
|
||||
|
Reference in New Issue
Block a user