MOBILE-3591 course: Fix linting

main
Pau Ferrer Ocaña 2020-12-07 16:20:24 +01:00
parent e4bb89d401
commit 9d87226ad8
5 changed files with 11 additions and 9 deletions

View File

@ -37,12 +37,14 @@ export class CoreContextMenuComponent implements OnInit, OnDestroy {
hideMenu = true; // It will be unhidden when items are added.
expanded = false;
uniqueId: string;
protected items: CoreContextMenuItemComponent[] = [];
protected itemsMovedToParent: CoreContextMenuItemComponent[] = [];
protected itemsChangedStream: Subject<void>; // Stream to update the hideMenu boolean when items change.
protected instanceId: string;
protected parentContextMenu?: CoreContextMenuComponent;
protected uniqueId: string;
constructor(
protected popoverCtrl: PopoverController,

View File

@ -9,7 +9,7 @@
</div>
</ng-container>
<ion-infinite-scroll [disabled]="!enabled || error || loadingMore" (ionInfinite)="loadMore($event)" [position]="position">
<ion-infinite-scroll [disabled]="!enabled || error || loadingMore" (ionInfinite)="loadMore()" [position]="position">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>

View File

@ -16,7 +16,7 @@
<img [src]="courseImageUrl" core-external-content alt=""/>
</div>
</div>
<div class="core-course-thumb-parallax-content">
<div class="core-course-thumb-parallax-content" *ngIf="course">
<ion-item class="ion-text-wrap" (click)="openCourse()" [title]="course.fullname" [attr.details]="!avoidOpenCourse && canAccessCourse">
<ion-icon name="fas-graduation-cap" fixed-width slot="start"></ion-icon>
<ion-label>
@ -43,7 +43,7 @@
<h2>{{ 'core.teachers' | translate }}</h2>
</ion-label>
</ion-item-divider>
<ion-item class="ion-text-wrap" *ngFor="let contact of course.contacts" core-user-link
<!-- @todo <ion-item class="ion-text-wrap" *ngFor="let contact of course.contacts" core-user-link
[userId]="contact.id"
[courseId]="isEnrolled ? course.id : null"
[attr.aria-label]="'core.viewprofile' | translate">
@ -55,7 +55,7 @@
<ion-label>
<h2>{{contact.fullname}}</h2>
</ion-label>
</ion-item>
</ion-item>-->
<ion-item-divider></ion-item-divider>
</ng-container>
@ -102,10 +102,10 @@
</ion-item>
<ion-item *ngIf="canAccessCourse && downloadCourseEnabled" (click)="prefetchCourse()" detail="false"
[attr.aria-label]="prefetchCourseData.statusTranslatable | translate">
<ion-icon *ngIf="!prefetchCourseData.status != statusDownloaded && !prefetchCourseData.loading"
<ion-icon *ngIf="(prefetchCourseData.status != statusDownloaded) && !prefetchCourseData.loading"
[name]="prefetchCourseData.icon" slot="start">
</ion-icon>
<ion-icon *ngIf="prefetchCourseData.status == statusDownloaded && !prefetchCourseData.loading"
<ion-icon *ngIf="(prefetchCourseData.status == statusDownloaded) && !prefetchCourseData.loading"
slot="start" [name]="prefetchCourseData.icon" color="success"
[attr.aria-label]="prefetchCourseData.statusTranslatable | translate" role="status">
</ion-icon>

View File

@ -64,6 +64,7 @@ export class CoreCoursesCoursePreviewPage implements OnInit, OnDestroy {
downloadCourseEnabled: boolean;
courseUrl = '';
courseImageUrl?: string;
isMobile: boolean;
protected isGuestEnabled = false;
protected guestInstanceId?: number;
@ -71,7 +72,6 @@ export class CoreCoursesCoursePreviewPage implements OnInit, OnDestroy {
protected waitStart = 0;
protected enrolUrl = '';
protected paypalReturnUrl = '';
protected isMobile: boolean;
protected pageDestroyed = false;
protected courseStatusObserver?: CoreEventObserver;

View File

@ -7,7 +7,7 @@
</ion-toolbar>
</ion-header>
<ion-content>
<core-search-box (onSubmit)="search($event)" (onClear)="clearSearch($event)"
<core-search-box (onSubmit)="search($event)" (onClear)="clearSearch()"
[placeholder]="'core.courses.search' | translate" [searchLabel]="'core.courses.search' | translate" autoFocus="true"
searchArea="CoreCoursesSearch"></core-search-box>