forked from EVOgeek/Vmeda.Online
commit
0ec36b43d2
|
@ -72,7 +72,7 @@
|
||||||
<p>{{ 'addon.calendar.type' + event.formattedType | translate }}</p>
|
<p>{{ 'addon.calendar.type' + event.formattedType | translate }}</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item class="ion-text-wrap" *ngIf="courseName" [href]="courseUrl" core-link capture="true">
|
<ion-item class="ion-text-wrap" *ngIf="courseName" [href]="courseUrl" core-link capture="true" detail="true">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<p class="item-heading">{{ 'core.course' | translate}}</p>
|
<p class="item-heading">{{ 'core.course' | translate}}</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -50,7 +50,8 @@
|
||||||
<core-format-text clean="true" [text]="criteria.details.requirement" [filter]="false"></core-format-text>
|
<core-format-text clean="true" [text]="criteria.details.requirement" [filter]="false"></core-format-text>
|
||||||
</p>
|
</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<strong slot="end">{{ criteria.status }}</strong>
|
<strong slot="end" *ngIf="criteria.complete">{{ 'core.yes' | translate }}</strong>
|
||||||
|
<strong slot="end" *ngIf="!criteria.complete">{{ 'core.no' | translate }}</strong>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item class="ion-hide-md-down ion-text-wrap">
|
<ion-item class="ion-hide-md-down ion-text-wrap">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
|
@ -64,7 +65,7 @@
|
||||||
</ion-row>
|
</ion-row>
|
||||||
<ion-row *ngFor="let criteria of completion.completions">
|
<ion-row *ngFor="let criteria of completion.completions">
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<core-format-text clean="true" [text]="criteria.title" [filter]="false"></core-format-text>
|
<core-format-text clean="true" [text]="criteria.details.type" [filter]="false"></core-format-text>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<core-format-text clean="true" [text]="criteria.details.criteria" [filter]="false"></core-format-text>
|
<core-format-text clean="true" [text]="criteria.details.criteria" [filter]="false"></core-format-text>
|
||||||
|
@ -75,7 +76,8 @@
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<core-format-text [text]="criteria.details.status" [filter]="false"></core-format-text>
|
<core-format-text [text]="criteria.details.status" [filter]="false"></core-format-text>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col>{{ criteria.status }}</ion-col>
|
<ion-col *ngIf="criteria.complete">{{ 'core.yes' | translate }}</ion-col>
|
||||||
|
<ion-col *ngIf="!criteria.complete">{{ 'core.no' | translate }}</ion-col>
|
||||||
<ion-col *ngIf="criteria.timecompleted">
|
<ion-col *ngIf="criteria.timecompleted">
|
||||||
{{ criteria.timecompleted * 1000 | coreFormatDate :'strftimedatetimeshort' }}
|
{{ criteria.timecompleted * 1000 | coreFormatDate :'strftimedatetimeshort' }}
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
|
|
@ -357,6 +357,10 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon
|
||||||
* @returns Promise resolved when done.
|
* @returns Promise resolved when done.
|
||||||
*/
|
*/
|
||||||
protected async showLoadingAndRefresh(sync = false, invalidateData = true): Promise<void> {
|
protected async showLoadingAndRefresh(sync = false, invalidateData = true): Promise<void> {
|
||||||
|
// Try to keep current scroll position.
|
||||||
|
const scrollElement = await CoreUtils.ignoreErrors(this.content?.getScrollElement());
|
||||||
|
const scrollTop = scrollElement?.scrollTop ?? -1;
|
||||||
|
|
||||||
this.updatingData = true;
|
this.updatingData = true;
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
|
|
||||||
|
@ -371,6 +375,11 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon
|
||||||
} finally {
|
} finally {
|
||||||
this.updatingData = false;
|
this.updatingData = false;
|
||||||
this.changeDetectorRef.detectChanges();
|
this.changeDetectorRef.detectChanges();
|
||||||
|
|
||||||
|
if (scrollTop > 0) {
|
||||||
|
await CoreUtils.nextTick();
|
||||||
|
this.content?.scrollToPoint(0, scrollTop, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue