MOBILE-2532 course: Allow accessing hidden courses

main
dpalou 2018-09-14 10:38:03 +02:00
parent ab1c124713
commit cbc2f456eb
3 changed files with 8 additions and 3 deletions

View File

@ -101,6 +101,11 @@ ion-app.app-root {
opacity: 0.71; opacity: 0.71;
} }
// Simulate item[disabled] but keeping pointer-events.
.item-disabled {
opacity: .4;
}
.item-radio-checked { .item-radio-checked {
background-color: $gray-lighter; 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> <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> <h2><core-format-text [text]="course.displayname || course.fullname"></core-format-text></h2>
<div item-end> <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"> <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=""/> <img *ngIf="course.imageThumb" [src]="course.imageThumb" core-external-content alt=""/>
</div> </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> <h2><core-format-text [text]="course.displayname || course.fullname"></core-format-text></h2>
<div class="core-button-spinner" *ngIf="downloadCourseEnabled"> <div class="core-button-spinner" *ngIf="downloadCourseEnabled">
@ -14,7 +14,7 @@
<ion-spinner *ngIf="prefetchCourseData.prefetchCourseIcon == 'spinner'"></ion-spinner> <ion-spinner *ngIf="prefetchCourseData.prefetchCourseIcon == 'spinner'"></ion-spinner>
</div> </div>
</ion-item> </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> <p>
<summary> <summary>
<core-format-text [text]="course.summary" [singleLine]="true" [clean]="true" [fullOnClick]="true"></core-format-text> <core-format-text [text]="course.summary" [singleLine]="true" [clean]="true" [fullOnClick]="true"></core-format-text>