Merge pull request #1519 from dpalou/MOBILE-2532

MOBILE-2532 course: Allow accessing hidden courses
main
Juan Leyva 2018-09-20 14:28:31 +02:00 committed by GitHub
commit 4c14d44ac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -101,6 +101,11 @@ ion-app.app-root {
opacity: 0.71;
}
// Simulate item[disabled] but keeping pointer-events.
.item-disabled {
opacity: .4;
}
.item-radio-checked {
background-color: $gray-lighter;
}

View File

@ -1,4 +1,4 @@
<a ion-item text-wrap (click)="openCourse(course)" [attr.disabled]="course.visible == 0 ? true : null" [attr.detail-none]="course.visible == 0 ? true : null" [title]="course.displayname || course.fullname">
<a ion-item text-wrap (click)="openCourse(course)" [class.item-disabled]="course.visible == 0" [title]="course.displayname || course.fullname">
<core-icon name="fa-graduation-cap" fixed-width item-start></core-icon>
<h2><core-format-text [text]="course.displayname || course.fullname"></core-format-text></h2>
<div item-end>

View File

@ -2,7 +2,7 @@
<div (click)="openCourse(course)" class="core-course-thumb core-course-color-{{course.id % 10}}" [class.core-course-color-img]="course.imageThumb">
<img *ngIf="course.imageThumb" [src]="course.imageThumb" core-external-content alt=""/>
</div>
<ion-item tappable text-wrap detail-none (click)="openCourse(course)" [title]="course.displayname || course.fullname" class="core-course-link">
<ion-item tappable text-wrap detail-none (click)="openCourse(course)" [title]="course.displayname || course.fullname" class="core-course-link" [class.item-disabled]="course.visible == 0">
<h2><core-format-text [text]="course.displayname || course.fullname"></core-format-text></h2>
<div class="core-button-spinner" *ngIf="downloadCourseEnabled">
@ -14,7 +14,7 @@
<ion-spinner *ngIf="prefetchCourseData.prefetchCourseIcon == 'spinner'"></ion-spinner>
</div>
</ion-item>
<ion-item text-wrap *ngIf="course.summary && course.summary.length">
<ion-item text-wrap *ngIf="course.summary && course.summary.length" [class.item-disabled]="course.visible == 0">
<p>
<summary>
<core-format-text [text]="course.summary" [singleLine]="true" [clean]="true" [fullOnClick]="true"></core-format-text>