MOBILE-3814 course: Fix navigation buttons to not be fixed at bottom
parent
8dee7cbff6
commit
7d3a650ac4
|
@ -24,7 +24,7 @@
|
|||
|
||||
<core-infinite-loading [enabled]="canLoadMore" (action)="showMoreActivities($event)"></core-infinite-loading>
|
||||
</div>
|
||||
<div collapsible-footer appearOnBottom *ngIf="displayCourseIndex && (previousSection || nextSection)" slot="fixed">
|
||||
<div collapsible-footer appearOnBottom *ngIf="displayCourseIndex && hasPreviousOrNextSections" slot="fixed">
|
||||
<div class="core-course-section-nav-buttons safe-area-padding-horizontal list-item-limited-width">
|
||||
<ion-button *ngIf="previousSection" (click)="sectionChanged(previousSection)" expand="block"
|
||||
[attr.aria-label]="('core.previous' | translate) + ': ' + previousSection.name">
|
||||
|
|
|
@ -92,6 +92,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
|||
selectedSection?: CoreCourseSection;
|
||||
previousSection?: CoreCourseSection;
|
||||
nextSection?: CoreCourseSection;
|
||||
hasPreviousOrNextSections = false;
|
||||
allSectionsId: number = CoreCourseProvider.ALL_SECTIONS_ID;
|
||||
stealthModulesSectionId: number = CoreCourseProvider.STEALTH_MODULES_SECTION_ID;
|
||||
loaded = false;
|
||||
|
@ -488,6 +489,8 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
|||
this.showMoreActivities();
|
||||
}
|
||||
|
||||
this.hasPreviousOrNextSections = !!this.previousSection || !!this.nextSection;
|
||||
|
||||
// Scroll to module if needed. Give more priority to the input.
|
||||
const moduleIdToScroll = this.moduleId && previousValue === undefined ? this.moduleId : moduleId;
|
||||
if (moduleIdToScroll) {
|
||||
|
|
Loading…
Reference in New Issue