Skip to content

Commit

Permalink
General: Scroll up when clicking on a course in course management (ls…
Browse files Browse the repository at this point in the history
  • Loading branch information
edkaya authored Jun 7, 2024
1 parent 6ff38d2 commit 003875d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { HttpErrorResponse } from '@angular/common/http';
import { Subject, Subscription } from 'rxjs';
Expand Down Expand Up @@ -33,13 +33,14 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ProfileService } from 'app/shared/layouts/profiles/profile.service';
import { PROFILE_IRIS, PROFILE_LOCALCI, PROFILE_LTI } from 'app/app.constants';
import { CourseAccessStorageService } from 'app/course/course-access-storage.service';
import { scrollToTopOfPage } from 'app/shared/util/utils';

@Component({
selector: 'jhi-course-management-tab-bar',
templateUrl: './course-management-tab-bar.component.html',
styleUrls: ['./course-management-tab-bar.component.scss'],
})
export class CourseManagementTabBarComponent implements OnInit, OnDestroy {
export class CourseManagementTabBarComponent implements OnInit, OnDestroy, AfterViewInit {
readonly FeatureToggle = FeatureToggle;
readonly ButtonSize = ButtonSize;

Expand Down Expand Up @@ -119,6 +120,9 @@ export class CourseManagementTabBarComponent implements OnInit, OnDestroy {
this.courseAccessStorageService.onCourseAccessed(courseId);
}

ngAfterViewInit() {
scrollToTopOfPage();
}
/**
* Subscribe to changes in course.
*/
Expand Down

0 comments on commit 003875d

Please sign in to comment.